0 votes
490 views
Hello,

I need to use org.openlca.app.db package and also or.openlca.app.App.class file. I need to include them in my pom.xml as a jar file.

Have you an idea how should I proceed to first generate a .jar file containing all these classes, in order to add this .jar file to my pom.xml.

This allow me to automaticly copy all these classes from olca-app\bin\ to my target path .

Thanks in advance,

Karima.
in openLCA by (280 points)

1 Answer

0 votes
by (13.7k points)
selected by
 
Best answer
In general, a jar file is just a zip file. So you could just zip the contents of the `olca-app/bin` folder and rename the file as `*.jar` (and then install it as a Maven bundle).

However, this will fail when you want to run it outside of an Eclipse RCP runtime and call functions that depend on that runtime. The `olca-app` package is an Eclipse RCP application and has many dependencies to the Eclipse RCP platform (see for example the imports of the `App` class). The Eclipse independent functionality of openLCA is provided by the olca-modules project which can be directly used in Maven. When you want to use (the Eclipse independent) functionality from the olca-app repository in a Maven project, the best way is to move it into a separate Maven module.
...