Skip to content

Instantly share code, notes, and snippets.

@falkorichter
Created April 2, 2013 17:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save falkorichter/5294517 to your computer and use it in GitHub Desktop.
Save falkorichter/5294517 to your computer and use it in GitHub Desktop.
upload your apk directly from your pom
<profile>
<id>hockeyAppUpload</id>
<properties>
<project.property.hockey.mode>true</project.property.hockey.mode>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-versionCode-properties</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>hockeyApp.appToken</property>
<message>The 'hockeyApp.appToken' property is missing.</message>
</requireProperty>
<requireProperty>
<property>hockeyApp.apiToken</property>
<message>The 'hockeyApp.apiToken' property is missing.</message>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>upload to hockey</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>curl</executable>
<workingDirectory>target</workingDirectory>
<arguments>
<argument>--silent</argument>
<arguent>--show-error</arguent>
<argument>-Fstatus=${hockeyApp.status}</argument>
<argument>-Fnotify=${hockeyApp.notify}</argument>
<argument>-Fnotes_type=1</argument>
<argument>-Fmandatory=${hockeyApp.mandatory}</argument>
<argument>-Fipa=@${project.build.finalName}.apk</argument>
<argument>-HX-HockeyAppToken: ${hockeyApp.apiToken}</argument>
<argument>
https://rink.hockeyapp.net/api/2/apps/${hockeyApp.appToken}/app_versions
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment