Skip to content
Snippets Groups Projects
Commit fb01cf60 authored by Jari-Matti Mäkelä's avatar Jari-Matti Mäkelä
Browse files

Switch to gitlab package registry

parent 48de644d
Branches master
Tags 2.0.2
No related merge requests found
Pipeline #74769 passed
image: maven:latest
image: maven:3.9.6-eclipse-temurin-22
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
# -DinstallAtEnd=true -DdeployAtEnd=true"
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add ''
cache:
key: "$CI_JOB_NAME"
paths:
- .m2/repository
stages:
- build
- test
- deploy
build:
stage: build
script:
......@@ -23,3 +25,10 @@ test:
stage: test
script:
- mvn test
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- mvn deploy -s ci_settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>hotreload-demo</artifactId>
<version>2.0.1-SNAPSHOT</version>
<version>2.0.2</version>
<name>Hot reloader demo</name>
<url>https://gitlab.utu.fi/tech/education/gui/hotreload</url>
<packaging>jar</packaging>
......@@ -9,12 +9,12 @@
<parent>
<groupId>fi.utu.tech</groupId>
<artifactId>hotreload-meta</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</parent>
<properties>
<project.mainclass>fi.utu.tech.demo.Main</project.mainclass>
<hotreload.version>2.0.1</hotreload.version>
<hotreload.version>2.0.2</hotreload.version>
</properties>
<dependencies>
......
package fi.utu.tech.demo;
public class Main {
public static void main(String[] args) {
MainApp.launch(MainApp.class, args);
}
}
......@@ -69,4 +69,8 @@ public class MainApp extends Application implements ReloadableApplication {
// should work even without hot reloading
setScene(stage);
}
public static void main(String[] args) {
MainApp.launch(MainApp.class, args);
}
}
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>hotreload</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<name>Hot reloader</name>
<url>https://gitlab.utu.fi/tech/education/gui/hotreload</url>
<packaging>jar</packaging>
......@@ -9,6 +9,6 @@
<parent>
<groupId>fi.utu.tech</groupId>
<artifactId>hotreload-meta</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</parent>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>fi.utu.tech</groupId>
<artifactId>hotreload-meta</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<name>Hot reload meta</name>
<url>https://gitlab.utu.fi/tech/education/gui/hotreload</url>
<packaging>pom</packaging>
<modules>
......@@ -17,32 +13,27 @@
</modules>
<properties>
<project.mainclass>fi.utu.tech.demo.Main</project.mainclass>
<project.mainclass>fi.utu.tech.demo.MainApp</project.mainclass>
<project.mainmodule>fi.utu.tech.demo</project.mainmodule>
<project.launcher>hotreload</project.launcher>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.version>11</jdk.version>
<jqwik.version>1.5.1</jqwik.version>
<junit.version>5.7.1</junit.version>
<junitplatform.version>1.7.1</junitplatform.version>
<javafx.version>16</javafx.version>
<classloader.version>1.2.0</classloader.version>
<jdk.version>17</jdk.version>
<junit.version>5.10.2</junit.version>
<junitplatform.version>1.10.2</junitplatform.version>
<javafx.version>22</javafx.version>
<classloader.version>1.2.1</classloader.version>
</properties>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<!-- classloader -->
<repository>
<id>ftdev</id>
<name>ftdev</name>
<url>https://ftdev.utu.fi/maven2</url>
<id>gitlab-classloader</id>
<url>https://gitlab.utu.fi/api/v4/projects/4566/packages/maven</url>
</repository>
</repositories>
......@@ -71,14 +62,6 @@
<version>${junitplatform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.jqwik</groupId>
<artifactId>jqwik</artifactId>
<version>${jqwik.version}</version>
<scope>test</scope>
</dependency>
<!-- JavaFX (remove if not needed to speed up dep downloads)-->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
......@@ -94,8 +77,6 @@
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
</dependency>
<!-- UTU libraries -->
<dependency>
<groupId>fi.utu.tech</groupId>
<artifactId>distributed-classloader</artifactId>
......@@ -105,11 +86,10 @@
<build>
<plugins>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.6</version>
<version>0.0.8</version>
<configuration>
<mainClass>${project.mainmodule}/${project.mainclass}</mainClass>
<stripDebug>true</stripDebug>
......@@ -119,25 +99,11 @@
<launcher>${project.launcher}</launcher>
</configuration>
</plugin>
<!-- Make the packaged jar executable -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<!-- DO NOT include log4j.properties file in your Jar -->
<excludes>
<exclude>**/log4j.properties</exclude>
</excludes>
<archive>
<manifest>
</manifest>
</archive>
</configuration>
</plugin>
<!-- JDK source/target versions -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
......@@ -147,7 +113,6 @@
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
......@@ -161,121 +126,32 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<tags>
<tag>
<name>toDo</name>
<placement>a</placement>
<head>To&nbsp;do:</head>
</tag>
<tag>
<name>classInvariant</name>
<placement>t</placement>
<head>Class&nbsp;invariant:</head>
</tag>
<tag>
<name>classInvariantProtected</name>
<placement>t</placement>
<head>Protected&nbsp;class&nbsp;invariant:</head>
</tag>
<tag>
<name>classInvariantPrivate</name>
<placement>t</placement>
<head>Private&nbsp;class&nbsp;invariant:</head>
</tag>
<tag>
<name>abstractionFunction</name>
<placement>t</placement>
<head>Abstraction&nbsp;function:</head>
</tag>
<tag>
<name>pre</name>
<placement>cm</placement>
<head>Precondition:</head>
</tag>
<tag>
<name>post</name>
<placement>cm</placement>
<head>Postcondition:</head>
</tag>
<tag>
<name>postProtected</name>
<placement>cm</placement>
<head>Protected&nbsp;postcondition:</head>
</tag>
<tag>
<name>postPrivate</name>
<placement>cm</placement>
<head>Private&nbsp;postcondition:</head>
</tag>
<tag>
<name>time</name>
<placement>cmf</placement>
<head>Time&nbsp;complexity:</head>
</tag>
<tag>
<name>space</name>
<placement>cmf</placement>
<head>Space&nbsp;complexity:</head>
</tag>
<tag>
<name>correspondence</name>
<placement>a</placement>
<head>Correspondence:</head>
</tag>
<tag>
<name>download</name>
<placement>a</placement>
<head>Download:</head>
</tag>
</tags>
<show>protected</show>
<failOnError>false</failOnError>
<sourceFileExcludes>
<sourceFileExclude>**/module-info.java</sourceFileExclude>
</sourceFileExcludes>
</configuration>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<!-- JUnit & JQwik test integration -->
<plugin>
<groupId>de.sormuras.junit</groupId>
<artifactId>junit-platform-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<configuration>
<executor>JAVA</executor>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
<extensions>
<!-- Enables the use of SSH for deployments -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>3.4.1</version>
</extension>
</extensions>
</build>
<distributionManagement>
<repository>
<id>ftdev</id>
<name>UTU tech ftdev repository</name>
<url>scp://localhost:2222/var/www/maven2</url>
<id>gitlab-maven</id>
<url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</repository>
<snapshotRepository>
<id>gitlab-maven</id>
<url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</snapshotRepository>
</distributionManagement>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment