Giter Club home page Giter Club logo

wuff's Introduction

Wuff logo

Build Status Release Snapshot License

Introduction

Wuff is a gradle plugin for developing and assembling OSGi/Eclipse applications and plugins independently of Eclipse-IDE. If you are familiar with Eclipse Tycho, then think of Wuff as a gradle-based alternative.

What's new โญ

Version 0.0.20

  • introduced publicLib configuration for eclipse bundles and applications.

Version 0.0.19

  • implemented consistent interpretation of 'provided' configuration: all artifacts in provided are visible at compile-time, but excluded from application bundles

  • introduced requireBundle mechanism for wrapped libs

Version 0.0.18

  • Using unpuzzle 0.0.22, which incorporates pull request "ArchiveUnpacker now preserves "executable" permissions in Tar and Zip" ( akhikhl/unpuzzle#8 )

Where to start?

How to use Wuff?

  • Maven artifacts: 'org.akhikhl.wuff:wuff-plugin:+' at jcenter and maven central.
  • Source code: compile, explore, deploy.

See more information on prerequisites and usage wiki page.

Copyright and License

Copyright 2014-2015 (c) Andrey Hihlovskiy and contributors

All versions, present and past, of Wuff are licensed under MIT license.

Support via Gittip

wuff's People

Contributors

akhikhl avatar mcmil avatar nedtwigg avatar qri avatar twostone avatar ylemoigne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wuff's Issues

How to define Eclipse version and mirror?

I understand that wuff uses unpuzzle to "mavenize" the eclipse dependencies. However, I cannot get it to change the Eclipse version. I copied the definition of eclipse 4.1 from the latest unpuzzle, but it does not evaluate this before build:

unpuzzle {
    selectedEclipseVersion = '4.4.1'

    def suffix_os = [ 'linux': 'linux-gtk', 'macosx': 'macosx-cocoa', 'windows': 'win32' ]
    def suffix_arch = [ 'x86_32': '', 'x86_64': '-x86_64' ]
    def fileExt_os = [ 'linux': 'tar.gz', 'macosx': 'tar.gz', 'windows': 'zip' ]
    def current_os = 'windows'
    def current_arch = 'x86_64'

    eclipseVersion('4.4.1') {
        eclipseMavenGroup = 'eclipse-luna-sr1'
        eclipseMirror = 'http://mirror.netcologne.de'
        eclipseArchiveMirror = 'http://archive.eclipse.org'
        sources {
            source "${eclipseMirror}/eclipse//technology/epp/downloads/release/luna/SR1/eclipse-jee-luna-SR1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
            source "${eclipseMirror}/eclipse//eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-SDK-4.4.1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}", sourcesOnly: true
            source "${eclipseMirror}/eclipse//eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-4.4.1-delta-pack.zip"
            languagePackTemplate '${eclipseMirror}/eclipse//technology/babel/babel_language_packs/R0.12.0/luna/BabelLanguagePack-eclipse-${language}_4.4.0.v20140623020002.zip'
        }
    }
}

Running gradle build will still use the 4.4 eclipse mirrors and locations. The 4.4 eclipse SDK at the current mirror does not exist. Does anyone have a good workaround or solution?

Enhancmened suggestion - getQualifier and getVersion

Hi Andrey,

I've written a bit of code to get the qualifier (based on given date format) and version number (from the current MANIFEST.MF file). Let me know if you need it - it's really short, but can make creating a feature project a lot easier...

Manifest generation error during wrapLibs

I'm seeing an error when trying to build the product for my Eclipse RCP app. When I hit the wrapLibs task, I'm getting back a message Specify the section name using the "name" attribute of the <section> element rather than using a "Name" manifest attribute. I suspect that this is happening within the Ant jar task, but I can't figure out where the spurious "Name" attribute is coming in from.

Here's a Gist of the failure with debug turned on.

https://gist.github.com/stephencsmall/8120e5e53cb79ae9e53b

Plugins with "-" are not recognized but with "_" are

My target platform conains org.apache.logging.log4j_1.2.16.t1.jar.

This jar is not found. If I replace the _ with a - it is found.

I'd prefer to keep the _ because that is how I got the jar from Orbit.

What wrong with the _?

Problems After Updating buildDir

Hi,

I'm not sure if this is a wuff issue, but I didn't have this problem in a non-wuff compilation, so it seems like a good place to start.

At first, I used the default build directory for my project. Then, I wanted my build directory to be different than the default one. So, in the build.gradle file I've added:
project.buildDir = new File("../", "/gradleBuild/"+project.name)

It seemed to be working just fine, but once I removed the old build, located at $myproject/build folder (the default setting), while running the jar task, I receive the following error:
....
Caused by: java.lang.IllegalArgumentException: A Jar can only accept a valid file or directory: $myproject/build/classes/main
at aQute.bnd.osgi.Jar.(Jar.java:51)
at aQute.bnd.osgi.Jar.(Jar.java:69)
at aQute.bnd.osgi.Analyzer.setJar(Analyzer.java:833)
at org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest.setAnalyzerProperties(DefaultOsgiManifest.java:125)
at org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest.getEffectiveManifest(DefaultOsgiManifest.java:69)
at org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest_Decorated.getEffectiveManifest(Unknown Source)
at org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:151)
at org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:35)
at org.gradle.api.java.archives.Manifest$writeTo.call(Unknown Source)
at org.gradle.api.tasks.bundling.Jar$_closure1_closure3.doCall(Jar.groovy:48)
at sun.reflect.GeneratedMethodAccessor869.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at groovy.lang.Closure.call(Closure.java:412)
at groovy.lang.Closure.call(Closure.java:425)
at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.copyTo(MapFileTree.java:155)
at org.gradle.api.internal.file.AbstractFileTreeElement.copyFile(AbstractFileTreeElement.java:93)
at org.gradle.api.internal.file.AbstractFileTreeElement.copyTo(AbstractFileTreeElement.java:74)
... 82 more

Indicating that the build is actually located within the old configuration (the writing is to the correct address, the source however seems to be the old one).

Have you encountered an issue like this before?

Thanks,
Noga

e(fx)clipse does not support nativeLaunchers feature

Currently, switching on the nativeLaunchers feature will cause a build-time NullPointerException because of a missing delta pack.

Currently I've prepared a workaround (disabling it by default for efxclipse) in #71 , e(fx)clipse is platform independent (not like SWT), but maybe it would be a good idea to have a native launcher (exe for windows).

Version issue + problem when updating eclipseMirror

Hi,

I tried to set the selectedEclipseVersion to be 4.3.1. Problem is, it keeps looking for the files in the mirror instead of the archive.
In order to get around it, I tried defining the version myself - changing the sources to start with the archive address did not help. When setting the eclipseMirror to the archive site, I get the following error:

message:null

"org.gradle.tooling.BuildException: Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-bin.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:48)
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider.buildModel(GradleModelProvider.java:385)
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.java:290)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:633)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:646)
at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer$1.run(GradleClassPathContainer.java:109)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'altair.util'.
at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:77)
at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:115)
at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:92)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.configure(InProcessBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:79)
at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:30)
at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:108)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:45)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:51)
at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'altair.util'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:507)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:82)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
... 47 more
Caused by: java.lang.NumberFormatException: null
at java.lang.Long.parseLong(Long.java:404)
at java.lang.Long.parseLong(Long.java:483)
at java_lang_Long$parseLong.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.akhikhl.unpuzzle.utils.Downloader.downloadFile(Downloader.groovy:68)
at org.akhikhl.unpuzzle.utils.Downloader$downloadFile.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at org.akhikhl.unpuzzle.eclipse2maven.EclipseDownloader.downloadAndUnpack(EclipseDownloader.groovy:43)
at org.akhikhl.unpuzzle.eclipse2maven.EclipseDownloader$downloadAndUnpack.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at org.akhikhl.unpuzzle.Configurer.downloadEclipse(Configurer.groovy:112)
at org.akhikhl.unpuzzle.Configurer$downloadEclipse.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
at org.akhikhl.unpuzzle.Configurer.installEclipse(Configurer.groovy:143)
at org.akhikhl.unpuzzle.Configurer$installEclipse.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at org.akhikhl.wuff.Configurer.getSelectedEclipseMavenGroup(Configurer.groovy:153)
at org.akhikhl.wuff.Configurer.postConfigure(Configurer.groovy:203)
at org.akhikhl.wuff.JavaConfigurer.super$2$postConfigure(JavaConfigurer.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
at org.akhikhl.wuff.JavaConfigurer.postConfigure(JavaConfigurer.groovy:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:914)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at groovy.lang.Closure.call(Closure.java:412)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy14.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
... 53 more
"

The code I've inserted into the version (before that I of course set the selected version):

eclipseVersion('4.3.1'){
extendsFrom '4.2.2'
eclipseMavenGroup = 'eclipse-kepler-sr1'
eclipseMirror = 'http://archive.eclipse.org'
eclipseArchiveMirror = 'http://archive.eclipse.org'
def suffix_os = [ 'linux': 'linux-gtk', 'macosx': 'macosx-cocoa', 'windows': 'win32' ]
def suffix_arch = [ 'x86_32': '', 'x86_64': '-x86_64' ]
def fileExt_os = [ 'linux': 'tar.gz', 'macosx': 'tar.gz', 'windows': 'zip' ]

    def current_os = 'linux'
    def current_arch = 'x86_64'


    sources {

      source "$eclipseArchiveMirror/eclipse//technology/epp/downloads/release/kepler/SR1/eclipse-jee-kepler-SR1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
      source "$eclipseArchiveMirror/eclipse//eclipse/downloads/drops4/R-4.3.1-201309111000/eclipse-SDK-4.3.1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}", sourcesOnly: true
      source "$eclipseArchiveMirror/eclipse//eclipse/downloads/drops4/R-4.3.1-201309111000/eclipse-4.3.1-delta-pack.zip"

      languagePackTemplate '${eclipseArchiveMirror}/eclipse//technology/babel/babel_language_packs/R0.11.1/kepler/BabelLanguagePack-eclipse-${language}_4.3.0.v20131123020001.zip'
    }

Thanks!

Compiling Scala with new 0.0.13-SNAPSHOT fails

Hi Andrey,

I'm compiling Scala in my of my projects. In 0.0.12 version it's just fine, but when trying to move up to the new snapshot version, I get the following:
"Could not find any version that matches eclipse-luna-sr1:org.scala-lang.scala-library:+"

So I'm thinking the new version somehow changes my scala dependencies. Could you take a look?

Thanks!

Wraps jars in Windows native executables

Is there any way to wraps (automatically) the output jar in a Windows *.EXE file. I am not very happy with the batch solution because of the visible command promp.

Thanks in advance

Build error with mirror in settings.xml

In our ~/.m2/settings.xml we have defined to use our mirror for all repositories:

<mirrors>
    <mirror>
        <id>internal-repository</id>
        <name>Our Nexus</name>
        <url>http://nexus/content/groups/public</url>
        <mirrorOf>*</mirrorOf>
    </mirror>
</mirrors>

But this causes following error when building with wuff:

Deploying artifacts

      [zip] Building zip: /tmp/d50eb68f-8ecb-4089-a2dd-3a3dada95dcd/org.eclipse.core.runtime.compatibility.registry-3.5.300.v20140128-0851.jar
   [deploy] Deploying to http://nexus/content/groups/public/
   [deploy] Uploading: eclipse-luna-calipse/org.eclipse.core.runtime.compatibility.registry/3.5.300.v20140128-0851/org.eclipse.core.runtime.compatibility.registry-3.5.300.v20140128-0851.jar to repository internal-repository at http://nexus/content/groups/public/
   [deploy] Transferring 19K from g3-internal
   [deploy] An error has occurred while processing the Maven artifact tasks.
   [deploy]  Diagnosis:
   [deploy] 
   [deploy] Error deploying artifact 'eclipse-luna-calipse:org.eclipse.core.runtime.compatibility.registry:jar': Error deploying artifact: Failed to transfer file: http://nexus/content/groups/public/eclipse-luna-calipse/org.eclipse.core.runtime.compatibility.registry/3.5.300.v20140128-0851/org.eclipse.core.runtime.compatibility.registry-3.5.300.v20140128-0851.jar. Return code is: 401

getEclipseBundleSymbolicName is invoked "too early" for rcp apps

getEclipseBundleSymbolicName is invoked "too early" by rcp app configuration (indirectly, by getEclipseIntroId in defaultConfig.groovy). That means: temprary manifest does not exist yet, but getEclipseBundleSymbolicName already tries to read it, which leads to FileNotFoundException.

The solution is simply to replace PluginUtils.getEclipseBundleSymbolicName with project.bundleSymbolicName (which is populated early, before rcp app configuration).

Support for Eclipse 4

I am in the progress of switching a Maven Tycho Build of an e4 RCP application to wuff. But I think for e4 Wuff needs to be enhanced to support the new concepts:

  • There are no Views any more, but Application.e4xmi and Fragment.e4xmi (workaround: create file src/main/resources/plugin.xml and define it there)
  • There is no need to create an Application.java. Just use eclipse.application=org.eclipse.e4.ui.workbench.swt.E4Application in config.ini for SWT-Applications (Workaround: ?) This is normally defined in plugin.xml
    <extension
            id="myproductid"
            point="org.eclipse.core.runtime.products">
        <product
                name="myproductname"
                application="org.eclipse.e4.ui.workbench.swt.E4Application">
[...]

Workaround:

products {
    launchParameters << '-application'
    launchParameters << 'org.eclipse.e4.ui.workbench.swt.E4Application'
    launchParameters << '-product'
    launchParameters << "${project.name}.myproductid"
}

run {
    args = products.launchParameters
}
  • More to come?

contribution: update documentation with new plugin ids

Since I got bitten by invalid plugin ids while reading the doc, I thought I would contribute the documentation first with updated plugin ids.

You can find my update over https://github.com/pdeschen/wuff-wiki

I did a simple one liner over all plugin ids.

for I in *.md ; do sed -i '' -e "s/apply plugin: 'swt-lib'/apply plugin: 'org.akhikhl.wuff.swt-lib'/g" $I; done

I've also added a section in the Home.md about contributing.

Note: Unfortunately, github do not support pull request on wiki repo, so you'll need to go old school :-)

Launch and Debug from within Eclipse

Currently it is only possible to launch an application using ./gradlew run. To debug, you have to use ./gradlew debug and attach a remote debugger.

This also means there is no support for hot code replacement.

I was experimenting with creating a launch configuration using org.eclipse.equinox.launcher.WebStartMain as main class, program arguments -application org.eclipse.e4.ui.workbench.swt.E4Application -product appid.productid -user @user.home/.kratzer/user -data @user.home/.kratzer/data -configuration @user.home/.kratzer/configuration and vm arguments -Djnlp.osgi.bundles=org.eclipse.core.runtime@start,org.eclipse.equinox.ds@2:start,org.eclipse.equinox.common@2:start -Djnlp.org.eclipse.update.install.features=true -Djnlp.equinox.use.ds=true, because WebstartMain can discover all bundles at runtime, but this did not work, because it expects all dependencies as jars.

I was able to successfully launch the application using a launch configuration with main class org.eclipse.equinox.launcher.Main and program arguments -application org.eclipse.e4.ui.workbench.swt.E4Application -product appid.productid -user @user.home/.kratzer/user -data @user.home/.kratzer/data -configuration ${project_loc:projectname}/build/run/configuration. But this only works after having executed ./gradlew prepareRunConfig. Also this does not allow hot code replacement, because after every change, prepareRunConfig has to be executed.

Another idea is to use the Eclipse PDE tools:

apply plugin: 'eclipse'
eclipse {
    project {
        natures 'org.eclipse.pde.PluginNature'
        buildCommand 'org.eclipse.pde.ManifestBuilder'
        buildCommand 'org.eclipse.pde.SchemaBuilder'
    }
    classpath {
        containers 'org.eclipse.pde.core.requiredPlugins'
    }
}

But I think this assumes that there is the META-INF/MANIFEST.MF and build.properties in the root dir. I have just happily removed these two files.

Is there any way for being able to run or debug an application build with wuff from within eclipse with hot code replacement?

Support for eclipse-luna-sp1

Hi Andrey,

Couldn't find wuff support for the newest Eclipse release, so I've added my own version - thought
you could use it:
eclipseVersion('4.4.1') {
eclipseMavenGroup = 'eclipse-luna-sr1'
eclipseMirror = 'http://mirror.netcologne.de'
eclipseArchiveMirror = 'http://archive.eclipse.org'
sources {
source "$eclipseMirror/eclipse//technology/epp/downloads/release/luna/SR1/eclipse-jee-luna-R-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
source "$eclipseMirror/eclipse/eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-SDK-4.4.1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
source "$eclipseMirror/eclipse/eclipse/downloads/drops4/R-4.4.1-201409250400/eclipse-4.4.1-delta-pack.zip"
languagePackTemplate '${eclipseMirror}/eclipse//technology/babel/babel_language_packs/R0.12.0/luna/BabelLanguagePack-eclipse-${language}_4.4.1.v20140623020002.zip'
}

Eclipse version to use

How and where do I set the version of the Eclipse framework I want to use?
By default Luna is used. But my source depends on 3.7. Where do I configure Wuff to use that instead?
The wiki doesn't elaborate on this :).

build.properties with multiple source.. entries causes build failure

When using multiple source folders in build.properties

source.. = src/main/emf/,\
           src/main/java

I get the error

A problem occurred configuring project ':project'.
> Cannot convert the provided notation to a File or URI: [src/main/emf/, src/main/java].
  The following types/formats are supported:
    - A String or CharSequence path, e.g 'src/main/java' or '/usr/include'
    - A String or CharSequence URI, e.g 'file:/usr/include'
    - A File instance.
    - A URI or URL instance.

Workaround: create a file build.gradle with content

sourceSets {
    main {
        java {
            srcDirs = ['src/main/java', 'src/main/emf']
        }
    }
}

How Wuff support SwtBot in E4

Hi,

I am working on an E4 project in which I try to use SWTBot for GUI testing. After I add SWTBot dependency in MANIFEST.MF, wuff throws error like below

Could not find any version that matches eclipse-luna-sr2:org.eclipse.swtbot.swt.finder:+.
Searched in the following locations:
file:/C:/Users/jyang/.m2/repository/eclipse-luna-sr2/org.eclipse.swtbot.swt.finder/maven-metadata.xml
file:/C:/Users/jyang/.m2/repository/eclipse-luna-sr2/org.eclipse.swtbot.swt.finder/
https://jcenter.bintray.com/eclipse-luna-sr2/org.eclipse.swtbot.swt.finder/maven-metadata.xml
https://jcenter.bintray.com/eclipse-luna-sr2/org.eclipse.swtbot.swt.finder/
file:/C:/Users/jyang/.wuff/m2_repository/eclipse-luna-sr2/org.eclipse.swtbot.swt.finder/maven-metadata.xml
file:/C:/Users/jyang/.wuff/m2_repository/eclipse-luna-sr2/org.eclipse.swtbot.swt.finder/

It seems that SwtBot can not be found by Wuff. So I am wondering if there is a solution in wuff to solve such problem? Since SwtBot is published in p2 format, I can not add it in as a repository in Gradle.

Thanks in advance.

privateLib get "bundleized" and published in product build

Hi,

I have multi project with :
a project A of type bundle, with some privateLib declared.
a project B of type rcp-app with a dependency to the previous bundle.

By the inheritance game, privateLib is in compile configuration of A.
A is in compile configuration of B.
So, privateLib is in runtime configuration of B.

In EquinoxAppConfigurer, configureTask_wrapLibs use runtime to output wrappedLib (unnecessary wrapping)
Then EquinoxProductConfigurer, writeIniFile read the content of wrapLibs to generate ini file.

So privateLib dependency of my bundle end up in very public places.

Provide option to keep original plugin.xml and MANIFEST.MF

I don't want wuff to enhance my plugin.xml because it already contains the view configurations correctly. Enhancing will duplicate some of the views.

I also don't want wuff to change my MANIFEST.MF because then eclipse would not load my plug-in.

Can you please provide a simple switch, like "keepPluginXml" and "keepManifest" or something similar?

I tried to replace the original file with gradle, but at the end, the JAR file always contains the modified versions. This is my gradle code:

task replacePluginXml(type: Copy) {
from project.file("plugin.xml")
into 'build/extra'
inputs.files 'build/extra/plugin.xml'
outputs.files 'build/extra/plugin.xml'
}

task replaceManifestMf(type: Copy) {
from project.file("META-INF/MANIFEST.MF")
into 'build/tmp-osgi'
inputs.files 'build/tmp-osgi/MANIFEST.MF'
outputs.files 'build/tmp-osgi/MANIFEST.MF'
}

jar.dependsOn(replacePluginXml)
jar.dependsOn(replaceManifestMf)

java.lang.IncompatibleClassChangeError

java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for org.akhikhl.unpuzzle.osgi2maven.Deployer do not match. Expected -1 but got 6

Getting this during gradle build

I have this dependency

classpath "org.akhikhl.wuff:wuff-plugin:0.0.13-SNAPSHOT"

and the plugin is applied this way:

apply plugin: "org.akhikhl.wuff.eclipse-equinox-app"

Could you please help me with that? What details should I provide?

Support testing inside running Eclipse

Some parts of plugins/RCP apps can be tested using unit test but other tests will need to run in an initialized Eclipse instance. So far the support for testing with these tests is missing in Wuff and IMO this is a blocker for the adoption.

Some of the ideas how to implement this:

  1. Allow to add new sourceSet to plugin projects like eclipseTest (in addition to main & test). This would be built into another fragment or plugin. Add a target that will install the original plugin and testing plugin/fragment into a clean Eclipse RCP app/Eclipse IDE. Then launch PDE test listener and this app and let it run PDE test. It should be possible to do it like for the Ant/PDE integration described in http://www.eclipse.org/articles/article.php?file=Article-PDEJUnitAntAutomation/index.html
  2. Expect project structure like :myPlugin, :myPluginTest. First project builds plugin, second builds its test plugin/fragment. 2nd project also adds a target to run this test similarly as in (1.)

While the (1.) is more Gradle-like the (2.) can be simpler to implement and probably easier to map to Eclipse setups if anyone wants to run these tests directly from Eclipse.

Note that these are my ideas based on my experience with Eclipse 5 years ago. Feel free to use another approach if it is a better way. Meanwhile I will likely try to implement support using on of these approaches.

osgiExecutionEnvironment cannot be customized

While in my project (using 'org.akhikhl.wuff.eclipse-rcp-app'), the project.ext.osgiExecutionEnvironment property doesn't exist (yet) and any change will be overwritten

Workaround :
afterEvaluate { project ->
project.ext.osgiExecutionEnvironment = 'JavaSE-1.7,'+project.ext.osgiExecutionEnvironment
}

Worst, the property cannot be unset, so it always end in product configuration.ini file.

I'm ok to fix this issue, but I'm not sure what's the right way. To my mind this property should be set in product configuration DSL (EquinoxAppProductsExtension class)
Is there any reason of why it's in project's ext ?

I feel like if I'm missing something

compilerAdapter property in build.properties causes GroovyCastException

In order to properly allow PDE Build to compile my groovy files, I needed to add the following to all my build.properties files:

sourceFileExtensions=*.java, *.groovy
compilerAdapter=org.codehaus.groovy.eclipse.ant.GroovyCompilerAdapter
compilerAdapter.useLog=true

as explained in this post:http://contraptionsforprogramming.blogspot.com/2010/08/groovy-pde-redux.html

However, for some reason, wuff is doing some weird type conversion when trying to read that property. My otherwise successful builds now fail once I added those three lines. Here is the root exception cause of the error:

Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.codehaus.groovy.eclipse.ant.GroovyCompilerAdapter' with class 'java.lang.String' to class 'java.util.Map'
        at org.akhikhl.wuff.OsgiBundleConfigurer.readBuildProperties(OsgiBundleConfigurer.groovy:533)
        at org.akhikhl.wuff.OsgiBundleConfigurer.preConfigure(OsgiBundleConfigurer.groovy:516)
        at org.akhikhl.wuff.Configurer.apply(Configurer.groovy:37)
        at org.akhikhl.wuff.Configurer$apply.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.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:110)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:69)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:35)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:117)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:85)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:130)
        at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:41)
        at org.gradle.api.Project$apply$0.call(Unknown Source)
        at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
        at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
        at build_67qjugt193gi7iadc8hv9r2ho5.run(C:\Users\erika01\git\salesforce-oauth2-browser-component\build.gradle:24)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
        ... 31 more

Is there a workaround? I have to have those properties there, or else when I do a PDE build, the .groovy files will be placed in the output .jar without actually being compiled.

Configuring the generated Manifest.mf within build.gradle does not work

Currently I am trying to get a JavaFX-based RCP application to run. See https://github.com/tschulte/contacts-griffon.

After having the project running, I tried to change the project layout from the default PDE layout to the default gradle/maven layout (https://github.com/tschulte/contacts-griffon/tree/default_gradle_project_layout). In this effort I tried to remove the Manifest.mf and configure all specialitiies in build.gradle to let gradle generate the manifest:

project(':org.eclipse.fx.demo.contacts.app') {
    apply plugin: 'org.akhikhl.wuff.eclipse-equinox-app'
    tasks.jar {
        manifest {
            instruction 'Bundle-Activator', 'org.eclipse.fx.demo.contacts.BundleActivatorImpl'
            instruction 'Service-Component', 'OSGI-INF/component.xml'
        }
    }
}
project(':org.eclipse.fx.demo.contacts.edit') {
    apply plugin: 'org.akhikhl.wuff.osgi-bundle'
    jar {
        manifest {
            instruction 'Bundle-Activator', 'org.eclipse.fx.demo.contacts.provider.ContactsEditPlugin$Implementation'
        }
    }
}

Both Bundle-Activators and and the Service-Component entries are not added to the

Support osgi-extensions to enable e(fx)clipse based e4 RCP applications

Currently I am trying to get a JavaFX-based RCP application to run. See https://github.com/tschulte/contacts-griffon.

This project is a copy of the contacts demo of e(fx)clipse and I just added the gradle build file. As you can see, I needed to do a lot of stuff to at least get it running, though it still does not run completely.

OSGI-Extensions are not supported out of the box:

products {
    launchParameter '-vmargs'
    launchParameter '-Dosgi.framework.extensions=org.eclipse.fx.osgi'
}
run {
    args.addAll(products.launchParameters)
}
configurations {
    osgiExtension
}
dependencies {
    osgiExtension "$eclipseMavenGroup:org.eclipse.fx.osgi:+"
}
afterEvaluate {
    tasks.prepareRunConfig << {
        File configIni = file("$buildDir/run/configuration/config.ini")
        configIni.append "osgi.framework.extensions=reference\\:${configurations.osgiExtension.files[0].toURI()}"
    }
}
configurations {
    compileOnly
    all {
        // exclude a lot of dependencies automatically applied by wuff (swt et. al.)
    }
}

As you can see, the bundle org.eclipse.fx.osgi must not be added to the osgi.bundles list in the config.ini, but instead to a new entry osgi.framework.extensions.

build fails on :libs:unpuzzle:installEclipse

After cloning the git repository, I did a "gradle build" (on Windows 7, using Jdk1.7 and Gradle 1.11).
Here is the important stack trace:

Caused by: : Problem: failed to create task or type pom
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

        at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:499)
        at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:431)
        at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
        at org.akhikhl.unpuzzle.osgi2maven.Deployer$_deployBundle_closure2.doCall(Deployer.groovy:84
)
        at org.akhikhl.unpuzzle.osgi2maven.Deployer.deployBundle(Deployer.groovy:83)
        at org.akhikhl.unpuzzle.osgi2maven.Deployer$deployBundle.call(Unknown Source)
        at org.akhikhl.unpuzzle.eclipse2maven.EclipseDeployer$_deploy_closure2_closure8.doCall(Eclip
seDeployer.groovy:168)
        at org.akhikhl.unpuzzle.eclipse2maven.EclipseDeployer$_deploy_closure2.doCall(EclipseDeploye
r.groovy:167)
        at org.akhikhl.unpuzzle.eclipse2maven.EclipseDeployer.deploy(EclipseDeployer.groovy:166)
        at org.akhikhl.unpuzzle.eclipse2maven.EclipseDeployer$deploy.call(Unknown Source)
        at org.akhikhl.unpuzzle.Configurer.installEclipse(Configurer.groovy:145)
        at org.akhikhl.unpuzzle.Configurer$_apply_closure2_closure7_closure14.doCall(Configurer.groo
vy:66)
        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:502)

Please note, the same fail occurs if I do a build on "IdeApp-8" example.

Failed to get resource

Hi,

Every time that I build or clean my application, I see a lot of "Failed to get resource" messages in the build log. My application is working fine, so far. But any idea how to solve it or should I ignore it?

Sample log:
Failed to get resource: HEAD. [HTTP HTTP/1.1 409 Conflict: http://oss.jfrog.org/artifactory/oss-snapshot-local/org/akhikhl/gradle-onejar/gradle-onejar/0.0.11/gradle-onejar-0.0.11.pom]
Failed to get resource: HEAD. [HTTP HTTP/1.1 409 Conflict: http://oss.jfrog.org/artifactory/oss-snapshot-local/commons-io/commons-io/2.4/commons-io-2.4.pom]

The reason behind the log is because the artifact does not exists in the repository. Is it expected ?

Number of fails:
$ ./gradlew build --info | grep "Conflict:" | wc -l
137

Problem with PluginUtils

Hi Andrey,

I'm hoping you could help me with another problem.

I finally got to compiling (one of) my main project, which is a proper plugin. I'm using the ide-bundle plugin. Gradle/wuff finds my plugin.xml file, however I get the following error:

What went wrong:
Execution failed for task ':createOsgiManifest'.

No such property: @Class for class: java.lang.String
Possible solutions: class

The stack trace led me to PluginUtils.groovy, line 134:
def classes = pluginConfig.extension.''.findAll({ it.'@Class' })*.'@Class' + pluginConfig.extension.''.findAll({ it.'@contributorClass' })*.'@contributorClass'

I'm a newbie to Gradle and Groovy, so I wanted to make sure this is me doing something wrong, and not a wuff bug.

As usual, your input will be greatly appreciated.

Just for the record, here's the original trace:

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':createOsgiManifest'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    Caused by: groovy.lang.MissingPropertyException: No such property: @Class for class: java.lang.String
    Possible solutions: class
    at org.akhikhl.wuff.PluginUtils$_findImportPackagesInPluginConfigFile_closure4.doCall(PluginUtils.groovy:134)
    at org.akhikhl.wuff.PluginUtils.findImportPackagesInPluginConfigFile(PluginUtils.groovy:134)
    at org.akhikhl.wuff.PluginUtils$findImportPackagesInPluginConfigFile$7.call(Unknown Source)
    at org.akhikhl.wuff.OsgiBundleConfigurer.createManifest(OsgiBundleConfigurer.groovy:316)
    at org.akhikhl.wuff.OsgiBundleConfigurer$_configureTask_createOsgiManifest_closure6_closure28_closure29.doCall(OsgiBundleConfigurer.groovy:108)
    at org.akhikhl.wuff.OsgiBundleConfigurer$_configureTask_createOsgiManifest_closure6_closure28.doCall(OsgiBundleConfigurer.groovy:108)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:539)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:520)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 44 more

Missing plugins : org.eclipse.equinox.p2.metadata.repository org.eclipse.equinox.p2.repository

Hi,

I have a RCP project that contains these 2 jars[1] declared in the plugins section. The plugin jar files are not copied in the output/xxx/plugins folder and not registered in the config file.

The funny fact is that it works for all 153 others plugin dependencies. It only misses these 2.

[1]: org.eclipse.equinox.p2.metadata.repository and org.eclipse.equinox.p2.repository

Thanks,
Rafael Torres

RCP app may hang on Linux with Cinnamon

Eclipse-RCP app may sporadically hang on start, when running on Linux with Cinnamon Desktop. The exact reason for this is unkown, although the following is observed:

  • The issue is not specific to Wuff - same behavior is seen with Eclipse-RCP app generated and run under Eclipse IDE.
  • The issue is not specific to particular JDK - same behavior is seen with JDK-7 and JDK-8.
  • The issue is not reproducible on other desktops - Linux with [XFCE, Mate], Windows.

The issue is fixed by deleting all folders in "configuration" folder of the RCP app. Note: you shouldn't delete "configuration/config.ini", delete only subfolders.

new jvmArgs do not work correctly

Currently I am trying to get a JavaFX-based RCP application to run. See https://github.com/tschulte/contacts-griffon.

This project is a copy of the contacts demo of e(fx)clipse and I just added the gradle build file. As you can see, I needed to do a lot of stuff to at least get it running, though it still does not run completely.

To use osgi extensions, I had to add a vmarg

products {
    launchParameter '-vmargs'
    launchParameter '-Dosgi.framework.extensions=org.eclipse.fx.osgi'
}
run {
    args.addAll(products.launchParameters)
}

I tried using the new jvmArg method instead, but that did not work.

Intro page shown incorrectly on Linux with LXDE or Unity

Eclipse-RCP/IDE app with intro does not show intro page correctly on Linux with LXDE or Unity desktop. Instead of embedded browser, it shows white "pseudo-page" with hyperlink "Welcome":

rcp_welcome_lxde

When you click hyperlink, the desired intro page is opened in separate browser window.
The exact reason for it is unkown, although the following is observed:

  • The issue is not specific to Wuff - same behavior is seen with Eclipse-RCP app generated and run under Eclipse IDE.
  • The issue is not specific to particular JDK - same behavior is seen with JDK-7 and JDK-8.
  • The issue is not reproducible on other desktops - Linux with [XFCE, Mate, Cinnamon], Windows.

There is no known solution to this issue.

Allow more fine grained control over automatically added dependencies

Currently I am trying to get a JavaFX-based RCP application to run. See https://github.com/tschulte/contacts-griffon.

This project is a copy of the contacts demo of e(fx)clipse and I just added the gradle build file. As you can see, I needed to do a lot of stuff to at least get it running, though it still does not run completely.

I had to exclude a lot of dependencies (trial and error), that are automatically added by Wuff:

configurations {
    compileOnly
    all {
        exclude module: 'org.apache.batik.css'
        exclude module: 'org.apache.batik.util'
        exclude module: 'org.apache.batik.util.gui'
        exclude module: 'org.eclipse.ant.core'
        exclude module: 'org.eclipse.core.filesystem.linux.x86_64'
        exclude module: 'org.eclipse.core.net'
        exclude module: 'org.eclipse.core.net.linux.x86_64'
        exclude module: 'org.eclipse.core.runtime.compatibility.registry'
        exclude module: 'org.eclipse.core.variables'
        exclude module: 'org.eclipse.e4.ui.bindings'
        exclude module: 'org.eclipse.e4.ui.css.core'
        exclude module: 'org.eclipse.e4.ui.css.swt'
        exclude module: 'org.eclipse.e4.ui.css.swt.theme'
        exclude module: 'org.eclipse.e4.ui.widgets'
        exclude module: 'org.eclipse.e4.ui.workbench3'
        exclude module: 'org.eclipse.e4.ui.workbench.addons.swt'
        exclude module: 'org.eclipse.e4.ui.workbench.renderers.swt'
        exclude module: 'org.eclipse.e4.ui.workbench.swt'
        exclude module: 'org.eclipse.equinox.bidi'
        exclude module: 'org.eclipse.equinox.launcher.gtk.linux.x86_64'
        exclude module: 'org.eclipse.equinox.security'
        exclude module: 'org.eclipse.help'
        exclude module: 'org.eclipse.jface'
        exclude module: 'org.eclipse.jface.databinding'
        exclude module: 'org.eclipse.osgi.compatibility.state'
        exclude module: 'org.eclipse.swt'
        exclude module: 'org.eclipse.swt.gtk.linux.x86_64'
        exclude module: 'org.eclipse.ui'
        exclude module: 'org.eclipse.ui.views'
        exclude module: 'org.eclipse.ui.workbench'
        exclude module: 'org.w3c.css.sac'
        exclude module: 'org.w3c.dom.events'
        exclude module: 'org.w3c.dom.smil'
        exclude module: 'org.w3c.dom.svg'
    }
}

This should not be necessary.

Cannot build plugin against org.junit bundle

My META-INF/MANIFEST.MF contains
Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Wuff-junit Bundle-SymbolicName: wuff-junit Bundle-Version: 1.0.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Require-Bundle: org.junit

There is a source src/wuff/junit containing:
`
package wuff.junit;

import org.junit.Assert;
import org.junit.Test;

public class WuffTest {

@Test
public void foo() {
    Assert.fail();
}

}
`
Plugin like this builds using Eclipse PDE as it depends on org.junit-4.11.0.v201303080030

If I add build script like
`
buildscript {
repositories {
jcenter()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}

dependencies {
classpath "org.akhikhl.wuff:wuff-plugin:$wuff_version"
}
}

repositories {
jcenter()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}

apply plugin: 'java'
apply plugin: 'org.akhikhl.wuff.eclipse-ide-bundle'

dependencies {
compile "${eclipseMavenGroup}:org.junit:+"
}
The compilation fails because it cannot find classes from junit.jar. org.junit bundle contains this JAR and its classpath is set upBundle-ClassPath: junit.jar`.

I've also seen message 'Bundle name org.junit could not be found' in a more complex setup expanding this. There is a project with org.akhikhl.wuff.eclipse-ide-app plugin applies where I want to install this plugin + org.junit as its dependency.

privateLib configurations are invisible to other gradle plugins

The other day I was trying to use the maven plugin to publish my project to my local maven repository. It didn't quite work because the maven plugin doesn't know about privateLib configurations. Thus the pom.xml file was generated with missing dependencies in it.

Going through your documentation, this line caught my attention:

"compile" configuration extends from "privateLib"

Maybe if it were the other way around other plugins could interpret privateLib configurations without problems?

Working within eclipse?

How does everyone work within eclipse?

We have a bunch of projects/features/plugins/apps. Our developers have so far been working within eclipse. Now I have to make all of these build with jenkins/gradle, without breaking everybody's work.

  • wuff wants things (plugin.xml, META-INF, icons) in src/main/resources, but the way eclipse works it wants those at the root of the project
  • Even if I leave things as they are, my extensions inside MANIFEST (e.g. Bundle-Version: ${project.ext.calculatedVersion}) break the way eclipse works and won't let me start the plugin as an application: "invalid version "${project.ext.calculatedVersion}": non-numeric"

Basically, I want to take a raw "Hello world" plugin project and make it build with wuff, but still work within eclipse.

Scaffold command fails on OSX

Encountered an error when following the instructions laid out at https://github.com/akhikhl/wuff/wiki/Create-first-RCP-app

Environment

------------------------------------------------------------
Gradle 2.0-rc-1
------------------------------------------------------------

Build time:   2014-06-06 07:02:41 UTC
Build number: none
Revision:     b6ead6fa452dfdadec484059191eb641d817226c

Groovy:       2.3.2
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_05 (Oracle Corporation 25.5-b02)
OS:           Mac OS X 10.9.3 x86_64

Error on output

Downloading file: http://mirror.netcologne.de/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-null-x86_64.null


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'test'.
> java.io.FileNotFoundException: http://mirror.netcologne.de/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-null-x86_64.null

Remove 'Require-Bundle: org.eclipse.osgi'

Hello, I'm using the apply plugin: 'org.akhikhl.wuff.osgi-bundle' plugin to deploy a bundle to Apache Karaf and I'm almost sure I don't need the dependency on org.eclipse.osgi. But whenever I build a bundle, that header is added. Is there a way to remove that header from my manifest?

Thx

clean fails

Hi,

I get the following error:

Execution failed for task ':clean'.

Unable to delete directory: /unpuzzle_temp

Eclipse Update Site?

I was playing around with wuff to produce Eclipse plugins, and couldn't find anything that helps in producing an update site for the plugins compiled.

Are there are plans for such a feature? If not, I might be able to contribute later on.

wuff doesn't find Eclipse jars

I tried a build of examples/IdeApp-1/MyIdeAppgiven this wuff configuration:

repositories {
  //mavenLocal()
  jcenter()
}
wuff {
  localMavenRepositoryDir = new File('D:/Java/wuffCache/m2_repository')

  wuffDir = new File('D:/Java/wuffCache', '.wuff')

  selectedEclipseVersion = '3.7.2' // '4.3.2'

  eclipseVersion('3.7.2') {
  }

I saw that wuff did some deploy like this:

[deploy] [INFO] Uploading repository metadata for: 'artifact org.eclipse.jst.ejb.ui:org.eclipse.j
st.ejb.ui'
   [deploy] [INFO] Uploading project information for org.eclipse.jst.ejb.ui 1.1.601.v201201261600
   [deploy] Deploying to file:/D:/Java/wuffCache/m2_repository
   [deploy] Uploading: org/eclipse/jst/j2ee/core/org.eclipse.jst.j2ee.core/1.2.102.v201202090300/org
.eclipse.jst.j2ee.core-1.2.102.v201202090300.jar to repository remote at file:/D:/Java/wuffCache/m2_
repository
   [deploy] Transferring 2624K from remote

But then, errors like this occurred:

> Could not resolve all dependencies for configuration ':runtime'.
   > Could not find any version that matches eclipse-indigo-sr2:org.eclipse.osgi:+.
     Searched in the following locations:
         http://jcenter.bintray.com/eclipse-indigo-sr2/org.eclipse.osgi/maven-metadata.xml
         http://jcenter.bintray.com/eclipse-indigo-sr2/org.eclipse.osgi/
         file:/D:/Java/mvn-repo/eclipse-indigo-sr2/org.eclipse.osgi/maven-metadata.xml
         file:/D:/Java/mvn-repo/eclipse-indigo-sr2/org.eclipse.osgi/
         file:/D:/Java/wuffCache/m2_repository/eclipse-indigo-sr2/org.eclipse.osgi/maven-metadata.xm
l
         file:/D:/Java/wuffCache/m2_repository/eclipse-indigo-sr2/org.eclipse.osgi/
         http://repo1.maven.org/maven2/eclipse-indigo-sr2/org.eclipse.osgi/maven-metadata.xml
         http://repo1.maven.org/maven2/eclipse-indigo-sr2/org.eclipse.osgi/
     Required by:
         :MyIdeApp:1.0.0.0

First, I was surprised that wuff also searches in my local Maven repo, allthough mavenLocal() is commented out (in fact I have a some environment variable M2_REPO pointing to the directory). Then wuff expects to find a directory with files in eclipse-indigo-sr2 inside D:/Java/wuffCache/m2_repository which does not exist. All deployed Eclipse jars can be found instead in directory wuffCache\m2_repository\org\eclipse.And last, wuff considers wuffCache/m2_repository as a remote repository.

Is this some configuration problem?

Bundle-ActivationPolicy: lazy

Is there a way choose if the header Bundle-ActivationPolicy: lazy will be included in the manifest or not? Some times I want my bundles to start right away. Would be a nice thing to have.

P.S.: Wuff is an amazing plugin :) Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.