Commit 3378c8ea authored by Matija Obreza's avatar Matija Obreza
Browse files

Build using "release" profile and use `flatten-maven-plugin` for deployments

- Don't use nexus-staging-maven-plugin Maven plugin
parent 1b2d3325
...@@ -18,7 +18,7 @@ publish artifacts: ...@@ -18,7 +18,7 @@ publish artifacts:
- echo "${GPG_KEY_SECRET}" | gpg --batch --import - echo "${GPG_KEY_SECRET}" | gpg --batch --import
- gpg --list-keys - gpg --list-keys
script: script:
- mvn clean deploy --settings .ci-maven-settings.xml -B -U - mvn clean deploy -P release --settings .ci-maven-settings.xml -B -U
only: only:
- master - master
- tags - tags
...@@ -94,13 +94,12 @@ ...@@ -94,13 +94,12 @@
</properties> </properties>
<repositories> <repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository> <repository>
<id>snapshots</id> <id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository> </repository>
</repositories> </repositories>
...@@ -223,8 +222,7 @@ ...@@ -223,8 +222,7 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<!-- first check to see if you have locally modified files, and will <!-- first check to see if you have locally modified files, and will fail if there are any. -->
fail if there are any. -->
<doCheck>false</doCheck> <doCheck>false</doCheck>
<doUpdate>false</doUpdate> <doUpdate>false</doUpdate>
</configuration> </configuration>
...@@ -261,15 +259,30 @@ ...@@ -261,15 +259,30 @@
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.sonatype.plugins</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version> <version>1.0.1</version>
<extensions>true</extensions>
<configuration> <configuration>
<serverId>ossrh</serverId> <flattenMode>ossrh</flattenMode>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration> </configuration>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
<resources> <resources>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment