Skip to content

Commit daf4fe4

Browse files
committed
update with OSSRH and release plugin
1 parent 4b2706d commit daf4fe4

1 file changed

Lines changed: 86 additions & 1 deletion

File tree

pom.xml

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
<properties>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<maven-compiler-plugin.version>3.2</maven-compiler-plugin.version>
16+
<nexus-staging-maven-plugin.version>1.6.3</nexus-staging-maven-plugin.version>
17+
<maven-release-plugin.version>2.5.1</maven-release-plugin.version>
1518
</properties>
1619

1720
<licenses>
@@ -33,6 +36,17 @@
3336
<developerConnection>scm:git:git@github.com:trung/InMemoryJavaCompiler.git</developerConnection>
3437
</scm>
3538

39+
<distributionManagement>
40+
<snapshotRepository>
41+
<id>ossrh</id>
42+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
43+
</snapshotRepository>
44+
<repository>
45+
<id>ossrh</id>
46+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
47+
</repository>
48+
</distributionManagement>
49+
3650
<dependencies>
3751
<dependency>
3852
<groupId>junit</groupId>
@@ -47,12 +61,83 @@
4761
<plugin>
4862
<groupId>org.apache.maven.plugins</groupId>
4963
<artifactId>maven-compiler-plugin</artifactId>
50-
<version>3.2</version>
64+
<version>${maven-compiler-plugin.version}</version>
5165
<configuration>
5266
<source>1.7</source>
5367
<target>1.7</target>
5468
</configuration>
5569
</plugin>
70+
<plugin>
71+
<groupId>org.sonatype.plugins</groupId>
72+
<artifactId>nexus-staging-maven-plugin</artifactId>
73+
<version>${nexus-staging-maven-plugin.version}</version>
74+
<extensions>true</extensions>
75+
<configuration>
76+
<serverId>ossrh</serverId>
77+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
78+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
79+
</configuration>
80+
</plugin>
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-release-plugin</artifactId>
84+
<version>${maven-release-plugin.version}</version>
85+
<configuration>
86+
<autoVersionSubmodules>true</autoVersionSubmodules>
87+
<useReleaseProfile>false</useReleaseProfile>
88+
<releaseProfiles>release</releaseProfiles>
89+
<goals>deploy</goals>
90+
</configuration>
91+
</plugin>
5692
</plugins>
5793
</build>
94+
<profiles>
95+
<profile>
96+
<id>release</id>
97+
<build>
98+
<plugins>
99+
<plugin>
100+
<groupId>org.apache.maven.plugins</groupId>
101+
<artifactId>maven-source-plugin</artifactId>
102+
<version>2.2.1</version>
103+
<executions>
104+
<execution>
105+
<id>attach-sources</id>
106+
<goals>
107+
<goal>jar-no-fork</goal>
108+
</goals>
109+
</execution>
110+
</executions>
111+
</plugin>
112+
<plugin>
113+
<groupId>org.apache.maven.plugins</groupId>
114+
<artifactId>maven-javadoc-plugin</artifactId>
115+
<version>2.9.1</version>
116+
<executions>
117+
<execution>
118+
<id>attach-javadocs</id>
119+
<goals>
120+
<goal>jar</goal>
121+
</goals>
122+
</execution>
123+
</executions>
124+
</plugin>
125+
<plugin>
126+
<groupId>org.apache.maven.plugins</groupId>
127+
<artifactId>maven-gpg-plugin</artifactId>
128+
<version>1.5</version>
129+
<executions>
130+
<execution>
131+
<id>sign-artifacts</id>
132+
<phase>verify</phase>
133+
<goals>
134+
<goal>sign</goal>
135+
</goals>
136+
</execution>
137+
</executions>
138+
</plugin>
139+
</plugins>
140+
</build>
141+
</profile>
142+
</profiles>
58143
</project>

0 commit comments

Comments
 (0)