From 9b26d82233c6427b014bbf3008fa6891ce6b34cb Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 2 Jul 2019 16:51:38 +0200 Subject: [PATCH] Requires KNIME version 4 Also * CITATION.cff and .zenodo.json files, for better citation support * Switched from KNIME SDK to Eclipse + target platform * Source jars for plugin have been replaced with source reference in MANIFEST.MF Refs #19 Refs #18 --- CHANGELOG.md | 12 +++++ CITATION.cff | 4 +- README.md | 17 +++---- archetype-catalog.xml | 2 +- pom.xml | 2 +- .../META-INF/maven/archetype-metadata.xml | 16 ++++++- .../archetype-resources/.zenodo.json | 4 ++ .../archetype-resources/CITATION.cff | 17 +++++++ .../resources/archetype-resources/README.md | 40 +++++------------ .../archetype-resources/p2/category.xml | 16 ------- .../plugin/META-INF/MANIFEST.MF | 6 +-- .../resources/archetype-resources/pom.xml | 40 ++++++++--------- .../targetplatform/KNIME-AP-4.0.target | 44 +++++++++++++++++++ .../targetplatform/pom.xml | 26 +++++++++++ .../tests/META-INF/MANIFEST.MF | 10 ++--- .../archetype-resources/tests/pom.xml | 2 +- .../projects/branded/archetype.properties | 4 +- .../projects/unbranded/archetype.properties | 4 +- 18 files changed, 172 insertions(+), 94 deletions(-) create mode 100644 src/main/resources/archetype-resources/.zenodo.json create mode 100644 src/main/resources/archetype-resources/CITATION.cff create mode 100644 src/main/resources/archetype-resources/targetplatform/KNIME-AP-4.0.target create mode 100644 src/main/resources/archetype-resources/targetplatform/pom.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f256f1..30f9adc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CITATION.cff b/CITATION.cff index 5465f14..344c4e1 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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 diff --git a/README.md b/README.md index d8b13bc..cef5797 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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: @@ -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 diff --git a/archetype-catalog.xml b/archetype-catalog.xml index c4a1d6c..2d55f8d 100644 --- a/archetype-catalog.xml +++ b/archetype-catalog.xml @@ -6,7 +6,7 @@ nl.esciencecenter tycho-knime-node-archetype - 1.7.0 + 2.0.0 Archetype for a KNIME node. https://dl.bintray.com/nlesc/tycho-knime-node-archetype diff --git a/pom.xml b/pom.xml index ece62ee..8b1399b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 nl.esciencecenter tycho-knime-node-archetype - 1.7.0 + 2.0.0 Archetype - Knime node maven-archetype diff --git a/src/main/resources/META-INF/maven/archetype-metadata.xml b/src/main/resources/META-INF/maven/archetype-metadata.xml index 1827958..eee8ab4 100644 --- a/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -4,13 +4,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - 1.1.0 + 1.4.0 1.8 - 3.3 + 4.0 @@ -24,6 +24,8 @@ README.md .travis.yml + .zenodo.json + CITATION.cff @@ -120,5 +122,15 @@ + + + + + + KNIME-AP-4.0.target + + + + diff --git a/src/main/resources/archetype-resources/.zenodo.json b/src/main/resources/archetype-resources/.zenodo.json new file mode 100644 index 0000000..ab321f3 --- /dev/null +++ b/src/main/resources/archetype-resources/.zenodo.json @@ -0,0 +1,4 @@ +{ + "title": "${node}", + "license": "Apache-2.0" +} \ No newline at end of file diff --git a/src/main/resources/archetype-resources/CITATION.cff b/src/main/resources/archetype-resources/CITATION.cff new file mode 100644 index 0000000..9def7b3 --- /dev/null +++ b/src/main/resources/archetype-resources/CITATION.cff @@ -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 `` with actual author names +${symbol_pound}- given-names: +${symbol_pound} family-names: +${symbol_pound} affiliation: +${symbol_pound} orcid: https://orcid.org/ +repository-code: https://github.com/${github_organization}/${github_repository} +license: Apache-2.0 +version: ${version} diff --git a/src/main/resources/archetype-resources/README.md b/src/main/resources/archetype-resources/README.md index 8721b96..9bf4531 100644 --- a/src/main/resources/archetype-resources/README.md +++ b/src/main/resources/archetype-resources/README.md @@ -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 @@ -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 \ No newline at end of file diff --git a/src/main/resources/archetype-resources/p2/category.xml b/src/main/resources/archetype-resources/p2/category.xml index aa315ce..79450df 100644 --- a/src/main/resources/archetype-resources/p2/category.xml +++ b/src/main/resources/archetype-resources/p2/category.xml @@ -8,33 +8,17 @@ - - - 3D-e-Chem: Collection KNIME nodes & Extensions for the NLeSC 3d-e-Chem project - - - 3D-e-Chem Sources: Sources of KNIME nodes & Extensions for the NLeSC - 3d-e-Chem project - - #else - - - - - #end diff --git a/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF b/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF index a933e74..271d083 100644 --- a/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF +++ b/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF @@ -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 diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml index ca224d4..20b6286 100644 --- a/src/main/resources/archetype-resources/pom.xml +++ b/src/main/resources/archetype-resources/pom.xml @@ -28,29 +28,17 @@ 3.0 - ${knime_version} - http://update.knime.org/analytics-platform/${symbol_dollar}{knime.version}/ ${tycho_version} ${tycho_version} -Xmx512m + scm:git:https://github.com/${github_organization}/${github_repository}.git UTF-8 UTF-8 scm:git:https://github.com/${github_organization}/${github_repository}.git https://sonarcloud.io ${github_organization.toLowerCase()} + KNIME-AP-4.0 - - - knime - p2 - ${symbol_dollar}{knime.update.site} - - - 3d-e-chem - p2 - https://3d-e-chem.github.io/updates - - @@ -94,6 +82,14 @@ x86_64 + + + ${groupId} + ${artifactId}.targetplatform + ${symbol_dollar}{project.version} + ${symbol_dollar}{target.file} + + @@ -114,10 +110,15 @@ + + org.eclipse.tycho.extras + tycho-pack200a-plugin + ${symbol_dollar}{tycho.extras.version} + org.eclipse.tycho.extras tycho-source-feature-plugin - ${tycho.extras.version} + ${symbol_dollar}{tycho.extras.version} source-feature @@ -131,7 +132,7 @@ org.eclipse.tycho tycho-p2-plugin - ${tycho.version} + ${symbol_dollar}{tycho.version} attach-p2-metadata @@ -142,11 +143,6 @@ - - org.eclipse.tycho.extras - tycho-pack200a-plugin - ${tycho.extras.version} - @@ -163,7 +159,7 @@ org.eclipse.tycho.extras tycho-sourceref-jgit - ${tycho.extras.version} + ${symbol_dollar}{tycho.extras.version} diff --git a/src/main/resources/archetype-resources/targetplatform/KNIME-AP-4.0.target b/src/main/resources/archetype-resources/targetplatform/KNIME-AP-4.0.target new file mode 100644 index 0000000..b7fd671 --- /dev/null +++ b/src/main/resources/archetype-resources/targetplatform/KNIME-AP-4.0.target @@ -0,0 +1,44 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + + + + + + + + + + + + + + + + + + + + +-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 + + diff --git a/src/main/resources/archetype-resources/targetplatform/pom.xml b/src/main/resources/archetype-resources/targetplatform/pom.xml new file mode 100644 index 0000000..29c8e93 --- /dev/null +++ b/src/main/resources/archetype-resources/targetplatform/pom.xml @@ -0,0 +1,26 @@ + + + + 4.0.0 + + ${artifactId} + pom + + + ${rootArtifactId} + ${groupId} + ${version} + + + diff --git a/src/main/resources/archetype-resources/tests/META-INF/MANIFEST.MF b/src/main/resources/archetype-resources/tests/META-INF/MANIFEST.MF index 4803a36..5f26d5c 100644 --- a/src/main/resources/archetype-resources/tests/META-INF/MANIFEST.MF +++ b/src/main/resources/archetype-resources/tests/META-INF/MANIFEST.MF @@ -9,11 +9,11 @@ Bundle-SymbolicName: ${rootArtifactId}.tests Bundle-Version: ${qversion} Bundle-RequiredExecutionEnvironment: JavaSE-$java_version Require-Bundle: org.junit;bundle-version="4.12.0", - org.knime.product;bundle-version="[${knime_version}.0,4.0.0)", - org.knime.core;bundle-version="[${knime_version}.0,4.0.0)", - org.knime.base;bundle-version="[${knime_version}.0,4.0.0)", - org.knime.testing;bundle-version="[${knime_version}.0,4.0.0)", - nl.esciencecenter.e3dchem.knime.testing.plugin;bundle-version="[1.0.0,2.0.0)", + org.knime.product;bundle-version="[${knime_version}.0,5.0.0)", + org.knime.core;bundle-version="[${knime_version}.0,5.0.0)", + org.knime.base;bundle-version="[${knime_version}.0,5.0.0)", + org.knime.testing;bundle-version="[${knime_version}.0,5.0.0)", + nl.esciencecenter.e3dchem.knime.testing.plugin;bundle-version="[1.0.3,2.0.0)", ${rootArtifactId}.plugin Bundle-Vendor: ${vendor} Bundle-ClassPath: . diff --git a/src/main/resources/archetype-resources/tests/pom.xml b/src/main/resources/archetype-resources/tests/pom.xml index 971a6d4..71e439f 100644 --- a/src/main/resources/archetype-resources/tests/pom.xml +++ b/src/main/resources/archetype-resources/tests/pom.xml @@ -17,7 +17,7 @@ org.jacoco jacoco-maven-plugin - 0.8.0 + 0.8.4 diff --git a/src/test/resources/projects/branded/archetype.properties b/src/test/resources/projects/branded/archetype.properties index de3e264..e441b04 100644 --- a/src/test/resources/projects/branded/archetype.properties +++ b/src/test/resources/projects/branded/archetype.properties @@ -2,9 +2,9 @@ package=foo.bar.knime.somenode version=1.0.0-SNAPSHOT groupId=foo.bar artifactId=foo.bar.knime -tycho_version=1.1.0 +tycho_version=1.4.0 java_version=1.8 -knime_version=3.3 +knime_version=4.0 github_organization=foo github_repository=bar node=SomeNode diff --git a/src/test/resources/projects/unbranded/archetype.properties b/src/test/resources/projects/unbranded/archetype.properties index 24f8ace..85d8735 100644 --- a/src/test/resources/projects/unbranded/archetype.properties +++ b/src/test/resources/projects/unbranded/archetype.properties @@ -2,9 +2,9 @@ package=foo.bar.knime.somenode version=1.0.0-SNAPSHOT groupId=foo.bar artifactId=foo.bar.knime -tycho_version=1.1.0 +tycho_version=1.4.0 java_version=1.8 -knime_version=3.3 +knime_version=4.0 github_organization=foo github_repository=bar node=SomeNode