Permalink
Browse files

Update build script for release

  • Loading branch information...
1 parent 3abee90 commit f75fe8fbdb9b695e2cd3806f9f89991f0f0f08bc @saudet saudet committed Nov 20, 2016
Showing with 74 additions and 5 deletions.
  1. +27 −0 nd4j-shade/jackson/dependency-reduced-pom.xml
  2. +29 −1 nd4j-shade/jackson/pom.xml
  3. +18 −4 perform-release.sh
@@ -47,6 +47,33 @@
</relocations>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>empty-javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>javadoc</classifier>
+ <classesDirectory>${basedir}/javadoc</classesDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>empty-sources-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <classesDirectory>${basedir}/src</classesDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<dependencies>
@@ -77,6 +77,34 @@
</relocations>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>empty-javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>javadoc</classifier>
+ <classesDirectory>${basedir}/javadoc</classesDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>empty-sources-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <classesDirectory>${basedir}/src</classesDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -121,4 +149,4 @@
</dependencies>
-</project>
+</project>
View
@@ -35,7 +35,7 @@ if [[ -z ${STAGING_REPOSITORY:-} ]]; then
# create new staging repository with everything in it
source change-scala-versions.sh 2.10
source change-cuda-versions.sh 7.5
- mvn clean deploy -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -DstagingRepositoryId=$STAGING_REPOSITORY
+ mvn clean deploy -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -Denforcer.skip -DstagingRepositoryId=$STAGING_REPOSITORY
if [[ ! $(grep stagingRepository.id target/nexus-staging/staging/*.properties) =~ ^stagingRepository.id=(.*) ]]; then
exit 1
@@ -44,16 +44,30 @@ if [[ -z ${STAGING_REPOSITORY:-} ]]; then
source change-scala-versions.sh 2.11
source change-cuda-versions.sh 8.0
- mvn clean deploy -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -DstagingRepositoryId=$STAGING_REPOSITORY
+ mvn clean deploy -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -Denforcer.skip -DstagingRepositoryId=$STAGING_REPOSITORY
+
+ # build for Android with the NDK
+ export ANDROID_NDK=~/Android/android-ndk/
+
+ cd ../libnd4j
+ bash buildnativeoperations.sh -c cpu -platform android-arm
+ cd ../nd4j
+ mvn clean deploy -Djavacpp.platform=android-arm -am -pl nd4j-backends/nd4j-backend-impls/nd4j-native -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -Denforcer.skip -Dmaven.javadoc.skip -DstagingRepositoryId=$STAGING_REPOSITORY
+
+ cd ../libnd4j
+ bash buildnativeoperations.sh -c cpu -platform android-x86
+ cd ../nd4j
+ mvn clean deploy -Djavacpp.platform=android-x86 -am -pl nd4j-backends/nd4j-backend-impls/nd4j-native -Dgpg.executable=gpg2 -DperformRelease -Psonatype-oss-release -DskipTests -Denforcer.skip -Dmaven.javadoc.skip -DstagingRepositoryId=$STAGING_REPOSITORY
+
else
# build only partially (on other platforms) and deploy to given repository
source change-scala-versions.sh 2.10
source change-cuda-versions.sh 7.5
- mvn clean deploy -am -pl nd4j-backends/nd4j-backend-impls/nd4j-native,nd4j-backends/nd4j-backend-impls/nd4j-cuda -Dgpg.useagent=false -DperformRelease -Psonatype-oss-release -DskipTests -Dmaven.javadoc.skip -DstagingRepositoryId=$STAGING_REPOSITORY
+ mvn clean deploy -am -pl nd4j-backends/nd4j-backend-impls/nd4j-native,nd4j-backends/nd4j-backend-impls/nd4j-cuda -Dgpg.useagent=false -DperformRelease -Psonatype-oss-release -DskipTests -Denforcer.skip -Dmaven.javadoc.skip -DstagingRepositoryId=$STAGING_REPOSITORY
source change-scala-versions.sh 2.11
source change-cuda-versions.sh 8.0
- mvn clean deploy -am -pl nd4j-backends/nd4j-backend-impls/nd4j-native,nd4j-backends/nd4j-backend-impls/nd4j-cuda -Dgpg.useagent=false -DperformRelease -Psonatype-oss-release -DskipTests -Dmaven.javadoc.skip -DstagingRepositoryId=$STAGING_REPOSITORY
+ mvn clean deploy -am -pl nd4j-backends/nd4j-backend-impls/nd4j-native,nd4j-backends/nd4j-backend-impls/nd4j-cuda -Dgpg.useagent=false -DperformRelease -Psonatype-oss-release -DskipTests -Denforcer.skip -Dmaven.javadoc.skip -DstagingRepositoryId=$STAGING_REPOSITORY
fi
source change-scala-versions.sh 2.10

0 comments on commit f75fe8f

Please sign in to comment.