-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-710] Change POM files to be able to regularly publish to Apache Release & Maven Central Repo #11862
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also try to change the
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
to the parent pom file and them apply changes to each assembly files.
@@ -589,6 +589,7 @@ scalaclean: | |||
scalapkg: | |||
(cd $(ROOTDIR)/scala-package; \ | |||
mvn package -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) -Dcxx="$(CXX)" \ | |||
-Dbuild.platform="$(SCALA_PKG_PROFILE)" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we used this param in the profile
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have tried this, I couldn't use read this from the profile in release/release-perform that is why I had to add an additional property.
-Darguments=""-Dbuild\.platform=\""$(SCALA_PKG_PROFILE)\""
-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \ | ||
-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a") | ||
|
||
scalarelease-dryrun: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also include explanations on these make target in the CWiki and possibly provide the links to explains the reason to run this and the following two make target below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if you don't set this it will fail with the error "gpg: signing failed: Inappropriate ioctl for device"
export GPG_TTY=$(tty)
#build scalapkg
make scalapkg
#make sure everything is working as expected
make scalarelease-dryrun
# Releases to Apache Snapshot
make scaladeploy. This will upload to the snapshot repo
# Verify that the package has been uploaded in https://repository.apache.org/content/repositories/snapshots/
# Preparing the release will create the new tag, automatically checking in on your behalf.(We have disabled CheckIn)
make scalarelease-prepare
# this will upload to the staging repository and make it for testing
make scalarelease-perform
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>flatten-maven-plugin</artifactId> | ||
<!--<version>1.1.0-SNAPSHOT</version>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it there because I am not using a version and to point out and remember that it is 1.1.0-SNAPSHOT(there is no released version)
# below routine shamelessly copied from | ||
# https://github.com/apache/incubator-mxnet/blob/master/setup-utils/install-mxnet-osx-python.sh | ||
|
||
chkret() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is chkret?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chkret
executes a command and checks return code.
elif [[ $PLATFORM == "linux-x86_64-gpu" ]] | ||
then | ||
echo "Building MXNet Backend on Linux GPU" | ||
echo "Building MXNet Backend on Linux CPU" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments, I have responded and see if that addresses your concern.
-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \ | ||
-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a") | ||
|
||
scalarelease-dryrun: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if you don't set this it will fail with the error "gpg: signing failed: Inappropriate ioctl for device"
export GPG_TTY=$(tty)
#build scalapkg
make scalapkg
#make sure everything is working as expected
make scalarelease-dryrun
# Releases to Apache Snapshot
make scaladeploy. This will upload to the snapshot repo
# Verify that the package has been uploaded in https://repository.apache.org/content/repositories/snapshots/
# Preparing the release will create the new tag, automatically checking in on your behalf.(We have disabled CheckIn)
make scalarelease-prepare
# this will upload to the staging repository and make it for testing
make scalarelease-perform
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>flatten-maven-plugin</artifactId> | ||
<!--<version>1.1.0-SNAPSHOT</version>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it there because I am not using a version and to point out and remember that it is 1.1.0-SNAPSHOT(there is no released version)
# below routine shamelessly copied from | ||
# https://github.com/apache/incubator-mxnet/blob/master/setup-utils/install-mxnet-osx-python.sh | ||
|
||
chkret() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chkret
executes a command and checks return code.
@@ -589,6 +589,7 @@ scalaclean: | |||
scalapkg: | |||
(cd $(ROOTDIR)/scala-package; \ | |||
mvn package -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) -Dcxx="$(CXX)" \ | |||
-Dbuild.platform="$(SCALA_PKG_PROFILE)" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have tried this, I couldn't use read this from the profile in release/release-perform that is why I had to add an additional property.
-Darguments=""-Dbuild\.platform=\""$(SCALA_PKG_PROFILE)\""
@lanking520 regarding
I am not sure if I got your suggestion right, but that is exactly how it is done right now. |
@nswamy The normal practice is to add the configuration file in the parent pom and all child modules will extend that. So if you add the |
@lanking520 its already there |
Agreed. We can create another PR specifically on cleaning the pom files and build cycle. |
scala-package/pom.xml
Outdated
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.19</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we degrade the version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. will fix it
…e Release & Maven Central Repo (apache#11862) * pom file changes for maven builds
Description
This brings the ability to publish Maven packages using Apache Maven Release plugin and is integrated with the existing Make file System. The steps to perform the Scala Release is documented here:
https://cwiki.apache.org/confluence/display/MXNET/MXNet-Scala+Release+Process.
This process was used to publish both 1.2.0 and 1.2.1 releases. This could be further automated by integrating to the CI system to publish SNAPSHOTS to the Apache SnapShot repo which can be picked up to perform the Release.
@lanking520 @andrewfayres