Skip to content

Commit 5959dba

Browse files
committed
Remove Maven release magic
Remove configurations for maven deploy and maven release plugins from pom files. These plugins only complicated the release process. Return to the release script for now. Change the modules not to have a parent pom anymore. Change parent pom to be just a "master" POM that builds both modules in the repository. It shouldn't end up on Maven Central anymore. Fix #48
1 parent 64a6bfb commit 5959dba

File tree

4 files changed

+19
-103
lines changed

4 files changed

+19
-103
lines changed

com.eclipsesource.json.performancetest/pom.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<parent>
6-
<groupId>com.eclipsesource.minimal-json</groupId>
7-
<artifactId>parent</artifactId>
8-
<version>0.9.4-SNAPSHOT</version>
9-
</parent>
10-
5+
<groupId>com.eclipsesource.minimal-json</groupId>
116
<artifactId>minimal-json-performancetest</artifactId>
7+
<version>0.9.4-SNAPSHOT</version>
128
<packaging>jar</packaging>
139
<name>minimal-json performance tests</name>
1410
<description>Performance benchmarks for minimal-json parser</description>

com.eclipsesource.json/pom.xml

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<parent>
6-
<groupId>com.eclipsesource.minimal-json</groupId>
7-
<artifactId>parent</artifactId>
8-
<version>0.9.4-SNAPSHOT</version>
9-
</parent>
10-
5+
<groupId>com.eclipsesource.minimal-json</groupId>
116
<artifactId>minimal-json</artifactId>
7+
<version>0.9.4-SNAPSHOT</version>
128
<packaging>bundle</packaging>
139
<name>minimal-json</name>
1410
<description>A Minimal JSON Parser and Writer</description>
@@ -92,14 +88,6 @@
9288
</instructions>
9389
</configuration>
9490
</plugin>
95-
<plugin>
96-
<groupId>org.apache.maven.plugins</groupId>
97-
<artifactId>maven-deploy-plugin</artifactId>
98-
<version>2.4</version>
99-
<configuration>
100-
<skip>false</skip>
101-
</configuration>
102-
</plugin>
10391
</plugins>
10492
</build>
10593

@@ -143,34 +131,4 @@
143131
</dependency>
144132
</dependencies>
145133

146-
<profiles>
147-
<profile>
148-
<id>release-sign-artifacts</id>
149-
<activation>
150-
<property>
151-
<name>performRelease</name>
152-
<value>true</value>
153-
</property>
154-
</activation>
155-
<build>
156-
<plugins>
157-
<plugin>
158-
<groupId>org.apache.maven.plugins</groupId>
159-
<artifactId>maven-gpg-plugin</artifactId>
160-
<version>1.1</version>
161-
<executions>
162-
<execution>
163-
<id>sign-artifacts</id>
164-
<phase>verify</phase>
165-
<goals>
166-
<goal>sign</goal>
167-
</goals>
168-
</execution>
169-
</executions>
170-
</plugin>
171-
</plugins>
172-
</build>
173-
</profile>
174-
</profiles>
175-
176134
</project>

com.eclipsesource.json/release.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,21 @@ echo "Build and release ${ID}"
1111
echo -n "Version: "
1212
read VERSION
1313

14-
git tag -a -s -m "${VERSION} release" ${VERSION}
14+
sed -e "s/-SNAPSHOT//; s/HEAD/${VERSION}/" pom.xml > .pom.xml || exit 1
15+
mv .pom.xml pom.xml || exit 1
16+
git diff
1517

16-
sed -e "s/-SNAPSHOT//" pom.xml > ${ID}-${VERSION}.pom || exit 1
17-
mvn -Duser.name="${USER_NAME}" -f ${ID}-${VERSION}.pom clean package || exit 1
18+
echo "POM rewritten, okay?"
19+
read
20+
21+
mvn -Duser.name="${USER_NAME}" clean package || exit 1
22+
23+
echo "Ready, okay to tag and upload?"
24+
read
25+
26+
git tag -a -s -m "${VERSION} release" ${VERSION} || exit 1
27+
28+
cp pom.xml ${ID}-${VERSION}.pom
1829

1930
mvn gpg:sign-and-deploy-file -Durl=${NEXUS_URL} -DrepositoryId=${NEXUS_REPO} -DpomFile=${ID}-${VERSION}.pom -Dfile=target/${ID}-${VERSION}.jar || exit 1
2031
mvn gpg:sign-and-deploy-file -Durl=${NEXUS_URL} -DrepositoryId=${NEXUS_REPO} -DpomFile=${ID}-${VERSION}.pom -Dfile=target/${ID}-${VERSION}-sources.jar -Dclassifier=sources || exit 1

pom.xml

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,13 @@
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.eclipsesource.minimal-json</groupId>
6-
<artifactId>parent</artifactId>
6+
<artifactId>build</artifactId>
77
<version>0.9.4-SNAPSHOT</version>
88
<packaging>pom</packaging>
9-
<name>parent</name>
109

1110
<modules>
1211
<module>com.eclipsesource.json</module>
1312
<module>com.eclipsesource.json.performancetest</module>
1413
</modules>
1514

16-
<scm>
17-
<url>https://github.com/ralfstx/minimal-json</url>
18-
<connection>scm:git:git@github.com:ralfstx/minimal-json.git</connection>
19-
<developerConnection>scm:git:git@github.com:ralfstx/minimal-json.git</developerConnection>
20-
<tag>HEAD</tag>
21-
</scm>
22-
23-
<distributionManagement>
24-
<snapshotRepository>
25-
<id>sonatype-nexus-snapshots</id>
26-
<name>Sonatype Nexus Snapshots</name>
27-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
28-
</snapshotRepository>
29-
<repository>
30-
<id>sonatype-nexus-staging</id>
31-
<name>Nexus Release Repository</name>
32-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
33-
</repository>
34-
</distributionManagement>
35-
36-
<build>
37-
<plugins>
38-
<plugin>
39-
<groupId>org.apache.maven.plugins</groupId>
40-
<artifactId>maven-deploy-plugin</artifactId>
41-
<version>2.4</version>
42-
<configuration>
43-
<skip>true</skip>
44-
</configuration>
45-
</plugin>
46-
</plugins>
47-
<pluginManagement>
48-
<plugins>
49-
<plugin>
50-
<groupId>org.apache.maven.plugins</groupId>
51-
<artifactId>maven-release-plugin</artifactId>
52-
<version>2.4</version>
53-
<configuration>
54-
<!-- needed to enable make gpg signing -->
55-
<mavenExecutorId>forked-path</mavenExecutorId>
56-
<tagNameFormat>@{project.version}</tagNameFormat>
57-
<arguments>-Duser.name="@{user.name}"</arguments>
58-
</configuration>
59-
</plugin>
60-
</plugins>
61-
</pluginManagement>
62-
</build>
63-
6415
</project>

0 commit comments

Comments
 (0)