POM.XML for Open Source Maven project example
<?xml version="1.0" encoding="UTF-8"?> | |
<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"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>io.lenar</groupId> | |
<artifactId>app-props</artifactId> | |
<version>0.9.3-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>AppProps</name> | |
<description>Manages properties</description> | |
<url>https://github.com/LenarBad/app-props</url> | |
<parent> | |
<groupId>org.sonatype.oss</groupId> | |
<artifactId>oss-parent</artifactId> | |
<version>9</version> | |
</parent> | |
<properties> | |
<project.scm.id>github</project.scm.id> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<java.source-target.version>1.8</java.source-target.version> | |
</properties> | |
<distributionManagement> | |
<snapshotRepository> | |
<id>ossrh</id> | |
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | |
</snapshotRepository> | |
<repository> | |
<id>ossrh</id> | |
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> | |
</repository> | |
</distributionManagement> | |
<licenses> | |
<license> | |
<name>The Apache Software License, Version 2.0</name> | |
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | |
<distribution>repo</distribution> | |
</license> | |
</licenses> | |
<scm> | |
<connection>scm:git:git@github.com:lenarbad/app-props.git</connection> | |
<developerConnection>scm:git:git@github.com:lenarbad/app-props.git</developerConnection> | |
<url>https://github.com/lenarbad/app-props</url> | |
</scm> | |
<developers> | |
<developer> | |
<id>owner</id> | |
<name>Lenar Badretdinov</name> | |
<timezone>UTC-7</timezone> | |
<email>my-email@g-hot-web-mail.com</email> | |
</developer> | |
</developers> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.sonatype.plugins</groupId> | |
<artifactId>nexus-staging-maven-plugin</artifactId> | |
<version>1.6.7</version> | |
<extensions>true</extensions> | |
<configuration> | |
<serverId>ossrh</serverId> | |
<nexusUrl>https://oss.sonatype.org</nexusUrl> | |
<autoReleaseAfterClose>true</autoReleaseAfterClose> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.3</version> | |
<configuration> | |
<source>${java.source-target.version}</source> | |
<target>${java.source-target.version}</target> | |
<!-- IMPORTANT --> | |
<useIncrementalCompilation>false</useIncrementalCompilation> | |
</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> | |
<phase>package</phase> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<version>2.9</version> | |
<executions> | |
<execution> | |
<id>attach-javadocs</id> | |
<phase>package</phase> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<profiles> | |
<profile> | |
<id>sign-artifacts</id> | |
<activation> | |
<property> | |
<name>performRelease</name> | |
<value>true</value> | |
</property> | |
</activation> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-gpg-plugin</artifactId> | |
<version>1.5</version> | |
<configuration> | |
<passphrase>${gpg.passphrase}</passphrase> | |
</configuration> | |
<executions> | |
<execution> | |
<id>sign-artifacts</id> | |
<phase>verify</phase> | |
<goals> | |
<goal>sign</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> | |
</profiles> | |
<dependencies> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-api</artifactId> | |
<version>1.7.25</version> | |
</dependency> | |
<dependency> | |
<groupId>org.testng</groupId> | |
<artifactId>testng</artifactId> | |
<version>6.13.1</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment