[ 
https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484972
 ] 

Jacek Laskowski commented on OPENJPA-186:
-----------------------------------------

It's something pertaining to the way Ant is executed from within M2, and 
OpenJPA build runs into troubles. I could reproduce it with a simple, almost 
empty project. When build.xml is executed directly with ant it runs fine. When 
it's executed from M2 it fails with the following error message. Any hints on 
how to work it out?

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ mvn -v
Maven version: 2.0.5

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ echo $CLASSPATH


[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ echo $JAVA_HOME
/cygdrive/c/apps/java5

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ java -version
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ ant
Buildfile: build.xml

compile:
    [javac] Compiling 1 source file

BUILD SUCCESSFUL
Total time: 0 seconds

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ mvn integration-test
[INFO] Scanning for projects...
[INFO] 
----------------------------------------------------------------------------
[INFO] Building OpenJPA Examples Integration Tests
[INFO]    task-segment: [integration-test]
[INFO] 
----------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [antrun:run {execution: run-examples}]
[INFO] Executing tasks
     [echo] Running OpenJPA Examples

compile:
    [javac] Compiling 1 source file
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
C:\OPENJPA-186\build.xml:4: 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
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Mar 28 21:36:02 CEST 2007
[INFO] Final Memory: 4M/254M
[INFO] ------------------------------------------------------------------------

$ cat pom.xml
<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/maven-v4_0_0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>xxx</groupId>
    <artifactId>examples</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <name>OpenJPA Examples Integration Tests</name>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>run-examples</id>
                        <phase>integration-test</phase>
                        <configuration>
                        <tasks>
                        <echo>Running OpenJPA Examples</echo>

                        <subant inheritAll="false">
                            <fileset dir="."
                                includes="build.xml"/>
                        </subant>

                        </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

[EMAIL PROTECTED] /cygdrive/c/OPENJPA-186
$ cat build.xml
<project default="compile">

    <target name="compile" description="Compile the example java files">
        <javac srcdir="src" />
    </target>

</project>


> Build failure of OpenJPA sources from trunk
> -------------------------------------------
>
>                 Key: OPENJPA-186
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-186
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: build / infrastructure
>    Affects Versions: 0.9.7
>            Reporter: Jacek Laskowski
>         Assigned To: Marc Prud'hommeaux
>             Fix For: 0.9.7
>
>         Attachments: OPENJPA-186-builderror-2.txt, 
> OPENJPA-186.buildfailure.txt
>
>
> (I have sent it to the mailing list on March 26th, but it didn't get through)
> As I'm not alone with the build failure, see 
> http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the 
> issue report.
> I've been trying to build OpenJPA source from trunk for a couple of days and 
> no joy so far. Anything missing?
> [EMAIL PROTECTED] /cygdrive/c/oss/openjpa
> $ svn up
> At revision 522565.
> [EMAIL PROTECTED] /cygdrive/c/oss/openjpa
> $ svn status
> [EMAIL PROTECTED] /cygdrive/c/oss/openjpa
> $ mvn clean install
> [INFO] Executing tasks
>     [echo] Revision: 406193:522097
> [INFO] Executed tasks
> [INFO] [antrun:run {execution: delete sun.misc.Perf}]
> [INFO] Executing tasks
> [INFO] Executed tasks
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] Compiling 33 source files to
> c:\oss\openjpa\openjpa-lib\target\test-classes
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> c:\oss\openjpa\openjpa-lib\target\surefire-reports
> [INFO] Building jar: 
> c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar
> java.lang.NoClassDefFoundError: 
> org/apache/maven/surefire/booter/SurefireBooter
> Exception in thread "main"
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] There are test failures.
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 16 seconds
> [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007
> [INFO] Final Memory: 21M/254M
> [INFO] 
> ------------------------------------------------------------------------
> [EMAIL PROTECTED] /cygdrive/c/oss/openjpa
> $ mvn -v
> Maven version: 2.0.5
> [EMAIL PROTECTED] /cygdrive/c/oss/openjpa
> $ java -version
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to