| Summary: | Tycho-Surefire should use Toolchains | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Evgeny Mandrikov <mandrikov> | ||||||||||
| Component: | Tycho | Assignee: | Igor Fedorenko <igor> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | enhancement | ||||||||||||
| Priority: | P3 | CC: | igor, steffen.kriese, vrentschler | ||||||||||
| Version: | unspecified | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Evgeny Mandrikov
What I want to achieve here is to be able to test JaCoCo with different JDKs - https://sourceforge.net/apps/trac/eclemma/wiki/MavenBuild#TestingwithdifferentJDKs Patch available at https://github.com/sonatype/sonatype-tycho/pull/5 Created attachment 192890 [details]
proposed fix
Patch attached.
I'll look at the contribution once the Tycho sources are in parallel IP at Eclipse. @Jan, Igor: Since you are way more familiar with the tycho-surefire-plugin, could you please review Evgeny's patch? We are allowed to take changes from bugzilla, although we are not yet in parallel IP (see bug 342809#c46). @Evgeny: It would certainly help if you could provide an (integration) test that verifies that your changes work as expected. @Tobias: That's a definitely good idea to have a test on top of this, but at time of creation I didn't had enough free time, thus maybe patch itself can be improved. So, I'll try to take a look on this again and provide better patch with tests. P.S. There is inconvenience for me : as was said by Igor - patches accepted only thru bugzilla. IMO would be better to have an ability to send also via GitHub. (In reply to comment #6) > P.S. There is inconvenience for me : as was said by Igor - patches accepted only > thru bugzilla. IMO would be better to have an ability to send also via GitHub. You should vote for bug 283749: Then we could take patches to Gerrit, which would be a huge improvement over the current process. (In reply to comment #7) > You should vote for bug 283749: Then we could take patches to Gerrit, which > would be a huge improvement over the current process. Indeed - would be cool! Thanks for the link - voted. Created attachment 198808 [details]
Proposed fix (attempt 2)
New patch attached - with a better implementation and with integration test. Also was tested on a real project.
@Tobias, Jan, Igor: Can someone consider this patch? This patch breaks a number of integration tests [INFO] Command line: /bin/sh -c -jar /private/tmp/tycho-bootstrap.localrepo/org/eclipse/tycho/tycho-p2-runtime/0.13.0-SNAPSHOT/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -debug -consoleLog -nosplash -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -source /workspaces/m2eclipse-igordev/sonatype-tycho/tycho-its/target/projects/TYCHO321deployableFeature/target/site -metadataRepository file:/workspaces/m2eclipse-igordev/sonatype-tycho/tycho-its/target/projects/TYCHO321deployableFeature/target/site/ -metadataRepositoryName feature -artifactRepository file:/workspaces/m2eclipse-igordev/sonatype-tycho/tycho-its/target/projects/TYCHO321deployableFeature/target/site/ -artifactRepositoryName 'feature Artifacts' -noDefaultIUs -compress /bin/sh: -j: invalid option Usage: /bin/sh [GNU long option] [option] ... /bin/sh [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.817s [INFO] Finished at: Wed Jul 13 00:05:36 MSD 2011 [INFO] Final Memory: 56M/112M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:0.13.0-SNAPSHOT:feature-p2-metadata (default-feature-p2-metadata) on project feature: P2 publisher return code was 2 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:0.13.0-SNAPSHOT:feature-p2-metadata (default-feature-p2-metadata) on project feature: P2 publisher return code was 2 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.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:314) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168) at org.apache.maven.cli.MavenCli.main(MavenCli.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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.MojoFailureException: P2 publisher return code was 2 at org.eclipse.tycho.plugins.p2.AbstractP2MetadataMojo.generateMetadata(AbstractP2MetadataMojo.java:114) at org.eclipse.tycho.plugins.p2.AbstractP2MetadataMojo.execute(AbstractP2MetadataMojo.java:88) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195) ... 19 more Hi Igor, Thanks for the testing. DefaultEquinoxLauncher uses path to jvm executable from EquinoxLaunchConfiguration, so this path wasn't configured. I can imagine two ways to fix this : # handle this case in DefaultEquinoxLauncher - some kind of backward compatibility # find place where EquinoxLaunchConfiguration was constructed and configure correct path Could you please give me an advice which way do you prefer, if you want me to modify patch? Or maybe you prefer to fix it by yourself? I'd handle this in DefaultEquinoxLauncher, i.e. move back the logic to calculate jvm path if it is not provided via configuration. Created attachment 199563 [details]
Proposed fix (attempt 3)
New patch attached – with restored behaviour of DefaultEquinoxLauncher when JVM executable was not specified in LaunchConfiguration
For proper attribution purposes we require patches in git-format-patch format. Created attachment 199644 [details]
Proposed fix (attempt 3)
Patch in git-format-patch format.
Applied the patch. Thank you. Is this new feature self-explaining, or should it be documented in the Tycho wiki [1]? Is this worth advertising as new feature in the release notes [2]? [1] http://wiki.eclipse.org/Tycho [2] http://wiki.eclipse.org/Tycho/Release_Notes/0.13 @Tobias, I think that this feature is valuable enough and deserves to be mentioned in wiki and in release notes, however I suppose that final decision should not be made by me (and maybe this question wasn't for me?) ;) I don't know barely anything about toolchains, so I trust your judgement. Could you document the feature in the wiki (on a new or existing page) and link to that documentation on the 0.13. release notes page? |