maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Ekesparr <>
Subject javac not found using toolchains.xml, works when adding --debug..
Date Mon, 14 Dec 2015 18:39:44 GMT
Help ! I need some new ideas here.

What is it I'm missing when the maven-compiler-plugin is failing to find
the javac executeble when I use toolchains.xml ?

And adding the "--debug" parameter to the maven call makes it work so it is
of no help.

I'm executing maven from inside our CruiseControl server (Running as
SYSTEM) when the build is failing and I have not being able to reproduce it
other then in this context.

Below is the commandline that maven is running with when I echo the command
from inside the mvn.bat file.

"E:/Program/Java/jdk1.8.0_51_ibm\bin\java.exe" -Xms128m -Xmx1024m
org.codehaus.plexus.classworlds.launcher.Launcher -B -f pom.xml
--toolchains E:\Program\cruisecontrol/config/toolchains.xml

Below is the build error I receive.

[INFO] Scanning for projects...
[INFO] Building test 1.0.0-SNAPSHOT
[INFO] --- maven-toolchains-plugin:1.1:toolchain (default) @ test ---
[INFO] Required toolchain: jdk [ vendor='sun' version='1.6' ]
[INFO] Found matching toolchain for type jdk:
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ test ---
[INFO] Toolchain in compiler-plugin: JDK[E:\Program\Java\jdk1.6.0_45_x86]
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252,
i.e. build is platform dependent!
[INFO] Compiling 1 source file to E:\data\view\slask\target\classes
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] javac: file not found:
(The system cannot find the file specified)
[INFO] 1 error
[INFO] -------------------------------------------------------------

I below we can see that the binary javac.exe exist in the specified

 Volume in drive E is Data
 Volume Serial Number is 90F0-F2A1

 Directory of E:\Program\Java\jdk1.6.0_45_x86\bin

2013-10-03  14:26            34 704 javac.exe
               1 File(s)         34 704 bytes
               0 Dir(s)  10 634 477 568 bytes free

And as I specified in the top. The build succeeds when running with the
--debug flag set...


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message