We are trying to figure out how to add an appsetting into the root websites web.config from a helix feature project. Its my understanding that if you add a transform file e.g (web.config.transform) into the root of your feature project and build the project using the helix gulp script, the transform should update the root config. Is this correct? Unfortunately when we run the gulp script we get an error
[11:26:54] Starting '04-Apply-Xml-Transform'...
[11:26:55] Applying configuration transform: D:\Projects\xxxxxxx\src\Feature\Claims\code\xxxxx.Website.Feature.Claim\App_Config\Include\Web.config.transform
D:\Projects\xxxxxxx\scripts\applytransform.targets(14,5): error : Could not open Source file: Could not find a part of the path 'C:\inetpub\wwwroot\xxxxxxxxx\website\xxxxxxx.Website.Feature.Claim\App_Config\Include\Web.config'.
Process terminated with code 1.
[11:26:56] MSBuild failed with code 1!
[11:26:56] '04-Apply-Xml-Transform' errored after 1.59 s
error!
[11:26:56] Error: MSBuild failed with code 1!
at ChildProcess.<anonymous> (D:\Projects\xxxxxxxxxxxx\node_modules\gulp-msbuild\lib\msbuild-runner.js:66:25)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
It looks to me as like it is trying to update a local web.config.
Your web.config would not reside here C:\inetpub\wwwroot\xxxxxxxxx\website\xxxxxxx.Website.Feature.Claim\App_Config\Include\Web.config
It would reside here: C:\inetpub\wwwroot\xxxxxxxxx\website\Web.config
I have 2 local assemblies referenced via nuget (packed the dll's up) using vs2017 on a asp.net core solution, builds fine locally.
Now trying to generate a build via VSTS i am getting the following error,
Detected NuGet version 4.0.0.2283 / 4.0.0
SYSTEMVSSCONNECTION exists true
Saving NuGet.config to a temporary config file.
d:\a\_tool\NuGet\4.0.0\x64\nuget.exe restore d:\a\1\s\TestFrameworkCoreAPI.sln -Verbosity Detailed -NonInteractive -ConfigFile d:\a\1\Nuget\tempNuGet_37.config
NuGet Version: 4.0.0.2283
MSBuild auto-detection: using msbuild version '15.3.409.57025' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\msbuild.exe /t:GenerateRestoreGraphFile /nologo /nr:false /p:RestoreUseCustomAfterTargets=true /p:BuildProjectReferences=false /v:q /p:NuGetRestoreTargets="d:\a\_temp\NuGet-Scratch\w53qa5rr.4sd.targets" /p:RestoreTaskAssemblyFile="d:\a\_tool\NuGet\4.0.0\x64\nuget.exe" /p:RestoreGraphOutputPath="d:\a\_temp\NuGet-Scratch\4mlmlfgh.mmy.result" /p:ExcludeRestorePackageImports=true /p:RestoreRecursive=False /p:RestoreProjectFilterMode=exclusionlist /p:RestoreContinueOnError=WarnAndContinue /p:RestoreGraphProjectInput="d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj;" "d:\a\_temp\NuGet-Scratch\w53qa5rr.4sd.targets"
Running restore with 2 concurrent jobs.
Reading project file d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj.
Reading project file d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj.
Restoring packages for d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj...
Restoring packages for d:\a\1\s\TestFrameworkCoreAPI\TestFrameworkCoreAPI.csproj...
Restoring packages for .NETCoreApp,Version=v1.1...
Restoring packages for .NETCoreApp,Version=v2.0...
System.AggregateException: One or more errors occurred. ---> NuGet.Protocol.Core.Types.FatalProtocolException: Failed to retrieve information about 'Microsoft.VisualStudio.Web.CodeGeneration.Tools' from remote source 'D:\TestFrameworkAssemblies'.
at NuGet.Protocol.LocalV3FindPackageByIdResource.GetVersionsCore(String id, ILogger logger)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at NuGet.Protocol.LocalV3FindPackageByIdResource.GetAllVersionsAsync(String id, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
at NuGet.Commands.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Error: d:\a\_tool\NuGet\4.0.0\x64\nuget.exe failed with return code: 1
Packages failed to restore
I have a nuget.config file in a .nuget folder located in the root of solution,
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- remove any machine-wide sources with <clear/> -->
<clear />
<add key="Test Framework" value="D:\TestFrameworkAssemblies" />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
This is what is in the VSTS build def, NuGet restore step
It looks like it always references my local assembly and not the standard nuget.org, now in the config file, if i take out my local entry to framework assemblies, the nuget part works but i get a primary reference error as it cannot find the 2 assemblies i have packed locally.
Been going round in circles with this at the moment, how can you get VSTS to restore local packed assemblies as well as from nuget.org. I am using Hosted 2017 as well.
thanks in advance
It seems you were queue the build on Hosted agent. Since there has the packages located on your local machine, you should build with the private agent which located on your local machine.
Additional, if you need to queue the build on Hosted agent, you should add the local packages in repository, and then reference the packages with the new path and change the value in nuget.config.
I have server with Jenkins and QT project. The server runs on CentOS 7. I installed "Cppcheck" into server also I installed "Cppcheck Plug-in" plugin into Jenkins.
The script for build project:
cd FlashClipboard;
/usr/lib64/qt5/bin/qmake FlashClipboard.pro;
make clean;
make;
cppcheck --enable=all --suppress=missingIncludeSystem . --xml --xml-version=2 . 2> ./tmp/cppcheck.xml;
Post-Build Actions:
But I have error:
[Cppcheck] Starting the cppcheck analysis.
[Cppcheck] Processing 1 files with the pattern 'tmp/cppcheck.xml'.
[Cppcheck] Parsing throws exceptions. javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; systemId: file:/var/lib/jenkins/workspace/Flash%20Clipboard/tmp/cppcheck.xml; lineNumber: 1; columnNumber: 1; Premature end of file.]
Build step 'Publish Cppcheck results' changed build result to FAILURE
Build step 'Publish Cppcheck results' marked build as failure
What is my mistake?
sorry but are you sure the path is correct?
Shouldn't it be:
Cppcheck report XML: FlashClipboard/tmp/cppcheck.xml
I'm trying to configure my AKKA.NET runtime environment using a HOCON configuration block in a unittest context in .NET Core 1.0. Apparently the configuration is not picked up from the App.config file.
Can anybody explain how the HOCON configuration is picked up by AKKA.NET when running in a unittest context (xunit)?
Here are some more details if the above question does not give enough information:
I'm trying to avoid the well-known warnings.
NewtonSoftJsonSerializer has been detected as a default serializer. It will be obsoleted in Akka.NET starting from version 1.5 in the favor of Wire
I managed to get rid of this message from a Console application using AKKA.NET by the following section in App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka" />
</configSections>
<akka>
<hocon>
<![CDATA[
akka {
actor {
serializers {
wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
}
serialization-bindings {
"System.Object" = wire
}
}
}
]]>
</hocon>
</akka>
</configuration>
When I do the same in my unittest project it does not have the same effect.
I'm using xunit for unittesting. These are my dependencies:
"Akka": "1.1.1",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0",
"NSubstitute": "1.10.0",
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"Akka.TestKit": "1.1.1",
"Akka.TestKit.Xunit2": "1.1.1",
"Akka.Serialization.Wire": "1.1.1.28-beta"
It turned out to be a build issue. The App.config file was copied to the build folder (something like .\bin\Debug\net46\win7-x64) and this copy sometimes is stale, meaning it is not properly updated. Deleting the bin-folder before building solved the problem.
I am new to maven.
I have one project which I try to build with the maven3.
When I run the command mvn -X clean install I got the error.
[root#localhost]# mvn -X clean install
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: /usr/local/maven
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-279.9.1.el6.x86_64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/maven/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml
[DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Could not find metadata com.test.ctrl:ctrl-build:0.0.17-SNAPSHOT/maven-metadata.xml in local (/root/.m2/repository)
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.openstack:openstack-rhel-rpms:2012.1-SNAPSHOT: Could not find artifact com.test.ctrl:ctrl-build:pom:0.0.17-SNAPSHOT and 'parent.relativePath' points at wrong local POM # org.openstack:openstack-rhel-rpms:2012.1-SNAPSHOT, /root/test/devenv/openstack-rhel/pom.xml, line 8, column 13
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]
[ERROR] The project org.openstack:my-tar:2012.1-SNAPSHOT (/root/test/devenv/mytar/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.openstack:openstack-rhel-rpms:2012.1-SNAPSHOT: Could not find artifact com.test.ctrl:ctrl-build:pom:0.0.17-SNAPSHOT and 'parent.relativePath' points at wrong local POM # org.openstack:openstack-rhel-rpms:2012.1-SNAPSHOT, /root/test/devenv/openstack-rhel/pom.xml, line 8, column 13 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact com.test.ctrl:ctrl-build:pom:0.0.17-SNAPSHOT
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:159)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:410)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:379)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:343)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact com.test.ctrl:ctrl-build:pom:0.0.17-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155)
... 22 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact com.test.ctrl:ctrl-build:pom:0.0.17-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528)
... 26 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
I check the pom.xml but cant understand what was the problem.
Some lines from my pom.xml is as below.
1 <?xml version="1.0"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5
6 <parent>
7 <groupId>org.openstack</groupId>
8 <artifactId>openstack-rhel-rpms</artifactId>
9 <version>2012.1-SNAPSHOT</version>
10 <relativePath>../openstack-rhel</relativePath>
11 </parent>
12
13 <groupId>org.openstack</groupId>
14 <artifactId>my-tar</artifactId>
15 <version>2012.1-SNAPSHOT</version>
16 <packaging>pom</packaging>
17 <name>my tar</name>
18
I also check the solution on some question in stackoverflow like Non-resolvable parent POM: Could not find artifact but couldnt help to solve the problem.
If you need more information related to this question, let me know.
I faced the same issue. Setting relative path of the parent in module projects solved the issue.
Use <relativePath>../Parent Project Name/pom.xml</relativePath>
You need to have the file /root/test/devenv/openstack-rhel/pom.xml
This file need to have the followings elements:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openstack</groupId>
<artifactId>openstack-rhel-rpms</artifactId>
<version>2012.1-SNAPSHOT</version>
<packaging>pom</packaging>
</project>
I encountered an issue like this using the Maven Release Plugin. Resolving using relative paths (i.e. for the parent pom in the child module ../parent/pom.xml) did not seem to work in this scenario, it keeps looking for the released parent pom in the Nexus repository. Moving the parent pom to the parent folder of the module resolved this.
Make sure you have settings.xml. I had the same problem when I've deleted it by mistake.
In pom.xml file of the project,
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>X.X.X.RELEASE</version>
<relativePath> ../PROJECTNAME/pom.xml</relativePath>
</parent>
Pointing relativepath to the same MAVEN project POM file solved the issue for me.
In my case, the reason was a simple typo.
<parent>
<groupId>org.sringframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
</parent>
A missing character in the groupId org.s(p)ringframework lead to this error.
We had the same issue.
The parent pom file was available in our local repository, but maven still unsuccessfully tried to download it from the central repository, or from the relativePath (there were no files in the relative path).
Turns out, there was a file called "_remote.repositories" in the local repository, which was causing this behavior. After deleting all the files with this name from the complete local repository, we could build our modules.
Any way you mentioned /root/.m2/settings.xml.
But in my Case i missed the settings.xml to configure in the maven preferences.
so that maven will search for the relative_path pom.xml from the remote_repository which is configured in settings.xml
Give the relative path URL value to the pom.xml file
../parentfoldername/pom.xml
In my case I had to enter proxy configuration to maven settings file and run mvn verify from command line. Somehow eclipse was still givin the same timeout error when trying to download the dependency.