Discussion:
Problem with surefire tests & exploded bundle
(too old to reply)
Laurent PETIT
2013-05-26 19:26:31 UTC
Permalink
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
Laurent PETIT
2013-05-28 06:37:50 UTC
Permalink
Nobody encountered this problem before ?
Post by Laurent PETIT
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.
- 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.
"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)
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
Sievers, Jan
2013-05-28 07:31:06 UTC
Permalink
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-***@eclipse.org [mailto:tycho-user-***@eclipse.org] 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
Laurent PETIT
2013-05-30 15:45:03 UTC
Permalink
Hello,

Yes, I've banged my head against walls all day.

I even tried to provide my custom /bin/chmod to track chmod call
errors, but without success. Seems like it's not called.

The problem is not with the clean, analyze, compile or install (with
skiptTests set to true) phases.
My updatesite is correctly set.

But whenever I invoke the tycho surefire integration-tests, I fail
with this error.

I've switched to Tycho 0.18 and am still seeing this behaviour.

I WISH I COULD have more information on what precise file makes chmod to fail.
Alas, I've only the "1" exit code :-(

Finally, I've succesfully installed a new version of the plugin via
the created update site archive, and I can tell that manual tests went
OK.

So the problem really is when I wan to start the Integration Tests ...

It's possible to play with the project by cloning it:

git clone https://github.com/laurentpetit/ccw
cd ccw
mvn clean install

Please, help !
Post by Sievers, Jan
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]
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 ?
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Jeff MAURY
2013-05-28 07:31:01 UTC
Permalink
Hello,

I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.

Jeff
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
Tonny Madsen
2013-05-28 08:22:30 UTC
Permalink
I use this is several of my tests with no problems at all... /Tonny

--
Tonny Madsen
My profiles: [image: LinkedIn] <http://www.linkedin.com/in/tonnymadsen> [image:
Twitter] <http://twitter.com/tonnymadsen> [image:
Blogger]<http://tonnymadsen.blogspot.dk/>
[image: SlideShare] <http://www.slideshare.net/nonty>
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.
Jeff
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Laurent PETIT
2013-05-30 15:50:41 UTC
Permalink
Hello,
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.
I don't know if you were able to check. On my side, as reported in my
response to Jan, there hasn't been much progress, despite having devoted a
lot of time to this issue :-(

Without any guidance for helping me narrow down the issue (e.g. "chmod exit
code = 1" does not help a lot), I wonder what my options are ... :

- it'll be difficult if not impossible to refactor my project to not embed
jar contents (exploded in a lib directory via a call to
dependency:unpack-dependencies, btw) in my core plugin
- I can try to use dependency:copy-dependencies instead, but it will still
require me to do some changes here and there, plus it's less convenient
(have to maintain list of jars up to date in my plugin's build.properties
and MANIFEST.MF).
- try to install tycho, and the nexus dependency why does the chmod call to
add more debug info into it ? (is it hard to do? I fear it is time
consuming, but maybe I'm wrong?)

Thanks for any info/guidance,
--
Laurent
Post by Laurent PETIT
Jeff
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Jeff MAURY
2013-05-30 16:41:17 UTC
Permalink
Laurent,

I tested on my Windows7 box and I add test errors but not the same as
yours. At least tests are executed. Will try this evening on my MacOS box.

Regards
Jeff
Post by Laurent PETIT
Hello,
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.
I don't know if you were able to check. On my side, as reported in my
response to Jan, there hasn't been much progress, despite having devoted a
lot of time to this issue :-(
Without any guidance for helping me narrow down the issue (e.g. "chmod
- it'll be difficult if not impossible to refactor my project to not embed
jar contents (exploded in a lib directory via a call to
dependency:unpack-dependencies, btw) in my core plugin
- I can try to use dependency:copy-dependencies instead, but it will still
require me to do some changes here and there, plus it's less convenient
(have to maintain list of jars up to date in my plugin's build.properties
and MANIFEST.MF).
- try to install tycho, and the nexus dependency why does the chmod call
to add more debug info into it ? (is it hard to do? I fear it is time
consuming, but maybe I'm wrong?)
Thanks for any info/guidance,
--
Laurent
Post by Laurent PETIT
Jeff
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
Laurent PETIT
2013-05-31 22:15:29 UTC
Permalink
Progress report :

Thanks to Jeff, the error was more precisely identified:

- when a bundle is meant to be unpacked when installed
- on a Linux or BSD (OS X) machine
- during the preparation phase of the integration tests

... then if the bundle had at least one bundled package whose name contains
the dollar sign ( such as in lib/foo$bar/baz.class ), there will be a chmod
error and the tests will fail without ever having had a chance to pass.

Note that this problem seems related to the use of the plexus archiver.
That's why the problem does not occur when installing the bundle "normally"
via the p2 tools (eg during a normal Eclipse plugin install)

I've created a minimalistic repository for you to easily reproduce the
problem: https://github.com/laurentpetit/tycho-dollar-issue

Instructions are on the README.md


I will check the plexus archiver JIRA to see if I can spot an existing open
bug related to my issue.

In the mean time, you can easily reproduce the issue with the minimalistic
github project mentioned above.

Cheers,
--
Laurent
Post by Jeff MAURY
Laurent,
I tested on my Windows7 box and I add test errors but not the same as
yours. At least tests are executed. Will try this evening on my MacOS box.
Regards
Jeff
Post by Laurent PETIT
Hello,
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.
I don't know if you were able to check. On my side, as reported in my
response to Jan, there hasn't been much progress, despite having devoted a
lot of time to this issue :-(
Without any guidance for helping me narrow down the issue (e.g. "chmod
- it'll be difficult if not impossible to refactor my project to not
embed jar contents (exploded in a lib directory via a call to
dependency:unpack-dependencies, btw) in my core plugin
- I can try to use dependency:copy-dependencies instead, but it will
still require me to do some changes here and there, plus it's less
convenient (have to maintain list of jars up to date in my plugin's
build.properties and MANIFEST.MF).
- try to install tycho, and the nexus dependency why does the chmod call
to add more debug info into it ? (is it hard to do? I fear it is time
consuming, but maybe I'm wrong?)
Thanks for any info/guidance,
--
Laurent
Post by Laurent PETIT
Jeff
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Laurent PETIT
2013-05-31 22:37:36 UTC
Permalink
OK, so the JIRA for plexus archiver has an unresolved issue almost similar
to mine ( but talking about problems with dollars in file names, not folder
names ) : http://jira.codehaus.org/browse/PLXCOMP-164

The last comment to date informed that upgrading maven-dependency-plugin to
be of version 2.4 solved the problem somehow.

Glad that the issue was not closed, or I would have missed the trick.

Unfortunately, the issue may have been solved for file names with dollars,
but not for directories.

I've updated the test github repo to explicitly use maven-dependency-plugin
2.8, btw.


What do you suggest my next move be?
I don't want to just throw a bug to the JIRA and desparately wait for
things to move. What would be the most efficient ?
Post by Laurent PETIT
- when a bundle is meant to be unpacked when installed
- on a Linux or BSD (OS X) machine
- during the preparation phase of the integration tests
... then if the bundle had at least one bundled package whose name
contains the dollar sign ( such as in lib/foo$bar/baz.class ), there will
be a chmod error and the tests will fail without ever having had a chance
to pass.
Note that this problem seems related to the use of the plexus archiver.
That's why the problem does not occur when installing the bundle "normally"
via the p2 tools (eg during a normal Eclipse plugin install)
I've created a minimalistic repository for you to easily reproduce the
problem: https://github.com/laurentpetit/tycho-dollar-issue
Instructions are on the README.md
I will check the plexus archiver JIRA to see if I can spot an existing
open bug related to my issue.
In the mean time, you can easily reproduce the issue with the minimalistic
github project mentioned above.
Cheers,
--
Laurent
Post by Jeff MAURY
Laurent,
I tested on my Windows7 box and I add test errors but not the same as
yours. At least tests are executed. Will try this evening on my MacOS box.
Regards
Jeff
Post by Laurent PETIT
Hello,
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.
I don't know if you were able to check. On my side, as reported in my
response to Jan, there hasn't been much progress, despite having devoted a
lot of time to this issue :-(
Without any guidance for helping me narrow down the issue (e.g. "chmod
- it'll be difficult if not impossible to refactor my project to not
embed jar contents (exploded in a lib directory via a call to
dependency:unpack-dependencies, btw) in my core plugin
- I can try to use dependency:copy-dependencies instead, but it will
still require me to do some changes here and there, plus it's less
convenient (have to maintain list of jars up to date in my plugin's
build.properties and MANIFEST.MF).
- try to install tycho, and the nexus dependency why does the chmod call
to add more debug info into it ? (is it hard to do? I fear it is time
consuming, but maybe I'm wrong?)
Thanks for any info/guidance,
--
Laurent
Post by Laurent PETIT
Jeff
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Jeff MAURY
2013-06-01 09:32:32 UTC
Permalink
My suggestion:

build a sample project based on plexus archiver api and try to reproduce
the issue. Then, fill the JIRA will a link to the project (Github hosted).
For your project, I think there may be a workaround.
Instead of unpacking you dependencies into the lib folder, just copy the
JAR in lib and update the bundle classpath (I don't think you can specify
lib/*.jar) with each jar. Make sure that when you copy the dependecies in
the lib folder, the version suffix is stripped so that you don't need to
update the bundle manifest if you change the version of a dependency. With
this, you will need to update your bundle manifest only when you add or
remove a dependency.

Comments ?
Jeff
Post by Laurent PETIT
OK, so the JIRA for plexus archiver has an unresolved issue almost similar
to mine ( but talking about problems with dollars in file names, not folder
names ) : http://jira.codehaus.org/browse/PLXCOMP-164
The last comment to date informed that upgrading maven-dependency-plugin
to be of version 2.4 solved the problem somehow.
Glad that the issue was not closed, or I would have missed the trick.
Unfortunately, the issue may have been solved for file names with dollars,
but not for directories.
I've updated the test github repo to explicitly use
maven-dependency-plugin 2.8, btw.
What do you suggest my next move be?
I don't want to just throw a bug to the JIRA and desparately wait for
things to move. What would be the most efficient ?
Post by Laurent PETIT
- when a bundle is meant to be unpacked when installed
- on a Linux or BSD (OS X) machine
- during the preparation phase of the integration tests
... then if the bundle had at least one bundled package whose name
contains the dollar sign ( such as in lib/foo$bar/baz.class ), there will
be a chmod error and the tests will fail without ever having had a chance
to pass.
Note that this problem seems related to the use of the plexus archiver.
That's why the problem does not occur when installing the bundle "normally"
via the p2 tools (eg during a normal Eclipse plugin install)
I've created a minimalistic repository for you to easily reproduce the
problem: https://github.com/laurentpetit/tycho-dollar-issue
Instructions are on the README.md
I will check the plexus archiver JIRA to see if I can spot an existing
open bug related to my issue.
In the mean time, you can easily reproduce the issue with the
minimalistic github project mentioned above.
Cheers,
--
Laurent
Post by Jeff MAURY
Laurent,
I tested on my Windows7 box and I add test errors but not the same as
yours. At least tests are executed. Will try this evening on my MacOS box.
Regards
Jeff
Post by Laurent PETIT
Hello,
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using this
feature.
I don't know if you were able to check. On my side, as reported in my
response to Jan, there hasn't been much progress, despite having devoted a
lot of time to this issue :-(
Without any guidance for helping me narrow down the issue (e.g. "chmod
- it'll be difficult if not impossible to refactor my project to not
embed jar contents (exploded in a lib directory via a call to
dependency:unpack-dependencies, btw) in my core plugin
- I can try to use dependency:copy-dependencies instead, but it will
still require me to do some changes here and there, plus it's less
convenient (have to maintain list of jars up to date in my plugin's
build.properties and MANIFEST.MF).
- try to install tycho, and the nexus dependency why does the chmod
call to add more debug info into it ? (is it hard to do? I fear it is time
consuming, but maybe I'm wrong?)
Thanks for any info/guidance,
--
Laurent
Post by Laurent PETIT
Jeff
On Tue, May 28, 2013 at 8:37 AM, Laurent PETIT <
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
Laurent PETIT
2013-06-01 09:40:29 UTC
Permalink
Hello,
Post by Jeff MAURY
build a sample project based on plexus archiver api and try to reproduce
the issue. Then, fill the JIRA will a link to the project (Github hosted).
I'll do that.
Post by Jeff MAURY
For your project, I think there may be a workaround.
Instead of unpacking you dependencies into the lib folder, just copy the
JAR in lib and update the bundle classpath (I don't think you can specify
lib/*.jar) with each jar. Make sure that when you copy the dependecies in
the lib folder, the version suffix is stripped so that you don't need to
update the bundle manifest if you change the version of a dependency. With
this, you will need to update your bundle manifest only when you add or
remove a dependency.
Comments ?
That's exactly what I did, and now the test preparation is OK. There's
indeed the little annoyance of having to take care of declaring
dependencies in the MANIFEST, but that's not a big deal and will do until
plexus archiver is (hopefully) fixed.

I now have some other problems, which may be related to assumptions in code
about the new layout of the lib/ directory, but that I can take care of :-)

Thanks for the guidance and moral support,
--
Laurent
Post by Jeff MAURY
Jeff
Post by Laurent PETIT
OK, so the JIRA for plexus archiver has an unresolved issue almost
similar to mine ( but talking about problems with dollars in file names,
not folder names ) : http://jira.codehaus.org/browse/PLXCOMP-164
The last comment to date informed that upgrading maven-dependency-plugin
to be of version 2.4 solved the problem somehow.
Glad that the issue was not closed, or I would have missed the trick.
Unfortunately, the issue may have been solved for file names with
dollars, but not for directories.
I've updated the test github repo to explicitly use
maven-dependency-plugin 2.8, btw.
What do you suggest my next move be?
I don't want to just throw a bug to the JIRA and desparately wait for
things to move. What would be the most efficient ?
Post by Laurent PETIT
- when a bundle is meant to be unpacked when installed
- on a Linux or BSD (OS X) machine
- during the preparation phase of the integration tests
... then if the bundle had at least one bundled package whose name
contains the dollar sign ( such as in lib/foo$bar/baz.class ), there will
be a chmod error and the tests will fail without ever having had a chance
to pass.
Note that this problem seems related to the use of the plexus archiver.
That's why the problem does not occur when installing the bundle "normally"
via the p2 tools (eg during a normal Eclipse plugin install)
I've created a minimalistic repository for you to easily reproduce the
problem: https://github.com/laurentpetit/tycho-dollar-issue
Instructions are on the README.md
I will check the plexus archiver JIRA to see if I can spot an existing
open bug related to my issue.
In the mean time, you can easily reproduce the issue with the
minimalistic github project mentioned above.
Cheers,
--
Laurent
Post by Jeff MAURY
Laurent,
I tested on my Windows7 box and I add test errors but not the same as
yours. At least tests are executed. Will try this evening on my MacOS box.
Regards
Jeff
Post by Laurent PETIT
Hello,
Post by Laurent PETIT
Hello,
I have the same constraint in one of my plugins. I use only the
Eclipse-BundleShape directive.
I had no problems but I have to check if one of my tests is using
this feature.
I don't know if you were able to check. On my side, as reported in my
response to Jan, there hasn't been much progress, despite having devoted a
lot of time to this issue :-(
Without any guidance for helping me narrow down the issue (e.g. "chmod
- it'll be difficult if not impossible to refactor my project to not
embed jar contents (exploded in a lib directory via a call to
dependency:unpack-dependencies, btw) in my core plugin
- I can try to use dependency:copy-dependencies instead, but it will
still require me to do some changes here and there, plus it's less
convenient (have to maintain list of jars up to date in my plugin's
build.properties and MANIFEST.MF).
- try to install tycho, and the nexus dependency why does the chmod
call to add more debug info into it ? (is it hard to do? I fear it is time
consuming, but maybe I'm wrong?)
Thanks for any info/guidance,
--
Laurent
Post by Laurent PETIT
Jeff
On Tue, May 28, 2013 at 8:37 AM, Laurent PETIT <
Post by Laurent PETIT
Nobody encountered this problem before ?
Hello,
Post by Laurent PETIT
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.
- 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.
"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)
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
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by
actually working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Loading...