diff options
Diffstat (limited to 'maven')
-rw-r--r-- | maven/README.txt | 67 | ||||
-rw-r--r-- | maven/gluegen.pom.in | 4 | ||||
-rw-r--r-- | maven/joal.pom.in | 4 | ||||
-rw-r--r-- | maven/jocl.pom.in | 4 | ||||
-rw-r--r-- | maven/jogl.pom.in | 4 | ||||
-rwxr-xr-x | maven/make-deploy-one.sh | 58 |
6 files changed, 107 insertions, 34 deletions
diff --git a/maven/README.txt b/maven/README.txt index a976718..2cea946 100644 --- a/maven/README.txt +++ b/maven/README.txt @@ -21,7 +21,7 @@ Sonatype. See the repository usage guide [1] for details on getting an account. ------------------------------------------------------------------------ -Instructions +Instructions (deploying a release to Central) ------------------------------------------------------------------------ 1. Obtain the jogamp-all-platforms.7z release for the version @@ -153,6 +153,69 @@ Instructions If there are still more projects to release, return to step 6. ------------------------------------------------------------------------ +Instructions (deploying something to the jogamp test repository) +------------------------------------------------------------------------ + +In order to deploy to the jogamp test repository, the artifacts must be +deployed over SSH. As Maven now uses jsch [4], and because we require +the use of SSH keypairs, and because jsch can't talk to OpenSSH's +ssh-agent, it takes a bit of extra work to get deployment working +over SSH. + + 1. First, it's necessary to generate a "master password" for + Maven. This is analogous to a password used for a web browser + keychain; it is used to encrypt all other passwords. + + So, pick a good password, and then encrypt it (where 'abcdefgh' + is the password): + + $ mvn --encrypt-master-password abcdefgh + + The command will produce output similar to (note the braces): + + {Ugr6u/ykq9yAl51tEAJSnsUr+6D/qO9cRxr6r7suOr4} + + 2. Then, save this password in $HOME/.m2/settings-security.xml: + + <settingsSecurity> + <master>{Ugr6u/ykq9yAl51tEAJSnsUr+6D/qO9cRxr6r7suOr4}</master> + </settingsSecurity> + + 3. Now, it's necessary to encrypt your SSH key's passphrase with + your master password (where '12345678' is the passphrase): + + $ mvn --encrypt-password 12345678 + {9N6TewUd+9sEbMpmJpLC+O4Q4so0aM3ewriU+n7iA+c=} + + 4. Now, it's necessary to add a definition to $HOME/.m2/settings.xml + so that, given a unique server ID, Maven can find: + + * Your SSH private key + * The passphrase required to decrypt it + * The username to use on the server + + For convenience, we'll call the server "jogamp-test-scp" here, + but it's obviously possible to use whatever name is desired: + + <servers> + <server> + <id>jogamp-test-scp</id> + <username>someone</username> + <privateKey>/home/someone/.ssh/id_rsa</privateKey> + <passphrase>{9N6TewUd+9sEbMpmJpLC+O4Q4so0aM3ewriU+n7iA+c=}</passphrase> + </server> + </servers> + + 5. Now, when running make-deploy.sh, the server ID we added to + $HOME/.m2/settings.xml must be used as the REPOSITORY_ID (and + the REPOSITORY_URL must be adjusted slightly to use the scp:// + protocol as opposed to the old scpexe:// protocol): + + $ export REPOSITORY_ID=jogamp-test-scp + $ export REPOSITORY_URL="scp://jogamp.org/srv/www/jogamp.org/deployment/maven/" + $ ./make-deploy.sh ... + +------------------------------------------------------------------------ Projects ------------------------------------------------------------------------ @@ -254,3 +317,5 @@ Footnotes jogamp project at a time. [3] https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html + +[4] http://www.jcraft.com/jsch/ diff --git a/maven/gluegen.pom.in b/maven/gluegen.pom.in index 96c5a7d..d592297 100644 --- a/maven/gluegen.pom.in +++ b/maven/gluegen.pom.in @@ -55,8 +55,8 @@ <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh-external</artifactId> - <version>2.2</version> + <artifactId>wagon-ssh</artifactId> + <version>2.4</version> </extension> </extensions> </build> diff --git a/maven/joal.pom.in b/maven/joal.pom.in index 373b699..898e402 100644 --- a/maven/joal.pom.in +++ b/maven/joal.pom.in @@ -67,8 +67,8 @@ <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh-external</artifactId> - <version>2.2</version> + <artifactId>wagon-ssh</artifactId> + <version>2.4</version> </extension> </extensions> </build> diff --git a/maven/jocl.pom.in b/maven/jocl.pom.in index 4574387..f9e6a16 100644 --- a/maven/jocl.pom.in +++ b/maven/jocl.pom.in @@ -67,8 +67,8 @@ <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh-external</artifactId> - <version>2.2</version> + <artifactId>wagon-ssh</artifactId> + <version>2.4</version> </extension> </extensions> </build> diff --git a/maven/jogl.pom.in b/maven/jogl.pom.in index bdb129d..3d46549 100644 --- a/maven/jogl.pom.in +++ b/maven/jogl.pom.in @@ -67,8 +67,8 @@ <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh-external</artifactId> - <version>2.2</version> + <artifactId>wagon-ssh</artifactId> + <version>2.4</version> </extension> </extensions> </build> diff --git a/maven/make-deploy-one.sh b/maven/make-deploy-one.sh index f0a5968..d547c25 100755 --- a/maven/make-deploy-one.sh +++ b/maven/make-deploy-one.sh @@ -25,6 +25,8 @@ if [ -z "${REPOSITORY_URL}" -o -z "${REPOSITORY_ID}" ] ; then # REPOSITORY_ID="jogamp-mirror" fi +info "using repository: ${REPOSITORY_ID} ${REPOSITORY_URL}" + PLATFORMS=`cat make-platforms.txt | awk '{print $1}'` || exit 1 CURRENT_DIR=`pwd` || exit 1 @@ -36,39 +38,45 @@ NATIVES=`echo "${NATIVES}" | tr -d ' '` || exit 1 cd "output/${NAME}/${VERSION}" || exit 1 -# Deploy jar. -mvn gpg:sign-and-deploy-file \ - "-DpomFile=pom.xml" \ - "-Dfile=${NAME}.jar" \ - "-Durl=${REPOSITORY_URL}" \ - "-DrepositoryId=${REPOSITORY_ID}" +# Maintain a list of extra files, along with their classifiers, to deploy. +DEPLOY_EXTRA_FILES="" +DEPLOY_EXTRA_CLASSIFIERS="" +DEPLOY_EXTRA_TYPES="" + +# Deploy javadoc jar +f="${NAME}-${VERSION}-javadoc.jar" +info "adding file ${f}" +DEPLOY_EXTRA_FILES="${f}" +DEPLOY_EXTRA_CLASSIFIERS="javadoc" +DEPLOY_EXTRA_TYPES="jar" + +# Deploy source jar +f="${NAME}-${VERSION}-sources.jar" +info "adding file ${f}" +DEPLOY_EXTRA_FILES="${DEPLOY_EXTRA_FILES},${f}" +DEPLOY_EXTRA_CLASSIFIERS="${DEPLOY_EXTRA_CLASSIFIERS},sources" +DEPLOY_EXTRA_TYPES="${DEPLOY_EXTRA_TYPES},jar" # Deploy native jars into repository, if necessary. if [ "${NATIVES}" = "natives" ] then for PLATFORM in ${PLATFORMS} do - mvn gpg:sign-and-deploy-file \ - "-DpomFile=pom.xml" \ - "-Dfile=${NAME}-${VERSION}-natives-${PLATFORM}.jar" \ - "-Dclassifier=natives-${PLATFORM}" \ - "-Durl=${REPOSITORY_URL}" \ - "-DrepositoryId=${REPOSITORY_ID}" + f="${NAME}-${VERSION}-natives-${PLATFORM}.jar" + DEPLOY_EXTRA_FILES="${DEPLOY_EXTRA_FILES},${f}" + DEPLOY_EXTRA_CLASSIFIERS="${DEPLOY_EXTRA_CLASSIFIERS},natives-${PLATFORM}" + DEPLOY_EXTRA_TYPES="${DEPLOY_EXTRA_TYPES},jar" + info "adding file ${f}" done fi -# Deploy empty 'sources' and 'javadoc' jars. -mvn gpg:sign-and-deploy-file \ - "-DpomFile=pom.xml" \ - "-Dfile=${NAME}-${VERSION}-javadoc.jar" \ - "-Dclassifier=javadoc" \ - "-Durl=${REPOSITORY_URL}" \ - "-DrepositoryId=${REPOSITORY_ID}" - -mvn gpg:sign-and-deploy-file \ - "-DpomFile=pom.xml" \ - "-Dfile=${NAME}-${VERSION}-sources.jar" \ - "-Dclassifier=sources" \ - "-Durl=${REPOSITORY_URL}" \ +# Deploy everything. +mvn gpg:sign-and-deploy-file \ + "-DpomFile=pom.xml" \ + "-Dfile=${NAME}.jar" \ + "-Dfiles=${DEPLOY_EXTRA_FILES}" \ + "-Dclassifiers=${DEPLOY_EXTRA_CLASSIFIERS}" \ + "-Dtypes=${DEPLOY_EXTRA_TYPES}" \ + "-Durl=${REPOSITORY_URL}" \ "-DrepositoryId=${REPOSITORY_ID}" |