Help wanted for supporting Java 9

408 views
Skip to first unread message

Ben Evans

unread,
May 22, 2017, 9:07:47 AM5/22/17
to bndtools-users
Hi,

I know that bndtools probably doesn't support Java 9 yet - but Neil Bartlett suggested I post this request here.

I'm asking for help in getting (at least partial) support as quickly as we can.

Mark Reinhold has published a new version of the JPMS spec which includes Automatic Modules. Myself and some others from the London Java Community are trying to get the Maven toolchain upgraded to the point where Maven-based projects can be used to test out & verify the AM changes.

We've managed to get the maven-compiler-plugin working, and a release (3.6.2, I think) is being prepared that will now work with Java 9.

However, our next stumbling block is maven-bundle-plugin, which is failing with this exception:

java.lang.NullPointerException
    at aQute.bnd.header.OSGiHeader.quote(OSGiHeader.java:150)
    at aQute.bnd.header.Attrs.append(Attrs.java:416)
    at aQute.bnd.header.Attrs.append(Attrs.java:397)
    at aQute.bnd.header.Parameters.append(Parameters.java:175)
    at aQute.bnd.header.Parameters.toString(Parameters.java:164)
    at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:788)
    at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer(ManifestPlugin.java:298)
    at org.apache.felix.bundleplugin.ManifestPlugin.execute(ManifestPlugin.java:100)
    at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:387)
    at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:378)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    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.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:563)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

which seems to implicate bndtools to us.

Can someone help us with some cycles to try to resolve these problems? There is very little time left (< 3 weeks) before JPMS must be resubmitted for a vote, and a working Maven toolchain will allow us to provide much better feedback to Mark and the whole EC, as it allows a much wider group of developers to try out Java 9 modules (& AM) for themselves.

This is real "force multiplier" effort, and we have people ready to assist in trying out changes & RCs - but we badly need some support from bndtools developers.

Please can someone help us?

Thanks,

Ben

Neil Bartlett

unread,
May 22, 2017, 9:27:02 AM5/22/17
to bndtool...@googlegroups.com
Hi Ben,

Which precise version of maven-bundle-plugin are you using for this? You should be using the latest release version, which is 3.3.0.

However, I’m not sure I understand what you are doing or why maven-bundle-plugin needs to be involved. It’s not one of the “core” Maven plugins (despite its name — it’s actually a violation of the normal plugin naming conventions), and it is used only by OSGi developers.

Are you trying to show than an OSGi application can be run as JPMS automodules without any refactoring? I can already tell you that won’t work, because OSGi runs bundles in their own classloaders and allows bundles to have overlapping private contents.

Regards,
Neil



--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
May 22, 2017, 9:36:16 AM5/22/17
to bndtool...@googlegroups.com
The maven-bundle-plugin is developed by the Apache Felix community[1]. The Bnd community develops the bnd-maven-plugin [2] which (uses proper maven plugin naming and) has a different operational mode than the maven-bundle-plugin.

As Neil asked, what version of the plugin are you using? So we can know the underlying version of bndlib in use. Also, what was the input to the plugin? Perhaps the input is malformed.

[1] https://github.com/apache/felix/tree/trunk/tools/maven-bundle-plugin
[2] https://github.com/bndtools/bnd/tree/master/maven
--
BJ

Ben Evans

unread,
May 22, 2017, 9:44:33 AM5/22/17
to bndtool...@googlegroups.com
Thanks Neil.

Moving to 3.3.0 solves the NPE issue, but there are still problems
with the plugin, and mvn package still fails.

This thread: https://github.com/vavr-io/vavr/issues/1225 seems
relevant here. Vavr (previously Javaslang) is one of the projects
we're using as a proving ground - because it has so few dependencies
and it gives javac a decent workout.

I'm in contact with the lead dev of Vavr - so I'll ask him to come
here & join the discussion, but the solution might be "make Vavr not
use maven-bundle-plugin".

If anyone wants to try this out and provide ideas of how else we might
approach this - https://github.com/kittylyst/vavr

and commit c22af620e80cfacd630096eb8cfbb5e0a9d504a9 is the one to try.

Thanks,

Ben

Neil Bartlett

unread,
May 23, 2017, 4:39:22 AM5/23/17
to bndtool...@googlegroups.com
From a quick skim of that thread, it seems like he is using bnd’s baselining feature to validate package compatibility and ensure correct version evolution, even though not targetting OSGi as a runtime platform. That’s a pretty cool usage of the tooling.

Do let us know the details of any problems you would like to look into.

Neil

BJ Hargrave

unread,
May 23, 2017, 11:45:25 AM5/23/17
to bndtool...@googlegroups.com
So I cloned the https://github.com/kittylyst/vavr repo but immediately run into the issue that I don't have:

[INFO] Building Vavr Match 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:3.6.2-SNAPSHOT is missing, no dependency information available

So I can't get to the issue you see with Bnd.
--
BJ

BJ Hargrave

unread,
May 23, 2017, 11:53:11 AM5/23/17
to bndtool...@googlegroups.com
If I use the 3.6.1 compile plugin, I see:

[INFO] --- maven-bundle-plugin:3.3.0:manifest (bundle-manifest) @ vavr-match ---
[ERROR] Manifest io.vavr:vavr-match:jar:1.0.0-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Manifest io.vavr:vavr-match:jar:1.0.0-SNAPSHOT : Invalid class file module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)

So it looks like Bnd is trying to process the module-info.class file and barfing.

[DEBUG] parseClassFile(): path=module-info.class resource=/Users/hargrave/git/tmp/vavr/vavr-match/target/classes/module-info.class
[DEBUG] Reported exception
java.lang.ArrayIndexOutOfBoundsException: 19
    at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:525)
    at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:496)
    at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:485)
    at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:475)
    at aQute.bnd.osgi.Analyzer.analyzeJar(Analyzer.java:2330)
    at aQute.bnd.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:2237)
    at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:172)
    at aQute.bnd.osgi.Builder.analyze(Builder.java:389)
    at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:687)

So it looks like I'll need to add support to Bnd's class file parser for module-info.class files: http://cr.openjdk.java.net/~mr/jigsaw/spec/lang-vm.html#jigsaw-2 (or ignore them).
--
BJ

Ben Evans

unread,
May 23, 2017, 12:20:23 PM5/23/17
to bndtool...@googlegroups.com
Thanks BJ - that matches the 3.6.2-SNAPSHOT error. There should be a
release of 3.6.2 with the fixes in out soon.

Do you need any help - e.g. trying out bleeding edge builds?

BJ Hargrave

unread,
May 23, 2017, 12:21:50 PM5/23/17
to bndtool...@googlegroups.com
Let me make a fix for Bnd and then I'll hack it into maven-bundle-plugin to see how that goes.

BJ Hargrave

unread,
May 23, 2017, 7:47:00 PM5/23/17
to bndtool...@googlegroups.com
I fixed the class file parsing issue but have run into another issue I'll work on tomorrow.
--
BJ

BJ Hargrave

unread,
May 24, 2017, 1:53:22 PM5/24/17
to bndtool...@googlegroups.com
Ben,

I have made fixes to Bnd to resolve the build issues. I can't complete the full build since it fails during a compile which I suspect the compile plugin fix addresses.

Add the following to the pom, to use the latest Bnd snapshot with the maven-bundle-plugin.

$ git diff
diff --git a/pom.xml b/pom.xml
index 3e99d81a..a1025273 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,6 +89,24 @@ Note: The maven build currently needs to be started from the vavr root dir
         <scala.maven.version>3.2.2</scala.maven.version>
         <scala.version>2.12.2</scala.version>
     </properties>   
+    <pluginRepositories>
+      <pluginRepository>
+        <releases>
+          <enabled>false</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>fail</checksumPolicy>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+          <updatePolicy>interval:30</updatePolicy>
+          <checksumPolicy>fail</checksumPolicy>
+        </snapshots>
+        <id>bndSnapshots</id>
+        <name>Bnd Snapshots</name>
+        <url>https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles</url>
+        <layout>default</layout>
+      </pluginRepository>
+    </pluginRepositories>
     <dependencyManagement>
         <dependencies>
             <dependency>
@@ -279,6 +297,13 @@ Note: The maven build currently needs to be started from the vavr root dir
                             </goals>
                         </execution>
                     </executions>
+                    <dependencies>
+                      <dependency>
+                        <groupId>biz.aQute.bnd</groupId>
+                        <artifactId>biz.aQute.bndlib</artifactId>
+                        <version>3.4.0-SNAPSHOT</version>
+                      </dependency>
+                    </dependencies>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>



>>> > For more options, visit https://groups.google.com/d/optout.
>>> >
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "bndtools-users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an

>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "bndtools-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an

>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> BJ
>
> --
> BJ
>
> --
> You received this message because you are subscribed to the Google Groups
> "bndtools-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ
--
BJ



--

BJ

Ben Evans

unread,
May 25, 2017, 2:22:11 AM5/25/17
to bndtool...@googlegroups.com
Hi BJ,

That has worked for the initial problem that I was seeing.

Btw, to get the SNAPSHOT version for the compiler plugin, I have this:

<pluginRepository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>Maven Snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
</pluginRepository>

With that, and your change, we make further progress, but the test
cases fail compilation, for reasons that look to be specific to the
Vavr project itself.

Thanks for your help - I think you can roll this fix into the next
release of BndTools, as a step towards supporting 9 (assuming it
doesn't break anything else)?

Do you know when this fix might be available for other projects (e.g.
the bundle plugin) to pick up as part of their release? Do you know
who at Apache Felix I should speak to, in order to make them aware of
this thread?

Thanks,

Ben
>>>> >>> > email to bndtools-user...@googlegroups.com.
>>>> >>> > For more options, visit https://groups.google.com/d/optout.
>>>> >>> >
>>>> >>> >
>>>> >>> > --
>>>> >>> > You received this message because you are subscribed to the Google
>>>> >>> > Groups
>>>> >>> > "bndtools-users" group.
>>>> >>> > To unsubscribe from this group and stop receiving emails from it,
>>>> >>> > send
>>>> >>> > an
>>>> >>> > email to bndtools-user...@googlegroups.com.
>>>> >>> > For more options, visit https://groups.google.com/d/optout.
>>>> >>>
>>>> >>> --
>>>> >>> You received this message because you are subscribed to the Google
>>>> >>> Groups
>>>> >>> "bndtools-users" group.
>>>> >>> To unsubscribe from this group and stop receiving emails from it,
>>>> >>> send an
>>>> >>> email to bndtools-user...@googlegroups.com.
>>>> >>> For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >> --
>>>> >> BJ
>>>> >
>>>> > --
>>>> > BJ
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google
>>>> > Groups
>>>> > "bndtools-users" group.
>>>> > To unsubscribe from this group and stop receiving emails from it, send
>>>> > an
>>>> > email to bndtools-user...@googlegroups.com.
>>>> > For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "bndtools-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to bndtools-user...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> BJ
>>
>> --
>> BJ
>
>
>
>
> --
>
> BJ
>
> --
> You received this message because you are subscribed to the Google Groups
> "bndtools-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bndtools-user...@googlegroups.com.

BJ Hargrave

unread,
May 25, 2017, 10:16:55 AM5/25/17
to bndtool...@googlegroups.com
The Bnd fix is in the master branch to be part of the next release, 3.4.0, which will be in June. I suspect that Apache Felix will shortly follow that with a 3.4.0 release of maven-bundle-plugin based upon that. I'll make sure the Apache Felix folks now about the Bnd release and request they release an update to maven-bundle-plugin.

Ben Evans

unread,
May 25, 2017, 10:18:02 AM5/25/17
to bndtool...@googlegroups.com
Thank you BJ - your help (& Neil's) is really appreciated!

Dávid Karnok

unread,
Jul 25, 2017, 7:58:10 AM7/25/17
to bndtools-users
Hello. I have the same NullPointerException when I run my code with Gradle 4.0.1 and JDK 9b179.

This is the relevant part from build.gradle:

jar {
manifest {
name = 'rxjava2_9'
instruction 'Bundle-Vendor', 'akarnokd'
instruction 'Bundle-Description', 'RxJava 2 built with JDK 9'
instruction 'Bundle-DocURL', 'https://github.com/akarnokd/RxJava2_9'
instruction 'Import-Package', '!org.junit,!junit.framework,!org.mockito.*,*'
instruction 'Eclipse-ExtensibleAPI', 'true'
}
}

Travis-CI failure:

java.lang.NullPointerException

at aQute.bnd.header.OSGiHeader.quote(OSGiHeader.java:150)

at aQute.bnd.header.Attrs.append(Attrs.java:416)

at aQute.bnd.header.Attrs.append(Attrs.java:397)

at aQute.bnd.header.Parameters.append(Parameters.java:175)

at aQute.bnd.header.Parameters.toString(Parameters.java:164)

at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:788)

at org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest.getEffectiveManifest(DefaultOsgiManifest.java:70)

at org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest_Decorated.getEffectiveManifest(Unknown Source)

at org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest.getEffectiveManifest(DefaultOsgiManifest.java:35)

at org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:197)

at org.gradle.api.java.archives.internal.DefaultManifest.writeTo(DefaultManifest.java:191)

at org.gradle.jvm.tasks.Jar$1$1.execute(Jar.java:76)

at org.gradle.jvm.tasks.Jar$1$1.execute(Jar.java:63)

at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.copyTo(MapFileTree.java:184)

at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.generateContent(MapFileTree.java:202)

at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.updateFileOnlyWhenGeneratedContentChanges(MapFileTree.java:190)

at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.getFile(MapFileTree.java:174)

at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.getLastModified(MapFileTree.java:227)

at org.gradle.api.internal.file.copy.DefaultFileCopyDetails.getLastModified(DefaultFileCopyDetails.java:73)

at org.gradle.api.internal.file.archive.ZipCopyAction.getArchiveTimeFor(ZipCopyAction.java:127)

at org.gradle.api.internal.file.archive.ZipCopyAction.access$100(ZipCopyAction.java:40)

at org.gradle.api.internal.file.archive.ZipCopyAction$StreamAction.visitFile(ZipCopyAction.java:102)

at org.gradle.api.internal.file.archive.ZipCopyAction$StreamAction.processFile(ZipCopyAction.java:95)

at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1$1.processFile(NormalizingCopyActionDecorator.java:66)

at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1$1.processFile(DuplicateHandlingCopyActionDecorator.java:60)

at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.processFile(CopyFileVisitorImpl.java:62)

at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.visitFile(CopyFileVisitorImpl.java:46)

at org.gradle.api.internal.file.AbstractFileTree$FilteredFileTreeImpl$1.visitFile(AbstractFileTree.java:181)

at org.gradle.api.internal.file.collections.MapFileTree$Visit.visit(MapFileTree.java:135)

at org.gradle.api.internal.file.collections.MapFileTree.visit(MapFileTree.java:88)

at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:110)

at org.gradle.api.internal.file.AbstractFileTree$FilteredFileTreeImpl.visit(AbstractFileTree.java:172)

at org.gradle.api.internal.file.CompositeFileTree.visit(CompositeFileTree.java:87)

at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:39)

at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:24)

at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:648)

at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:650)

at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:650)

at org.gradle.api.internal.file.copy.DefaultCopySpec.walk(DefaultCopySpec.java:458)

at org.gradle.api.internal.file.copy.CopySpecBackedCopyActionProcessingStream.process(CopySpecBackedCopyActionProcessingStream.java:38)

at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1.process(DuplicateHandlingCopyActionDecorator.java:44)

at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.process(NormalizingCopyActionDecorator.java:57)

at org.gradle.api.internal.file.archive.ZipCopyAction$1.execute(ZipCopyAction.java:67)

at org.gradle.api.internal.file.archive.ZipCopyAction$1.execute(ZipCopyAction.java:65)

at org.gradle.internal.IoActions.withResource(IoActions.java:76)

at org.gradle.api.internal.file.archive.ZipCopyAction.execute(ZipCopyAction.java:65)

at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:53)

at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator.execute(DuplicateHandlingCopyActionDecorator.java:42)

at org.gradle.api.internal.file.copy.CopyActionExecuter.execute(CopyActionExecuter.java:40)

at org.gradle.api.tasks.AbstractCopyTask.copy(AbstractCopyTask.java:174)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:564)

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)

at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)

at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)

at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:711)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:694)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)

at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)

at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:242)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:235)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:224)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:121)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:77)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:102)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:96)

at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:612)

at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:567)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:96)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:57)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:122)

at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)

at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)

at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)

at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)

at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:253)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:170)

at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:44)

at org.gradle.initialization.DefaultGradleLauncher$1.run(DefaultGradleLauncher.java:122)

at org.gradle.internal.work.DefaultWorkerLeaseService$2.execute(DefaultWorkerLeaseService.java:124)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:116)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:99)

at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:66)

at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)

at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)

at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)

at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)

at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)

at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:44)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)

at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)

at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)

at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:51)

at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)

at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)

at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)

at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)

at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)

at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)

at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)

at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:50)

at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)

at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)

at org.gradle.util.Swapper.swap(Swapper.java:38)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:50)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)

at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)

at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)

at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)

at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)

at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)

at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)

at java.base/java.lang.Thread.run(Thread.java:844)


Gradle doesn't let me define the osgi plugin version (complains about being a core plugin released with each gradle version).

Any tips on resolving this issue?

BJ Hargrave

unread,
Jul 25, 2017, 8:18:13 AM7/25/17
to bndtool...@googlegroups.com
The latest version of bnd has fixes regarding Java 9. Gradle seems to ship with an older version of bndlib. For example:

$ find gradle-4.1-rc-1 -name "*bnd*"
gradle-4.1-rc-1/lib/plugins/biz.aQute.bndlib-3.2.0.jar

I would suggest moving away from the osgi plugin and using the bnd plugin for gradle.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
BJ

Dávid Karnok

unread,
Jul 25, 2017, 8:25:20 AM7/25/17
to bndtool...@googlegroups.com
Thanks for the response. I haven't found any issues reported on the Gradle project regarding this so I think they might not be aware of the need for upgrading.

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to a topic in the Google Groups "bndtools-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bndtools-users/48tIAJmUmAA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best regards,
David Karnok
Reply all
Reply to author
Forward
0 new messages