akhikhl / wuff

Gradle plugin for automating assembly of OSGi/Eclipse bundles and applications
MIT License
153 stars 51 forks source link

Errror with Convert existing Eclipse plugins and apps to Gradle #113

Open carlolf opened 8 years ago

carlolf commented 8 years ago

I tried to convert my existing Eclipse plugins to Gradle using the script from "https://github.com/akhikhl/wuff/wiki/Convert-existing-Eclipse-plugins-and-apps-to-Gradle". I get an error for which I have no idea what might be the reason (using Gradle 2.13): Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '[configuration ':de.uvdms.bgetem:publicLib']' with class 'java.util.ArrayList' to class 'org.gradle.api.file.FileCollection' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.gradle.api.file.FileCollection(org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated) at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.setProperty(BeanDynamicObject.java:300) at org.gradle.internal.metaobject.BeanDynamicObject.setProperty(BeanDynamicObject.java:155) at org.gradle.internal.metaobject.CompositeDynamicObject.setProperty(CompositeDynamicObject.java:65) at org.gradle.internal.metaobject.AbstractDynamicObject.setProperty(AbstractDynamicObject.java:75) at org.gradle.api.internal.tasks.DefaultSourceSet_Decorated.setProperty(Unknown Source) at org.akhikhl.wuff.OsgiBundleConfigurer$_createConfigurations_closure14.doCall(OsgiBundleConfigurer.groovy:344) at org.akhikhl.wuff.OsgiBundleConfigurer.createConfigurations(OsgiBundleConfigurer.groovy:344) at org.akhikhl.wuff.Configurer.preConfigure(Configurer.groovy:231) at org.akhikhl.wuff.JavaConfigurer.super$2$preConfigure(JavaConfigurer.groovy) at org.akhikhl.wuff.JavaConfigurer.preConfigure(JavaConfigurer.groovy:97) at org.akhikhl.wuff.OsgiBundleConfigurer.super$3$preConfigure(OsgiBundleConfigurer.groovy) at org.akhikhl.wuff.OsgiBundleConfigurer.preConfigure(OsgiBundleConfigurer.groovy:547) at org.akhikhl.wuff.Configurer.apply(Configurer.groovy:37) at org.akhikhl.wuff.Configurer$apply$2.call(Unknown Source) at org.akhikhl.wuff.EclipseBundlePlugin.apply(EclipseBundlePlugin.groovy:22) at org.akhikhl.wuff.EclipseBundlePlugin.apply(EclipseBundlePlugin.groovy) at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)

nedtwigg commented 8 years ago

Might wanna take a look at Goomph and its example project. Currently on 3.0.0-SNAPSHOT, actively seeking feedback before 3.0.0 release.

petarov commented 8 years ago

I believe this error arises with Gradle 3.0. Previously it was a deprecation warning. I made a few changes that should fix this in my fork.

prantor commented 7 years ago

Hi Petarov, When do you plan to publish your fix as an official release?

srilagit commented 5 years ago

Trying wuff for converting RCP app to gradle for creating Product export. Faced GroovyCast exception mentioned above and hence tried with Wuff 0.0.13, It proceeded, but getting "Cannot get property 'name' on null object." Tried with eclipse neon, gradle 4.10.1 on windows x86_64 OS the sample RCPApp3 in examples. Set wuff plugin version as 0.0.13. Any update as of today? am checking after 2 years of this post.. pl comment if wuff can be used and whether it is actively maintained?

petarov commented 5 years ago

@srilagit I use wuff in production, but I don't believe it is maintained anymore. I think there are several forks around if you check out the other issues. My fork is just basic fixes and updates. You could build it yourself, together with unpuzzle and check if that will work for you.

srilagit commented 5 years ago

@petarov Thanks for the response. Shall check your fork,

srilagit commented 5 years ago

@petarov I downloaded your wuff-dev and unpuzzle-dev and successfully built them; had to make few groovy version changes alone. Configured eclipse-photon as eclipse version. Then tried to apply wuff plugin on wuff-master/examples/RCPApp1 and 3. Used the build.gradle script given in https://github.com/akhikhl/wuff/wiki/Create-first-RCP-app. Now getting below error. Pls suggest what is needed to get an RCP Product export.

Could not resolve all files for configuration ':runtime'. Could not find any matches for eclipse-photon:org.eclipse.core.runtime.compatibility.registry:+ as no versions of eclipse-photon:org.eclipse.core.runtime.compatibility.registry are available. Searched in the following locations:

srilagit commented 5 years ago

@petarov awaiting your response for the issue posted above. As you are actively using wuff in production, pl advise on resolution for above. Mainly wish to create Eclipse RCP App export via gradle build process. Currently using Eclispe Neon on x86.

petarov commented 5 years ago

@srilagit I don't use wuff to build RCP apps, so this issue is unknown to me. Sorry, I can't support you here.

As far as I can tell, the whole org.eclipse.core.runtime.compatibility component has been removed since Eclipse Neon [1]. Perhaps you can try using a lower Eclipse version in your build.