| <project name="Upload EclipseLink artifacts to Maven repository" basedir="." xmlns:artifact="urn:maven-artifact-ant" default="upload.maven"> |
| <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.0.8.jar" /> <!-- TODO discuss with Tom where should this value and the actual lib go --> |
| <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" |
| classpathref="maven-ant-tasks.classpath" /> |
| |
| <target name="upload.maven" > |
| <property file="./build.properties"/> <!-- release.version and build_id are intialized from here --> |
| <echo message="release.version ${release.version}"/> |
| <echo message="build_id ${build_id}"/> |
| |
| <!-- Get the subversion version for current working copy --> |
| <!-- A freshly checked out copy of workspace is guaranteed to not have mixed revisions --> |
| <exec outputproperty="subversion.revision" failonerror="true" executable="svnversion"> |
| <arg line="."/> |
| </exec> |
| <echo message="subversion.revision ${subversion.revision}"/> |
| |
| <!-- Copy pom.template to pom.xml filtering various properties --> |
| <copy file="pom.xml.template" tofile="pom.xml" overwrite="true"> |
| <filterset> |
| <filter token="release.version" value="${release.version}"/> |
| <filter token="qualifier" value="${build_id}"/> |
| <filter token="subversion.revision" value="${subversion.revision}"/> |
| </filterset> |
| </copy> |
| |
| <!-- Delploy the jar to maven repository along with sources --> |
| <artifact:pom id="maven.project" file="pom.xml" /> |
| <artifact:deploy file="./eclipselink.jar"> |
| <pom refid="maven.project"/> |
| <artifact:attach file="eclipselink-src.zip" classifier="sources"/> |
| </artifact:deploy> |
| </target> |
| </project> |
| |