Reverted maven changes and switched to using maven flatten plugin

This commit is contained in:
Ziver Koc 2020-02-14 15:20:09 +01:00
parent ec75a5df80
commit 7c9be882e3
2 changed files with 42 additions and 9 deletions

5
Jenkinsfile vendored
View file

@ -14,7 +14,7 @@ node {
} }
withMaven(mavenConfiguration) { withMaven(mavenConfiguration) {
def mvnParams = "-Dbuild.version=1.0.${BUILD_NUMBER} -Dbuild.development=false" def mvnParams = "-Dbuild.number=${BUILD_NUMBER} -Dbuild.development=false"
stage('Build') { stage('Build') {
sh "mvn ${mvnParams} clean compile" sh "mvn ${mvnParams} clean compile"
@ -29,7 +29,8 @@ node {
} }
stage('Deploy') { stage('Deploy') {
sh "mvn ${mvnParams} releaser:release" sh "mvn ${mvnParams} -DskipStatic -DskipTests deploy"
sh "mvn ${mvnParams} scm:tag"
} }
} }
} }

46
pom.xml
View file

@ -6,7 +6,7 @@
<groupId>se.koc</groupId> <groupId>se.koc</groupId>
<artifactId>zutil</artifactId> <artifactId>zutil</artifactId>
<version>${build.version}</version> <version>1.0.${build.number}</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Zutil</name> <name>Zutil</name>
@ -34,7 +34,7 @@
</scm> </scm>
<properties> <properties>
<build.version>1.0.0-SNAPSHOT</build.version> <build.number>0-SNAPSHOT</build.number>
<build.development>true</build.development> <build.development>true</build.development>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -144,9 +144,10 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version> <version>3.1.1</version>
<configuration> <!-- TODO: Temporary until javadoc issues are solved --> <configuration> <!-- TODO: Temporary until javadoc issues are solved -->
<doclint>none</doclint> <doclint>none</doclint>
<source>8</source>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
@ -175,13 +176,44 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.github.danielflower.mavenplugins</groupId> <groupId>org.sonatype.plugins</groupId>
<artifactId>multi-module-maven-release-plugin</artifactId> <artifactId>nexus-staging-maven-plugin</artifactId>
<version>3.2.0</version> <version>1.6.7</version>
<extensions>true</extensions>
<configuration> <configuration>
<serverId>repo.koc.se</serverId> <serverId>sonatype-nexus-snapshot</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
<configuration>
<tag>${project.artifactId}-${project.version}</tag>
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>flatten</id>
<phase>package</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>