Sample POM to build Archi plugin with Maven & Tycho

Started by fanievh, May 09, 2024, 09:13:00 AM

Previous topic - Next topic

fanievh

Hi,

I'm struggling to get an Archi plugin built using Maven & Tycho. I'm new to Maven & Tycho. My plugin is being successfully built to a jar file using the PDE tools and it works in Archi. Does someone have an Archi plugin sample POM that they can share that has all the relevant Eclipse and Archi dependencies defined and successfully produces the relevant build artefacts using Maven & Tycho?

A second related question: my Archi plugin uses jackson-databind, jackson-annotations, jackson-core and byte-buddy. Ideally I would like the Maven build to generate a single jar file with the relevant compiled classes from these libraries included in a single jar together with my plugin classes. Is that possible and what would need to be added to the POM to achieve that?

Currently I have to package these jars together with my plugin jar generated by PDE into the .archiplugin compressed file. When installing it in an Archi instance, it shows each jar separately in Help | Manage Archi Plugins which doesn't seem ideal to me. I would prefer my plugin to be a single item in Manage Archi Plugins.

Is it possible to produce a single jar using the PDE tools (instead of Maven & Tycho) similar to my question above?

Appreciate any help.

Regards,
Fanie.

Phil Beauvoir

Hi, I use the PDE "Export Deployable plug-ins and fragments" to create a plug-in and then zip it into an .archiplugin file. All dependent jars are included in the plug-in as ordinary jar files (not as Eclipse plug-ns). Take a look at the Jasper Reports plug-in as an example - https://github.com/archimatetool/archi/tree/master/com.archimatetool.jasperreports
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

fanievh

Thank you so much. It does exactly what I want. Spares me going down the whole Maven & Tycho path.