Skip to content

Commit

Permalink
Merge pull request #20 from 3D-e-Chem/knime4
Browse files Browse the repository at this point in the history
Requires KNIME version 4
  • Loading branch information
sverhoeven authored Jul 2, 2019
2 parents bb8392c + 9b26d82 commit b63199e
Show file tree
Hide file tree
Showing 18 changed files with 172 additions and 94 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ The file is formatted as described on http://keepachangelog.com/.

## [Unreleased]

## [2.0.0] - 2019-07-02

### Added

* CITATION.cff and .zenodo.json files, for better citation support

### Changed

* Requires KNIME version 4 ([#19](https://github.com/3D-e-Chem/tycho-knime-node-archetype/issues/19))
* Switched from KNIME SDK to Eclipse + target platform ([#18](https://github.com/3D-e-Chem/tycho-knime-node-archetype/issues/18))
* Source jars for plugin have been replaced with source reference in MANIFEST.MF

## [1.7.0] - 2018-03-23

### Changed
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors:
family-names: Verhoeven
affiliation: Nederlands eScience Center
orcid: https://orcid.org/0000-0002-5821-2060
version: 1.7.0
date-released: 2018-03-23
version: 2.0.0
date-released: 2019-07-02
repository-code: https://github.com/3D-e-Chem/tycho-knime-node-archetype
license: Apache-2.0
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The [Maven archetype](https://maven.apache.org/guides/introduction/introduction-

## Requirements

* Java >=1.8
* Java ==8
* Maven >=3.0

The archetype is hosted on a [BinTray repository](https://dl.bintray.com/nlesc/tycho-knime-node-archetype).
Expand Down Expand Up @@ -53,7 +53,7 @@ The following command will generate a skeleton project
```sh
mvn archetype:generate -DarchetypeGroupId=nl.esciencecenter \
-DarchetypeArtifactId=tycho-knime-node-archetype \
-DarchetypeVersion=1.7.0 -P knimearchetype
-DarchetypeVersion=2.0.0 -P knimearchetype
```

The command will ask the following questions:
Expand Down Expand Up @@ -87,19 +87,20 @@ Further instructions about generated project can be found in it's README.md file

## Generate from inside KNIME SDK

1. Start up the KNIME SDK
2. Install the `m2e - Maven Integration for Eclipse` software, (you might need to add the add the Eclipse software site which is `http://download.eclipse.org/releases/neon` for the version 3.5.1 of the KNIME SDK)
3. Register the archetype catalog which contains this archetype
1. Install Java 8
2. Install Eclipse for [RCP and RAP developers](https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-rcp-and-rap-developers)
3. Configure Java 8 inside Eclipse Window > Preferences > Java > Installed JREs
4. Register the archetype catalog which contains this archetype

1. Goto Window > Preferences > Maven > Archetypes
2. Add a remove catalog with `https://github.com/3D-e-Chem/tycho-knime-node-archetype/raw/master/archetype-catalog.xml`
2. Add a remote catalog with `https://github.com/3D-e-Chem/tycho-knime-node-archetype/raw/master/archetype-catalog.xml`

4. Create a new project based on archetype
5. Create a new project based on archetype

1. Goto File > New > Project ... > Maven
2. Select Maven Project & press Next button
3. Use default location & press Next button
4. Select Catalog you added in 3.2
4. Select Catalog you added in step 4.2
5. Select the archetype with artifact id `tycho-knime-node-archetype` & press Next button
6. Fill in the form & press Finish button

Expand Down
2 changes: 1 addition & 1 deletion archetype-catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<archetype>
<groupId>nl.esciencecenter</groupId>
<artifactId>tycho-knime-node-archetype</artifactId>
<version>1.7.0</version>
<version>2.0.0</version>
<description>Archetype for a KNIME node.</description>
<repository>https://dl.bintray.com/nlesc/tycho-knime-node-archetype</repository>
</archetype>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>nl.esciencecenter</groupId>
<artifactId>tycho-knime-node-archetype</artifactId>
<version>1.7.0</version>
<version>2.0.0</version>
<name>Archetype - Knime node</name>
<packaging>maven-archetype</packaging>
<licenses>
Expand Down
16 changes: 14 additions & 2 deletions src/main/resources/META-INF/maven/archetype-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
<requiredProperty key="tycho_version">
<defaultValue>1.1.0</defaultValue>
<defaultValue>1.4.0</defaultValue>
</requiredProperty>
<requiredProperty key="java_version">
<defaultValue>1.8</defaultValue>
</requiredProperty>
<requiredProperty key="knime_version">
<defaultValue>3.3</defaultValue>
<defaultValue>4.0</defaultValue>
</requiredProperty>
<requiredProperty key="github_organization"/>
<requiredProperty key="github_repository"/>
Expand All @@ -24,6 +24,8 @@
<includes>
<include>README.md</include>
<include>.travis.yml</include>
<include>.zenodo.json</include>
<include>CITATION.cff</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
Expand Down Expand Up @@ -120,5 +122,15 @@
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}.targetplatform" dir="targetplatform" name="${rootArtifactId}.targetplatform">
<fileSets>
<fileSet filtered="true" encoding="UTF-8">
<directory></directory>
<includes>
<include>KNIME-AP-4.0.target</include>
</includes>
</fileSet>
</fileSets>
</module>
</modules>
</archetype-descriptor>
4 changes: 4 additions & 0 deletions src/main/resources/archetype-resources/.zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "${node}",
"license": "Apache-2.0"
}
17 changes: 17 additions & 0 deletions src/main/resources/archetype-resources/CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound} YAML 1.2
${symbol_pound} Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
cff-version: 1.0.3
message: If you use this software, please cite it as below.
title: ${node}
authors: []
${symbol_pound}${symbol_pound} Uncomment and replace `<changeme>` with actual author names
${symbol_pound}- given-names: <changeme>
${symbol_pound} family-names: <changeme>
${symbol_pound} affiliation: <changeme>
${symbol_pound} orcid: https://orcid.org/<changeme>
repository-code: https://github.com/${github_organization}/${github_repository}
license: Apache-2.0
version: ${version}
40 changes: 11 additions & 29 deletions src/main/resources/archetype-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,39 +52,20 @@ Also see `./.travis.yml` file how to perform a [SonarCloud](https://sonarcloud.i

See `./appveyor.yml` file how to run on https://www.appveyor.com .

${symbol_pound} Development

Steps to get development environment setup:

1. Download KNIME SDK from https://www.knime.org/downloads/overview
2. Install/extract KNIME SDK
3. Start KNIME SDK
4. Install m2e (Maven integration for Eclipse) + Test workflows in JUnit

1. Goto Window -> Preferences -> Install/Update -> Available Software Sites
2. Make sure the following Software Sites (or a version of them) are present otherwise add them:
To cite the KNIME node, a [DOI](https://en.wikipedia.org/wiki/Digital_object_identifier) can be generated when a GitHub release is made. To enable, the GitHub repository must be connected on https://zenodo.org/account/settings/github/ . The connection must be made before creating a GitHub release.
To [cite the software](https://research-software.org/citation/developers/) a human and computer readable file called `CITATION.cff` is included.

* http://update.knime.org/analytics-platform/${knime_version}
* http://download.eclipse.org/eclipse/updates/4.6
* http://download.eclipse.org/releases/neon
* https://3d-e-chem.github.io/updates (only required for 3D-e-Chem node)

3. Goto Help -> Check for updates
4. Install any updates found & restart
5. Goto Help > Install new software ...
6. Select --All Available sites-- in work with pulldown
7. Wait for list to be filled, `Pending...` should disappear
8. Select the following items:

* m2e - Maven integration for Eclipse (includes Incubating components)
* Test KNIME workflows from a Junit test
* Splash & node category for 3D-e-Chem KNIME nodes (only required for 3D-e-Chem node)
${symbol_pound} Development

9. Install software & restart
Steps to get development environment setup based on https://github.com/knime/knime-sdk-setup#sdk-setup:

5. Import this repo as an Existing Maven project
1. Install Java 8
2. Install Eclipse for [RCP and RAP developers](https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-rcp-and-rap-developers)
3. Configure Java 8 inside Eclipse Window > Preferences > Java > Installed JREs
4. Import this repo as an Existing Maven project
5. Activate target platform by going to Window > Preferences > Plug-in Development > Target Platform and check the `KNIME Analytics Platform (${knime_version}) - ${artifactId}.targetplatform/KNIME-AP-${knime_version}.target` target definition.

During import the Tycho Eclipse providers must be installed, Eclipse will ask for your permission.
During import the Tycho Eclipse providers must be installed.

${symbol_pound}${symbol_pound} Tests

Expand Down Expand Up @@ -123,3 +104,4 @@ ${symbol_pound} New release
1. Correct authors
2. Correct license
9. Make nodes available to 3D-e-Chem KNIME feature by following steps at https://github.com/3D-e-Chem/knime-node-collection#new-release
10. Update `CITATION.cff` file with new DOI, version, release date
16 changes: 0 additions & 16 deletions src/main/resources/archetype-resources/p2/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,17 @@
<feature id="${parentArtifactId}.feature" version="${qversion}">
<category name="nl.esciencecenter.3D-e-Chem" />
</feature>
<feature id="${parentArtifactId}.feature.source" version="${qversion}">
<category name="nl.esciencecenter.3D-e-Chem.sources" />
</feature>
<category-def name="nl.esciencecenter.3D-e-Chem" label="KNIME 3D-e-Chem Contributions">
<description>
3D-e-Chem: Collection KNIME nodes &amp; Extensions for the NLeSC 3d-e-Chem
project
</description>
</category-def>
<category-def name="nl.esciencecenter.3D-e-Chem.sources"
label="KNIME 3D-e-Chem Contributions Sources">
<description>
3D-e-Chem Sources: Sources of KNIME nodes &amp; Extensions for the NLeSC
3d-e-Chem project
</description>
</category-def>
#else
<feature id="${parentArtifactId}.feature" version="${qversion}">
<category name="${vendor}" />
</feature>
<feature id="${parentArtifactId}.feature.source" version="${qversion}">
<category name="${vendor} Sources" />
</feature>
<category-def name="${vendor}" label="KNIME ${vendor} Contributions">
</category-def>
<category-def name="${vendor} Sources"
label="KNIME ${vendor} Contributions Sources">
</category-def>
#end
</site>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Bundle-RequiredExecutionEnvironment: JavaSE-$java_version
Bundle-Activator: ${package}.Activator
Bundle-Vendor: ${vendor}
Require-Bundle: org.eclipse.core.runtime,
org.knime.workbench.core;bundle-version="[${knime_version}.0,4.0.0)",
org.knime.workbench.repository;bundle-version="[${knime_version}.0,4.0.0)",
org.knime.base;bundle-version="[${knime_version}.0,4.0.0)"
org.knime.workbench.core;bundle-version="[${knime_version}.0,5.0.0)",
org.knime.workbench.repository;bundle-version="[${knime_version}.0,5.0.0)",
org.knime.base;bundle-version="[${knime_version}.0,5.0.0)"
#if( $branded == "Y")
,nl.esciencecenter.e3dchem.plugin
#end
Expand Down
40 changes: 18 additions & 22 deletions src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,17 @@
<maven>3.0</maven>
</prerequisites>
<properties>
<knime.version>${knime_version}</knime.version>
<knime.update.site>http://update.knime.org/analytics-platform/${symbol_dollar}{knime.version}/</knime.update.site>
<tycho.version>${tycho_version}</tycho.version>
<tycho.extras.version>${tycho_version}</tycho.extras.version>
<tycho.test.jvmArgs>-Xmx512m</tycho.test.jvmArgs>
<tycho.scmUrl>scm:git:https://github.com/${github_organization}/${github_repository}.git</tycho.scmUrl>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<tycho.scmUrl>scm:git:https://github.com/${github_organization}/${github_repository}.git</tycho.scmUrl>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>${github_organization.toLowerCase()}</sonar.organization>
<target.file>KNIME-AP-4.0</target.file>
</properties>
<repositories>
<repository>
<id>knime</id>
<layout>p2</layout>
<url>${symbol_dollar}{knime.update.site}</url>
</repository>
<repository>
<id>3d-e-chem</id>
<layout>p2</layout>
<url>https://3d-e-chem.github.io/updates</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -94,6 +82,14 @@
<arch>x86_64</arch>
</environment>
</environments>
<target>
<artifact>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}.targetplatform</artifactId>
<version>${symbol_dollar}{project.version}</version>
<classifier>${symbol_dollar}{target.file}</classifier>
</artifact>
</target>
</configuration>
</plugin>
<plugin>
Expand All @@ -114,10 +110,15 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pack200a-plugin</artifactId>
<version>${symbol_dollar}{tycho.extras.version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tycho.extras.version}</version>
<version>${symbol_dollar}{tycho.extras.version}</version>
<executions>
<execution>
<id>source-feature</id>
Expand All @@ -131,7 +132,7 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho.version}</version>
<version>${symbol_dollar}{tycho.version}</version>
<executions>
<execution>
<id>attach-p2-metadata</id>
Expand All @@ -142,11 +143,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pack200a-plugin</artifactId>
<version>${tycho.extras.version}</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand All @@ -163,7 +159,7 @@
<dependency>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-sourceref-jgit</artifactId>
<version>${tycho.extras.version}</version>
<version>${symbol_dollar}{tycho.extras.version}</version>
</dependency>
</dependencies>
<configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="KNIME Analytics Platform (4.0)" sequenceNumber="1512743962">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.knime.features.explorer.serverspace.feature.group" version="0.0.0"/>
<unit id="org.knime.features.base.feature.group" version="0.0.0"/>
<unit id="org.knime.features.dbdrivers.feature.group" version="0.0.0"/>
<unit id="org.knime.features.ensembles.feature.group" version="0.0.0"/>
<unit id="org.knime.features.ext.itemset.feature.group" version="0.0.0"/>
<unit id="org.knime.features.ext.jep.feature.group" version="0.0.0"/>
<unit id="org.knime.features.ext.poi.feature.group" version="0.0.0"/>
<unit id="org.knime.features.js.quickforms.feature.group" version="0.0.0"/>
<unit id="org.knime.features.json.feature.group" version="0.0.0"/>
<unit id="org.knime.features.personalproductivity.feature.group" version="0.0.0"/>
<unit id="org.knime.features.testingapplication.feature.group" version="0.0.0"/>
<unit id="org.knime.features.xml.feature.group" version="0.0.0"/>
<unit id="org.knime.targetPlatform.feature.group" version="0.0.0"/>
<repository location="https://update.knime.org/analytics-platform/${knime_version}/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="nl.esciencecenter.e3dchem.knime.testing.plugin" version="0.0.0"/>
<unit id="nl.esciencecenter.e3dchem.plugin" version="0.0.0"/>
<repository location="https://3d-e-chem.github.io/updates"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-${java_version}"/>
<launcherArgs>
<vmArgs>-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+UseG1GC
-ea
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false
-Dorg.eclipse.swt.internal.gtk.useCairo=false
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dsun.net.client.defaultReadTimeout=0
-Dorg.eclipse.swt.internal.gtk.disablePrinting</vmArgs>
</launcherArgs>
</target>
Loading

0 comments on commit b63199e

Please sign in to comment.