Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problem with surefire tests & exploded bundle

looks like you have a jar entry with non-standard permission bitmask (exec bit set?) and the unarchiver can't execute chmod to restore it while extracting (build user does not have permissions to do this?).
This should not be relevant with normal jar files but I think the plexus archiver/unarchiver component uses zip file format extensions which preserve file permission info.

Jan

---

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.17.0:test (default-test) on project ccw.core.test: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.17.0:test failed: Unable to unpack jar /home/travis/build/laurentpetit/ccw/ccw.core/target/ccw.core-0.12.4-SNAPSHOT.jar: chmod exit code was: 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.17.0:test (default-test) on project ccw.core.test: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.17.0:test failed: Unable to unpack jar /home/travis/build/laurentpetit/ccw/ccw.core/target/ccw.core-0.12.4-SNAPSHOT.jar
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycloduleBuilder.buildProject(LifecycloduleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycloduleBuilder.buildProject(LifecycloduleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativethodAccessorImpl.invoke(NativethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.17.0:test failed: Unable to unpack jar /home/travis/build/laurentpetit/ccw/ccw.core/target/ccw.core-0.12.4-SNAPSHOT.jar
	at org.apache.maven.plugin.DefaultBuildPluginManager.executojo(DefaultBuildPluginManager.java:110)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: java.lang.RuntimeException: Unable to unpack jar /home/travis/build/laurentpetit/ccw/ccw.core/target/ccw.core-0.12.4-SNAPSHOT.jar
	at org.eclipse.sisu.equinox.launching.internal.DefaultEquinoxInstallationFactory.unpack(DefaultEquinoxInstallationFactory.java:186)
	at org.eclipse.sisu.equinox.launching.internal.DefaultEquinoxInstallationFactory.createInstallation(DefaultEquinoxInstallationFactory.java:76)
	at org.eclipse.tycho.surefire.TestMojo.createEclipseInstallation(TestMojo.java:656)
	at org.eclipse.tycho.surefire.TestMojo.execute(TestMojo.java:559)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executojo(DefaultBuildPluginManager.java:101)
	... 20 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: chmod exit code was: 2
	at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:106)
	at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFile(AbstractZipUnArchiver.java:238)
	at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFileIfIncluded(AbstractZipUnArchiver.java:185)
	at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.execute(AbstractZipUnArchiver.java:149)
	at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:119)
	at org.eclipse.sisu.equinox.launching.internal.DefaultEquinoxInstallationFactory.unpack(DefaultEquinoxInstallationFactory.java:184)
	... 24 more
[ERROR] 

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Laurent PETIT
Sent: Dienstag, 28. Mai 2013 08:38
To: Tycho user list
Subject: Re: [tycho-user] Problem with surefire tests & exploded bundle

Nobody encountered this problem before ?

Le dimanche 26 mai 2013, Laurent PETIT a écrit :
Hello,

My project requires that my core bundle be exploded to work.

Unit tests which work from my Development environment neither work
locally via mvn command, neither externally on travis-ci.

I have taken care of doing the following:

- originally (for user deployment time), my feature declares that the
bundle must be unpacked
- I have also added an
<explodedBundles><explodedBundle>ccw.core</explodedBundle></explodedBundles>
sufire configuration to the pom of my tests
- I have also added an Eclipse specific META-INF directive,
"Eclipse-BundleShape: dir", to my core plugin, as suggested somewhere
(in the FAQ I guess ? Or was it on StackOverflow, don't remember).

I have made the last 2 additions incrementally, so I had first tested
without both, then with the <explodedBundles>, then with the MANIFEST
Eclipse specific directive.

on Travis-ci (Ubuntu Server 12.04, the build fails with this root exception:
 "Caused by: org.codehaus.plexus.archiver.ArchiverException: chmod
exit code was: 2"

on my local machine, same chmod issue, but the exit code is 1 instead
of 2 (I have a Mac Book Air with OS X Lion)

link to the failed build on travis:
https://travis-ci.org/laurentpetit/ccw/jobs/7515910#L4268
link to the project on github: https://github.com/laurentpetit/ccw

Any idea ?

Thanks in advance,

--
Laurent


Back to the top