Skip to content

Commit 9b96ee4

Browse files
committed
More tweakings of the pom.xml file
Move deployment plugin out of the release profile. Add 'v' before tag name as GitHub suggested. Move source and javadoc generation to release profile. Set autoReleaseAfterClose to true.
1 parent afc33b6 commit 9b96ee4

File tree

2 files changed

+47
-45
lines changed

2 files changed

+47
-45
lines changed

pom.xml

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35

46
<modelVersion>4.0.0</modelVersion>
57

@@ -74,47 +76,27 @@
7476
<artifactId>maven-surefire-plugin</artifactId>
7577
<version>2.20.1</version>
7678
</plugin>
77-
<plugin>
78-
<groupId>org.apache.maven.plugins</groupId>
79-
<artifactId>maven-source-plugin</artifactId>
80-
<version>3.0.1</version>
81-
<executions>
82-
<execution>
83-
<id>attach-sources</id>
84-
<goals>
85-
<goal>jar-no-fork</goal>
86-
</goals>
87-
</execution>
88-
</executions>
89-
</plugin>
90-
<plugin>
91-
<groupId>org.apache.maven.plugins</groupId>
92-
<artifactId>maven-javadoc-plugin</artifactId>
93-
<version>3.0.0</version>
94-
<configuration>
95-
<additionalOptions>
96-
<additionalOption>-Xdoclint:all,-missing</additionalOption>
97-
</additionalOptions>
98-
</configuration>
99-
<executions>
100-
<execution>
101-
<id>attach-javadocs</id>
102-
<goals>
103-
<goal>jar</goal>
104-
</goals>
105-
</execution>
106-
</executions>
107-
</plugin>
10879
<plugin>
10980
<groupId>org.apache.maven.plugins</groupId>
11081
<artifactId>maven-release-plugin</artifactId>
11182
<version>2.5.3</version>
11283
<configuration>
113-
<tagNameFormat>@{project.version}</tagNameFormat>
84+
<tagNameFormat>v@{project.version}</tagNameFormat>
11485
<autoVersionSubmodules>true</autoVersionSubmodules>
11586
<releaseProfiles>release</releaseProfiles>
11687
</configuration>
11788
</plugin>
89+
<plugin>
90+
<groupId>org.sonatype.plugins</groupId>
91+
<artifactId>nexus-staging-maven-plugin</artifactId>
92+
<version>1.6.8</version>
93+
<extensions>true</extensions>
94+
<configuration>
95+
<serverId>sonatype-nexus-staging</serverId>
96+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
97+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
98+
</configuration>
99+
</plugin>
118100
</plugins>
119101
</build>
120102

@@ -123,6 +105,37 @@
123105
<id>release</id>
124106
<build>
125107
<plugins>
108+
<plugin>
109+
<groupId>org.apache.maven.plugins</groupId>
110+
<artifactId>maven-source-plugin</artifactId>
111+
<version>3.0.1</version>
112+
<executions>
113+
<execution>
114+
<id>attach-sources</id>
115+
<goals>
116+
<goal>jar-no-fork</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-javadoc-plugin</artifactId>
124+
<version>3.0.0</version>
125+
<configuration>
126+
<additionalOptions>
127+
<additionalOption>-Xdoclint:all,-missing</additionalOption>
128+
</additionalOptions>
129+
</configuration>
130+
<executions>
131+
<execution>
132+
<id>attach-javadocs</id>
133+
<goals>
134+
<goal>jar</goal>
135+
</goals>
136+
</execution>
137+
</executions>
138+
</plugin>
126139
<plugin>
127140
<groupId>org.apache.maven.plugins</groupId>
128141
<artifactId>maven-gpg-plugin</artifactId>
@@ -137,17 +150,6 @@
137150
</execution>
138151
</executions>
139152
</plugin>
140-
<plugin>
141-
<groupId>org.sonatype.plugins</groupId>
142-
<artifactId>nexus-staging-maven-plugin</artifactId>
143-
<version>1.6.8</version>
144-
<extensions>true</extensions>
145-
<configuration>
146-
<serverId>sonatype-nexus-staging</serverId>
147-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
148-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
149-
</configuration>
150-
</plugin>
151153
</plugins>
152154
</build>
153155
</profile>

stackdriver/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</parent>
1212

1313
<artifactId>stackdriver</artifactId>
14-
<name>Stackdriver writer</name>
14+
<name>Stackdriver Writer</name>
1515
<description>Metrics writer using stackdriver backend.</description>
1616

1717
<packaging>jar</packaging>

0 commit comments

Comments
 (0)