| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ****************************************************************************** |
| * Copyright (c) 2008, 2010 VMware Inc. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * VMware Inc. - initial contribution |
| ****************************************************************************** |
| --> |
| <project name="publish-library" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:maven="antlib:org.apache.maven.artifact.ant"> |
| |
| <import file="common.xml"/> |
| <import file="../common/publish.xml"/> |
| |
| <target name="publish-ivy" depends="common-common.ivy.init, common-common.resolve"> |
| <delete quiet="true" file="${ivy.output.file}"/> |
| <mkdir dir="${ivy.output.dir}" /> |
| <ivy:publish resolver="eclipse-${publication.resolver.prefix}-library-publish" overwrite="true" pubdate="${timestamp}" status="${release.type}"> |
| <artifacts pattern="${libd.output.dir}/[artifact].[ext]"/> |
| <artifacts pattern="${ivy.output.dir}/[artifact].[ext]"/> |
| </ivy:publish> |
| </target> |
| |
| <target name="publish-maven" depends="create.pom, snapshot.pom, maven.init" unless="local.build"> |
| <maven:deploy file="${libd.output.file}"> |
| <remoteRepository url="scp://build.eclipse.org/opt/public/rt/virgo/maven/bundles/${adjusted.release.type}"> |
| <authentication username="${eclipse.buildId}" privateKey="${key.file}"/> |
| </remoteRepository> |
| <pom file="${pom.output.file}"/> |
| </maven:deploy> |
| </target> |
| |
| <target name="install-maven" depends="create.pom, snapshot.pom, maven.init"> |
| <maven:install file="${libd.output.file}"> |
| <pom file="${pom.output.file}"/> |
| </maven:install> |
| </target> |
| |
| <target name="create.pom" depends="ivy.init, resolve"> |
| <delete quiet="true" file="${pom.output.file}"/> |
| <mkdir dir="${pom.output.dir}"/> |
| |
| <ivy:makepom ivyfile="${ivy.output.file}" pomfile="${pom.output.file}"> |
| <mapping conf="compile" scope="compile"/> |
| <mapping conf="provided" scope="provided"/> |
| <mapping conf="server-provided" scope="provided"/> |
| <mapping conf="runtime" scope="runtime"/> |
| <mapping conf="test" scope="test"/> |
| </ivy:makepom> |
| |
| <replaceregexp match="<packaging>jar</packaging>" |
| replace="<packaging>libd</packaging>" |
| file="${pom.output.file}"/> |
| </target> |
| |
| </project> |