| POM文件内容: |
<?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>net.mintern</groupId>
<artifactId>primitive</artifactId>
<version>1.2.1</version>
<name>Primitive</name>
<description>Utility methods for primitive types</description>
<url>http://mintern.net/primitive</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<licenses>
<license>
<name>GNU General Public License, version 2, with the Classpath Exception</name>
<url>http://openjdk.java.net/legal/gplv2+ce.html</url>
</license>
</licenses>
<developers>
<developer>
<name>Brandon Mintern</name>
<email>brandon@mintern.net</email>
<organization>Mintern Java Projects</organization>
<organizationUrl>https://github.com/mintern-java</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com:mintern-java/primitive.git</connection>
<developerConnection>scm:git:git@github.com:mintern-java/primitive.git</developerConnection>
<url>git@github.com:mintern-java/primitive.git</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-fmpp-data</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/fmpp</directory>
</resource>
</resources>
<outputDirectory>target/fmpp</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.fmpp-maven-plugin</groupId>
<artifactId>fmpp-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<outputDirectory>target/generated-sources/net/mintern/primitive</outputDirectory>
<cfgFile>target/fmpp/Primitive.fmpp</cfgFile>
<templateDirectory>target/fmpp/templates</templateDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.5</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!--
The maven-source-plugin was not correctly packaging the source (refer to
<http://stackoverflow.com/q/29159749/1237044>). We can build the source JAR
ourselves without too much trouble, but this confuses maven-install-plugin's
default-install (it installs this in place of the class JAR). Disabling the
default-install in favor of a custom configuration fixes that problem, but
then nexus-staging-maven-plugin suffers from the same issue.
Instead, we use build-helper-maven-plugin below to attach the sources as an
artifact, but the install plugin *still* installs this JAR in place of the
class JAR. Changing the build-sources phase to prepare-package alleviates
that issue and everything builds correctly, though in a much hackier way
than I would prefer.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>build-sources</id>
<goals>
<goal>jar</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<classesDirectory>${project.build.directory}/generated-sources</classesDirectory>
<finalName>${project.build.finalName}-sources</finalName>
<excludes>
<!-- the generated-sources directory includes an empty
annotations directory that we don't need -->
<exclude>annotations</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>attach-artifact</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}-sources.jar</file>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<sourcepath>target/generated-sources</sourcepath>
</configuration>
</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>
</plugins>
</build>
</profile>
</profiles>
</project>
|