Teaser: A Modern Setup for CPN Tools

The past time I’ve been working on setting up a modern infrastructure for CPN Tools.  It’s not done yet – I’ll post on this site when it is ready – but here are some teasers.

First of all, modern distributed version control with Gitlab:

Screenshot 2015-04-08 21.40.44

Continuous integration and cross-compiling on 3 platforms where applicable using Jenkins:

Screenshot 2015-04-08 21.29.52

Automatic deployment from build-server to a binary repository using Nexus:

Screenshot 2015-04-08 21.38.02

Code quality tracking for each commit using SonarQube:

Screenshot 2015-04-08 21.37.07

All Java code is being re-structured to use Maven for building.  This means much simplified use in applications – on the command line, in IntelliJ, or in Eclipse:

Screenshot 2015-04-08 21.59.28

Maven is package management for Java applications and automatically takes care of finding and downloading libraries and all required dependencies.  This makes it much easier to make applications benefiting from Access/CPN (as above) or simulator extensions.  For example, the entirety of the PNML export feature of CPN Tools comprises just 31 lines of XML describing the project, 85 lines of Java (boiler-plate included!) invoking the transformation, and a 885 line XSLT style-sheet implementing the actual translation.

Once checked out, simply invoking “mvn compile” in the project directory will automatically fetch the simulator extension libraries, the required Access/CPN libraries, compile the extension against the latest or a specific version, and nicely pack up everything ready be dropped in the plug-ins folder and run.

Cool as this all is, it is not ready yet, but I’ll see about writing up something when it is, including a quick guide helping you get started.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.