Skip to content
Skip to search
1,234 bytes added
10:02, 30 September 2016
Using maven to build packages:
Changing the title and adding content. The example at GitHub will be added soon.
Besides setting this variable, the file can contain normal Jython code that is executed on import.
== Bundle packages in a JAR file ==
An interesting feature of Jython is to search for packages and modules inside of [https://en.wikipedia.org/wiki/JAR_(file_format) JAR files]. The folder structure from the last section can be modified by packing everything into a single <code>myPackages.jar</code>. The name of the JAR file doesn't matter. All imports work the same as explained before.
The advantage of this approach is that you can share your packages easily. For example you can upload the JAR file to an [[Update_Sites|update site]].
== Using maven to build packages ==
Using maven you can automate the packaging of Jython code into JAR files. This approach is only recommended if you already use maven, as installing and learning how to use maven is not worth the time saving of automated packaging.
At GitHub you will find an example project that you can use as a template. Just run <code>mvn jar:jar</code> and maven will generate a JAR file at the <code>target</code> directory.
== References ==
← Older edit
Newer edit →
Retrieved from "
Set/change upload password