Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use release plugin

Reset version
  • Loading branch information...
commit f013d0063b43918e0aa1c502be26d13d1779a710 1 parent 6b6347a
@jberkel jberkel authored
View
11 RELEASE.md
@@ -14,14 +14,11 @@ Regenerate pom.xml
$ gradle writePom
-Upload to to oss sonatype
+Upload to oss sonatype (snapshot)
$ gradle uploadArchives
-Signing (does not work yet)
+Releasing to oss sonatype (staging)
- $ mvn gpg:sign-and-deploy-file -DpomFile=build/poms/pom-default.xml \
- -Dfile=build/libs/java-api-wrapper-1.0.0.jar \
- -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
- -DrepositoryId=sonatype-nexus-staging \
- -Dgpg.keyname=jan@soundcloud.com
+ $ mvn -DdryRun=true -Dresume=false -DskipTests release:prepare
+ $ mvn release:perform -Dgpg.keyname=jan@soundcloud.com
View
2  build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = 1.6
-version = '1.0.1-SNAPSHOT'
+version = '1.0.0-SNAPSHOT'
group = 'com.soundcloud'
repositories { mavenCentral() }
View
80 pom-include.xml
@@ -1,7 +1,7 @@
<project>
<scm>
<connection>scm:git:git://github.com/soundcloud/java-api-wrapper.git</connection>
- <developerConnection>scm:git:git@github.com:soundcoud/java-api-wrapper.git</developerConnection>
+ <developerConnection>scm:git:git@github.com:soundcloud/java-api-wrapper.git</developerConnection>
<url>https://github.com/soundcloud/java-api-wrapper</url>
</scm>
@@ -13,6 +13,13 @@
</developer>
</developers>
+ <distributionManagement>
+ <repository>
+ <id>sonatype-nexus-staging</id>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
+ </distributionManagement>
+
<build>
<plugins>
<plugin>
@@ -20,45 +27,42 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3</version>
</plugin>
- <!--
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <goals>deploy</goals>
+ </configuration>
</plugin>
</plugins>
</build>
+
+ <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>
+ <phase>install</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
View
63 pom.xml
@@ -60,7 +60,7 @@
</dependencies>
<scm>
<connection>scm:git:git://github.com/soundcloud/java-api-wrapper.git</connection>
- <developerConnection>scm:git:git@github.com:soundcoud/java-api-wrapper.git</developerConnection>
+ <developerConnection>scm:git:git@github.com:soundcloud/java-api-wrapper.git</developerConnection>
<url>https://github.com/soundcloud/java-api-wrapper</url>
</scm>
<developers>
@@ -70,6 +70,12 @@
<email>jan@soundcloud.com</email>
</developer>
</developers>
+ <distributionManagement>
+ <repository>
+ <id>sonatype-nexus-staging</id>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
+ </distributionManagement>
<build>
<plugins>
<plugin>
@@ -78,29 +84,40 @@
<version>2.3</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <goals>deploy</goals>
+ </configuration>
</plugin>
</plugins>
</build>
+ <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>
+ <phase>install</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
View
2  src/test/java/com/soundcloud/api/CloudAPIIntegrationTest.java
@@ -51,7 +51,7 @@ public void shouldUploadASimpleAudioFile() throws Exception {
assertThat(status, is(201));
}
- @Test(expected = CloudAPI.InvalidTokenException.class)
+ @Test(expected = IOException.class)
public void shouldNotGetASignupTokenWhenInofficialApp() throws Exception {
api.clientCredentials();
}
Please sign in to comment.
Something went wrong with that request. Please try again.