preparing maven central deployment

This commit is contained in:
Ziver Koc 2017-10-11 14:51:33 +02:00
parent e47e5ec885
commit 3c75ef8829
2 changed files with 93 additions and 9 deletions

13
Jenkinsfile vendored
View file

@ -29,14 +29,9 @@ node {
sh "git push 'https://${USERNAME}:${PASSWORD}@${env.REPO_URL}' ${env.BUILD_NAME}"
}
}
stage('Deploy') {
sh 'mvn -DskipStatic -DskipTests deploy'
}
}
}
//stage('Deploy') {
// timeout(time: 5, unit: 'HOURS') {
// input message: 'Deploy?', submitter: 'ziver'
// node {
// sh 'mvn deploy'
// }
// }
//}

89
pom.xml
View file

@ -7,8 +7,30 @@
<groupId>koc.se</groupId>
<artifactId>zutil</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Zutil</name>
<description>A library containuin utility classes and code snippets</description>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Ziver Koc</name>
<email>ziver@koc.se</email>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/Ziver/zutil.git</connection>
<developerConnection>scm:git:https://github.com/Ziver/zutil.git</developerConnection>
<url>https://github.com/Ziver/zutil</url>
</scm>
<properties>
<java.version>1.8</java.version>
@ -89,7 +111,74 @@
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration> <!-- TODO: Temporary until javadoc issues are solved -->
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus</id>
<name>Sonatype Nexus Snapshots</name>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus</id>
<name>Nexus Release Repository</name>
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>