diffplug / gradle-and-eclipse-rcp

Gradle and Eclipse RCP
Apache License 2.0
45 stars 9 forks source link

Assemble.all step :deploy:buildP2 fails with Oxygen (4.7.2) - No such plugin: javax.xml #11

Closed jirkafm closed 6 years ago

jirkafm commented 6 years ago

Hi,

I'm interested in building eclipse-rcp app in Gradle unfortunately I wasn't able to make successful build on my Windows machine. My idea is to be able to build product locally on any platform and on Jenkins (Linux machine). Last working version of eclipse platform was 4.6.3 in my case.

I've made following changes to thix example project:

cpu@fractal MINGW64 /f/GRADLE_TEST/gradle-and-eclipse-rcp-master-oxygen
$ grep 4.7.2 gradle.properties target.p2/build.gradle
gradle.properties:GOOMPH_PDE_VER=4.7.2
target.p2/build.gradle:         repoEclipse '4.7.2'

My output of gradle assemble.all:

cpu@fractal MINGW64 /f/GRADLE_TEST/gradle-and-eclipse-rcp-master-oxygen
$ gradle assemble.all
:com.diffplug.needs17:compileJava UP-TO-DATE
:com.diffplug.needs17:processResources UP-TO-DATE
:com.diffplug.needs17:classes UP-TO-DATE
:com.diffplug.needs17:jar UP-TO-DATE
:com.diffplug.needs18:compileJava UP-TO-DATE
:com.diffplug.needs18:processResources UP-TO-DATE
:com.diffplug.needs18:classes UP-TO-DATE
:com.diffplug.needs18:jar UP-TO-DATE
:com.diffplug.needsBoth:compileJava UP-TO-DATE
:com.diffplug.needsBoth:processResources UP-TO-DATE
:com.diffplug.needsBoth:classes UP-TO-DATE
:com.diffplug.needsBoth:jar UP-TO-DATE
:com.diffplug.talks.rxjava_and_swt:compileJava UP-TO-DATE
:com.diffplug.talks.rxjava_and_swt:processResources UP-TO-DATE
:com.diffplug.talks.rxjava_and_swt:classes UP-TO-DATE
:com.diffplug.talks.rxjava_and_swt:jar UP-TO-DATE
:com.diffplug.rcpdemo:compileJava UP-TO-DATE
:com.diffplug.rcpdemo:processResources UP-TO-DATE
:com.diffplug.rcpdemo:classes UP-TO-DATE
:com.diffplug.rcpdemo:jar UP-TO-DATE
:target.maven:clean
:target.maven:bundles
Could not retrieve POM com.diffplug.talks:com.diffplug.rcpdemo:1.0.0@pom
Could not retrieve POM com.diffplug.talks:com.diffplug.talks.rxjava_and_swt:1.0.0@pom
Could not retrieve POM com.diffplug.talks:com.diffplug.needs18:1.0.0@pom
Could not retrieve POM com.diffplug.talks:com.diffplug.needs17:1.0.0@pom
Could not retrieve POM com.diffplug.talks:com.diffplug.needsBoth:1.0.0@pom
Added the following explicitly defined auxiliary dependencies (platformaux) in addition to the resolved configuration (platform): com.google.guava:guava:17.0
:deploy:buildP2
url=jar:file:/C:/Users/cpu/.gradle/caches/modules-2/files-2.1/com.diffplug.gradle/goomph/3.13.0/62ea0c35f2849a7000b8822bae272e76317b1f0a/goomph-3.13.0.jar!/com/diffplug/gradle/pde/template.build.properties
:deploy:buildP2 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':deploy:buildP2'.
> No such plugin: javax.xml

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
18 actionable tasks: 3 executed, 15 up-to-date

I've tried to look around in configuration files but didn't find any clue which could help me to overcome this. I'm new to Gradle unfortunately.

Here's my setup:

cpu@fractal MINGW64 /f/GRADLE_TEST/gradle-and-eclipse-rcp-master-oxygen
$ gradle -version

------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------

Build time:   2018-02-28 13:36:36 UTC
Revision:     8fa6ce7945b640e6168488e4417f9bb96e4ab46c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_161 (Oracle Corporation 25.161-b12)
OS:           Windows 7 6.1 amd64

oxygen-build-debug.log git diff

nedtwigg commented 6 years ago

The error is telling you that your product file references javax.xml, but that dependency is not available in target.maven. Probably you need to remove it from your product file.

jirkafm commented 6 years ago

Thanks for reply. I've changed little bit original rcpdemo.product and was able to go through assembly process however when product build ant tasks are called following error appears:

generate.p2.metadata:
Unable to find: Installable Unit [ id=org.eclipse.equinox.executable_root.win32.win32.x86_64 ]
Unable to find: Installable Unit [ id=org.eclipse.equinox.executable_root.win32.win32.x86 ]
Unable to find: Installable Unit [ id=org.eclipse.equinox.executable_root.gtk.linux.x86_64 ]
Unable to find: Installable Unit [ id=org.eclipse.equinox.executable_root.gtk.linux.x86 ]
Unable to find: Installable Unit [ id=org.eclipse.equinox.executable_root.cocoa.macosx.x86_64 ]
   [delete] Deleting directory F:\gradle\gradle-and-eclipse-rcp\deploy\build\p2\tmp\p2.branding
     [copy] Copying 1 file to F:\gradle\gradle-and-eclipse-rcp\deploy\build\p2\features\org.eclipse.pde.build.container.feature\product
[p2.mirror] Problems resolving provisioning plan.
[p2.mirror] Unable to satisfy dependency from org.eclipse.swt 3.106.2.v20171129-0543 to org.eclipse.swt.gtk.linux.ppc64 [3.106.2.v20171129-0543].
[p2.mirror] Unable to satisfy dependency from org.eclipse.swt 3.106.2.v20171129-0543 to org.eclipse.swt.gtk.linux.ppc64le [3.106.2.v20171129-0543].
[p2.mirror] Messages while mirroring artifact descriptors.

deploy:assemble.all product ends successfully but I'm missing executable launcher for each platform. git diff

nedtwigg commented 6 years ago

If you fork this repo, I'd be happy to work with you to update it to a later target platform. Working from git diffs is too tedious for my skill level. From the diff it seems that it ought to work.

jirkafm commented 6 years ago

Ok thanks a lot! Here it is https://github.com/jirkafm/gradle-and-eclipse-rcp.

jirkafm commented 6 years ago

Thanks @nedtwigg I really appreciate your help. I overlooked that 'nativeLaunchers' flag property even it was so obvious :roll_eyes:.

I'll try to convert my project to gradle now.