manifest first OSGi build with gradle - migrating from ant to Gradle

Paul Verest

Is there manifest first http://wiki.osgi.org/wiki/Tooling_Approaches gradle plugin for OSGi? Or how to do it with gradle?

There's big old project for OSGi container with many project having complicated relation declared in MANIFEST.MF. The build is long. Now we want to simplify things and adopt Gradle. But first without breaking things and keeping ant and gradle builds in parallel for some time. However what I see is gradle suggesting define MANIFEST inside build.gradle. https://docs.gradle.org/current/userguide/osgi_plugin.html
That would make a lot of copy work.

UPDATE There are close to 100 modules with a lot of dependencies information between modules and for nested jar. On average MANIFEST.MF length is about 50 lines (varies from 20 to 300 lines). How to bundle nested jar's is other question. This question is about using existing MANIFEST.MF files. All plugins I saw use bnd that is exactly contrary to manifest first approach.

Paul Verest

As of April 2016 there's no Manifest-first approach in Maven or Gradle build tools for OSGi.

While for Eclipse plugins (that are also valid OSGi bundles) there is maven/tycho build, that is standard within Eclipse Foundation, it is not really of help for general OSGi projects.

Oposite to Manifest-first is Manifest generation, and there is only one tool bnd, that initially was for manifest creation, then grew into full bundle jar builder and now has BndTools Eclipse integration, looking similar to Maven/Gradle integration managing dependencies.

I would recommend to keep bnd instructions in external standard bnd.bnd file and not to put it inside build script. *.bnd files are similar to usual Java .properties files, so in Eclipse IDE right-click, Open with -> Other ... select Properties File Editor check "Use this editor for.." and check "Use this editor for all '*.nbd' files"

For Gradle

For maven

All bnd-based tools are now collected on http://bnd.bndtools.org/chapters/700-tools.html

There are some examples in https://github.com/paulvi/OSGiBuildExamples

Note: link http://wiki.osgi.org/wiki/Tooling_Approaches has been in "The OSGi Community Wiki was unfortunately hacked and is currently unavailable. " status for more than a week, while this question was opened.

Sadly @Richard gave up too early to receive some thanks as well (for mentioning maven)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Migrating from Ant to Gradle in Android Studio

From Dev

Building APK with Gradle outside IDE (migrating from Ant)

From Dev

Read manifest from JAR with gradle

From Dev

Read manifest from JAR with gradle

From Dev

"-includeresource" in JAR Manifest inside Gradle build file

From Dev

Calling Ant Macrodef from Gradle

From Dev

How does gradle execute an ant build file

From Dev

How to provide Gradle dependencies for Ant build

From Dev

Migrating from existing dynamic web project to gradle

From Dev

Migrating from IDEA to Android Studio with Gradle

From Dev

Migrating maven checkstyle to gradle

From Dev

Migrating maven checkstyle to gradle

From Java

Crashlytics could not find the manifest when update build:gradle to 3.3.0

From Dev

Replace String in Manifest in build time doesn't work on Gradle 2.1

From Dev

Android Studio Gradle Build error - specified for property 'manifest' does not exist

From Dev

Gradle war manifest version number wrong for release build

From Dev

Using Hibernate tools Ant task from Gradle

From Dev

How to use flyway with gradle? First migration depends on gradle build

From Dev

How to call build.gradle from another build.gradle

From Dev

Gradle Manifest.MF

From Dev

Gradle, War, tomcat and manifest

From Dev

Use Ant task from salesforce-ant.jar in gradle script

From Dev

How to build a Lotus Domino Database using SVN and Ant, Maven or Gradle

From Dev

Gradle ant build file not not available during configuration phase

From Dev

build tool (Gradle vs Ant vs Maven) for java EE

From Dev

Gradle Composite Build with different project types (ant, maven)

From Dev

How to move a gradle function from build.gradle into a plugin?

From Dev

Pass data from settings.gradle to build.gradle

From Dev

Ant replace token - Gradle

Related Related

  1. 1

    Migrating from Ant to Gradle in Android Studio

  2. 2

    Building APK with Gradle outside IDE (migrating from Ant)

  3. 3

    Read manifest from JAR with gradle

  4. 4

    Read manifest from JAR with gradle

  5. 5

    "-includeresource" in JAR Manifest inside Gradle build file

  6. 6

    Calling Ant Macrodef from Gradle

  7. 7

    How does gradle execute an ant build file

  8. 8

    How to provide Gradle dependencies for Ant build

  9. 9

    Migrating from existing dynamic web project to gradle

  10. 10

    Migrating from IDEA to Android Studio with Gradle

  11. 11

    Migrating maven checkstyle to gradle

  12. 12

    Migrating maven checkstyle to gradle

  13. 13

    Crashlytics could not find the manifest when update build:gradle to 3.3.0

  14. 14

    Replace String in Manifest in build time doesn't work on Gradle 2.1

  15. 15

    Android Studio Gradle Build error - specified for property 'manifest' does not exist

  16. 16

    Gradle war manifest version number wrong for release build

  17. 17

    Using Hibernate tools Ant task from Gradle

  18. 18

    How to use flyway with gradle? First migration depends on gradle build

  19. 19

    How to call build.gradle from another build.gradle

  20. 20

    Gradle Manifest.MF

  21. 21

    Gradle, War, tomcat and manifest

  22. 22

    Use Ant task from salesforce-ant.jar in gradle script

  23. 23

    How to build a Lotus Domino Database using SVN and Ant, Maven or Gradle

  24. 24

    Gradle ant build file not not available during configuration phase

  25. 25

    build tool (Gradle vs Ant vs Maven) for java EE

  26. 26

    Gradle Composite Build with different project types (ant, maven)

  27. 27

    How to move a gradle function from build.gradle into a plugin?

  28. 28

    Pass data from settings.gradle to build.gradle

  29. 29

    Ant replace token - Gradle

HotTag

Archive