Skip to content
Snippets Groups Projects
Commit a5c45149 authored by Nicola Fulvio Calabria's avatar Nicola Fulvio Calabria
Browse files

extend pom to use revisions

parent 5933699a
No related branches found
No related tags found
No related merge requests found
Pipeline #15728 passed
...@@ -13,7 +13,7 @@ build: ...@@ -13,7 +13,7 @@ build:
artifacts: artifacts:
paths: paths:
- target/vospace-datamodel.jar - target/vospace-datamodel.jar
- pom.xml - flattened-pom.xml
expire_in: 7 days expire_in: 7 days
only: only:
- master - master
...@@ -24,7 +24,7 @@ build-test: ...@@ -24,7 +24,7 @@ build-test:
- docker - docker
image: maven:3.6.3-openjdk-14 image: maven:3.6.3-openjdk-14
script: script:
- mvn clean package -DskipTests -DfinalName=vospace-datamodel-test -Drevision=TEST - mvn clean package -DskipTests -DfinalName=vospace-datamodel-test -Drevision=0.0.2-TEST
artifacts: artifacts:
paths: paths:
- target/vospace-datamodel-test.jar - target/vospace-datamodel-test.jar
...@@ -63,7 +63,7 @@ deploy: ...@@ -63,7 +63,7 @@ deploy:
- mvn deploy:deploy-file - mvn deploy:deploy-file
-Dfile=target/vospace-datamodel.jar -Dfile=target/vospace-datamodel.jar
-DrepositoryId=ia2.snapshots -DrepositoryId=ia2.snapshots
-DpomFile=pom.xml -DpomFile=flattened-pom.xml
-Durl=${IA2_MVN_REPO_SNAPSHOTS} -Durl=${IA2_MVN_REPO_SNAPSHOTS}
only: only:
- master - master
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>it.oats.inaf</groupId> <groupId>it.oats.inaf</groupId>
<artifactId>vospace-datamodel</artifactId> <artifactId>vospace-datamodel</artifactId>
<version>0.0.2-SNAPSHOT</version> <version>${revision}</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>14</maven.compiler.source> <maven.compiler.source>14</maven.compiler.source>
<maven.compiler.target>14</maven.compiler.target> <maven.compiler.target>14</maven.compiler.target>
<revision>0.0.2-SNAPSHOT</revision>
<finalName>${project.artifactId}-${project.version}</finalName> <finalName>${project.artifactId}-${project.version}</finalName>
</properties> </properties>
...@@ -60,6 +61,32 @@ ...@@ -60,6 +61,32 @@
<build> <build>
<finalName>${finalName}</finalName> <finalName>${finalName}</finalName>
<plugins> <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.3.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
<flattenedPomFilename>flattened-pom.xml</flattenedPomFilename>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version> <version>2.22.2</version>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment