diff --git a/README.md b/README.md index c0bbfdb..bc0a5b9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Build Status](https://travis-ci.org/3D-e-Chem/knime-python-node-archetype.svg?branch=master)](https://travis-ci.org/3D-e-Chem/knime-python-node-archetype) [![Build status](https://ci.appveyor.com/api/projects/status/5dory9qjycepcmcn/branch/master?svg=true)](https://ci.appveyor.com/project/3D-e-Chem/knime-python-node-archetype/branch/master) -[![Download](https://api.bintray.com/packages/nlesc/knime-python-node-archetype/knime-python-node-archetype/images/download.svg) ](https://bintray.com/nlesc/knime-python-node-archetype/knime-python-node-archetype/_latestVersion) [![DOI](https://zenodo.org/badge/63080247.svg)](https://zenodo.org/badge/latestdoi/63080247) Generates [KNIME](http://www.knime.org) workflow node skeleton repository with sample code. @@ -29,8 +28,8 @@ See https://github.com/3D-e-Chem/knime-python-wrapper for more information how t * Java ==8 * Maven >=3.0 -The archetype is hosted on a [BinTray repository](https://dl.bintray.com/nlesc/knime-python-node-archetyp). -Maven does not resolve to this BinTray repository by default so it must be added. +The archetype is hosted on a [GitHub packages repository](https://github.com/orgs/3D-e-Chem/packages?repo_name=tycho-knime-node-archetype). +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: @@ -45,8 +44,8 @@ The ~/.m2/settings.xml should contain the following profile: pythonknimearchetype - python-knime-archetype - https://dl.bintray.com/nlesc/knime-python-node-archetype + archetype + https://maven.pkg.github.com/3D-e-Chem @@ -126,21 +125,11 @@ Further instructions about generated project can be found in it's README.md file ### Deploy -To deploy current version to Bintray. +To deploy current version to GitHub Packages. -1. Add bintray API key to [~/.m2/settings.xml](https://maven.apache.org/settings.html) - -``` - - - bintray-nlesc-knime-python-node-archetype - ************ - ******************************** - - -``` - -2. Run `mvn deploy` +0. Create personal access token with write:packages scope +1. Create [~/.m2/settings.xml](https://docs.github.com/en/packages/guides/configuring-apache-maven-for-use-with-github-packages#authenticating-with-a-personal-access-token) +2. Run `mvn --batch-mode deploy` ## Attribution diff --git a/pom.xml b/pom.xml index c38bcd7..3b84e70 100644 --- a/pom.xml +++ b/pom.xml @@ -75,10 +75,10 @@ - - bintray-nlesc-knime-python-node-archetype - nlesc-knime-node-archetype - https://api.bintray.com/maven/nlesc/knime-python-node-archetype/knime-python-node-archetype/;publish=1 - - + + github + GitHub Packages + https://maven.pkg.github.com/3D-e-Chem/knime-python-node-archetype + + diff --git a/src/main/resources/META-INF/maven/archetype-metadata.xml b/src/main/resources/META-INF/maven/archetype-metadata.xml index 44a6885..0b4f7a4 100644 --- a/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -1,6 +1,6 @@ - @@ -10,7 +10,7 @@ 1.8 - 4.0 + 4.3 diff --git a/src/main/resources/archetype-resources/plugin/src/java/__node__Dialog.java b/src/main/resources/archetype-resources/plugin/src/java/__node__Dialog.java index 031849c..64e02f2 100644 --- a/src/main/resources/archetype-resources/plugin/src/java/__node__Dialog.java +++ b/src/main/resources/archetype-resources/plugin/src/java/__node__Dialog.java @@ -44,7 +44,11 @@ public class ${node}Dialog extends DefaultNodeSettingsPane { public void loadAdditionalSettingsFrom(NodeSettingsRO settings, PortObjectSpec[] specs) throws NotConfigurableException { super.loadAdditionalSettingsFrom(settings, specs); - config.loadFromInDialog(settings); + try { + config.loadFromInDialog(settings); + } catch (InvalidSettingsException e) { + // swallow error + } pythonOptions.loadSettingsFrom(config); } @@ -52,7 +56,11 @@ public void loadAdditionalSettingsFrom(NodeSettingsRO settings, PortObjectSpec[] public void loadAdditionalSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException { super.loadAdditionalSettingsFrom(settings, specs); - config.loadFromInDialog(settings); + try { + config.loadFromInDialog(settings); + } catch (InvalidSettingsException e) { + // swallow error + } pythonOptions.loadSettingsFrom(config); } 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 index 685e71d..ff819af 100644 --- a/src/main/resources/archetype-resources/targetplatform/KNIME-AP-4.0.target +++ b/src/main/resources/archetype-resources/targetplatform/KNIME-AP-4.0.target @@ -14,7 +14,7 @@ - + @@ -33,7 +33,7 @@ -Dsun.java2d.d3d=false -Dosgi.classloader.lock=classname -XX:+UnlockDiagnosticVMOptions --XX:+UnsyncloadClass +-XX:+UnsyncloadClass -XX:+UseG1GC -ea -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false diff --git a/src/main/resources/archetype-resources/tests/pom.xml b/src/main/resources/archetype-resources/tests/pom.xml index 71e439f..7d73b28 100644 --- a/src/main/resources/archetype-resources/tests/pom.xml +++ b/src/main/resources/archetype-resources/tests/pom.xml @@ -29,7 +29,7 @@ - org.apache.maven.plugins @@ -113,6 +113,27 @@ + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + + + + eclipse-feature + org.knime.features.core + 0.0.0 + + + eclipse-feature + org.knime.features.testing.application + 0.0.0 + + + + + diff --git a/src/test/resources/projects/basic/archetype.properties b/src/test/resources/projects/basic/archetype.properties index 929b3af..4385c60 100644 --- a/src/test/resources/projects/basic/archetype.properties +++ b/src/test/resources/projects/basic/archetype.properties @@ -5,7 +5,7 @@ groupId=foo.bar artifactId=foo.bar.knime tycho_version=1.4.0 java_version=1.8 -knime_version=4.0 +knime_version=4.3 github_organization=foo github_repository=bar node=SomeNode