Skip to content

Commit 1e4f967

Browse files
authored
Merge pull request #279 from Systems-Modeling/ST6RI-448
ST6RI-448 Strip qualifier from version included in Jupyter installer
2 parents b778fbc + dd1cebc commit 1e4f967

5 files changed

Lines changed: 28 additions & 21 deletions

File tree

org.omg.sysml.jupyter.installer/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
== All Operating Systems
44

5-
1. Install Java 8+, e.g. https://adoptopenjdk.net/index.html?variant=openjdk11&jvmVariant=hotspot[OpenJDK 11].
5+
1. Install Java 11+, e.g. https://adoptopenjdk.net/index.html?variant=openjdk11&jvmVariant=hotspot[OpenJDK 11].
66
* You can check the Java version you have installed by running `java -version` in Terminal (Linux / macOS) or Command Prompt (Windows). See https://www.baeldung.com/java-check-is-installed[How to Check if Java is Installed].
77
2. Install https://docs.conda.io/en/latest/miniconda.html[Miniconda] with Python version 3.x.
88
* **[Windows]** During installation, enable the "Add Anaconda to my PATH environment variable" option. See https://medium.com/@GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444[Install Python on Windows]

org.omg.sysml.jupyter.installer/assembly.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
</includes>
2020
</fileSet>
2121
<fileSet>
22-
<directory>${project.basedir}/target/classes</directory>
22+
<directory>${project.basedir}</directory>
2323
<outputDirectory>/</outputDirectory>
2424
<includes>
2525
<include>install.bat</include>
2626
<include>install.sh</include>
2727
</includes>
28+
<filtered>true</filtered>
2829
<fileMode>0755</fileMode>
2930
</fileSet>
3031
<fileSet>

org.omg.sysml.jupyter.installer/install.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@echo off
2222

23-
set /A SYSML_VERSION="${project.version}"
23+
set /A SYSML_VERSION="${project.version.unqualified}"
2424

2525
echo --- Step 1: Testing Conda installation ---
2626
where conda

org.omg.sysml.jupyter.installer/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
set -e
2323

24-
SYSML_VERSION="${project.version}"
24+
SYSML_VERSION="${project.version.unqualified}"
2525

2626
echo "--- Step 1: Testing Conda installation ---"
2727
command -v conda || (echo "Conda is not installed. Please install Conda and re-run." && return 1)

org.omg.sysml.jupyter.installer/pom.xml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99
</parent>
1010
<artifactId>org.omg.sysml.jupyter.installer</artifactId>
1111

12-
<dependencies>
13-
<dependency>
14-
<groupId>org.omg.sysml</groupId>
15-
<artifactId>jupyter-sysml-kernel</artifactId>
16-
<type>zip</type>
17-
<version>${project.version}</version>
18-
<scope>runtime</scope>
19-
</dependency>
20-
<dependency>
21-
<groupId>org.omg.sysml</groupId>
22-
<artifactId>jupyterlab-sysml</artifactId>
23-
<type>tgz</type>
24-
<version>${project.version}</version>
25-
<scope>runtime</scope>
26-
</dependency>
27-
</dependencies>
28-
2912
<build>
3013
<plugins>
3114
<!-- disable Maven's default-compile -->
@@ -52,6 +35,29 @@
5235
</execution>
5336
</executions>
5437
</plugin>
38+
<!-- remove qualifier, e.g. "-SNAPSHOT" from version -->
39+
<plugin>
40+
<groupId>org.codehaus.mojo</groupId>
41+
<artifactId>build-helper-maven-plugin</artifactId>
42+
<version>${build-helper-maven-plugin.version}</version>
43+
<executions>
44+
<execution>
45+
<id>regex-property</id>
46+
<phase>package</phase>
47+
<goals>
48+
<goal>regex-property</goal>
49+
</goals>
50+
<configuration>
51+
<name>project.version.unqualified</name>
52+
<value>${project.version}</value>
53+
<!-- https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string -->
54+
<regex>^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$</regex>
55+
<replacement>$1.$2.$3</replacement>
56+
<failIfNoMatch>true</failIfNoMatch>
57+
</configuration>
58+
</execution>
59+
</executions>
60+
</plugin>
5561
<!-- build installer archive -->
5662
<plugin>
5763
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)