It seems that java.home property is not propagated from maven into ant. Can you
try to add a line before the <ant ...> in the pom.xml?
<configuration>
<tasks>
<property name="java.home"
value="${java.home}"/>
<ant antfile="./build.xml" />
</tasks>
</configuration>
From: ant elder
Sent: Friday, February 13, 2009 8:52 AM
To: [email protected]
Subject: Re: svn commit: r743992 -
/tuscany/java/sca/itest/distribution/bin-distro-unzip/pom.xml
On Fri, Feb 13, 2009 at 4:41 PM, Raymond Feng <[email protected]> wrote:
Hi,
Does your "JAVA_HOME" point to a JRE instead of JDK and there is no tools.jar
under ${java.home}? If that's case, I'm surprised that the previous pom.xml
could work. Please clarify.
Something is setting it to point at a JRE during the build run, here's a
complete log output:
C:\Tuscany\SVN\trunk\itest\distribution>set JAVA_HOME
JAVA_HOME=\Java\jdk6_07
C:\Tuscany\SVN\trunk\itest\distribution>mvn clean install -o
[INFO]
NOTE: Maven is executing in offline mode. Any artifacts not already in your
local
repository will be inaccessible.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Apache Tuscany SCA Distribution Integration Tests
[INFO] Apache Tuscany SCA Bin Distro Unzip
[INFO] Apache Tuscany SCA Distribution itest binding-ws-calculator
[INFO] Apache Tuscany SCA Distribution itest calculator-rmi
[INFO] Apache Tuscany SCA Distribution itest implementation-java-calculator
[INFO]
----------------------------------------------------------------------------
[INFO] Building Apache Tuscany SCA Distribution Integration Tests
[INFO] task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\Tuscany\SVN\trunk\itest\distribution\pom.xml to
C:\Documents and Settings\Administrator\.m2\reposit
ory\org\apache\tuscany\sca\itest-distribution\2.0-SNAPSHOT\itest-distribution-2.0-SNAPSHOT.pom
[INFO]
----------------------------------------------------------------------------
[INFO] Building Apache Tuscany SCA Bin Distro Unzip
[INFO] task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
C:\Tuscany\SVN\trunk\itest\distribution\bin-distro-unzip\target
[INFO] [resources:resources]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e.
build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
C:\Tuscany\SVN\trunk\itest\distribution\bin-distro-unzip\src\main\resources
[INFO] Copying 0 resource to META-INF
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
C:\Tuscany\SVN\trunk\itest\distribution\bin-distro-unzip\src\test\resources
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[INFO] Building jar:
C:\Tuscany\SVN\trunk\itest\distribution\bin-distro-unzip\target\itest-bin-distro-unzip-2.0-SNAPSHOT
.jar
[INFO] [antrun:run {execution: run-samples}]
[INFO] Executing tasks
unzip:
[unzip] Expanding:
C:\Tuscany\SVN\trunk\distribution\all\target\apache-tuscany-sca-all-2.0-SNAPSHOT.zip
into C:\Tusc
any\SVN\trunk\distribution\all\target\apache-tuscany-sca-all-2.0-SNAPSHOT-dir
[INFO] Executed tasks
[INFO] [install:install]
[INFO] Installing
C:\Tuscany\SVN\trunk\itest\distribution\bin-distro-unzip\target\itest-bin-distro-unzip-2.0-SNAPSHOT.ja
r to C:\Documents and
Settings\Administrator\.m2\repository\org\apache\tuscany\sca\itest-bin-distro-unzip\2.0-SNAPSHOT\i
test-bin-distro-unzip-2.0-SNAPSHOT.jar
[INFO]
----------------------------------------------------------------------------
[INFO] Building Apache Tuscany SCA Distribution itest binding-ws-calculator
[INFO] task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
C:\Tuscany\SVN\trunk\itest\distribution\binding-ws-calculator\target
[INFO] [resources:resources]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e.
build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
C:\Tuscany\SVN\trunk\itest\distribution\binding-ws-calculator\src\main\resour
ces
[INFO] Copying 0 resource to META-INF
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
C:\Tuscany\SVN\trunk\itest\distribution\binding-ws-calculator\src\test\resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[INFO] Building jar:
C:\Tuscany\SVN\trunk\itest\distribution\binding-ws-calculator\target\itest-distribution-binidng-ws-
calculator-2.0-SNAPSHOT.jar
[INFO] [antrun:run {execution: run-samples}]
[INFO] Executing tasks
[echo] ${JAVA_HOME}
run:
init:
[mkdir] Created dir:
C:\Tuscany\SVN\trunk\distribution\all\target\apache-tuscany-sca-all-2.0-SNAPSHOT-dir\tuscany-sc
a-2.0-SNAPSHOT\samples\binding-ws-calculator\target\classes
compile:
[javac] Compiling 13 source files to
C:\Tuscany\SVN\trunk\distribution\all\target\apache-tuscany-sca-all-2.0-SNAPSHO
T-dir\tuscany-sca-2.0-SNAPSHOT\samples\binding-ws-calculator\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: The following error occurred while
executing this line:
C:\Tuscany\SVN\trunk\itest\distribution\binding-ws-calculator\build.xml:36: The
following error occurred while executing
this line:
C:\Tuscany\SVN\trunk\distribution\all\target\apache-tuscany-sca-all-2.0-SNAPSHOT-dir\tuscany-sca-2.0-SNAPSHOT\samples\bi
nding-ws-calculator\build.xml:37: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Java\jdk6_07\jre"
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Fri Feb 13 16:51:07 GMT 2009
[INFO] Final Memory: 24M/46M
[INFO] ------------------------------------------------------------------------
C:\Tuscany\SVN\trunk\itest\distribution>set JAVA_HOME
JAVA_HOME=\Java\jdk6_07
C:\Tuscany\SVN\trunk\itest\distribution>