You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Dean Schulze <de...@yahoo.com> on 2011/06/17 02:15:02 UTC

Maven build in Eclipse fails


Just downloaded the latest Roller source.  Followed the directions on the web page for building in Eclipse.  I get the failure below.

The first thing that looks wrong is the Java user home setting gets truncated to "C:\Documents" which didn't exist.  I created that directory, but I get the same error.

The second problem is that the surefire-report directory doesn't get created.  There is no surefire-reports directory or file in the roller\roller-project\planet-business\target\ directory.

Does anyone have the latest source building and running under Eclipse?

Thanks.

------------------ Java Information ------------------
Java Version:    1.6.0_23
Java Vendor:     Sun Microsystems Inc.
Java home:       C:\bin\Java\jdk1.6.0_23\jre
Java classpath:  /C:/dean/bin/eclipse-jee-helios-SR2-win32-m2/eclipse/plugins/org.maven.ide.eclipse.maven_embedder_0.12.1.20110112-1712/jars/plexus-classworlds-2.4.jar
OS name:         Windows XP
OS architecture: x86
OS version:      5.1
Java user name:  dean
Java user home:  C:\Documents and Settings\dean
Java user dir:   C:\dean\downloads\src\roller\roller-project
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
--------- Derby Information --------
JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
[/org/apache/derby/info/DBMS.properties] 10.1.3.1 - (417277)
[/org/apache/derby/info/tools.properties] 10.1.3.1 - (417277)
[/org/apache/derby/info/net.properties] 10.1.3.1 - (417277)
[/org/apache/derby/info/dnc.properties] 10.1.3.1 - (417277)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------

[INFO] Executed tasks
[INFO] 
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ roller-planet-business ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ roller-planet-business ---
[INFO] Surefire report directory: C:\dean\downloads\src\roller\roller-project\planet-business\target\surefire-reports
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : C:\Documents
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Roller Project ............................. SUCCESS [0.343s]
[INFO] Apache Roller Core Module ......................... SUCCESS [1.657s]
[INFO] Apache Roller Test Utilities ...................... SUCCESS [0.750s]
[INFO] Apache Roller Planet Business Module .............. FAILURE [13.562s]
[INFO] Apache Roller Weblogger Business Module ........... SKIPPED
[INFO] Apache Roller Weblogger Web Module ................ SKIPPED
[INFO] Apache Roller Weblogger Web Application ........... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.562s
[INFO] Finished at: Thu Jun 16 18:01:13 MDT 2011
[INFO] Final Memory: 9M/24M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project roller-planet-business: There are test failures.
[ERROR] 
[ERROR] Please refer to C:\dean\downloads\src\roller\roller-project\planet-business\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :roller-planet-business

Re: Maven build in Eclipse fails

Posted by Dean Schulze <de...@yahoo.com>.

Microsoft strikes again with their directory names containing spaces.

I was able to get it to build by just skipping the tests.


________________________________
From: Dave <sn...@gmail.com>
To: user@roller.apache.org; Dean Schulze <de...@yahoo.com>
Sent: Saturday, June 18, 2011 1:33 PM
Subject: Re: Maven build in Eclipse fails

Comments below...


On Thu, Jun 16, 2011 at 8:15 PM, Dean Schulze <de...@yahoo.com> wrote:
> Just downloaded the latest Roller source.  Followed the directions on the web page for building in Eclipse.  I get the failure below.
>
> The first thing that looks wrong is the Java user home setting gets truncated to "C:\Documents" which didn't exist.  I created that directory, but I get the same error.
>
> The second problem is that the surefire-report directory doesn't get created.  There is no surefire-reports directory or file in the roller\roller-project\planet-business\target\ directory.
>
> Does anyone have the latest source building and running under Eclipse?

> ------------------ Java Information ------------------
> Java Version:    1.6.0_23
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\bin\Java\jdk1.6.0_23\jre
> Java user home:  C:\Documents and Settings\dean
> Java user dir:   C:\dean\downloads\src\roller\roller-project
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> ------------------------------------------------------
>
> [INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ roller-planet-business ---
> [INFO] Surefire report directory: C:\dean\downloads\src\roller\roller-project\planet-business\target\surefire-reports
> Error occurred during initialization of VM
> agent library failed to init: instrument
> Error opening zip file or JAR manifest missing : C:\Documents
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache Roller Project ............................. SUCCESS [0.343s]
> [INFO] Apache Roller Core Module ......................... SUCCESS [1.657s]
> [INFO] Apache Roller Test Utilities ...................... SUCCESS [0.750s]
> [INFO] Apache Roller Planet Business Module .............. FAILURE [13.562s]
> [INFO] Apache Roller Weblogger Business Module ........... SKIPPED
> [INFO] Apache Roller Weblogger Web Module ................ SKIPPED
> [INFO] Apache Roller Weblogger Web Application ........... SKIPPED
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 16.562s
> [INFO] Finished at: Thu Jun 16 18:01:13 MDT 2011
> [INFO] Final Memory: 9M/24M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project roller-planet-business: There are test failures.

The build works fine, just as long as you don't use Windows ;-)

This is the clue:
   > Error occurred during initialization of VM
   > agent library failed to init: instrument
   > Error opening zip file or JAR manifest missing : C:\Documents

I'm not sure how I did not notice this before, because I did do some
Windows builds this past spring.

Anyhow, the fix is to add quotation marks in four places:
   planet-business/pom.xml
   weblogger-business/pom.xml
   weblogger-web/pom.xml
   weblogger-webapp/pom.xml

In each of those files, look for this line:
   <argLine>-javaagent:${user.home}/.m2/repository/org/apache/openjpa/openjpa/2.0.1/openjpa-2.0.1.jar</argLine>

And add quotations as shown below:
   <argLine>-javaagent:"${user.home}/.m2/repository/org/apache/openjpa/openjpa/2.0.1/openjpa-2.0.1.jar"</argLine>

I'll soon commit that fix to the trunk.

Hope that helps...

- Dave

Re: Maven build in Eclipse fails

Posted by Dave <sn...@gmail.com>.
Comments below...


On Thu, Jun 16, 2011 at 8:15 PM, Dean Schulze <de...@yahoo.com> wrote:
> Just downloaded the latest Roller source.  Followed the directions on the web page for building in Eclipse.  I get the failure below.
>
> The first thing that looks wrong is the Java user home setting gets truncated to "C:\Documents" which didn't exist.  I created that directory, but I get the same error.
>
> The second problem is that the surefire-report directory doesn't get created.  There is no surefire-reports directory or file in the roller\roller-project\planet-business\target\ directory.
>
> Does anyone have the latest source building and running under Eclipse?

> ------------------ Java Information ------------------
> Java Version:    1.6.0_23
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\bin\Java\jdk1.6.0_23\jre
> Java user home:  C:\Documents and Settings\dean
> Java user dir:   C:\dean\downloads\src\roller\roller-project
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> --------- Derby Information --------
> JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> ------------------------------------------------------
>
> [INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ roller-planet-business ---
> [INFO] Surefire report directory: C:\dean\downloads\src\roller\roller-project\planet-business\target\surefire-reports
> Error occurred during initialization of VM
> agent library failed to init: instrument
> Error opening zip file or JAR manifest missing : C:\Documents
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache Roller Project ............................. SUCCESS [0.343s]
> [INFO] Apache Roller Core Module ......................... SUCCESS [1.657s]
> [INFO] Apache Roller Test Utilities ...................... SUCCESS [0.750s]
> [INFO] Apache Roller Planet Business Module .............. FAILURE [13.562s]
> [INFO] Apache Roller Weblogger Business Module ........... SKIPPED
> [INFO] Apache Roller Weblogger Web Module ................ SKIPPED
> [INFO] Apache Roller Weblogger Web Application ........... SKIPPED
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 16.562s
> [INFO] Finished at: Thu Jun 16 18:01:13 MDT 2011
> [INFO] Final Memory: 9M/24M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project roller-planet-business: There are test failures.

The build works fine, just as long as you don't use Windows ;-)

This is the clue:
   > Error occurred during initialization of VM
   > agent library failed to init: instrument
   > Error opening zip file or JAR manifest missing : C:\Documents

I'm not sure how I did not notice this before, because I did do some
Windows builds this past spring.

Anyhow, the fix is to add quotation marks in four places:
   planet-business/pom.xml
   weblogger-business/pom.xml
   weblogger-web/pom.xml
   weblogger-webapp/pom.xml

In each of those files, look for this line:
   <argLine>-javaagent:${user.home}/.m2/repository/org/apache/openjpa/openjpa/2.0.1/openjpa-2.0.1.jar</argLine>

And add quotations as shown below:
   <argLine>-javaagent:"${user.home}/.m2/repository/org/apache/openjpa/openjpa/2.0.1/openjpa-2.0.1.jar"</argLine>

I'll soon commit that fix to the trunk.

Hope that helps...

- Dave