From: <ni...@us...> - 2012-07-23 20:27:52
|
Revision: 17407 http://jmol.svn.sourceforge.net/jmol/?rev=17407&view=rev Author: nicove Date: 2012-07-23 20:27:46 +0000 (Mon, 23 Jul 2012) Log Message: ----------- Change to the build/release process for adding maven deployment Modified Paths: -------------- trunk/Jmol/build.xml trunk/Jmol/tools/jmol-release.xml Added Paths: ----------- trunk/Jmol/tools/jmol-sonatype.xml trunk/Jmol/tools/maven-ant-tasks-2.1.3.jar trunk/Jmol/tools/pom.xml.template Property Changed: ---------------- trunk/Jmol/ Property changes on: trunk/Jmol ___________________________________________________________________ Modified: svn:ignore - applet-classes classes build bin dist javadoc Jmol*.zip packaging/rpm/dist *.bak *.deprecated *~ *.jar t.spt data bobtest vrml scripts + applet-classes classes build bin dist javadoc Jmol*.zip packaging/rpm/dist *.bak *.deprecated *~ *.jar t.spt data bobtest vrml scripts Jmol.properties Modified: trunk/Jmol/build.xml =================================================================== --- trunk/Jmol/build.xml 2012-07-23 20:04:27 UTC (rev 17406) +++ trunk/Jmol/build.xml 2012-07-23 20:27:46 UTC (rev 17407) @@ -1499,6 +1499,18 @@ mode="755" includes="*/jmol,*/jmol.sh" /> </tar> + + <!-- Copy other files to have a complete distribution --> + <copy file="src/org/jmol/viewer/Jmol.properties" tofile="build/dist/Jmol.properties" /> + <copy file="${jmol.build.dir}/Jmol.jar" tofile="build/dist/Jmol.jar" /> + <filter token="version" value="${version}"/> + <copy file="tools/pom.xml.template" tofile="build/dist/pom.xml" filtering="true" /> + <jar jarfile="build/dist/jmol-${version}-javadoc.jar"> + <fileset dir="build/javadoc" /> + </jar> + <jar jarfile="build/dist/jmol-${version}-sources.jar"> + <fileset dir="src" /> + </jar> </target> <target name="clean-after-dist" id="clean-after-dist"> Modified: trunk/Jmol/tools/jmol-release.xml =================================================================== --- trunk/Jmol/tools/jmol-release.xml 2012-07-23 20:04:27 UTC (rev 17406) +++ trunk/Jmol/tools/jmol-release.xml 2012-07-23 20:27:46 UTC (rev 17407) @@ -20,7 +20,7 @@ <property name="path.release" value="Jmol Prerelease Tests/Prerelease 12.3" /> <property name="prefix.release" value="Prerelease " /> - <property file="Jmol.properties" prefix="Jmol.properties" /> + <property file="${dist.dir}/Jmol.properties" prefix="Jmol.properties" /> <property name="version" value="${Jmol.properties.___version}" /> <!-- Copying files to website --> Added: trunk/Jmol/tools/jmol-sonatype.xml =================================================================== --- trunk/Jmol/tools/jmol-sonatype.xml (rev 0) +++ trunk/Jmol/tools/jmol-sonatype.xml 2012-07-23 20:27:46 UTC (rev 17407) @@ -0,0 +1,125 @@ +<project name="Jmol release to Sonatype OSSRH repository" default="dist" basedir=".." xmlns:artifact="antlib:org.apache.maven.artifact.ant"> + + <!-- + To use this script, we need to add the tools/maven-ant-tasks-2.1.3.jar to the class path. + For details, see https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-4.MavenRepositories + --> + <taskdef uri="antlib:org.apache.maven.artifact.ant" + resource="org/apache/maven/artifact/ant/antlib.xml"> + <classpath> + <pathelement location="tools/maven-ant-tasks-2.1.3.jar" /> + </classpath> + </taskdef> + + <property name="src" location="src" /> + <property name="dist" location="build/dist" /> + <property name="dist-maven" location="build/dist-maven" /> + + <!-- define Maven coordinates --> + <property name="groupId" value="net.sourceforge.jmol" /> + <property name="artifactId" value="jmol" /> + + <property file="${dist}/Jmol.properties" prefix="Jmol.properties" /> + <property name="version" value="${Jmol.properties.version}" /> + + <!-- define artifacts' name, which follows the convention of Maven --> + <property name="maven-jar" value="${dist-maven}/${artifactId}-${version}.jar" /> + <property name="maven-javadoc-jar" value="${dist-maven}/${artifactId}-${version}-javadoc.jar" /> + <property name="maven-sources-jar" value="${dist-maven}/${artifactId}-${version}-sources.jar" /> + + <!-- defined maven snapshots and staging repository id and url --> + <property name="maven-snapshots-repository-id" value="sonatype-nexus-snapshots" /> + <property name="maven-snapshots-repository-url" value="https://oss.sonatype.org/content/repositories/snapshots/" /> + <property name="maven-staging-repository-id" value="sonatype-nexus-staging" /> + <property name="maven-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" /> + <property name="maven-releases-repository-id" value="releases" /> + + <target name="dist" description="generate the distribution"> + <!-- create the dist folder--> + <delete dir="${dist-maven}" /> + <mkdir dir="${dist-maven}" /> + + <!-- copy the pom.xml file --> + <copy file="${dist}/pom.xml" tofile="${dist-maven}/pom.xml" /> + + <!-- copy the jar artifact --> + <copy file="${dist}/Jmol.jar" tofile="${maven-jar}" /> + + <!-- copy the javadoc artifact --> + <copy file="${dist}/jmol-${version}-javadoc.jar" tofile="${maven-javadoc-jar}" /> + + <!-- copy the sources artifact --> + <copy file="${dist}/jmol-${version}-sources.jar" tofile="${maven-sources-jar}" /> + </target> + + <target name="snapshot" depends="dist" description="deploy snapshot version to Maven snapshot repository"> + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file" /> + <arg value="-Durl=${maven-snapshots-repository-url}" /> + <arg value="-DrepositoryId=${maven-snapshots-repository-id}" /> + <arg value="-DpomFile=${dist-maven}/pom.xml" /> + <arg value="-Dfile=${maven-jar}" /> + </artifact:mvn> + </target> + + <target name="deploy" depends="dist" description="deploy release version to Maven staging repository"> + <!-- sign and deploy the main artifact --> + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" /> + <arg value="-Durl=${maven-staging-repository-url}" /> + <arg value="-DrepositoryId=${maven-staging-repository-id}" /> + <arg value="-DpomFile=${dist-maven}/pom.xml" /> + <arg value="-Dfile=${maven-jar}" /> + <arg value="-Pgpg" /> + </artifact:mvn> + + <!-- sign and deploy the sources artifact --> + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" /> + <arg value="-Durl=${maven-staging-repository-url}" /> + <arg value="-DrepositoryId=${maven-staging-repository-id}" /> + <arg value="-DpomFile=${dist-maven}/pom.xml" /> + <arg value="-Dfile=${maven-sources-jar}" /> + <arg value="-Dclassifier=sources" /> + <arg value="-Pgpg" /> + </artifact:mvn> + + <!-- sign and deploy the javadoc artifact --> + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" /> + <arg value="-Durl=${maven-staging-repository-url}" /> + <arg value="-DrepositoryId=${maven-staging-repository-id}" /> + <arg value="-DpomFile=${dist-maven}/pom.xml" /> + <arg value="-Dfile=${maven-javadoc-jar}" /> + <arg value="-Dclassifier=javadoc" /> + <arg value="-Pgpg" /> + </artifact:mvn> + + </target> + + <target name="close" description="close the current staging repository"> + <!-- close the staging repository --> + <artifact:mvn> + <arg value="nexus:staging-close" /> + <arg value="-Dnexus.serverAuthId=${maven-staging-repository-id}" /> + </artifact:mvn> + </target> + + <target name="promote" description="promote the closed staging repository to release repository"> + <!-- promote the release --> + <artifact:mvn> + <arg value="nexus:staging-promote" /> + <arg value="-Dnexus.promote.autoSelectOverride=true" /> + <arg value="-Dnexus.serverAuthId=${maven-staging-repository-id}" /> + <arg value="-DtargetRepositoryId=${maven-releases-repository-id}" /> + </artifact:mvn> + </target> + + <target name="release" depends="deploy,close,promote" description="deploy and release a new version of Jmol to the Sonatype Maven repository"> + </target> + + <target name="clean" description="clean up"> + <delete dir="${dist-maven}" /> + </target> + +</project> Property changes on: trunk/Jmol/tools/jmol-sonatype.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/Jmol/tools/maven-ant-tasks-2.1.3.jar =================================================================== (Binary files differ) Property changes on: trunk/Jmol/tools/maven-ant-tasks-2.1.3.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Jmol/tools/pom.xml.template =================================================================== --- trunk/Jmol/tools/pom.xml.template (rev 0) +++ trunk/Jmol/tools/pom.xml.template 2012-07-23 20:27:46 UTC (rev 17407) @@ -0,0 +1,57 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.sonatype.oss</groupId> + <artifactId>oss-parent</artifactId> + <version>7</version> + </parent> + + <groupId>net.sourceforge.jmol</groupId> + <artifactId>jmol</artifactId> + <version>@version@</version> + + <packaging>jar</packaging> + <name>Jmol</name> + <description>Jmol: an open-source Java viewer for chemical structures in 3D</description> + <url>http://jmol.sourceforge.net/</url> + + <licenses> + <license> + <name>GNU LESSER GENERAL PUBLIC LICENSE 2.1</name> + </license> + </licenses> + + <scm> + <url>http://jmol.svn.sourceforge.net/svnroot/jmol/trunk/Jmol/</url> + <connection>scm:svn:http://jmol.svn.sourceforge.net/svnroot/jmol/trunk/Jmol/</connection> + </scm> + + <developers> + <developer> + <id>hansonr</id> + <name>Bob Hanson</name> + <url>http://www.stolaf.edu/people/hansonr/</url> + </developer> + <developer> + <id>egonw</id> + <name>Egon Willighagen</name> + <url>http://chem-bla-ics.blogspot.com/</url> + </developer> + <developer> + <id>migueljmol</id> + <name>Miguel Howard</name> + </developer> + <developer> + <id>nicove</id> + <name>Nicolas Vervelle</name> + </developer> + </developers> + + <dependencies> + </dependencies> + +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |