freemarker icon indicating copy to clipboard operation
freemarker copied to clipboard

Add support for bndtools in Eclipse

Open chrisrueger opened this issue 3 years ago • 3 comments

What

This PR is to make it possible to import freemarker in a bndtools Eclipse project (OSGI). See https://bndtools.org/concepts.html

This allows for easier debugging and development when you are working in OSGI project based on bndtools and you need a Freemarker source build right in your IDE for debugging purposes with your other code.

Why

Although in the past there has been some OSGi related additions for Eclipse, those changes were for Eclipse PDE-Build and do not work if you are using bndtools.

The main issue is that bndtools requires a file called bnd.bnd There is already an osgi.bnd The problem with osgi.bnd is that it

a) has the wrong name and b) contains variables likle ${versionForOsgi} which need to be replaced with valid values which are already available during the build.

Details

This PR adds a small addition to the ide-dependencies build target to create such a valid bnd.bnd file from the existing osgi.bnd Advantage is that we leave everything untouched and just create a new file which is also .gitignored and only be read by Eclipse IDE with bndtools plugin installed.

  • This creates a bnd.bnd file in build for ide-dependencies by simply copying the existing osgi.bnd
  • run ant clean jar ide-dependencies to execute this PR's changes and see the resulting bnd.bnd in project root
  • replaces placeholder variables in the resulting bnd.bnd
  • this exact filename is required by bndtools in the bnd workspace model
  • See https://bndtools.org/concepts.html#workspacerepositoriesproject-model for more information

chrisrueger avatar Oct 08 '22 22:10 chrisrueger

@ddekany could you review this PR, please?

Is there anything else I need to do?

chrisrueger avatar Oct 08 '22 22:10 chrisrueger

Only the legal part... Do you have a CLA at Apache?

ddekany avatar Oct 09 '22 16:10 ddekany

Do you have a CLA at Apache?

Yes I received a confirmation from apache around 2017 Jan:

This message acknowledges receipt of your ICLA, which has been filed in the Apache Software Foundation records.

With this message, the Incubator PMC and the FreeMarker podling have been notified that your ICLA has been filed. Please contact them with any questions.

chrisrueger avatar Oct 09 '22 18:10 chrisrueger

Thanks, I managed to check that the ICLA was indeed submitted.

ddekany avatar Oct 16 '22 21:10 ddekany