Generates KNIME workflow node skeleton repository with sample code.
This archetype was made because the instructions to create KNIME nodes at https://www.knime.com/developer-guide, requires interaction with Eclipse wizards. We wanted a way to start and perform node development from the command line and headless. KNIME nodes are Eclipse plugins. The Tycho Maven plugin is used to build and handle dependencies of Eclipse plugins, so we use Tycho for KNIME node building.
The Maven archetype will generate a multi-module project with the following structure:
The generated project offers:
Items above are documented in the generated README.md file, the README also includes instructions for setup for a user, setup for a developer, creating a release and citing the software.
The archetype is hosted on a GitHub packages repository. Maven does not resolve to this GitHub packages repository by default so it must be added.
The ~/.m2/settings.xml should contain the following profile:
<?xml version="1.0" encoding="UTF-8" ?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>knimearchetype</id>
<repositories>
<repository>
<id>archetype</id>
<url>https://maven.pkg.github.com/3D-e-Chem</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
The following command will generate a skeleton project
mvn archetype:generate -DarchetypeGroupId=nl.esciencecenter \
-DarchetypeArtifactId=tycho-knime-node-archetype \
-DarchetypeVersion=2.0.4 -P knimearchetype
The command will ask the following questions:
x.y.z-SNAPSHOT
format (for example 1.2.3-SNAPSHOT
), where x.y.z is semantic versioning.Y
to enable the 3D-e-Chem project branding like splash logo, node category and update site category or enter N
to skip the branding.The skeleton has been generated in a sub-directory named after the artifactId in the current working directory.
The following steps are needed to get a ready to use project.
Change directory to generated code.
Make skeleton git aware, by running git init
.
Fill in all placeholders ([Enter ... here.]
) in
Commit all changes and push to GitHub
Optionally, setup Continuous Integration as described in the project README.md file.
Further instructions about generated project can be found in it's README.md file.
Install Java 17
Install Eclipse for RCP and RAP developers
Configure Java 17 inside Eclipse Window > Preferences > Java > Installed JREs
Register the archetype catalog which contains this archetype
https://github.com/3D-e-Chem/tycho-knime-node-archetype/raw/master/archetype-catalog.xml
Create a new project based on archetype
tycho-knime-node-archetype
& press Next buttonFurther instructions about generated project can be found in it's README.md file.
mvn verify
To deploy current version to GitHub Packages.
mvn --batch-mode deploy
The https://github.com/open-archetypes/tycho-eclipse-plugin-archetype was used as inspiration for this archetype. Also https://github.com/knime-community/community-repository-template/ and https://github.com/vernalis/vernalis-knime-nodes/ where used as inspiration to upgrade to KNIME 5.1.