Skip to content

Commit

Permalink
Remove Maven release magic
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ralfstx committed Jul 19, 2015
1 parent 64a6bfb commit 5959dba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 103 deletions.
8 changes: 2 additions & 6 deletions com.eclipsesource.json.performancetest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
<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>

<parent>
<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>parent</artifactId>
<version>0.9.4-SNAPSHOT</version>
</parent>

<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>minimal-json-performancetest</artifactId>
<version>0.9.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>minimal-json performance tests</name>
<description>Performance benchmarks for minimal-json parser</description>
Expand Down
46 changes: 2 additions & 44 deletions com.eclipsesource.json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
<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>

<parent>
<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>parent</artifactId>
<version>0.9.4-SNAPSHOT</version>
</parent>

<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>minimal-json</artifactId>
<version>0.9.4-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>minimal-json</name>
<description>A Minimal JSON Parser and Writer</description>
Expand Down Expand Up @@ -92,14 +88,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -143,34 +131,4 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>release-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.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
17 changes: 14 additions & 3 deletions com.eclipsesource.json/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ echo "Build and release ${ID}"
echo -n "Version: "
read VERSION

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

sed -e "s/-SNAPSHOT//" pom.xml > ${ID}-${VERSION}.pom || exit 1
mvn -Duser.name="${USER_NAME}" -f ${ID}-${VERSION}.pom clean package || exit 1
echo "POM rewritten, okay?"
read

mvn -Duser.name="${USER_NAME}" clean package || exit 1

echo "Ready, okay to tag and upload?"
read

git tag -a -s -m "${VERSION} release" ${VERSION} || exit 1

cp pom.xml ${ID}-${VERSION}.pom

mvn gpg:sign-and-deploy-file -Durl=${NEXUS_URL} -DrepositoryId=${NEXUS_REPO} -DpomFile=${ID}-${VERSION}.pom -Dfile=target/${ID}-${VERSION}.jar || exit 1
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
Expand Down
51 changes: 1 addition & 50 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,13 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>parent</artifactId>
<artifactId>build</artifactId>
<version>0.9.4-SNAPSHOT</version>
<packaging>pom</packaging>
<name>parent</name>

<modules>
<module>com.eclipsesource.json</module>
<module>com.eclipsesource.json.performancetest</module>
</modules>

<scm>
<url>https://github.com/ralfstx/minimal-json</url>
<connection>scm:git:[email protected]:ralfstx/minimal-json.git</connection>
<developerConnection>scm:git:[email protected]:ralfstx/minimal-json.git</developerConnection>
<tag>HEAD</tag>
</scm>

<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4</version>
<configuration>
<!-- needed to enable make gpg signing -->
<mavenExecutorId>forked-path</mavenExecutorId>
<tagNameFormat>@{project.version}</tagNameFormat>
<arguments>-Duser.name="@{user.name}"</arguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>

0 comments on commit 5959dba

Please sign in to comment.