" I am working on a Jenkins project on a shared server managed by my school. My build.xml file has the followi...">

Error: "Copying source file <Unknown>"

I am working on a Jenkins project on a shared server managed by my school. My build.xml file has the following steps to execute FindBugs:

 <target name="findbugs"> <echo>FindBugs Starting:</echo> <available file="${findbugs.dir}/findbugs.jar" property="findbugs.available" /> <fail unless="findbugs.available" message="Error: FINDBUGS_HOME not set or findbugs.jar not found." /> <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.dir}/findbugs-ant.jar" /> <findbugs home="${findbugs.dir}" workHard="true" output="xml:withMessages" outputFile="${report.dir}/findbugs.xml" excludefilter="findbugs-exclusions.xml" sourcePath="${src.dir}" > <class location="${classes.dir}" /> <auxClasspath> <fileset file="${lib.dir}/junit.jar" /> </auxClasspath> </findbugs> <echo>FindBugs finished</echo> </target> 

When executed, the output to the Jenkins console does not contain errors, but shows a clean execution, as far as I can tell:

  [echo] FindBugs Starting: [findbugs] Executing findbugs from ant task [findbugs] Running FindBugs... [findbugs] Warnings generated: 24 [findbugs] Calculating exit code... [findbugs] Setting 'bugs found' flag (1) [findbugs] Exit code set to: 1 [findbugs] Java Result: 1 [findbugs] Output saved to report/findbugs.xml [echo] FindBugs finished 

In the results of the FindBugs alerts on the Files tab, there is a file named "", and in this detail I see the following:

  com.ewenicorn.reddit.dailyprogrammer.utility.CharacterUtilityTest.testShiftCharacter() invokes inefficient new Character(char) constructor; use Character.valueOf(char) instead 01 Copying the source file 'com/ewenicorn/reddit/dailyprogrammer/utility/<Unknown>' from the workspace to the build folder '/home/VLE/1257538/jenkins/jobs/RedditDailyProgrammer/builds/2013-08-24_16-50-28/workspace-files/f2082c83.tmp' on the Jenkins master failed. 02 Seems that the path is relative, however an absolute path is required when copying the sources. 03 Is the file '<Unknown>' contained more than once in your workspace? 04 Is the file 'com/ewenicorn/reddit/dailyprogrammer/utility/<Unknown>' a valid filename? 05 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/com/ewenicorn/reddit/dailyprogrammer/utility/<Unknown>' 06 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/com/ewenicorn/reddit/dailyprogrammer/utility/<Unknown>' 07 hudson.util.IOException2: remote file operation failed: com/ewenicorn/reddit/dailyprogrammer/utility/<Unknown> at [email protected] 08 at hudson.FilePath.act(FilePath.java:905) 09 at hudson.FilePath.act(FilePath.java:882) 10 at hudson.FilePath.copyTo(FilePath.java:1776) 11 at hudson.plugins.analysis.core.HealthAwareRecorder.copyFilesWithAnnotationsToBuildFolder(HealthAwareRecorder.java:398) 12 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:165) 13 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333) 14 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 15 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 16 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) 17 at hudson.model.Build$BuildExecution.post2(Build.java:183) 18 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) 19 at hudson.model.Run.execute(Run.java:1628) 20 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 21 at hudson.model.ResourceController.execute(ResourceController.java:88) 22 at hudson.model.Executor.run(Executor.java:247) 23 Caused by: java.io.FileNotFoundException: com/ewenicorn/reddit/dailyprogrammer/utility/<Unknown> (No such file or directory) 24 at java.io.FileInputStream.open(Native Method) 25 at java.io.FileInputStream.<init>(FileInputStream.java:137) 26 at hudson.FilePath$34.invoke(FilePath.java:1781) 27 at hudson.FilePath$34.invoke(FilePath.java:1776) 28 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) 29 at hudson.remoting.LocalChannel.call(LocalChannel.java:45) 30 at hudson.FilePath.act(FilePath.java:898) 31 ... 14 more 

I am looking to resolve this error, so any help available is appreciated, especially since I have not found anything from previous people studying this problem. If an additional structure is needed, the full source and binaries of the file can be found at https://github.com/jenrmagas/RedditDailyProgrammer , and it should work from build to Ant.

+4
source share
1 answer

"Unknown source file", most likely due to compilation of code without debugging information.

0
source

Source: https://habr.com/ru/post/1498834/


All Articles