How can I fix it or where do I fix it?
It should point to:
C:\jboss\jboss-5.1.0.GA\server\default\lib
Console log
C:\PSC Updated\src>ant build-ejb
Buildfile: C:\PSC Updated\src\build.xml
clean:
build-core:
[mkdir] Created dir: C:\PSC Updated\src\build\classes
[javac] Compiling 159 source files to C:\PSC Updated\src\build\classes
BUILD FAILED
C:\PSC Updated\src\build.xml:110: C:\home\apps\jboss-5.1.0.GA\server\default\lib does not exist.
Worked: When I pointed to my {jboss.home}\server\default\lib
Try double slash for windows path on ant files.
C:\\jboss\\jboss-5.1.0.GA\\server\\default\\lib
Could you post your build.xml for more clarification.
Related
I'm trying to set up a Jenkins build project with ReadyRoll. Mostly it is working but I'm getting warnings that concern me:
MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\bin\Release\' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\Release\CoreServices_Package.sql' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
I have searched for information on this error and have found nothing helpful. When I check the build server after the build is completed, the folder and file it says do not exist do, indeed, exist. That implies to me there is some sort of order of operation error going on here but I don't know where or how that would be occurring.
Here is the section of the log where the warnings are generated:
OctoPack:
Using package version: 8.6.26
OctoPack: OctoPack version: 3.6.1.0
OctoPack: Written files: 10
OctoPack: Copy file: c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\Release\CoreServices.nuspec
OctoPack: Packaging a console or Window Service application (no Web.config detected)
OctoPack: Add binary files
OctoPack: Added file: CoreServices_Package.sql
OctoPack: Added file: CoreServices_DeployPackage.ps1
OctoPack: Added file: CoreServices_Snapshot.nupkg.bin
MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\bin\Release\' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
OctoPack: Added file: Deploy.ps1
OctoPack: Added file: DeployFailed.ps1
MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\Release\CoreServices_Package.sql' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
OctoPack: Added file: CoreServices.dll
OctoPack: Added file: CoreServices.pdb
OctoPack: NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
OctoPack: Attempting to build package from 'CoreServices.nuspec'.
OctoPack: Successfully created package 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\octopacked\IC_CoreServices.Database.8.6.26.nupkg'.
And here are the MSBuild parameters:
/t:Clean,Build /p:Version=8.6.26.0;Configuration=Release /p:GenerateSqlPackage=True /p:ShadowServer=[shadowdatabasename] /p:RunOctoPack=true /p:OctoPackPackageVersion=8.6.26 /p:OctoPackPublishPackageToHttp=http://[OctopusDeployServer]/nuget/packages /p:OctoPackPublishApiKey=[key]
Any ideas how to fix this?
Thank you.
Unfortunately this is a known issue with ReadyRoll's integration with OctoPack, however the warnings are extraneous and can be safely ignored.
To suppress the warnings, add the following to your MSBuild parameters:
/nowarn:OCTNOENT
I'll update this answer once the issue is resolved (1003).
A fix for this was released as part of ReadyRoll 1.16.18100; the OctoPack warnings should no longer be displayed during build.
Hello All,
while building Visual project project from jenkins am getting below error i have set msbuild plugin and set path in jenkins.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: The command " [C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\DrawingsFabricApi.csproj]
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: if not exist "C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\bin\x64\Debug\Libs" md "C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\bin\x64\Debug\Libs" [C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\DrawingsFabricApi.csproj]
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: xcopy /s /y "Undefinedpackages\Apache.Ignite.2.2.0\Libs*.*" "C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\bin\x64\Debug\Libs"" exited with code 4. [C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\DrawingsFabricApi.csproj]
Done Building Project "C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\DrawingsFabricApi.csproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\DrawingsFabricApi.csproj" (default target) (1) ->
(ResolveAssemblyReferences target) ->
According to the error log:
error MSB3073: xcopy /s /y "Undefinedpackages\Apache.Ignite.2.2.0\Libs*.*"
You can find $(SolutionDir) is Undefined.
That because you may build the a single project (NOT Solution) in jenkins. In this case, MSBuild running each project independently not the Solution, so MSBuild could not find the define for $(SolutionDir). It worked fine in Visual Studio, but not on the build server.
To resolve this issue, you can use $(ProjectDir)..\ instead of $(SolutionDir)
So the command line should be:
if not exist "$(TargetDir)Libs" md "$(TargetDir)Libs"
xcopy /s /y "$(ProjectDir)..\packages\Apache.Ignite.2.2.0\Libs\*.*" "$(TargetDir)Libs"
But, I found the command line in the error log is not same as in the title, so you may need to double check the command line.
Hope this helps.
When building our solution on the build server (using Jenkins) with MSBuild 14 following warning occurs:
C:\Program Files
(x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.CurrentVersion.targets(133,9):
warning MSB3884: ruleset file "ManagedMinimumRules.ruleset" could not
be found.
Executing the same command line call on my dev machine, this warning won't appear.
Any ideas why this warning appears on the build server?
I've already opened an issue for MSBuild: https://github.com/Microsoft/msbuild/issues/361
Solution: Create an empty rule set file and pass that as a command line parameter to MSBuild.
NoRules.ruleset file:
<?xml version="1.0" encoding="utf-8"?>
<!--
Problem: warning MSB3884
Visual Studio 2015 includes references to MinimumRecommendedRules.ruleset in .csproj files.
MSBuild 10 cannot find this reference and generates warning MSB3884.
Solution: Create NoRules.ruleset [this file] and pass it to MSBuild in a command switch. Need to pass full path name to MSBuild.
Example: MSBuild /property:CodeAnalysisRuleSet="$Workspace\NoRules.ruleset"
References:
https://msdn.microsoft.com/en-us/library/dd264949.aspx
https://msdn.microsoft.com/en-us/library/ms164311.aspx
-->
<RuleSet Name="NoRules" Description="This rule set contains no rules." ToolsVersion="14.0">
</RuleSet>
For a Jenkins build, add the following MSBuild switch to override the project settings and use the NoRules file:
/property:CodeAnalysisRuleSet="$Workspace\NoRules.ruleset"
You can just add the NoRules file to source control. I chose to build it on the fly in Jenkins with a Batch file prior to the MSBuild step:
set NoRules=NoRules.ruleset
#echo Making %NoRules%
if not exist %NoRules% (
#echo ^<?xml version="1.0" encoding="utf-8"?^> >%NoRules%
#echo ^<!-- >>%NoRules%
call :WriteToFile %NoRules% "Problem: warning MSB3884"
call :WriteToFile %NoRules% " Visual Studio 2015 includes references to MinimumRecommendedRules.ruleset in .csproj files."
call :WriteToFile %NoRules% " MSBuild 10 cannot find this reference and generates warning MSB3884."
#echo. >>%NoRules%
call :WriteToFile %NoRules% "Solution: Create NoRules.ruleset [this file] and pass it to MSBuild in a command switch."
call :WriteToFile %NoRules% " Need to pass full path name to MSBuild."
#echo Example: MSBuild /property:CodeAnalysisRuleSet="$WORKSPACE\NoRules.ruleset" >>%NoRules%
#echo. >>%NoRules%
call :WriteToFile %NoRules% "References:"
call :WriteToFile %NoRules% " https://msdn.microsoft.com/en-us/library/dd264949.aspx"
call :WriteToFile %NoRules% " https://msdn.microsoft.com/en-us/library/ms164311.aspx"
#echo --^> >>%NoRules%
#echo ^<RuleSet Name="NoRules" Description="This rule set contains no rules." ToolsVersion="14.0"^> >>%NoRules%
#echo ^</RuleSet^> >>%NoRules%
)
exit /b %errorlevel%
:WriteToFile
#echo %~2 >>%1
exit /b %errorlevel%
This file also shows the comments in the Jenkins ConsoleOut display. This should help you know what why you did this later.
related: VS2015: warning MSB3884: Could not find rule set file
Check your csproj has a DevEnvDir and not a path to VS (esp vs2010). I reckon your laptop's got the appropriate VS installed and your build server doesn't.
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;$(DevEnvDir)\..\..\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
Create the following folder on your build server:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets
Copy all of your ruleset files from your dev machine onto the build server.
Then add the following registry key by creating a "addkey.reg" file with the following contents:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\EDev]
"StanDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Team Tools\\Static Analysis Tools\\"
Run it on your build server, reboot, done, warning gone.
Add this property to the msbuild command:
CodeAnalysisRuleSetDirectories="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Team Tools\Static Analysis Tools\Rule Sets".
For example, I used this command
>"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild" solutionName.sln /target:build /property:Configuration=Release;CodeAnalysisRuleSetDirectories="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Team Tools\Static Analysis Tools\Rule Sets"
I have the following :
<mkdir dir="${build.dir}/serverNIO" />
<copy todir="${build.dir}/serverNIO" overwrite="true" verbose="true">
<fileset dir="resources/serverresources">
<include name="*.properties" />
</fileset>
</copy>
I want to copy the properties file from one folder to the other, all other tasks work fine except this one.
Why does this happen? I do not even get any error message,and the file are in the location mentioned.
So when I try to run my server:
MacBook-Pro:ClientServerNio ramapriyasridharan$ ant run_server
Buildfile: /Users/ramapriyasridharan/Downloads/ClientServerNio/build.xml
init:
[mkdir] Created dir: /Users/ramapriyasridharan/Downloads/ClientServerNio/bin
[mkdir] Created dir: /Users/ramapriyasridharan/Downloads/ClientServerNio/dist
compile_server:
[mkdir] Created dir: /Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO
[copy] Copying 1 file to /Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO
[copy] Copying /Users/ramapriyasridharan/Downloads/ClientServerNio/resources/serverresources/server.properties to /Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO/server.properties
init:
compile_common_server:
[javac] Compiling 3 source files to /Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO
init:
compile_database_api:
[javac] Compiling 1 source file to /Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO
[javac] Compiling 5 source files to /Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO
jar_server:
[jar] Building jar: /Users/ramapriyasridharan/Downloads/ClientServerNio/dist/server.jar
run_server:
[java] Exception in thread "main" java.io.FileNotFoundException: /ClientServerNio/bin/serverNIO/server.properties (No such file or directory)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:146)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:101)
[java] at ch.ethz.rama.asl.server.MessageServer.main(Unknown Source)
[java] Java Result: 1
EDIT :
Now it suddenly seems to copy files, only thing is my server program cannot find the properties file,even tought its in the same directory, what should I do?
The Ant script copies server.properties to...
/Users/ramapriyasridharan/Downloads/ClientServerNio/bin/serverNIO/server.properties
...but the Java program launched in the run_server target is looking for the file at...
/ClientServerNio/bin/serverNIO/server.properties
To fix this, either:
<copy> in the Ant script needs to copy server.properties to /ClientServerNio/bin/serverNIO
MessageServer.main needs to change so it looks for server.properties under /Users/ramapriyasridharan
I am trying to import kxml2, what I did is I downloaded the lib, went to Project Explorer -> Properties -> Build Path -> Libraries, I include the kxml2-2.3.0.jar. I run compile and get this error
JAR file creation failed with error -1
The preverified classes if any are in tmp25754. See jar log of errors in C:\Users\sgil\AppData\Local\Temp\rapc_1296da5f.dir\jarlog.txt
Error!: Error: preverifier failed: C:\Program Files (x86)\Eclipse-Blackberry\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components ...
Packaging project ** failed (took 0.795 seconds)
Error!: Error: preverifier failed: C:\Program Files (x86)\Eclipse-Blackberry\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components ...
Packaging project ** failed (took 0.795 seconds)
I tried running the preverifier and I got this:
preverify -classpath "C:\Program Files (x86)\Eclipse-B
lackberry\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\lib\net_ri
m_api.jar" "C:\Users\sgil\Desktop\Projects\Blackberry****\lib\kxml2-2.3.0.
jar"
I get this error:
JAR file creation failed with error -1
The preverified classes if any are in tmp25503. See jar log of errors in output\
jarlog.txt
Any advice?
The solution to this is to put the correct PATH variable in the "Enviromental Variables" of the System(right click in My PC->Enviromental Variables).
If "PATH" already exists you need to add the path of the BIN of the JDK installed on the Computer.
The carpet you should add this is the bin:
for example: C:\PATH_TO_THE_INSTALLED_JDK\bin