pax_global_header00006660000000000000000000000064116043441650014516gustar00rootroot0000000000000052 comment=b0be51607ec33bff189803903233066b141849e6 maven-ant-tasks-2.1.3/000077500000000000000000000000001160434416500145325ustar00rootroot00000000000000maven-ant-tasks-2.1.3/README.txt000066400000000000000000000012201160434416500162230ustar00rootroot00000000000000Maven Ant Tasks $Id: README.txt 885617 2009-11-30 23:26:45Z pgier $ Building the Ant Tasks ---------------------- The Maven Ant Tasks can be build with Maven 2.x (2.2.1 is recommended). From the root directory run "mvn install" The resulting output will be generated to the "target" directory. Running the tests ----------------- The test suite is contained in the file "build-tests.xml". This can be run using Ant 1.6.x or 1.7.x. "ant -f build-tests.xml" Note: some of the tests require a running ssh server. How you start sshd will depend on your system. For example on Fedora Linux, you can start the ssh deamon using "service sshd start"maven-ant-tasks-2.1.3/build-tests.xml000066400000000000000000001001621160434416500175130ustar00rootroot00000000000000 Some tests must be run manually, since they are intended to fail: - test-bad-dep - test-invalid-pom-ref - test-bad-system-dep - test-bad-repo-refid Tests completed successfully. test-scm not run, since it fails... Expected failure because foo:foo:jar:1.0-alpha-2 artifact does not exist. Expected warning because 'bad-value' is not a valid scope. Error message must show official scopes. See MANTTASKS-190 for more information. Artifact ID = ${my.maven.project.artifactId} Parent Artifact ID = ${my.maven.project.parent.artifactId} Maven Core Version = ${my.maven.project.properties.mavenVersion} project.build.directory = ${my.maven.project.build.directory} Current profile = ${project.default.build.finalName} Current profile = ${project.myprofile1.build.finalName} Current profile = ${project.myprofile2.build.finalName} Current profile = ${project.noprofile.build.finalName} dependencies versions: ${maven-ant-tasks.compile.dependency.versions} Expected failure: central has been overrided. dependencies junit then it.ant-tasks should be preserved in path: ${order.property} dependencies junit then it.ant-tasks should be preserved in path: ${reverse.order.property} order of dependencies defined in pom should be preserved in path: ${pom.order.property} dummy Testing SCM Wagon Artifact ID = ${my.maven.project.artifactId} Parent Artifact ID = ${my.maven.project.parent.artifactId} classpath: ${system.scope.classpath.property} Artifact with system scope should be added to classpath. For system scope path should not come from local repository. Expected failure: dependency with scope="system" must define systemPath attribute Expected failure: undefined remoteRepository refid Checking for existence of @{type}: @{file} Checking for non-existence of @{type}: @{file} maven-ant-tasks-2.1.3/pom.xml000066400000000000000000000315351160434416500160560ustar00rootroot00000000000000 4.0.0 org.apache.maven maven-parent 19 org.apache.maven maven-ant-tasks 2.1.3 Maven Ant Tasks Ant Tasks used for Maven integration http://maven.apache.org/ant-tasks/ Maven User List users-subscribe@maven.apache.org users-unsubscribe@maven.apache.org users@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-users http://www.mail-archive.com/users@maven.apache.org/ http://old.nabble.com/Maven---Users-f178.html http://maven.users.markmail.org/ Maven Developer List dev-subscribe@maven.apache.org dev-unsubscribe@maven.apache.org dev@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev http://www.mail-archive.com/dev@maven.apache.org/ http://old.nabble.com/Maven-Developers-f179.html http://maven.dev.markmail.org/ Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://old.nabble.com/Maven---Issues-f15573.html http://maven.issues.markmail.org/ Maven Commits List commits-subscribe@maven.apache.org commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev http://www.mail-archive.com/commits@maven.apache.org http://old.nabble.com/Maven---Commits-f15575.html http://maven.commits.markmail.org/ Maven Announcements List announce@maven.apache.org announce-subscribe@maven.apache.org announce-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-announce/ http://www.mail-archive.com/announce@maven.apache.org http://old.nabble.com/Maven-Announcements-f15617.html http://maven.announce.markmail.org/ Maven Notifications List notifications-subscribe@maven.apache.org notifications-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-notifications/ http://www.mail-archive.com/notifications@maven.apache.org http://old.nabble.com/Maven---Notifications-f15574.html http://maven.notifications.markmail.org/ scm:svn:http://svn.apache.org/repos/asf/maven/ant-tasks/tags/maven-ant-tasks-2.1.3 scm:svn:https://svn.apache.org/repos/asf/maven/ant-tasks/tags/maven-ant-tasks-2.1.3 http://svn.apache.org/viewvc/maven/ant-tasks/tags/maven-ant-tasks-2.1.3 jira http://jira.codehaus.org/browse/MANTTASKS apache.website scp://people.apache.org/www/maven.apache.org/ant-tasks/ 2.2.1 1.0-beta-6 org.apache.ant ant 1.8.0 classworlds classworlds 1.1-alpha-2 junit junit 3.8.1 test org.codehaus.plexus plexus-container-default 1.0-alpha-9-stable-1 junit junit org.codehaus.plexus plexus-utils 1.5.15 org.codehaus.plexus plexus-interpolation 1.11 org.apache.maven maven-artifact ${mavenVersion} org.apache.maven maven-artifact-manager ${mavenVersion} org.apache.maven maven-model ${mavenVersion} org.apache.maven maven-project ${mavenVersion} org.apache.maven maven-error-diagnostics ${mavenVersion} org.apache.maven maven-settings ${mavenVersion} org.apache.maven.wagon wagon-file ${wagonVersion} org.apache.maven.wagon wagon-http-lightweight ${wagonVersion} org.apache.maven.wagon wagon-provider-api ${wagonVersion} maven-compiler-plugin 1.5 1.5 maven-shade-plugin 1.4 org.apache.maven.plugins maven-release-plugin https://svn.apache.org/repos/asf/maven/ant-tasks/tags org.apache.maven.plugins maven-shade-plugin package shade false true junit:junit jtidy:jtidy xml-apis:xml-apis org.apache.ant:ant org.apache.ant:ant-launcher backport-util-concurrent:backport-util-concurrent org.codehaus.plexus.util org.apache.maven.artifact.ant.shaded org.codehaus.plexus.util.xml.Xpp3Dom org.codehaus.plexus.util.xml.pull.* edu.emory.mathcs.backport.java.util.concurrent java.util.concurrent reporting org.codehaus.mojo clirr-maven-plugin 2.0.9 org/apache/maven/* run-its maven.test.skip !true org.apache.maven.plugins maven-invoker-plugin 1.5 src/it ${project.build.directory}/it */pom.xml verify.bsh src/it/settings.xml ${project.build.directory}/local-repo true integration-test install run maven-ant-tasks-2.1.3/src/000077500000000000000000000000001160434416500153215ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/000077500000000000000000000000001160434416500157355ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.6/000077500000000000000000000000001160434416500226505ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.6/build.xml000066400000000000000000000016221160434416500244720ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.6/invoker.properties000066400000000000000000000000311160434416500264350ustar00rootroot00000000000000invoker.goals = validate maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.6/pom.xml000077500000000000000000000034241160434416500241730ustar00rootroot00000000000000 4.0.0 it.ant-tasks ant-1.6-run pom ant-run 0.10-SNAPSHOT Try to call the ant tasks through the ant run plugin with Ant 1.6. org.apache.commons commons-io 1.3.2 testfile org.apache.maven.plugins maven-antrun-plugin 1.2 ant ant 1.6 ant ant-launcher 1.6 runtime run run validate maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.6/verify.bsh000066400000000000000000000012351160434416500246530ustar00rootroot00000000000000import java.io.*; import java.util.*; import org.codehaus.plexus.util.*; try { File outputFolder = new File( basedir, "target" ); File testFile = new File( outputFolder, "testfile"); if ( !testFile.isFile() ) { System.err.println( "Could not find generated file: " + testFile ); return false; } File depFile = new File( outputFolder, "org/apache/commons/commons-io/1.3.2/commons-io-1.3.2.jar"); if ( !depFile.isFile() ) { System.err.println( "Could not find copied dependency file: " + depFile ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.8.0/000077500000000000000000000000001160434416500230105ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.8.0/build.xml000066400000000000000000000016221160434416500246320ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.8.0/invoker.properties000066400000000000000000000000311160434416500265750ustar00rootroot00000000000000invoker.goals = validate maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.8.0/pom.xml000077500000000000000000000034601160434416500243330ustar00rootroot00000000000000 4.0.0 it.ant-tasks ant-1.8-run pom ant-run 0.10-SNAPSHOT Try to call the ant tasks through the ant run plugin with Ant 1.8.0. org.apache.commons commons-io 1.3.2 testfile org.apache.maven.plugins maven-antrun-plugin 1.3 org.apache.ant ant 1.8.0 org.apache.ant ant-launcher 1.8.0 runtime run run validate maven-ant-tasks-2.1.3/src/it/ant-run-plugin-with-ant-1.8.0/verify.bsh000066400000000000000000000012351160434416500250130ustar00rootroot00000000000000import java.io.*; import java.util.*; import org.codehaus.plexus.util.*; try { File outputFolder = new File( basedir, "target" ); File testFile = new File( outputFolder, "testfile"); if ( !testFile.isFile() ) { System.err.println( "Could not find generated file: " + testFile ); return false; } File depFile = new File( outputFolder, "org/apache/commons/commons-io/1.3.2/commons-io-1.3.2.jar"); if ( !depFile.isFile() ) { System.err.println( "Could not find copied dependency file: " + depFile ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ant-tasks-2.1.3/src/it/ant-tasks-in-ant-run-plugin/000077500000000000000000000000001160434416500231245ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/ant-tasks-in-ant-run-plugin/build.xml000066400000000000000000000016231160434416500247470ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/it/ant-tasks-in-ant-run-plugin/invoker.properties000066400000000000000000000000311160434416500267110ustar00rootroot00000000000000invoker.goals = validate maven-ant-tasks-2.1.3/src/it/ant-tasks-in-ant-run-plugin/pom.xml000077500000000000000000000026161160434416500244510ustar00rootroot00000000000000 4.0.0 it.ant-tasks ant-run pom ant-run 0.10-SNAPSHOT Try to call the ant tasks through the ant run plugin. org.apache.commons commons-io 1.3.2 testfile org.apache.maven.plugins maven-antrun-plugin 1.3 run run validate maven-ant-tasks-2.1.3/src/it/ant-tasks-in-ant-run-plugin/verify.bsh000066400000000000000000000012351160434416500251270ustar00rootroot00000000000000import java.io.*; import java.util.*; import org.codehaus.plexus.util.*; try { File outputFolder = new File( basedir, "target" ); File testFile = new File( outputFolder, "testfile"); if ( !testFile.isFile() ) { System.err.println( "Could not find generated file: " + testFile ); return false; } File depFile = new File( outputFolder, "org/apache/commons/commons-io/1.3.2/commons-io-1.3.2.jar"); if ( !depFile.isFile() ) { System.err.println( "Could not find copied dependency file: " + depFile ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ant-tasks-2.1.3/src/it/m2-in-ant-tasks-in-ant-run-plugin/000077500000000000000000000000001160434416500240445ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/m2-in-ant-tasks-in-ant-run-plugin/build.xml000066400000000000000000000013311160434416500256630ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/it/m2-in-ant-tasks-in-ant-run-plugin/invoker.properties000066400000000000000000000000311160434416500276310ustar00rootroot00000000000000invoker.goals = validate maven-ant-tasks-2.1.3/src/it/m2-in-ant-tasks-in-ant-run-plugin/pom.xml000066400000000000000000000026161160434416500253660ustar00rootroot00000000000000 4.0.0 it.ant-tasks ant-run pom ant-run 0.10-SNAPSHOT Try to call the ant tasks through the ant run plugin. org.apache.commons commons-io 1.3.2 testfile org.apache.maven.plugins maven-antrun-plugin 1.3 run run validate maven-ant-tasks-2.1.3/src/it/m2-in-ant-tasks-in-ant-run-plugin/verify.bsh000066400000000000000000000012321160434416500260440ustar00rootroot00000000000000import java.io.*; import java.util.*; import org.codehaus.plexus.util.*; try { File outputFolder = new File( basedir, "target" ); File testFile = new File( outputFolder, "maven.version"); if ( !testFile.isFile() ) { System.err.println( "Could not find generated file: " + testFile ); return false; } String version = IOUtil.toString(new FileInputStream(testFile)); if ( !version.contains( "Apache Maven 2.2.1" ) ) { System.err.println( "Expected Apache Maven 2.2.1. Got version: " + version ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ant-tasks-2.1.3/src/it/m3-in-ant-tasks-in-ant-run-plugin/000077500000000000000000000000001160434416500240455ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/m3-in-ant-tasks-in-ant-run-plugin/build.xml000066400000000000000000000013311160434416500256640ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/it/m3-in-ant-tasks-in-ant-run-plugin/invoker.properties000066400000000000000000000000311160434416500276320ustar00rootroot00000000000000invoker.goals = validate maven-ant-tasks-2.1.3/src/it/m3-in-ant-tasks-in-ant-run-plugin/pom.xml000066400000000000000000000026161160434416500253670ustar00rootroot00000000000000 4.0.0 it.ant-tasks ant-run pom ant-run 0.10-SNAPSHOT Try to call the ant tasks through the ant run plugin. org.apache.commons commons-io 1.3.2 testfile org.apache.maven.plugins maven-antrun-plugin 1.3 run run validate maven-ant-tasks-2.1.3/src/it/m3-in-ant-tasks-in-ant-run-plugin/verify.bsh000066400000000000000000000012321160434416500260450ustar00rootroot00000000000000import java.io.*; import java.util.*; import org.codehaus.plexus.util.*; try { File outputFolder = new File( basedir, "target" ); File testFile = new File( outputFolder, "maven.version"); if ( !testFile.isFile() ) { System.err.println( "Could not find generated file: " + testFile ); return false; } String version = IOUtil.toString(new FileInputStream(testFile)); if ( !version.contains( "Apache Maven 3.0.2" ) ) { System.err.println( "Expected Apache Maven 3.0.1. Got version: " + version ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ant-tasks-2.1.3/src/it/pom-generation/000077500000000000000000000000001160434416500206615ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/it/pom-generation/build.xml000066400000000000000000000031651160434416500225070ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/it/pom-generation/invoker.properties000066400000000000000000000000311160434416500244460ustar00rootroot00000000000000invoker.goals = validate maven-ant-tasks-2.1.3/src/it/pom-generation/pom.xml000066400000000000000000000026161160434416500222030ustar00rootroot00000000000000 4.0.0 it.ant-tasks ant-run pom ant-run 0.10-SNAPSHOT Try to call the ant tasks through the ant run plugin. org.apache.commons commons-io 1.3.2 testfile org.apache.maven.plugins maven-antrun-plugin 1.3 run run validate maven-ant-tasks-2.1.3/src/it/pom-generation/verify.bsh000066400000000000000000000006501160434416500226640ustar00rootroot00000000000000import java.io.*; import java.util.*; import org.codehaus.plexus.util.*; try { File outputFolder = new File( basedir, "target" ); File testFile = new File( outputFolder, "parent-pom.xml"); if ( !testFile.isFile() ) { System.err.println( "Could not find generated file: " + testFile ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ant-tasks-2.1.3/src/it/settings.xml000066400000000000000000000015761160434416500203300ustar00rootroot00000000000000 it-repo true local.central @localRepositoryUrl@ true true local.central @localRepositoryUrl@ true true maven-ant-tasks-2.1.3/src/main/000077500000000000000000000000001160434416500162455ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/000077500000000000000000000000001160434416500171665ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/000077500000000000000000000000001160434416500177555ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/000077500000000000000000000000001160434416500211765ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/000077500000000000000000000000001160434416500223045ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/000077500000000000000000000000001160434416500241015ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/000077500000000000000000000000001160434416500246635ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java000066400000000000000000000743531160434416500316060ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.profiles.DefaultProfileManager; import org.apache.maven.profiles.ProfileManager; import org.apache.maven.project.DefaultProjectBuilderConfiguration; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.settings.Mirror; import org.apache.maven.settings.RuntimeInfo; import org.apache.maven.settings.Server; import org.apache.maven.settings.Settings; import org.apache.maven.settings.SettingsUtils; import org.apache.maven.settings.TrackableBase; import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader; import org.apache.maven.usability.diagnostics.ErrorDiagnostics; import org.apache.maven.wagon.Wagon; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.Execute; import org.codehaus.classworlds.ClassWorld; import org.codehaus.classworlds.DuplicateRealmException; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.PlexusContainerException; import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.embed.Embedder; import org.codehaus.plexus.interpolation.EnvarBasedValueSource; import org.codehaus.plexus.interpolation.RegexBasedInterpolator; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Base class for artifact tasks. * * @author Brett Porter * @version $Id: AbstractArtifactTask.java 1085345 2011-03-25 12:13:31Z stephenc $ */ public abstract class AbstractArtifactTask extends Task { private static final String WILDCARD = "*"; private static final String EXTERNAL_WILDCARD = "external:*"; private static ClassLoader plexusClassLoader; private File userSettingsFile; private File globalSettingsFile; private Settings settings; private ProfileManager profileManager; private PlexusContainer container; private Pom pom; private String pomRefId; private LocalRepository localRepository; protected ArtifactRepository createLocalArtifactRepository() { ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout() ); return new DefaultArtifactRepository( "local", "file://" + getLocalRepository().getPath(), repositoryLayout ); } /** * Create a core-Maven ArtifactRepositoryFactory from a Maven Ant Tasks's RemoteRepository definition, * eventually configured with authentication and proxy information. * @param repository the remote repository as defined in Ant * @return the corresponding ArtifactRepositoryFactory */ protected ArtifactRepositoryFactory getArtifactRepositoryFactory( RemoteRepository repository ) { WagonManager manager = (WagonManager) lookup( WagonManager.ROLE ); Authentication authentication = repository.getAuthentication(); if ( authentication != null ) { manager.addAuthenticationInfo( repository.getId(), authentication.getUserName(), authentication.getPassword(), authentication.getPrivateKey(), authentication.getPassphrase() ); } Proxy proxy = repository.getProxy(); if ( proxy != null ) { manager.addProxy( proxy.getType(), proxy.getHost(), proxy.getPort(), proxy.getUserName(), proxy.getPassword(), proxy.getNonProxyHosts() ); } return (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE ); } protected void releaseArtifactRepositoryFactory( ArtifactRepositoryFactory repositoryFactory ) { try { getContainer().release( repositoryFactory ); } catch ( ComponentLifecycleException e ) { // TODO: Warn the user, or not? } } /** * Create a core-Maven ArtifactRepository from a Maven Ant Tasks's RemoteRepository definition. * @param repository the remote repository as defined in Ant * @return the corresponding ArtifactRepository */ protected ArtifactRepository createRemoteArtifactRepository( RemoteRepository repository ) { ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, repository.getLayout() ); ArtifactRepositoryFactory repositoryFactory = null; ArtifactRepository artifactRepository; try { repositoryFactory = getArtifactRepositoryFactory( repository ); ArtifactRepositoryPolicy snapshots = buildArtifactRepositoryPolicy( repository.getSnapshots() ); ArtifactRepositoryPolicy releases = buildArtifactRepositoryPolicy( repository.getReleases() ); artifactRepository = repositoryFactory.createArtifactRepository( repository.getId(), repository.getUrl(), repositoryLayout, snapshots, releases ); } finally { releaseArtifactRepositoryFactory( repositoryFactory ); } return artifactRepository; } private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy ) { boolean enabled = true; String updatePolicy = null; String checksumPolicy = null; if ( policy != null ) { enabled = policy.isEnabled(); if ( policy.getUpdatePolicy() != null ) { updatePolicy = policy.getUpdatePolicy(); } if ( policy.getChecksumPolicy() != null ) { checksumPolicy = policy.getChecksumPolicy(); } } return new ArtifactRepositoryPolicy( enabled, updatePolicy, checksumPolicy ); } protected LocalRepository getDefaultLocalRepository() { Settings settings = getSettings(); LocalRepository localRepository = new LocalRepository(); localRepository.setId( "local" ); localRepository.setPath( new File( settings.getLocalRepository() ) ); return localRepository; } protected synchronized Settings getSettings() { if ( settings == null ) { initSettings(); } return settings; } private File newFile( String parent, String subdir, String filename ) { return new File( new File( parent, subdir ), filename ); } private void initSettings() { if ( userSettingsFile == null ) { File tempSettingsFile = newFile( System.getProperty( "user.home" ), ".ant", "settings.xml" ); if ( tempSettingsFile.exists() ) { userSettingsFile = tempSettingsFile; } else { tempSettingsFile = newFile( System.getProperty( "user.home" ), ".m2", "settings.xml" ); if ( tempSettingsFile.exists() ) { userSettingsFile = tempSettingsFile; } } } if ( globalSettingsFile == null ) { File tempSettingsFile = newFile( System.getProperty( "ant.home" ), "etc", "settings.xml" ); if ( tempSettingsFile.exists() ) { globalSettingsFile = tempSettingsFile; } else { // look in ${M2_HOME}/conf List env = Execute.getProcEnvironment(); for ( String var: env ) { if ( var.startsWith( "M2_HOME=" ) ) { String m2Home = var.substring( "M2_HOME=".length() ); tempSettingsFile = newFile( m2Home, "conf", "settings.xml" ); if ( tempSettingsFile.exists() ) { globalSettingsFile = tempSettingsFile; } break; } } } } Settings userSettings = loadSettings( userSettingsFile ); Settings globalSettings = loadSettings( globalSettingsFile ); SettingsUtils.merge( userSettings, globalSettings, TrackableBase.GLOBAL_LEVEL ); settings = userSettings; if ( StringUtils.isEmpty( settings.getLocalRepository() ) ) { String location = newFile( System.getProperty( "user.home" ), ".m2", "repository" ).getAbsolutePath(); settings.setLocalRepository( location ); } WagonManager wagonManager = (WagonManager) lookup( WagonManager.ROLE ); wagonManager.setDownloadMonitor( new AntDownloadMonitor() ); if ( settings.isOffline() ) { log( "You are working in offline mode.", Project.MSG_INFO ); wagonManager.setOnline( false ); } else { wagonManager.setOnline( true ); } } private Settings loadSettings( File settingsFile ) { Settings settings = null; try { if ( settingsFile != null ) { log( "Loading Maven settings file: " + settingsFile.getPath(), Project.MSG_VERBOSE ); settings = readSettings( settingsFile ); } } catch ( IOException e ) { log( "Error reading settings file '" + settingsFile + "' - ignoring. Error was: " + e.getMessage(), Project.MSG_WARN ); } catch ( XmlPullParserException e ) { log( "Error parsing settings file '" + settingsFile + "' - ignoring. Error was: " + e.getMessage(), Project.MSG_WARN ); } if ( settings == null ) { settings = new Settings(); RuntimeInfo rtInfo = new RuntimeInfo( settings ); settings.setRuntimeInfo( rtInfo ); } return settings; } public void setSettingsFile( File settingsFile ) { if ( !settingsFile.exists() ) { throw new BuildException( "settingsFile does not exist: " + settingsFile.getAbsolutePath() ); } userSettingsFile = settingsFile; settings = null; } /** * @see org.apache.maven.settings.DefaultMavenSettingsBuilder#readSettings */ private Settings readSettings( File settingsFile ) throws IOException, XmlPullParserException { Settings settings = null; Reader reader = null; try { reader = ReaderFactory.newXmlReader( settingsFile ); StringWriter sWriter = new StringWriter(); IOUtil.copy( reader, sWriter ); String rawInput = sWriter.toString(); try { RegexBasedInterpolator interpolator = new RegexBasedInterpolator(); interpolator.addValueSource( new EnvarBasedValueSource() ); rawInput = interpolator.interpolate( rawInput, "settings" ); } catch ( Exception e ) { log( "Failed to initialize environment variable resolver. Skipping environment substitution in " + "settings." ); } StringReader sReader = new StringReader( rawInput ); SettingsXpp3Reader modelReader = new SettingsXpp3Reader(); settings = modelReader.read( sReader ); RuntimeInfo rtInfo = new RuntimeInfo( settings ); rtInfo.setFile( settingsFile ); settings.setRuntimeInfo( rtInfo ); } finally { IOUtil.close( reader ); } return settings; } protected RemoteRepository createAntRemoteRepository( org.apache.maven.model.Repository pomRepository ) { RemoteRepository r = createAntRemoteRepositoryBase( pomRepository ); if ( pomRepository.getSnapshots() != null ) { r.addSnapshots( convertRepositoryPolicy( pomRepository.getSnapshots() ) ); } if ( pomRepository.getReleases() != null ) { r.addReleases( convertRepositoryPolicy( pomRepository.getReleases() ) ); } return r; } protected RemoteRepository createAntRemoteRepositoryBase( org.apache.maven.model.RepositoryBase pomRepository ) { RemoteRepository r = new RemoteRepository(); r.setId( pomRepository.getId() ); r.setUrl( pomRepository.getUrl() ); r.setLayout( pomRepository.getLayout() ); return r; } protected void updateRepositoryWithSettings( RemoteRepository repository ) { // TODO: actually, we need to not funnel this through the ant repository - we should pump settings into wagon // manager at the start like m2 does, and then match up by repository id // As is, this could potentially cause a problem with 2 remote repositories with different authentication info Mirror mirror = getMirror( getSettings().getMirrors(), repository ); if ( mirror != null ) { repository.setUrl( mirror.getUrl() ); repository.setId( mirror.getId() ); } if ( repository.getAuthentication() == null ) { Server server = getSettings().getServer( repository.getId() ); if ( server != null ) { repository.addAuthentication( new Authentication( server ) ); } } if ( repository.getProxy() == null ) { org.apache.maven.settings.Proxy proxy = getSettings().getActiveProxy(); if ( proxy != null ) { repository.addProxy( new Proxy( proxy ) ); } } } protected Object lookup( String role ) { try { return getContainer().lookup( role ); } catch ( ComponentLookupException e ) { throw new BuildException( "Unable to find component: " + role, e ); } } protected Object lookup( String role, String roleHint ) { try { return getContainer().lookup( role, roleHint ); } catch ( ComponentLookupException e ) { throw new BuildException( "Unable to find component: " + role + "[" + roleHint + "]", e ); } } protected synchronized PlexusContainer getContainer() { if ( container == null ) { container = (PlexusContainer) getProject().getReference( PlexusContainer.class.getName() ); if ( container == null ) { try { ClassWorld classWorld = new ClassWorld(); classWorld.newRealm( "plexus.core", getClass().getClassLoader() ); Embedder embedder = new Embedder(); embedder.start( classWorld ); container = embedder.getContainer(); } catch ( PlexusContainerException e ) { throw new BuildException( "Unable to start embedder", e ); } catch ( DuplicateRealmException e ) { throw new BuildException( "Unable to create embedder ClassRealm", e ); } getProject().addReference( PlexusContainer.class.getName(), container ); } } return container; } /** * Tries to initialize the pom. If no pom has been configured, returns null. * * @param localArtifactRepository * @return An initialized pom or null. */ public Pom initializePom( ArtifactRepository localArtifactRepository ) { Pom pom = getPom(); if ( pom != null ) { MavenProjectBuilder projectBuilder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE ); pom.initialiseMavenProject( projectBuilder, localArtifactRepository ); } return pom; } protected Pom createDummyPom( ArtifactRepository localRepository ) { Pom pom = new Pom(); MavenProject minimalProject = createMinimalProject( localRepository ); // we nulled out these fields to allow inheritance when creating poms, but the dummy // needs to be a valid pom, so set them back to something that's OK to resolve minimalProject.setGroupId( "org.apache.maven" ); minimalProject.setArtifactId( "super-pom" ); minimalProject.setVersion( "2.0" ); minimalProject.setPackaging( "pom" ); pom.setMavenProject( minimalProject ); return pom; } /** * Create a minimal project when no POM is available. * * @param localRepository * @return */ protected MavenProject createMinimalProject( ArtifactRepository localRepository ) { MavenProjectBuilder projectBuilder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE ); DefaultProjectBuilderConfiguration builderConfig = new DefaultProjectBuilderConfiguration( ); builderConfig.setLocalRepository( localRepository ); builderConfig.setGlobalProfileManager( getProfileManager() ); try { MavenProject mavenProject = projectBuilder.buildStandaloneSuperProject(builderConfig); // if we don't null out these fields then the pom that will be created is at the super-pom's // GAV coordinates and we will not be able to inherit partial GAV coordinates from a parent GAV. mavenProject.setGroupId(null); mavenProject.setArtifactId(null); mavenProject.setVersion(null); return mavenProject; } catch ( ProjectBuildingException e ) { throw new BuildException( "Unable to create dummy Pom", e ); } } protected Artifact createDummyArtifact() { ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); // TODO: maybe not strictly correct, while we should enforce that packaging has a type handler of the same id, we don't return factory.createBuildArtifact( "unspecified", "unspecified", "0.0", "jar" ); } public String[] getSupportedProtocols() { try { Map wagonMap = getContainer().lookupMap( Wagon.ROLE ); List protocols = new ArrayList(); for ( Map.Entry entry : wagonMap.entrySet() ) { protocols.add( entry.getKey() ); } return (String[]) protocols.toArray( new String[protocols.size()] ); } catch ( ComponentLookupException e ) { throw new BuildException( "Unable to lookup Wagon providers", e ); } } public String getSupportedProtocolsAsString() { return StringUtils.join( getSupportedProtocols(), ", " ); } public void diagnoseError( Throwable error ) { try { ErrorDiagnostics diagnostics = (ErrorDiagnostics) container.lookup( ErrorDiagnostics.ROLE ); StringBuffer message = new StringBuffer(); message.append( "An error has occurred while processing the Maven artifact tasks.\n" ); message.append( " Diagnosis:\n\n" ); message.append( diagnostics.diagnose( error ) ); message.append( "\n\n" ); log( message.toString(), Project.MSG_INFO ); } catch ( ComponentLookupException e ) { log( "Failed to retrieve error diagnoser.", Project.MSG_DEBUG ); } } public void addPom( Pom pom ) { this.pom = pom; } /** * Try to get the POM from the nested pom element or a pomRefId * * @return The pom object */ public Pom getPom() { Pom thePom = this.pom; if ( thePom != null && getPomRefId() != null ) { throw new BuildException( "You cannot specify both a nested \"pom\" element and a \"pomrefid\" attribute" ); } if ( getPomRefId() != null ) { Object pomRefObj = getProject().getReference( getPomRefId() ); if ( pomRefObj instanceof Pom ) { thePom = (Pom) pomRefObj; } else { throw new BuildException( "Reference '" + pomRefId + "' was not found." ); } } return thePom; } public String getPomRefId() { return pomRefId; } /** * Try to get all the poms with id's which have been added to the ANT project * @return */ public List/**/ getAntReactorPoms() { List result = new ArrayList(); Iterator i = getProject().getReferences().values().iterator(); while ( i.hasNext() ) { Object ref = i.next(); if ( ref instanceof Pom ) { result.add( (Pom)ref ); } } return result; } public void setPomRefId( String pomRefId ) { this.pomRefId = pomRefId; } public LocalRepository getLocalRepository() { if ( localRepository == null ) { localRepository = getDefaultLocalRepository(); } return localRepository; } protected ProfileManager getProfileManager() { if ( profileManager == null ) { profileManager = new DefaultProfileManager( getContainer(), getSettings(), System.getProperties() ); } return profileManager; } public void addLocalRepository( LocalRepository localRepository ) { this.localRepository = localRepository; } public void setProfiles( String profiles ) { if ( profiles != null ) { // TODO: not sure this is the best way to do this... log( "Profiles not yet supported, ignoring profiles '" + profiles + "'", Project.MSG_WARN ); // System.setProperty( ProfileActivationUtils.ACTIVE_PROFILE_IDS, profiles ); } } private static RepositoryPolicy convertRepositoryPolicy( org.apache.maven.model.RepositoryPolicy pomRepoPolicy ) { RepositoryPolicy policy = new RepositoryPolicy(); policy.setEnabled( pomRepoPolicy.isEnabled() ); policy.setUpdatePolicy( pomRepoPolicy.getUpdatePolicy() ); return policy; } /** @noinspection RefusedBequest */ public void execute() { // Display the version if the log level is verbose showVersion(); ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { if ( plexusClassLoader != null ) { Thread.currentThread().setContextClassLoader( plexusClassLoader ); } initSettings(); doExecute(); } catch ( BuildException e ) { diagnoseError( e ); throw e; } finally { plexusClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader( originalClassLoader ); } } /** * The main entry point for the task. */ protected abstract void doExecute(); /** * This method finds a matching mirror for the selected repository. If there is an exact match, * this will be used. If there is no exact match, then the list of mirrors is examined to see if * a pattern applies. * * @param mirrors The available mirrors. * @param repository See if there is a mirror for this repository. * @return the selected mirror or null if none is found. */ private Mirror getMirror( List mirrors, RemoteRepository repository ) { String repositoryId = repository.getId(); if ( repositoryId != null ) { for ( Mirror mirror : mirrors ) { if ( repositoryId.equals( mirror.getMirrorOf() ) ) { return mirror; } } for ( Mirror mirror : mirrors ) { if ( matchPattern( repository, mirror.getMirrorOf() ) ) { return mirror; } } } return null; } /** * This method checks if the pattern matches the originalRepository. Valid patterns: * = * everything external:* = everything not on the localhost and not file based. repo,repo1 = repo * or repo1 *,!repo1 = everything except repo1 * * @param originalRepository to compare for a match. * @param pattern used for match. Currently only '*' is supported. * @return true if the repository is a match to this pattern. */ boolean matchPattern( RemoteRepository originalRepository, String pattern ) { boolean result = false; String originalId = originalRepository.getId(); // simple checks first to short circuit processing below. if ( WILDCARD.equals( pattern ) || pattern.equals( originalId ) ) { result = true; } else { // process the list String[] repos = pattern.split( "," ); for ( int i = 0; i < repos.length; i++ ) { String repo = repos[i]; // see if this is a negative match if ( repo.length() > 1 && repo.startsWith( "!" ) ) { if ( originalId.equals( repo.substring( 1 ) ) ) { // explicitly exclude. Set result and stop processing. result = false; break; } } // check for exact match else if ( originalId.equals( repo ) ) { result = true; break; } // check for external:* else if ( EXTERNAL_WILDCARD.equals( repo ) && isExternalRepo( originalRepository ) ) { result = true; // don't stop processing in case a future segment explicitly excludes this repo } else if ( WILDCARD.equals( repo ) ) { result = true; // don't stop processing in case a future segment explicitly excludes this repo } } } return result; } /** * Checks the URL to see if this repository refers to an external repository * * @param originalRepository * @return true if external. */ boolean isExternalRepo( RemoteRepository originalRepository ) { try { URL url = new URL( originalRepository.getUrl() ); return !( url.getHost().equals( "localhost" ) || url.getHost().equals( "127.0.0.1" ) || url.getProtocol().equals( "file" ) ); } catch ( MalformedURLException e ) { // bad url just skip it here. It should have been validated already, but the wagon lookup will deal with it return false; } } /** * Log the current version of the ant-tasks to the verbose output. */ protected void showVersion() { Properties properties = new Properties(); final String antTasksPropertiesPath = "META-INF/maven/org.apache.maven/maven-ant-tasks/pom.properties"; InputStream resourceAsStream = AbstractArtifactTask.class.getClassLoader().getResourceAsStream( antTasksPropertiesPath ); try { if ( resourceAsStream != null ) { properties.load( resourceAsStream ); } String version = properties.getProperty( "version", "unknown" ); String builtOn = properties.getProperty( "builtOn" ); if ( builtOn != null ) { log( "Maven Ant Tasks version: " + version + " built on " + builtOn, Project.MSG_VERBOSE ); } else { log( "Maven Ant Tasks version: " + version, Project.MSG_VERBOSE ); } } catch ( IOException e ) { log( "Unable to determine version from Maven Ant Tasks JAR file: " + e.getMessage(), Project.MSG_WARN ); } } } AbstractArtifactWithRepositoryTask.java000066400000000000000000000171401160434416500344520ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/antpackage org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.math.BigInteger; import java.security.MessageDigest; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Repository; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; /** * Base class for artifact tasks that are able to download artifact from remote repositories. * @version $Id: AbstractArtifactWithRepositoryTask.java 1068543 2011-02-08 19:46:41Z pgier $ */ public abstract class AbstractArtifactWithRepositoryTask extends AbstractArtifactTask { /** * List of Ant Tasks RemoteRepository-ies */ private List remoteRepositories = new ArrayList(); /** * Get the default remote repository. * @return central repository */ private static RemoteRepository getDefaultRemoteRepository() { // TODO: could we utilize the super POM for this? RemoteRepository remoteRepository = new RemoteRepository(); remoteRepository.setId( "central" ); remoteRepository.setUrl( "http://repo1.maven.org/maven2" ); RepositoryPolicy snapshots = new RepositoryPolicy(); snapshots.setEnabled( false ); remoteRepository.addSnapshots( snapshots ); return remoteRepository; } private static String statusAsString( RepositoryPolicy policy ) { return ( policy == null ) || policy.isEnabled() ? "enabled" : "disabled"; } protected List createRemoteArtifactRepositories() { return createRemoteArtifactRepositories( null ); } /** * Create the list of ArtifactRepository-ies where artifacts can be downloaded. If * no remote repository has been configured, adds central repository. * * @param pomRepositories additional repositories defined in pom (or null if none) * @return the list of ArtifactRepository-ies * @see #createRemoteArtifactRepository(RemoteRepository) */ protected List createRemoteArtifactRepositories( List pomRepositories ) { List remoteRepositories = new ArrayList(); // First, add repositories configured in Ant remoteRepositories.addAll( getRemoteRepositories() ); // Add repositories configured in POM if ( pomRepositories != null ) { for ( Repository pomRepository : pomRepositories ) { remoteRepositories.add( createAntRemoteRepository( pomRepository ) ); } } // Only add default repository if no repositories were configured otherwise if ( remoteRepositories.isEmpty() ) { remoteRepositories.add( getDefaultRemoteRepository() ); } log( "Using remote repositories:", Project.MSG_VERBOSE ); List list = new ArrayList(); Set ids = new HashSet(); for ( RemoteRepository remoteRepository : remoteRepositories ) { if ( !ids.add( remoteRepository.getId() ) ) { // repository id already added to the list: ignore it, since it has been overridden continue; } updateRepositoryWithSettings( remoteRepository ); StringBuffer msg = new StringBuffer(); msg.append( " - id=" + remoteRepository.getId() ); msg.append( ", url=" + remoteRepository.getUrl() ); msg.append( ", releases=" + statusAsString( remoteRepository.getReleases() ) ); msg.append( ", snapshots=" + statusAsString( remoteRepository.getSnapshots() ) ); if ( remoteRepository.getAuthentication() != null ) { msg.append( ", authentication=" + remoteRepository.getAuthentication().getUserName() ); } if ( remoteRepository.getProxy() != null ) { msg.append( ", proxy=" + remoteRepository.getProxy().getHost() ); } getProject().log( msg.toString(), Project.MSG_VERBOSE ); list.add( createRemoteArtifactRepository( remoteRepository ) ); } return list; } /** * The repositories configured in the Ant task * * @return The list of repositories */ public List getRemoteRepositories() { return remoteRepositories; } /** * This is called automatically by ant when the task is initialized. * Need to use "addConfigured..." instead of "add..." because the * repository Id and URL need to be set before the method is called. * * @param remoteRepository */ public void addConfiguredRemoteRepository( RemoteRepository remoteRepository ) { if ( remoteRepository.getRefid() != null ) { // check that the refid points to a repository that is properly defined String refid = remoteRepository.getRefid(); if ( getProject().getReference( refid ) == null ) { throw new BuildException( "Unknown remote repository refid='" + refid + "'." ); } } // Validate the url and id parameters before adding the repository if ( remoteRepository.getUrl() == null ) { throw new BuildException( "Each remote repository must specify a url." ); } if ( remoteRepository.getId() == null || remoteRepository.getId().equals( remoteRepository.getUrl() ) ) { log( "Each remote repository must specify a unique id. For backward-compatibility, " + "a default id will be used. In future releases, a missing repository id will raise an error.", Project.MSG_WARN ); remoteRepository.setId( generateDefaultRepositoryId( remoteRepository ) ); } remoteRepositories.add( remoteRepository ); } public final String MD5_ALGO_NAME = "MD5"; public final String UTF_ENC_NAME = "UTF-8"; /** * Generates an MD5 digest based on the url of the repository. * This is safer to use for the id than the url. * MANTTASKS-142 * * @param repository * @return */ public String generateDefaultRepositoryId( RemoteRepository repository ) { try { MessageDigest md = MessageDigest.getInstance( MD5_ALGO_NAME ); md.update( repository.getUrl().getBytes( UTF_ENC_NAME ) ); BigInteger digest = new BigInteger( md.digest() ); return digest.toString( 16 ); } catch ( Exception e ) { log( "Unable to generate unique repository Id: " + e, Project.MSG_WARN ); return "default"; } } }maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/AntDownloadMonitor.java000066400000000000000000000054151160434416500313150ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.wagon.events.TransferEvent; import org.apache.maven.wagon.events.TransferListener; import org.apache.tools.ant.Project; import org.apache.tools.ant.ProjectComponent; /** * Log wagon events in the ant tasks * * @author Brett Porter * @version $Id: AntDownloadMonitor.java 814436 2009-09-13 23:29:03Z bentmann $ */ public class AntDownloadMonitor extends ProjectComponent implements TransferListener { private static final int KILO = 1024; public void debug( String s ) { log( s, Project.MSG_DEBUG ); } public void transferCompleted( TransferEvent event ) { long contentLength = event.getResource().getContentLength(); if ( ( contentLength > 0 ) && ( event.getRequestType() == TransferEvent.REQUEST_PUT ) ) { log( "Uploaded " + ( ( contentLength + KILO / 2 ) / KILO ) + "K" ); } } public void transferError( TransferEvent event ) { log( event.getException().getMessage(), Project.MSG_ERR ); } public void transferInitiated( TransferEvent event ) { String message = event.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading"; String dest = event.getRequestType() == TransferEvent.REQUEST_PUT ? " to " : " from "; log( message + ": " + event.getResource().getName() + dest + "repository " + event.getWagon().getRepository().getId() + " at " + event.getWagon().getRepository().getUrl() ); } public void transferProgress( TransferEvent event, byte[] bytes, int i ) { } public void transferStarted( TransferEvent event ) { long contentLength = event.getResource().getContentLength(); if ( contentLength > 0 ) { log( "Transferring " + ( ( contentLength + KILO / 2 ) / KILO ) + "K from " + event.getWagon().getRepository().getId() ); } } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/AntResolutionListener.java000066400000000000000000000072711160434416500320510ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.ResolutionListener; import org.apache.maven.artifact.versioning.VersionRange; import org.apache.tools.ant.Project; /** * Show resolution information in Ant. * * @author Brett Porter * @version $Id: AntResolutionListener.java 884196 2009-11-25 17:07:06Z pgier $ */ public class AntResolutionListener implements ResolutionListener { private String indent = " "; private final Project project; public AntResolutionListener( Project project ) { this.project = project; } public void testArtifact( Artifact node ) { } public void startProcessChildren( Artifact artifact ) { indent += " "; } public void endProcessChildren( Artifact artifact ) { indent = indent.substring( 2 ); } public void includeArtifact( Artifact artifact ) { project.log( indent + artifact + " (selected)", Project.MSG_VERBOSE ); } public void omitForNearer( Artifact omitted, Artifact kept ) { project.log( indent + omitted + " (removed - nearer found: " + kept.getVersion() + ")", Project.MSG_VERBOSE ); } public void omitForCycle( Artifact omitted ) { project.log( indent + omitted + " (removed - causes a cycle in the graph)", Project.MSG_VERBOSE ); } public void updateScope( Artifact artifact, String scope ) { project.log( indent + artifact + " (setting scope to: " + scope + ")", Project.MSG_VERBOSE ); } public void updateScopeCurrentPom( Artifact artifact, String scope ) { project.log( indent + artifact + " (not setting scope to: " + scope + "; local scope " + artifact.getScope() + " wins)", Project.MSG_VERBOSE ); } public void selectVersionFromRange( Artifact artifact ) { project.log( indent + artifact + " (setting version to: " + artifact.getVersion() + " from range: " + artifact.getVersionRange() + ")", Project.MSG_VERBOSE ); } public void restrictRange( Artifact artifact, Artifact replacement, VersionRange newRange ) { project.log( indent + artifact + " (range restricted from: " + artifact.getVersionRange() + " and: " + replacement.getVersionRange() + " to: " + newRange + " )", Project.MSG_VERBOSE ); } public void manageArtifact( Artifact artifact, Artifact replacement ) { String msg = indent + artifact; msg += " ("; if ( replacement.getVersion() != null ) { msg += "applying version: " + replacement.getVersion() + ";"; } if ( replacement.getScope() != null ) { msg += "applying scope: " + replacement.getScope(); } msg += ")"; project.log( msg, Project.MSG_VERBOSE ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/AttachedArtifact.java000066400000000000000000000032101160434416500307150ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; /** * Container for specification of an attached artifact. * * @author Jason Dillon * @version $Id: AttachedArtifact.java 667996 2008-06-15 19:03:37Z hboutemy $ */ public class AttachedArtifact { private File file; private String type = "jar"; private String classifier; public File getFile() { return file; } public void setFile( final File file ) { this.file = file; } public String getType() { return type; } public void setType( final String type ) { this.type = type; } public String getClassifier() { return classifier; } public void setClassifier( final String classifier ) { this.classifier = classifier; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/Authentication.java000066400000000000000000000027441160434416500305140ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.maven.settings.Server; /** * Ant Wrapper for wagon authentication. * * @author Brett Porter * @version $Id: Authentication.java 524632 2007-04-01 17:05:24Z jvanzyl $ */ public class Authentication extends AuthenticationInfo { public Authentication() { super(); } public Authentication( Server server ) { setUserName( server.getUsername() ); setPassword( server.getPassword() ); setPassphrase( server.getPassphrase() ); setPrivateKey( server.getPrivateKey() ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/DependenciesTask.java000066400000000000000000000531411160434416500307430ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ant.util.AntBuildWriter; import org.apache.maven.artifact.ant.util.AntTaskModified; import org.apache.maven.artifact.ant.util.AntUtil; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.artifact.resolver.filter.AndArtifactFilter; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.apache.maven.model.Dependency; import org.apache.maven.project.artifact.InvalidDependencyVersionException; import org.apache.maven.project.artifact.MavenMetadataSource; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.StringUtils; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; /** * Dependencies task, using maven-artifact. * * @author Brett Porter * @author Herve Boutemy * @version $Id: DependenciesTask.java 1091446 2011-04-12 15:10:32Z stephenc $ */ public class DependenciesTask extends AbstractArtifactWithRepositoryTask { private static final String[] SCOPES = { Artifact.SCOPE_COMPILE, Artifact.SCOPE_PROVIDED, Artifact.SCOPE_RUNTIME, Artifact.SCOPE_TEST, Artifact.SCOPE_SYSTEM }; private static final Set SCOPES_SET; static { SCOPES_SET = new HashSet( Arrays.asList( SCOPES ) ); } public static final String DEFAULT_ANT_BUILD_FILE = "target/build-dependencies.xml"; private List dependencies = new ArrayList(); /** * The id of the path object containing a list of all dependencies. */ private String pathId; /** * The id of the fileset object containing a list of all dependencies. */ private String filesetId; /** * The id of the fileset object containing all resolved source jars for the list of dependencies. */ private String sourcesFilesetId; /** * The id of the fileset object containing all resolved javadoc jars for the list of dependencies. */ private String javadocFilesetId; /** * The id of the object containing a list of all artifact versions. * This is used for things like removing the version from the dependency filenames. */ private String versionsId; /** * A specific Maven scope used to determine which dependencies are resolved. * This takes only a single scope and uses the standard Maven ScopeArtifactFilter. */ private String useScope; /** * A comma separated list of dependency scopes to include, in the resulting path and fileset. */ private String scopes; /** * A comma separated list of dependency types to include in the resulting set of artifacts. */ private String type; /** * A comma separated list of dependency types to include in the resulting path object. */ private String pathType; /** * The file name to use for the generated Ant build that contains dependency properties and references. */ private String dependencyRefsBuildFile; /** * Whether to use a generated Ant build file to cache the list of dependency properties and references. */ private boolean cacheDependencyRefs; /** * Main task execution. Called by parent execute(). */ protected void doExecute() { if ( useScope != null && scopes != null ) { throw new BuildException( "You cannot specify both useScope and scopes in the dependencies task." ); } if ( getPom() != null && !this.dependencies.isEmpty() ) { throw new BuildException( "You cannot specify both dependencies and a pom in the dependencies task" ); } // Try to load dependency refs from an existing Ant cache file if ( isCacheDependencyRefs() ) { if ( getDependencyRefsBuildFile() == null ) { setDependencyRefsBuildFile( DEFAULT_ANT_BUILD_FILE ); } if ( checkCachedDependencies() ) { log( "Dependency refs loaded from file: " + getDependencyRefsBuildFile(), Project.MSG_VERBOSE ); return; } } doExecuteResolution(); } protected ArtifactResolutionResult doExecuteResolution() { ArtifactRepository localRepo = createLocalArtifactRepository(); log( "Using local repository: " + localRepo.getBasedir(), Project.MSG_VERBOSE ); // Look up required resources from the plexus container ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE ); ArtifactFactory artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); MavenMetadataSource metadataSource = (MavenMetadataSource) lookup( ArtifactMetadataSource.ROLE ); Pom pom = initializePom( localRepo ); if ( pom != null ) { dependencies = pom.getDependencies(); } else { // we have to have some sort of Pom object in order to satisfy the requirements for building the // originating Artifact below... pom = createDummyPom( localRepo ); } if ( dependencies.isEmpty() ) { log( "There were no dependencies specified", Project.MSG_WARN ); } else { // check scopes for ( Dependency dependency : dependencies ) { String scope = dependency.getScope(); if ( Artifact.SCOPE_SYSTEM.equals( scope ) ) { if ( StringUtils.isBlank( dependency.getSystemPath() ) ) { throw new BuildException( dependency.toString() + " is defined with scope='system': systemPath attribute is required." ); } } else if ( ( scope != null ) && !SCOPES_SET.contains( scope ) ) { // see MANTTASKS-190 log( "Unknown scope='" + scope + "' for " + dependency + ", supported scopes are: " + SCOPES_SET, Project.MSG_WARN ); } } } log( "Resolving dependencies...", Project.MSG_VERBOSE ); ArtifactResolutionResult result; List remoteArtifactRepositories = createRemoteArtifactRepositories( pom.getRepositories() ); try { Set artifacts = MavenMetadataSource.createArtifacts( artifactFactory, dependencies, null, null, null ); Artifact pomArtifact = artifactFactory.createBuildArtifact( pom.getGroupId(), pom.getArtifactId(), pom.getVersion(), pom.getPackaging() ); List listeners = Collections.singletonList( new AntResolutionListener( getProject() ) ); Map managedDependencies = pom.getMavenProject().getManagedVersionMap(); ArtifactFilter filter = null; if ( useScope != null ) { filter = new ScopeArtifactFilter( useScope ); } if ( scopes != null ) { filter = new SpecificScopesArtifactFilter( scopes ); } if ( type != null ) { ArtifactFilter typeArtifactFilter = new TypesArtifactFilter( type ); if ( filter != null ) { AndArtifactFilter andFilter = new AndArtifactFilter(); andFilter.add( filter ); andFilter.add( typeArtifactFilter ); filter = andFilter; } else { filter = typeArtifactFilter; } } result = resolver.resolveTransitively( artifacts, pomArtifact, managedDependencies, localRepo, remoteArtifactRepositories, metadataSource, filter, listeners ); } catch ( ArtifactResolutionException e ) { throw new BuildException( "Unable to resolve artifact: " + e.getMessage(), e ); } catch ( ArtifactNotFoundException e ) { throw new BuildException( "Dependency not found: " + e.getMessage(), e ); } catch ( InvalidDependencyVersionException e ) { throw new BuildException( "Invalid dependency version: " + e.getMessage(), e ); } FileSet dependencyFileSet = createFileSet(); FileSet sourcesFileSet = createFileSet(); FileSet javadocsFileSet = createFileSet(); Path dependencyPath = new Path( getProject() ); Set versions = new HashSet(); ArtifactFilter pathFilter; if ( pathType != null ) { pathFilter = new TypesArtifactFilter( pathType ); } else { pathFilter = null; } for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); ) { Artifact artifact = i.next(); addArtifactToResult( localRepo, artifact, dependencyFileSet, dependencyPath, pathFilter ); versions.add( artifact.getVersion() ); if ( sourcesFilesetId != null ) { resolveSource( artifactFactory, resolver, remoteArtifactRepositories, localRepo, artifact, "sources", sourcesFileSet ); } if ( javadocFilesetId != null ) { resolveSource( artifactFactory, resolver, remoteArtifactRepositories, localRepo, artifact, "javadoc", javadocsFileSet ); } } defineFilesetReference( filesetId, dependencyFileSet ); defineFilesetReference( sourcesFilesetId, sourcesFileSet ); defineFilesetReference( javadocFilesetId, javadocsFileSet ); if ( pathId != null ) { getProject().addReference( pathId, dependencyPath ); } if ( versionsId != null ) { String versionsValue = StringUtils.join( versions.iterator(), File.pathSeparator ); getProject().setNewProperty( versionsId, versionsValue ); } // Write the dependency information to an Ant build file. if ( getDependencyRefsBuildFile() != null || this.isCacheDependencyRefs() ) { if ( getDependencyRefsBuildFile() == null || getDependencyRefsBuildFile().equals( "default" ) ) { setDependencyRefsBuildFile( DEFAULT_ANT_BUILD_FILE ); } log( "Building ant file: " + getDependencyRefsBuildFile() ); AntBuildWriter antBuildWriter = new AntBuildWriter(); File antBuildFile = FileUtils.resolveFile( getProject().getBaseDir(), getDependencyRefsBuildFile() ); try { antBuildWriter.openAntBuild( antBuildFile, "maven-dependencies", "init-dependencies" ); antBuildWriter.openTarget( "init-dependencies" ); antBuildWriter.writeEcho( "Loading dependency paths from file: " + antBuildFile.getAbsolutePath() ); for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); ) { Artifact artifact = i.next(); String conflictId = artifact.getDependencyConflictId(); antBuildWriter.writeProperty( conflictId, artifact.getFile().getAbsolutePath() ); FileSet singleArtifactFileSet = (FileSet) getProject().getReference( conflictId ); antBuildWriter.writeFileSet( singleArtifactFileSet, conflictId ); } if ( pathId != null ) { Path thePath = (Path) getProject().getReference( pathId ); antBuildWriter.writePath( thePath, pathId ); } if ( filesetId != null ) { antBuildWriter.writeFileSet( dependencyFileSet, filesetId ); } if ( sourcesFilesetId != null ) { antBuildWriter.writeFileSet( sourcesFileSet, sourcesFilesetId ); } if ( javadocFilesetId != null ) { antBuildWriter.writeFileSet( sourcesFileSet, javadocFilesetId ); } String versionsList = getProject().getProperty( versionsId ); if ( versionsList != null ) { antBuildWriter.writeProperty( versionsId, versionsList ); } antBuildWriter.closeTarget(); antBuildWriter.closeAntBuild(); } catch ( IOException e ) { throw new BuildException ( "Unable to write ant build: " + e); } } return result; } /** * Check if the cache needs to be updated. * * @return true if the dependency refs were successfully loaded, false otherwise */ private boolean checkCachedDependencies() { File cacheBuildFile = FileUtils.resolveFile( getProject().getBaseDir(), getDependencyRefsBuildFile() ); if ( ! cacheBuildFile.exists() ) { return false; } File antBuildFile = new File( getProject().getProperty( "ant.file" ) ); if ( antBuildFile.lastModified() > cacheBuildFile.lastModified() ) { return false; } Pom pom = getPom(); if ( pom != null ) { File pomFile = pom.getFile(); if ( pomFile != null && ( pomFile.lastModified() > cacheBuildFile.lastModified() ) ) { return false; } } return loadDependenciesFromAntBuildFile(); } /** * Load the dependency references from the generated ant build file. * * @return True if the dependency refs were successfully loaded. */ private boolean loadDependenciesFromAntBuildFile() { Project currentAntProject = getProject(); // Run the ant build with the dependency refs AntTaskModified dependenciesAntBuild = new AntTaskModified(); dependenciesAntBuild.setAntfile( getDependencyRefsBuildFile() ); dependenciesAntBuild.setProject( currentAntProject ); dependenciesAntBuild.execute(); // Copy the properties and refs to the current project Project cachedDepsProject = dependenciesAntBuild.getSavedNewProject(); AntUtil.copyProperties( cachedDepsProject, currentAntProject ); AntUtil.copyReferences( cachedDepsProject, currentAntProject ); return true; } private FileSet createFileSet() { FileSet fileSet = new FileSet(); fileSet.setProject( getProject() ); fileSet.setDir( getLocalRepository().getPath() ); return fileSet; } private void defineFilesetReference( String id, FileSet fileSet ) { if ( id != null ) { if ( !fileSet.hasPatterns() ) { fileSet.createExclude().setName( "**/**" ); } getProject().addReference( id, fileSet ); } } private void addArtifactToResult( ArtifactRepository localRepo, Artifact artifact, FileSet toFileSet ) { addArtifactToResult( localRepo, artifact, toFileSet, null, null ); } private void addArtifactToResult( ArtifactRepository localRepo, Artifact artifact, FileSet toFileSet, Path path, ArtifactFilter filter ) { String filename = localRepo.pathOf( artifact ); toFileSet.createInclude().setName( filename ); getProject().setProperty( artifact.getDependencyConflictId(), artifact.getFile().getAbsolutePath() ); FileSet artifactFileSet = new FileSet(); artifactFileSet.setProject( getProject() ); artifactFileSet.setFile( artifact.getFile() ); getProject().addReference( artifact.getDependencyConflictId(), artifactFileSet ); if ( path != null && ( filter == null || filter.include( artifact ) ) ) { path.addFileset( artifactFileSet ); } } private void resolveSource( ArtifactFactory artifactFactory, ArtifactResolver resolver, List remoteArtifactRepositories, ArtifactRepository localRepo, Artifact artifact, String classifier, FileSet sourcesFileSet ) { Artifact sourceArtifact = artifactFactory.createArtifactWithClassifier( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), "java-source", classifier ); try { resolver.resolve( sourceArtifact, remoteArtifactRepositories, localRepo ); addArtifactToResult( localRepo, sourceArtifact, sourcesFileSet ); } catch ( ArtifactResolutionException e ) { throw new BuildException( "Unable to resolve artifact: " + e.getMessage(), e ); } catch ( ArtifactNotFoundException e ) { // no source available: no problem, it's optional } } public List getDependencies() { return dependencies; } public void addDependency( Dependency dependency ) { dependencies.add( dependency ); } public String getPathId() { return pathId; } public void setPathId( String pathId ) { this.pathId = pathId; } public String getFilesetId() { return filesetId; } public void setSourcesFilesetId( String filesetId ) { this.sourcesFilesetId = filesetId; } public String getSourcesFilesetId() { return sourcesFilesetId; } public void setJavadocFilesetId( String filesetId ) { this.javadocFilesetId = filesetId; } public String getJavadocFilesetId() { return javadocFilesetId; } public void setFilesetId( String filesetId ) { this.filesetId = filesetId; } public String getVersionsId() { return versionsId; } public void setVersionsId( String versionsId ) { this.versionsId = versionsId; } public void setVerbose( boolean verbose ) { getProject().log( "Option \"verbose\" is deprecated. Please use the standard Ant -v option.", Project.MSG_WARN ); } /** * Use the Maven artifact filtering for a particular scope. This * uses the standard Maven ScopeArtifactFilter. * * @param useScope */ public void setUseScope( String useScope ) { this.useScope = useScope; } public void setType( String type ) { this.type = type; } public void setPathType( String pathType ) { this.pathType = pathType; } public String getScopes() { return scopes; } /** * Only include artifacts that fall under one of the specified scopes. * * @return */ public void setScopes( String scopes ) { this.scopes = scopes; } /** * @deprecated * @param addArtifactFileSetRefs */ public void setAddArtifactFileSetRefs( boolean addArtifactFileSetRefs ) { this.log( "Parameter addArtifactFileSetRefs is deprecated. A fileset ref is always created " + "for each dependency.", Project.MSG_WARN ); } public String getDependencyRefsBuildFile() { return dependencyRefsBuildFile; } public void setDependencyRefsBuildFile( String dependencyRefsBuildFile ) { this.dependencyRefsBuildFile = dependencyRefsBuildFile; } public boolean isCacheDependencyRefs() { return cacheDependencyRefs; } public void setCacheDependencyRefs( boolean cacheDependencyRefs ) { this.cacheDependencyRefs = cacheDependencyRefs; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/DeployTask.java000066400000000000000000000170211160434416500276060ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeployer; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.model.DistributionManagement; import org.apache.maven.project.artifact.ProjectArtifactMetadata; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; /** * Deploy task, using maven-artifact. * * @author Brett Porter * @version $Id: DeployTask.java 928113 2010-03-27 00:33:45Z hboutemy $ */ public class DeployTask extends InstallDeployTaskSupport { private RemoteRepository remoteRepository; private RemoteRepository remoteSnapshotRepository; private boolean uniqueVersion = true; /** * Create a core-Maven deployment ArtifactRepository from a Maven Ant Tasks's RemoteRepository definition. * @param repository the remote repository as defined in Ant * @return the corresponding ArtifactRepository */ protected ArtifactRepository createDeploymentArtifactRepository( RemoteRepository repository ) { if ( repository.getId().equals( repository.getUrl() ) ) { // MANTTASKS-103: avoid default id set to the url, since it is used for maven-metadata-.xml repository.setId( "remote" ); } updateRepositoryWithSettings( repository ); ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, repository.getLayout() ); ArtifactRepositoryFactory repositoryFactory = null; ArtifactRepository artifactRepository; try { repositoryFactory = getArtifactRepositoryFactory( repository ); artifactRepository = repositoryFactory.createDeploymentArtifactRepository( repository.getId(), repository.getUrl(), repositoryLayout, uniqueVersion ); } finally { releaseArtifactRepositoryFactory( repositoryFactory ); } return artifactRepository; } protected void doExecute() { if ( file == null && ( attachedArtifacts.size() == 0 ) ) { throw new BuildException( "You must specify a file and/or an attached artifact " + "to deploy to the repository." ); } ArtifactRepository localRepo = createLocalArtifactRepository(); Pom pom = initializePom( localRepo ); if ( pom == null ) { throw new BuildException( "A POM element is required to deploy to the repository" ); } Artifact artifact = pom.getArtifact(); // Deploy the POM boolean isPomArtifact = "pom".equals( pom.getPackaging() ); if ( !isPomArtifact ) { ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() ); artifact.addMetadata( metadata ); } ArtifactRepository deploymentRepository = getDeploymentRepository( pom, artifact ); log( "Deploying to " + deploymentRepository.getUrl(), Project.MSG_INFO ); ArtifactDeployer deployer = (ArtifactDeployer) lookup( ArtifactDeployer.ROLE ); try { if ( file != null ) { if ( !isPomArtifact ) { deployer.deploy( file, artifact, deploymentRepository, localRepo ); } else { deployer.deploy( pom.getFile(), artifact, deploymentRepository, localRepo ); } } // Deploy any attached artifacts if ( attachedArtifacts != null ) { for ( Artifact attachedArtifact : pom.getAttachedArtifacts() ) { deployer.deploy( attachedArtifact.getFile(), attachedArtifact, deploymentRepository, localRepo ); } } } catch ( ArtifactDeploymentException e ) { throw new BuildException( "Error deploying artifact '" + artifact.getDependencyConflictId() + "': " + e.getMessage(), e ); } } private ArtifactRepository getDeploymentRepository( Pom pom, Artifact artifact ) { DistributionManagement distributionManagement = pom.getDistributionManagement(); if ( remoteSnapshotRepository == null && remoteRepository == null ) { if ( distributionManagement != null ) { if ( distributionManagement.getSnapshotRepository() != null ) { remoteSnapshotRepository = createAntRemoteRepositoryBase( distributionManagement .getSnapshotRepository() ); uniqueVersion = distributionManagement.getSnapshotRepository().isUniqueVersion(); } if ( distributionManagement.getRepository() != null ) { remoteRepository = createAntRemoteRepositoryBase( distributionManagement.getRepository() ); } } } if ( remoteSnapshotRepository == null ) { remoteSnapshotRepository = remoteRepository; } ArtifactRepository deploymentRepository; if ( artifact.isSnapshot() && remoteSnapshotRepository != null ) { deploymentRepository = createDeploymentArtifactRepository( remoteSnapshotRepository ); } else if ( remoteRepository != null ) { deploymentRepository = createDeploymentArtifactRepository( remoteRepository ); } else { throw new BuildException( "A distributionManagement element or remoteRepository element is required to deploy" ); } return deploymentRepository; } public RemoteRepository getRemoteRepository() { return remoteRepository; } public void addRemoteSnapshotRepository( RemoteRepository remoteSnapshotRepository ) { this.remoteSnapshotRepository = remoteSnapshotRepository; } public void addRemoteRepository( RemoteRepository remoteRepository ) { this.remoteRepository = remoteRepository; } public void setUniqueVersion( boolean uniqueVersion ) { this.uniqueVersion = uniqueVersion; } public boolean getUniqueVersion() { return uniqueVersion; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/InstallDeployTaskSupport.java000066400000000000000000000042561160434416500325400ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.util.ArrayList; import java.util.List; import org.apache.maven.artifact.repository.ArtifactRepository; /** * Support for install/deploy tasks. * * @author Jason Dillon * @version $Id: InstallDeployTaskSupport.java 928113 2010-03-27 00:33:45Z hboutemy $ */ public abstract class InstallDeployTaskSupport extends AbstractArtifactTask { /** * The file to install/deploy. */ protected File file; /** * Additional attached artifacts to install/deploy */ protected List attachedArtifacts = new ArrayList(); public File getFile() { return file; } public void setFile( File file ) { this.file = file; } public Pom initializePom( ArtifactRepository localArtifactRepository ) { Pom pom = super.initializePom( localArtifactRepository ); // attach artifacts if ( attachedArtifacts != null ) { for ( AttachedArtifact attached : attachedArtifacts ) { pom.attach( attached ); } } return pom; } public AttachedArtifact createAttach() { AttachedArtifact attach = new AttachedArtifact(); attachedArtifacts.add( attach ); return attach; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/InstallTask.java000066400000000000000000000065741160434416500277730ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.installer.ArtifactInstallationException; import org.apache.maven.artifact.installer.ArtifactInstaller; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.project.artifact.ProjectArtifactMetadata; import org.apache.tools.ant.BuildException; /** * Install task, using maven-artifact. * * @author Brett Porter * @version $Id: InstallTask.java 928113 2010-03-27 00:33:45Z hboutemy $ * @todo should be able to incorporate into the install mojo? */ public class InstallTask extends InstallDeployTaskSupport { protected void doExecute() { if ( file == null && ( attachedArtifacts.size() == 0 ) ) { throw new BuildException( "You must specify a file and/or an attached artifact " + "to install to the local repository." ); } ArtifactRepository localRepo = createLocalArtifactRepository(); Pom pom = initializePom( localRepo ); if ( pom == null ) { throw new BuildException( "A POM element is required to install to the local repository" ); } Artifact artifact = pom.getArtifact(); boolean isPomArtifact = "pom".equals( pom.getPackaging() ); if ( !isPomArtifact ) { ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() ); artifact.addMetadata( metadata ); } ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE ); try { if ( file != null ) { if ( !isPomArtifact ) { installer.install( file, artifact, localRepo ); } else { installer.install( pom.getFile(), artifact, localRepo ); } } // Install any attached artifacts if ( attachedArtifacts != null ) { for ( Artifact attachedArtifact : pom.getAttachedArtifacts() ) { installer.install( attachedArtifact.getFile(), attachedArtifact, localRepo ); } } } catch ( ArtifactInstallationException e ) { throw new BuildException( "Error installing artifact '" + artifact.getDependencyConflictId() + "': " + e.getMessage(), e ); } } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/InstallWagonProviderTask.java000066400000000000000000000117521160434416500324740ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.artifact.versioning.VersionRange; import org.apache.maven.project.artifact.MavenMetadataSource; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.codehaus.plexus.PlexusContainerException; import java.util.Collections; import java.util.Iterator; import java.util.List; /** * Ant Wrapper for wagon provider installation. * * @author Brett Porter * @version $Id: InstallWagonProviderTask.java 981672 2010-08-02 20:19:35Z hboutemy $ */ public class InstallWagonProviderTask extends AbstractArtifactWithRepositoryTask { private String groupId = "org.apache.maven.wagon"; private String artifactId; private String version; public String getGroupId() { return groupId; } public void setGroupId( String groupId ) { this.groupId = groupId; } public String getArtifactId() { return artifactId; } public void setArtifactId( String artifactId ) { this.artifactId = artifactId; } public String getVersion() { return version; } public void setVersion( String version ) { this.version = version; } public void doExecute() { VersionRange versionRange; try { versionRange = VersionRange.createFromVersionSpec( version ); } catch ( InvalidVersionSpecificationException e ) { throw new BuildException( "Unable to get extension '" + ArtifactUtils.versionlessKey( groupId, artifactId ) + "' because version '" + version + " is invalid: " + e.getMessage(), e ); } ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); Artifact providerArtifact = factory.createExtensionArtifact( groupId, artifactId, versionRange ); log( "Installing provider: " + providerArtifact ); ArtifactResolutionResult result; try { MavenMetadataSource metadataSource = (MavenMetadataSource) lookup( ArtifactMetadataSource.ROLE ); ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE ); List remoteRepositories = createRemoteArtifactRepositories(); result = resolver.resolveTransitively( Collections.singleton( providerArtifact ), createDummyArtifact(), createLocalArtifactRepository(), remoteRepositories, metadataSource, null ); } catch ( ArtifactResolutionException e ) { throw new BuildException( "Error downloading wagon provider from the remote repository: " + e.getMessage(), e ); } catch ( ArtifactNotFoundException e ) { throw new BuildException( "Unable to locate wagon provider in remote repository: " + e.getMessage(), e ); } try { for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); ) { Artifact a = i.next(); getContainer().addJarResource( a.getFile() ); } } catch ( PlexusContainerException e ) { throw new BuildException( "Unable to locate wagon provider in remote repository", e ); } log( "Protocols now supported: " + getSupportedProtocolsAsString(), Project.MSG_VERBOSE ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/LocalRepository.java000066400000000000000000000025321160434416500306620ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; /** * Local repository type. * * @author Brett Porter * @version $Id: LocalRepository.java 586615 2007-10-19 21:04:45Z hboutemy $ */ public class LocalRepository extends Repository { private File path; public File getPath() { return ( (LocalRepository) getInstance() ).path; } public void setPath( File path ) { this.path = path; } protected String getDefaultId() { return "local"; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/Mvn.java000066400000000000000000000130411160434416500262650ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.util.regex.Pattern; import org.apache.maven.model.Dependency; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Environment.Variable; /** * Ant task to execute a maven build. * * @author pgier * */ public class Mvn extends Java { public final String BATCH_MODE = "-B"; private File pom; private File mavenHome; private final String DEFAULT_MAVEN_VERSION = "2.0.10"; private String mavenVersion = DEFAULT_MAVEN_VERSION; private boolean batchMode = true; private LocalRepository localRepository; public void execute() throws BuildException { if ( batchMode ) { this.createArg().setValue( BATCH_MODE ); } if ( pom != null ) { createArg().setValue( "-f" + pom.getAbsolutePath() ); } if ( localRepository != null ) { this.createJvmarg().setValue( "-Dmaven.repo.local=" + localRepository.getPath().getAbsolutePath() ); } if ( mavenHome == null ) { Pattern oldMaven = Pattern.compile("(2\\.0)|(2\\.0-.*)|(2\\.0\\.[1-9])"); if ( oldMaven.matcher( getMavenVersion() ).matches() ) { throw new BuildException( "The requested Maven version '" + getMavenVersion() + "' is prior to " + "version '2.0.10'. In order to launch the requested version you need to " + "use a local Maven installation and point to that installation with the " + "mavenHome attribute." ); } downloadAndConfigureMaven(); } else { setupLocalMaven(); } super.execute(); } private void downloadAndConfigureMaven() { Dependency apacheMaven = new Dependency(); apacheMaven.setGroupId( "org.apache.maven" ); apacheMaven.setArtifactId( "apache-maven" ); apacheMaven.setVersion( getMavenVersion() ); apacheMaven.setType( "pom" ); DependenciesTask depsTask = new DependenciesTask(); depsTask.addLocalRepository( getLocalRepository() ); depsTask.setProject( getProject() ); depsTask.setPathId( "apache-maven-dependencies" ); depsTask.addDependency( apacheMaven ); depsTask.setType( "pom,jar" ); depsTask.setPathType( "jar" ); depsTask.execute(); this.setClasspath( (Path) getProject().getReference( "apache-maven-dependencies" ) ); this.setClassname( "org.apache.maven.cli.MavenCli" ); } private void setupLocalMaven() { // Set the required properties Variable classworldsConfProp = new Variable(); classworldsConfProp.setKey( "classworlds.conf" ); File classworldsPath = new File( mavenHome, "bin/m2.conf" ); classworldsConfProp.setValue( classworldsPath.getAbsolutePath() ); this.addSysproperty( classworldsConfProp ); Variable mavenHomeProp = new Variable(); mavenHomeProp.setKey( "maven.home" ); mavenHomeProp.setValue( mavenHome.getAbsolutePath() ); this.addSysproperty( mavenHomeProp ); // Set the boot classpath FileSet bootDir = new FileSet(); bootDir.setDir( new File ( mavenHome, "boot" ) ); bootDir.setIncludes( "*.jar" ); Path mavenClasspath = new Path( getProject() ); mavenClasspath.addFileset( bootDir ); this.setClasspath( mavenClasspath ); this.setClassname( "org.codehaus.classworlds.Launcher" ); } public void setPom( File pom ) { this.pom = pom; } public File getPom() { return pom; } public void setMavenHome( File mavenHome ) { this.mavenHome = mavenHome; } public File getMavenHome() { return mavenHome; } public void setBatchMode( boolean batchMode ) { this.batchMode = batchMode; } public boolean isBatchMode() { return batchMode; } public void addLocalRepository( LocalRepository localRepository ) { this.localRepository = localRepository; } public LocalRepository getLocalRepository() { return localRepository; } public void setMavenVersion( String mavenVersion ) { this.mavenVersion = mavenVersion; } public String getMavenVersion() { return mavenVersion; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/POMPropertyEvaluator.java000066400000000000000000000035071160434416500316160ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.tools.ant.PropertyHelper; /** * POM Property Delegate, for Ant 1.8.0. * * @since maven-ant-tasks 2.1.1 */ class POMPropertyEvaluator extends POMPropertyHelper implements PropertyHelper.PropertyEvaluator { public static void register( Pom pom, PropertyHelper propertyHelper ) { propertyHelper.add( new POMPropertyEvaluator( pom ) ); } private POMPropertyEvaluator( Pom pom ) { super( pom ); } public Object evaluate( String property, PropertyHelper propertyHelper ) { String prefix = pom.antId + "."; if ( !property.startsWith( prefix ) ) { return null; } try { // else handle the property resolution String expression = property.substring( prefix.length() ); return getPOMValue( "project." + expression ); } catch ( Exception ex ) { ex.printStackTrace(); return null; } } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/POMPropertyHelper.java000066400000000000000000000052621160434416500310730ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.PropertyHelper; import org.codehaus.plexus.util.introspection.ReflectionValueExtractor; /** * The property intercepter that handles the calls for "pom." properties in Ant 1.6 - 1.7.1 */ class POMPropertyHelper extends PropertyHelper { protected final Pom pom; POMPropertyHelper( Pom pom ) { this.pom = pom; } /** * The method that gets called by Ant 1.6 - 1.7.1 with every request of property */ public Object getPropertyHook( String ns, String name, boolean user ) { String prefix = this.pom.antId + "."; if ( !name.startsWith( prefix ) ) { // pass on to next interceptor return super.getPropertyHook( ns, name, user ); } try { // else handle the property resolution String expression = name.substring( prefix.length() ); return getPOMValue( "project." + expression ); } catch ( Exception ex ) { ex.printStackTrace(); return null; } } private static final String PROPERTIES_PREFIX = "project.properties."; protected Object getPOMValue( String expression ) { Object value = null; try { if ( expression.startsWith( PROPERTIES_PREFIX ) ) { expression = expression.substring( PROPERTIES_PREFIX.length() ); value = pom.getMavenProject().getProperties().get( expression ); } else { value = ReflectionValueExtractor.evaluate( expression, pom.getMavenProject() ); } } catch ( Exception e ) { throw new BuildException( "Error extracting expression from POM", e ); } return value; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/Pom.java000066400000000000000000000462671160434416500263000ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Build; import org.apache.maven.model.CiManagement; import org.apache.maven.model.Contributor; import org.apache.maven.model.Dependency; import org.apache.maven.model.DependencyManagement; import org.apache.maven.model.Developer; import org.apache.maven.model.DistributionManagement; import org.apache.maven.model.IssueManagement; import org.apache.maven.model.License; import org.apache.maven.model.MailingList; import org.apache.maven.model.Model; import org.apache.maven.model.Organization; import org.apache.maven.model.Parent; import org.apache.maven.model.Reporting; import org.apache.maven.model.Repository; import org.apache.maven.model.Scm; import org.apache.maven.profiles.ProfileManager; import org.apache.maven.project.DefaultProjectBuilderConfiguration; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.MavenProjectHelper; import org.apache.maven.project.ProjectBuilderConfiguration; import org.apache.maven.project.ProjectBuildingException; import org.apache.maven.project.inheritance.ModelInheritanceAssembler; import org.apache.maven.project.injection.ModelDefaultsInjector; import org.apache.maven.project.interpolation.ModelInterpolationException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.PropertyHelper; import org.codehaus.plexus.util.StringUtils; import java.io.File; import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Properties; /** * A POM typedef. Also an Ant Task that registers a handler called POMPropertyHelper that intercepts all calls to * property value resolution and replies instead of Ant to properties that start with the id of the pom. Example: * ${maven.project.artifactId} * * @author Brett Porter * @author Nicola Ken Barozzi * @version $Id: Pom.java 1085345 2011-03-25 12:13:31Z stephenc $ */ public class Pom extends AbstractArtifactWithRepositoryTask { /** * The id referring to an existing pom object in the current Ant project. */ private String refid; /** * The id of this pom object to be stored in the current Ant project. */ String antId; /** * The maven project represented by this pom */ private MavenProject mavenProject; /** * The file from which the pom was loaded. */ private File file; /** * The list of profiles to either activate or deactivate for this pom. */ private List profiles = new ArrayList(); private boolean inheritAllProperties = true; /** * The property intercepter. */ private final POMPropertyHelper helper = new POMPropertyHelper( this ); public String getRefid() { return refid; } /** * The ID used to retrieve this pom object from the Ant project. * * @param refid */ public void setRefid( String refid ) { this.refid = refid; } /** * The ID used to store this pom object in the Ant project. * * @param id */ public void setId( String id ) { this.antId = id; } /** * Retrieve the pom object from the current Ant project using the configured refid. * * @param refid * @return */ protected void getPomFromAntProject( String refid ) { if ( refid == null ) { throw new BuildException( "POM refid is null." ); } if ( getProject().getReference( refid ) == null ) { throw new BuildException( "Unable to locate POM reference: '" + refid + "'" ); } Pom thePom = (Pom) getProject().getReference( refid ); mavenProject = thePom.getMavenProject(); file = thePom.getFile(); } public void setMavenProject( MavenProject mavenProject ) { this.mavenProject = mavenProject; } public File getFile() { return file; } public void setFile( File file ) { this.file = file; } public List getProfiles() { return profiles; } public void addProfile( Profile activeProfile ) { this.profiles.add( activeProfile ); } public Artifact getArtifact() { return getMavenProject().getArtifact(); } public void attach( AttachedArtifact attached ) { MavenProjectHelper helper = (MavenProjectHelper) lookup( MavenProjectHelper.ROLE ); MavenProject project = getMavenProject(); if ( attached.getClassifier() != null ) { helper.attachArtifact( project, attached.getType(), attached.getClassifier(), attached.getFile() ); } else { helper.attachArtifact( project, attached.getType(), attached.getFile() ); } } public List getAttachedArtifacts() { return getMavenProject().getAttachedArtifacts(); } public void initialiseMavenProject( MavenProjectBuilder builder, ArtifactRepository localRepository ) { if ( file != null ) { addAntRepositoriesToProfileManager(); ProjectBuilderConfiguration builderConfig = this.createProjectBuilderConfig( localRepository ); try { mavenProject = builder.build( file, builderConfig ); builder.calculateConcreteState( mavenProject, builderConfig, false ); } catch ( ProjectBuildingException pbe ) { throw new BuildException( "Unable to initialize POM " + file.getName() + ": " + pbe.getMessage(), pbe ); } catch ( ModelInterpolationException mie ) { throw new BuildException( "Unable to interpolate POM " + file.getName() + ": " + mie.getMessage(), mie ); } } else if ( refid != null ) { this.getPomFromAntProject( refid ); } else if ( mavenProject != null ) { addAntRepositoriesToProfileManager(); ProjectBuilderConfiguration builderConfig = this.createProjectBuilderConfig( localRepository ); try { builder.calculateConcreteState( mavenProject, builderConfig, false ); } catch ( ModelInterpolationException mie ) { throw new BuildException( "Unable to interpolate POM " + file.getName() + ": " + mie.getMessage(), mie ); } } if ( mavenProject != null && mavenProject.getModel().getParent() != null ) { String parentGroupId = mavenProject.getModel().getParent().getGroupId(); String parentArtifactId = mavenProject.getModel().getParent().getArtifactId(); String parentVersion = mavenProject.getModel().getParent().getVersion(); Iterator i = getAntReactorPoms().iterator(); while ( i.hasNext() ) { Pom pom = (Pom)i.next(); if ( StringUtils.equals( parentGroupId, pom.getGroupId() ) && StringUtils.equals( parentArtifactId, pom.getArtifactId() ) && StringUtils.equals( parentVersion, pom.getVersion() ) ) { pom.initialiseMavenProject( builder, localRepository ); mavenProject.setParent( pom.getMavenProject() ); ModelInheritanceAssembler modelInheritanceAssembler = (ModelInheritanceAssembler) lookup( ModelInheritanceAssembler. ROLE ); modelInheritanceAssembler.assembleModelInheritance( mavenProject.getModel(), pom.getModel() ); break; } } } ModelDefaultsInjector modelDefaultsInjector = (ModelDefaultsInjector) lookup( ModelDefaultsInjector.ROLE ); modelDefaultsInjector.injectDefaults(mavenProject.getModel()); } protected MavenProject getMavenProject() { if ( mavenProject == null ) { mavenProject = createMinimalProject( createLocalArtifactRepository() ); } return mavenProject; } public String getArtifactId() { return getMavenProject().getArtifactId(); } public Build getBuild() { return getMavenProject().getBuild(); } public CiManagement getCiManagement() { return getMavenProject().getCiManagement(); } public List getContributors() { return getMavenProject().getContributors(); } public List getDependencies() { return getMavenProject().getDependencies(); } public DependencyManagement getDependencyManagement() { return getMavenProject().getDependencyManagement(); } public String getDescription() { return getMavenProject().getDescription(); } public List getDevelopers() { return getMavenProject().getDevelopers(); } public DistributionManagement getDistributionManagement() { return getMavenProject().getDistributionManagement(); } public String getGroupId() { return getMavenProject().getGroupId(); } public String getInceptionYear() { return getMavenProject().getInceptionYear(); } public IssueManagement getIssueManagement() { return getMavenProject().getIssueManagement(); } public List getLicenses() { return getMavenProject().getLicenses(); } public List getMailingLists() { return getMavenProject().getMailingLists(); } public String getModelVersion() { return getMavenProject().getModelVersion(); } public List getModules() { return getMavenProject().getModules(); } public String getName() { return getMavenProject().getName(); } public Organization getOrganization() { return getMavenProject().getOrganization(); } public String getPackaging() { return getMavenProject().getPackaging(); } public List getPluginRepositories() { return getMavenProject().getPluginRepositories(); } public Reporting getReporting() { return getMavenProject().getReporting(); } public List getRepositories() { return getMavenProject().getRepositories(); } public Scm getScm() { return getMavenProject().getScm(); } public String getUrl() { return getMavenProject().getUrl(); } public String getVersion() { return getMavenProject().getVersion(); } public String getId() { return getMavenProject().getId(); } /** * Registers POMPropertyHelper as a property interceptor in Ant 1.6 - 1.7.1, or property delegate in Ant 1.8.0 */ protected void doExecute() { if ( getId() == null ) { throw new BuildException( "id required for pom task" ); } ArtifactRepository localRepo = createLocalArtifactRepository(); MavenProjectBuilder projectBuilder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE ); initialiseMavenProject( projectBuilder, localRepo ); Project antProject = getProject(); // Add a reference to this task/type antProject.addReference( antId, this ); // Register the property intercepter or delegate PropertyHelper phelper = PropertyHelper.getPropertyHelper( antProject ); try { // Ant 1.8.0 delegate POMPropertyEvaluator.register( this, phelper ); } catch ( LinkageError e ) { // fallback to 1.6 - 1.7.1 intercepter chaining helper.setNext( phelper.getNext() ); helper.setProject( antProject ); phelper.setNext( helper ); } } /** * The repositories defined in the ant "pom" task need to be added manually to the profile manager. Otherwise they * won't be available when resolving the parent pom. MANTTASKS-87 */ private void addAntRepositoriesToProfileManager() { List remoteRepositories = this.getRemoteRepositories(); if ( remoteRepositories == null || remoteRepositories.isEmpty() ) { return; } org.apache.maven.model.Profile repositoriesProfile = new org.apache.maven.model.Profile(); repositoriesProfile.setId( "maven-ant-tasks-repo-profile" ); for ( RemoteRepository antRepo : remoteRepositories ) { Repository mavenRepo = new Repository(); mavenRepo.setId( antRepo.getId() ); mavenRepo.setUrl( antRepo.getUrl() ); repositoriesProfile.addRepository( mavenRepo ); } getProfileManager().addProfile( repositoriesProfile ); getProfileManager().explicitlyActivate( repositoriesProfile.getId() ); } private ProfileManager getActivatedProfiles() { ProfileManager profileManager = getProfileManager(); for ( Profile profile : getProfiles() ) { if ( profile.getId() == null ) { throw new BuildException( "Attribute \"id\" is required for profile in pom type." ); } if ( profile.getActive() == null || Boolean.valueOf( profile.getActive() ).booleanValue() ) { profileManager.explicitlyActivate( profile.getId() ); } else { profileManager.explicitlyDeactivate( profile.getId() ); } } return profileManager; } /** * Create a project builder configuration to be used when initializing the maven project. * * @return */ private ProjectBuilderConfiguration createProjectBuilderConfig( ArtifactRepository localArtifactRepository ) { ProjectBuilderConfiguration builderConfig = new DefaultProjectBuilderConfiguration(); builderConfig.setLocalRepository( localArtifactRepository ); builderConfig.setGlobalProfileManager( this.getActivatedProfiles() ); builderConfig.setUserProperties( getAntProjectProperties() ); builderConfig.setExecutionProperties( getAntProjectProperties() ); return builderConfig; } /** * Convert the Hashtable of Ant project properties to a Properties object * * @return The Ant project properties */ public Properties getAntProjectProperties() { Properties properties = new Properties(); Hashtable propsTable = null; if ( this.isInheritAllProperties() ) { propsTable = getProject().getProperties(); } else { propsTable = getProject().getUserProperties(); } Iterator propsIter = propsTable.keySet().iterator(); while ( propsIter.hasNext() ) { String key = (String) propsIter.next(); String value = (String) propsTable.get( key ); properties.setProperty( key, value ); } return properties; } /** * If set to true, all properties are passed to the maven pom. If set to false, only user properties are passed to * the pom. * * @param inheritAllProperties */ public void setInheritAllProperties( boolean inheritAllProperties ) { this.inheritAllProperties = inheritAllProperties; } public boolean isInheritAllProperties() { return inheritAllProperties; } public Model getModel() { return getMavenProject().getModel(); } public void setGroupId( String groupId ) { getMavenProject().setGroupId( groupId ); } public void setArtifactId( String artifactId ) { getMavenProject().setArtifactId( artifactId ); } public void setVersion( String version ) { getMavenProject().setVersion( version ); } public void addConfiguredParent( Parent parent ) { getMavenProject().getModel().setParent( parent ); } public void addConfiguredCiManagement( CiManagement ciManagement ) { getMavenProject().setCiManagement( ciManagement ); } public void addConfiguredContributor ( Contributor contributor ) { getMavenProject().addContributor( contributor ); } public void addConfiguredDependency( Dependency dependency ) { getMavenProject().getDependencies().add( dependency ); } public void addConfiguredDependencyManagement( DependencyManagement dependencyManagement ) { if ( getMavenProject().getDependencyManagement() == null ) { // is is a bit disappointing that we have to access the encapsulated model to fix the NPE getMavenProject().getModel().setDependencyManagement(new DependencyManagement()); } getMavenProject().getDependencyManagement().setDependencies( dependencyManagement.getDependencies() ); } public void setDescription( String description ) { getMavenProject().setDescription( description ); } public void addConfiguredDeveloper( Developer developer ) { getMavenProject().addDeveloper( developer ); } public void setInceptionYear( String inceptionYear ) { getMavenProject().setInceptionYear( inceptionYear ); } public void addConfiguredIssueManagement( IssueManagement issueManagement ) { getMavenProject().setIssueManagement( issueManagement ); } public void addConfiguredLicense ( License license ) { getMavenProject().addLicense( license ); } public void addConfiguredMailingLists( MailingList mailingList ) { getMavenProject().addMailingList( mailingList ); } public void setName( String name ) { getMavenProject().setName( name ); } public void addConfiguredOrganization( Organization organization ) { getMavenProject().setOrganization( organization ); } public void setPackaging( String packaging ) { getMavenProject().setPackaging( packaging ); } public void addConfiguredScm( Scm scm ) { getMavenProject().setScm( scm ); } public void setUrl( String url ) { getMavenProject().setUrl( url ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/Profile.java000066400000000000000000000025711160434416500271330ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Container for activating profiles */ public class Profile { /** * Profile Id to activate */ private String id; /** * If specified, the named property must be defined. Same as if on */ private String active; public String getId() { return id; } public void setId( String name ) { this.id = name; } public void setActive( String active ) { this.active = active; } public String getActive() { return active; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/Proxy.java000066400000000000000000000027151160434416500266540ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.wagon.proxy.ProxyInfo; /** * Ant Wrapper for wagon proxy. * * @author Brett Porter * @version $Id: Proxy.java 524632 2007-04-01 17:05:24Z jvanzyl $ */ public class Proxy extends ProxyInfo { public Proxy() { super(); } public Proxy( org.apache.maven.settings.Proxy proxy ) { setHost( proxy.getHost() ); setPort( proxy.getPort() ); setNonProxyHosts( proxy.getNonProxyHosts() ); setUserName( proxy.getUsername() ); setPassword( proxy.getPassword() ); setType( proxy.getProtocol() ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java000066400000000000000000000045221160434416500310640ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Remote repository type. * * @author Brett Porter * @version $Id: RemoteRepository.java 615614 2008-01-27 16:06:31Z hboutemy $ */ public class RemoteRepository extends Repository { private String url; private Authentication authentication; private Proxy proxy; private RepositoryPolicy snapshots; private RepositoryPolicy releases; public String getUrl() { return ( (RemoteRepository) getInstance() ).url; } public void setUrl( String url ) { this.url = url; } public Authentication getAuthentication() { return ( (RemoteRepository) getInstance() ).authentication; } public void addAuthentication( Authentication authentication ) { this.authentication = authentication; } public void addProxy( Proxy proxy ) { this.proxy = proxy; } public Proxy getProxy() { return ( (RemoteRepository) getInstance() ).proxy; } public RepositoryPolicy getSnapshots() { return ( (RemoteRepository) getInstance() ).snapshots; } public void addSnapshots( RepositoryPolicy snapshots ) { this.snapshots = snapshots; } public RepositoryPolicy getReleases() { return ( (RemoteRepository) getInstance() ).releases; } public void addReleases( RepositoryPolicy releases ) { this.releases = releases; } protected String getDefaultId() { return getUrl(); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/Repository.java000066400000000000000000000040521160434416500277060ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.tools.ant.ProjectComponent; /** * Base class for a repository. * * @author Brett Porter * @version $Id: Repository.java 586615 2007-10-19 21:04:45Z hboutemy $ */ public abstract class Repository extends ProjectComponent { private String id; private String refid; private String layout = "default"; protected abstract String getDefaultId(); public String getId() { if ( getInstance().id == null ) { getInstance().setId( getDefaultId() ); } return getInstance().id; } public void setId( String id ) { this.id = id; } public String getRefid() { return refid; } public void setRefid( String refid ) { this.refid = refid; } protected Repository getInstance() { Repository instance = this; if ( refid != null ) { instance = (Repository) getProject().getReference( refid ); } return instance; } public String getLayout() { return getInstance().layout; } public void setLayout( String layout ) { this.layout = layout; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/RepositoryPolicy.java000066400000000000000000000034111160434416500310640ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.tools.ant.ProjectComponent; /** * Base class for a repository policy. * * @author Brett Porter * @version $Id: RepositoryPolicy.java 649782 2008-04-19 09:42:38Z hboutemy $ */ public class RepositoryPolicy extends ProjectComponent { private String updatePolicy; private String checksumPolicy; private boolean enabled = true; public String getUpdatePolicy() { return updatePolicy; } public void setUpdatePolicy( String updatePolicy ) { this.updatePolicy = updatePolicy; } public boolean isEnabled() { return enabled; } public void setEnabled( boolean enabled ) { this.enabled = enabled; } public String getChecksumPolicy() { return checksumPolicy; } public void setChecksumPolicy( String checksumPolicy ) { this.checksumPolicy = checksumPolicy; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/SpecificScopesArtifactFilter.java000066400000000000000000000061451160434416500332620ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; /** * Filter to only retain objects in the given scope(s). * * @author pgier * @version $Id: SpecificScopesArtifactFilter.java 981672 2010-08-02 20:19:35Z hboutemy $ */ public class SpecificScopesArtifactFilter implements ArtifactFilter { private boolean compileScope; private boolean runtimeScope; private boolean testScope; private boolean providedScope; private boolean systemScope; /** * Takes a comma separated list of scopes to include. * * @param scopes A comma separated list of scopes */ public SpecificScopesArtifactFilter( String scopes ) { String [] scopeList = scopes.split( "," ); for ( int i = 0; i < scopeList.length; ++i ) { String scope = scopeList[i].trim(); if ( scope.equals( DefaultArtifact.SCOPE_COMPILE ) ) { compileScope = true; } else if ( scope.equals( DefaultArtifact.SCOPE_PROVIDED ) ) { providedScope = true; } else if ( scope.equals( DefaultArtifact.SCOPE_RUNTIME ) ) { runtimeScope = true; } else if ( scope.equals( DefaultArtifact.SCOPE_SYSTEM ) ) { systemScope = true; } else if ( scope.equals( DefaultArtifact.SCOPE_TEST ) ) { testScope = true; } } } public boolean include( Artifact artifact ) { if ( Artifact.SCOPE_COMPILE.equals( artifact.getScope() ) ) { return compileScope; } else if ( Artifact.SCOPE_RUNTIME.equals( artifact.getScope() ) ) { return runtimeScope; } else if ( Artifact.SCOPE_TEST.equals( artifact.getScope() ) ) { return testScope; } else if ( Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) ) { return providedScope; } else if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) ) { return systemScope; } return true; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/TypesArtifactFilter.java000066400000000000000000000035321160434416500314610ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import java.util.ArrayList; import java.util.List; /** * Artifact Filter which filters on artifact types. * */ public class TypesArtifactFilter implements ArtifactFilter { private List types = new ArrayList(); /** * Accepts a comma separated list of types * * @param types */ public TypesArtifactFilter( String types ) { if ( !types.trim().equals( "" ) ) { String[] typesArray = types.split( "," ); for ( int i = 0; i < typesArray.length; ++i ) { this.types.add( typesArray[i].trim() ); } } } public boolean include( Artifact artifact ) { String artifactType = artifact.getType(); if ( artifactType == null || artifactType.equals( "" ) ) { artifactType = "jar"; } return types.contains( artifactType ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/VersionMapper.java000066400000000000000000000062201160434416500303200ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.util.Arrays; import java.util.Comparator; import java.util.List; import org.apache.tools.ant.util.FileNameMapper; import org.codehaus.plexus.util.StringUtils; /** * Ant filename mapper to remove version info from filename when copying dependencies. * * @author Herve Boutemy * @version $Id: VersionMapper.java 928113 2010-03-27 00:33:45Z hboutemy $ */ public class VersionMapper implements FileNameMapper, Comparator { private List versions; private String to; public String[] mapFileName( String sourceFileName ) { String originalFileName = new java.io.File( sourceFileName ).getName(); for ( String version : versions ) { int index = originalFileName.indexOf( version ); if ( index >= 0 ) { // remove version in artifactId-version(-classifier).type String baseFilename = originalFileName.substring( 0, index - 1 ); String extension = originalFileName.substring( index + version.length() ); String path = sourceFileName.substring( 0, sourceFileName.length() - originalFileName.length() ); if ( "flatten".equals( to ) ) { path = ""; } return new String[] { path + baseFilename + extension }; } } return new String[] { sourceFileName }; } /** * Set the versions identifiers that this mapper can remove from filenames. The separator value used is path * separator, as used by dependencies task when setting versionsId property value. */ public void setFrom( String from ) { String[] split = StringUtils.split( from, File.pathSeparator ); // sort, from lengthiest to smallest Arrays.sort( split, this ); versions = Arrays.asList( split ); } /** * By default, only filename is changed, but if this attribute is set to flatten, directory is * removed. */ public void setTo( String to ) { this.to = to; } public int compare( String s1, String s2 ) { int lengthDiff = s2.length() - s1.length(); return ( lengthDiff != 0 ) ? lengthDiff : s1.compareTo( s2 ); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/WritePomTask.java000066400000000000000000000062271160434416500301260ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.io.IOException; import java.io.Writer; import org.apache.maven.model.Model; import org.apache.maven.model.io.xpp3.MavenXpp3Writer; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.WriterFactory; /** * Write a POM to a file. * * @since 2.1.0 */ public class WritePomTask extends Task { private String pomRefId; private File file; private boolean trim = true; public void execute() { // check valid configuration Pom pom = (Pom) getProject().getReference( pomRefId ); Model model = pom.getModel(); if ( trim ) { trimModel ( model ); } writeModel( model, file ); } /** * Removes a lot of unnecessary information from the POM. * This includes the build section, reporting, repositories, etc. */ public void trimModel( Model model ) { model.setBuild( null ); model.setReporting( null ); model.setProperties( null ); model.setRepositories( null ); model.setPluginRepositories( null ); model.setProfiles( null ); model.setDistributionManagement( null ); model.setModules( null ); } /** * Write a POM model to a file * * @param model * @return * @throws MojoExecutionException */ public void writeModel( Model model, File outputFile ) throws BuildException { Writer fw = null; try { fw = WriterFactory.newXmlWriter( outputFile ); new MavenXpp3Writer().write( fw, model ); } catch ( IOException e ) { throw new BuildException( "Error writing temporary pom file: " + e.getMessage(), e ); } finally { IOUtil.close( fw ); } } public void setPomRefId( String pomRefId ) { this.pomRefId = pomRefId; } public String getPomRefId() { return pomRefId; } public void setFile( File file ) { this.file = file; } public File getFile() { return file; } public void setTrim( boolean trim ) { this.trim = trim; } public boolean isTrim() { return trim; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/util/000077500000000000000000000000001160434416500256405ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/util/AntBuildWriter.java000066400000000000000000000140111160434416500313770ustar00rootroot00000000000000package org.apache.maven.artifact.ant.util; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.types.FileList; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; import org.codehaus.plexus.util.xml.XMLWriter; import org.codehaus.plexus.util.xml.XmlWriterUtil; /** * Utility class for writing an Ant build file. */ public class AntBuildWriter { public static final String DEFAULT_FILE_ENCODING = "UTF-8"; /** * The default line indenter */ protected static final int DEFAULT_INDENTATION_SIZE = XmlWriterUtil.DEFAULT_INDENTATION_SIZE; private XMLWriter writer; private OutputStreamWriter outputStreamWriter; /** * Open an Ant build file for writing. Opens the file and prints the opening project tag. * * @param buildFile * @param name * @param defaultTarget * @throws IOException */ public void openAntBuild( File dependenciesBuildFile, String name, String defaultTarget ) throws IOException { String encoding = DEFAULT_FILE_ENCODING; if ( ! dependenciesBuildFile.getParentFile().exists() ) { dependenciesBuildFile.getParentFile().mkdirs(); } outputStreamWriter = new OutputStreamWriter( new FileOutputStream( dependenciesBuildFile ), encoding ); writer = new PrettyPrintXMLWriter( outputStreamWriter, StringUtils.repeat( " ", DEFAULT_INDENTATION_SIZE ), encoding, null ); writer.startElement( "project" ); writer.addAttribute( "name", name ); writer.addAttribute( "default", defaultTarget ); XmlWriterUtil.writeLineBreak( writer ); } /** * Close the ant build writer * * @throws IOException */ public void closeAntBuild() throws IOException { writer.endElement(); XmlWriterUtil.writeLineBreak( writer ); IOUtil.close( outputStreamWriter ); } /** * Open a target tag * * @param targetName * @throws IOException */ public void openTarget( String targetName ) throws IOException { writer.startElement( "target" ); writer.addAttribute( "name", targetName ); } /** * Close a tag. * * @throws IOException */ public void closeTarget() throws IOException { writer.endElement(); } /** * Write an Ant fileset * * @param fileSet * @param id */ public void writeFileSet( FileSet fileSet, String id ) { writer.startElement( "fileset" ); if ( id != null ) { writer.addAttribute( "id", id ); } File dir = fileSet.getDir( fileSet.getProject() ); writer.addAttribute( "dir", dir.getAbsolutePath() ); DirectoryScanner scanner = fileSet.getDirectoryScanner( fileSet.getProject() ); scanner.scan(); String[] files = scanner.getIncludedFiles(); for ( int i = 0; i < files.length; ++i ) { writer.startElement( "include" ); writer.addAttribute( "name", files[i] ); writer.endElement(); } writer.endElement(); } /** * Write an ant property * * @param name * @param value */ public void writeProperty( String name, String value ) { writer.startElement( "property" ); writer.addAttribute( "name", name ); writer.addAttribute( "value", value ); writer.endElement(); } /** * Write an Ant echo task * * @param message */ public void writeEcho( String message ) { writer.startElement( "echo" ); writer.addAttribute( "level", "info" ); writer.addAttribute( "message", message ); writer.endElement(); } /** * Write an Ant file list * * @param fileList * @param id */ public void writeFileList( FileList fileList, String id ) { writer.startElement( "filelist" ); writer.addAttribute( "id", id ); File dir = fileList.getDir( fileList.getProject() ); writer.addAttribute( "dir", dir.getAbsolutePath() ); String[] files = fileList.getFiles( fileList.getProject() ); for ( int i = 0; i < files.length; ++i ) { writer.startElement( "file" ); writer.addAttribute( "name", files[i] ); writer.endElement(); } writer.endElement(); } /** * Write a path. * * @param path * @param pathId */ public void writePath( Path path, String pathId ) { writer.startElement( "path" ); writer.addAttribute( "id", pathId ); String[] paths = path.list(); for ( int i = 0; i < paths.length; ++i ) { writer.startElement( "pathelement" ); writer.addAttribute( "path", paths[i] ); writer.endElement(); } writer.endElement(); } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/util/AntTaskModified.java000066400000000000000000000043001160434416500315060ustar00rootroot00000000000000package org.apache.maven.artifact.ant.util; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.lang.reflect.Field; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Ant; /** * A modified version of the Ant task that allows access to the * new sub project. * * @author pgier */ public class AntTaskModified extends Ant { /** * The Ant tasks sets newProject to null at the end of execute(), so * we need to save this object to a different place. */ private Project savedNewProject; public void init() { super.init(); savedNewProject = saveNewProject(); } /** * This is a hack to get access to the private variable "newProject" in the Ant task. This should not be used. * Note: This may not work with later versions of Ant * * @return */ private Project saveNewProject() { try { Field newProjectField = Ant.class.getDeclaredField( "newProject" ); newProjectField.setAccessible( true ); return (Project) newProjectField.get( this ); } catch ( Exception e ) { throw new BuildException( "Unable to load cache: " + e, e ); } } /** * Get the new Ant project created by this task. * * @return */ public Project getSavedNewProject() { return savedNewProject; } } maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/util/AntUtil.java000066400000000000000000000064551160434416500300750ustar00rootroot00000000000000package org.apache.maven.artifact.ant.util; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.util.Hashtable; import java.util.Map; import org.apache.tools.ant.Project; /** * Utility stuff for dealing with Ant. */ public class AntUtil { /** * Copies all properties from the given project to the new project - omitting those that have already been set in the * new project as well as properties named basedir or ant.file. * * @param fromProject copy from * @param toProject copy to */ public static void copyProperties( Project fromProject, Project toProject ) { copyProperties( fromProject.getProperties(), toProject ); } /** * Copies all properties from the given table to the new project - omitting those that have already been set in the * new project as well as properties named basedir or ant.file. * * @param props properties Hashtable to copy to the new project. * @param project the project where the properties are added */ public static void copyProperties( Hashtable props, Project project ) { for ( Map.Entry entry : props.entrySet() ) { String key = entry.getKey(); if ( "basedir".equals( key ) || "ant.file".equals( key ) ) { // basedir and ant.file get special treatment in execute() continue; } // don't re-set user properties, avoid the warning message if ( project.getProperty( key ) == null ) { // no user property project.setNewProperty( key, entry.getValue() ); } } } /** * Copy references from one project to another. * * @param fromProject * @param toProject */ public static void copyReferences( Project fromProject, Project toProject ) { copyReferences( fromProject.getReferences(), toProject ); } /** * Copy references from a hashtable to a project. Will not * overwrite existing references. * * @param refs * @param project */ public static void copyReferences( Hashtable refs, Project project ) { for ( Map.Entry entry : refs.entrySet() ) { String key = entry.getKey(); // don't overwrite existing references if ( project.getReference( key ) == null ) { project.addReference( key, entry.getValue() ); } } } } maven-ant-tasks-2.1.3/src/main/resources/000077500000000000000000000000001160434416500202575ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/resources/org/000077500000000000000000000000001160434416500210465ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/resources/org/apache/000077500000000000000000000000001160434416500222675ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/resources/org/apache/maven/000077500000000000000000000000001160434416500233755ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/resources/org/apache/maven/artifact/000077500000000000000000000000001160434416500251725ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/resources/org/apache/maven/artifact/ant/000077500000000000000000000000001160434416500257545ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/main/resources/org/apache/maven/artifact/ant/antlib.xml000066400000000000000000000020341160434416500277460ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/site/000077500000000000000000000000001160434416500162655ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/site/apt/000077500000000000000000000000001160434416500170515ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/site/apt/download.apt.vm000066400000000000000000000062661160434416500220210ustar00rootroot00000000000000 ------ Download Maven Ant Tasks ------ Paul Gier ------ 2009-11-30 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Download the Maven Ant Tasks The Maven Ant Tasks are distributed as a jar file to be included in the Ant classpath. The complete sources can be downloaded as a zip file. After selecting the file to download, you will be prompted for a mirror. If the file is not found on your selected mirror, please be patient, as it may take 24 hours to reach all mirrors. The Maven Ant Tasks are distributed under the {{{http://maven.apache.org/license.html} Apache License, version 2.0}}. *-------------------------+---------+----------+-----------+ | | Mirrors | Checksum | Signature | *-------------------------+---------+----------+-----------+ | Binaries (jar) | {{{http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-ant-tasks-${project.version}.jar} maven-ant-tasks-${project.version}.jar}} | {{{http://www.apache.org/dist/maven/binaries/maven-ant-tasks-${project.version}.jar.md5} maven-ant-tasks-${project.version}.jar.md5}} | {{{http://www.apache.org/dist/maven/binaries/maven-ant-tasks-${project.version}.jar.asc} maven-ant-tasks-${project.version}.jar.asc}} | *-------------------------+---------+----------+-----------+ | Sources (zip) | {{{http://www.apache.org/dyn/closer.cgi/maven/source/maven-ant-tasks-${project.version}-src.zip} maven-ant-tasks-${project.version}-src.zip}} | {{{http://www.apache.org/dist/maven/source/maven-ant-tasks-${project.version}-src.zip.md5} maven-ant-tasks-${project.version}-src.zip.md5}} | {{{http://www.apache.org/dist/maven/source/maven-ant-tasks-${project.version}-src.zip.asc} maven-ant-tasks-${project.version}-src.zip.asc}} | *-------------------------+---------+----------+-----------+ * System {Requirements} *-----------------+------------------------------------------------------------------------------------------------+ | <> | JDK version 1.5 or above is required (This is due to dependencies on internal Maven libraries.) *-----------------+------------------------------------------------------------------------------------------------+ | <> | Ant version 1.6.x, 1.7.x or 1.8.x is required *-----------------+------------------------------------------------------------------------------------------------+ maven-ant-tasks-2.1.3/src/site/apt/examples/000077500000000000000000000000001160434416500206675ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/site/apt/examples/dependencies.apt000066400000000000000000000221151160434416500240240ustar00rootroot00000000000000 ------ Dependencies ------ Brett Porter Hervé Boutemy Paul Gier ------ 2009-05-07 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Basic Example The following example declares three dependencies and adds them to the <<>> pathId. ----- ----- The pathId can be used in the Ant build file for example in the <<>> task. ----- ... ----- Using FileSets and the Version Mapper Another option you can use is <<>>, which will give you a fileset reference that can be used to copy files into a particular location. For example, to populate <<>> with your dependencies you could use the following: ----- ... ----- Note the <<>> attribute in this call. This ensures that your web application only includes your compile and runtime dependencies, excluding those that are only for testing or are expected to already be provided by the servlet container. You can also specify a <<>> parameter on each dependency. This changes the behavior of transitive dependencies and is useful for building different types of classpaths. To see how it affects the behaviour of the dependencies, see the {{{http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html} Dependency Mechanism}} documentation on the Maven 2.0 site. Other options are: * <<>>, which will give you a fileset reference containing sources artifacts, <(since 2.0.6)> * <<>>, which will give you a fileset reference containing javadoc artifacts, <(since 2.0.9)> * {<<>>}, which can be used to drop version numbers in filenames <(since 2.0.7)> For example, to populate <<>> with your dependencies without the version in the filenames, <<>> with the corresponding sources and <<>> with the corresponding javadocs: ----- ... ----- <> In the above example you only need to specify <<>> if are using Maven Ant Tasks by {{{../installation.html#typedef} declaring a <<>>}}. It can be omitted if Maven Ant Tasks was {{{../installation.html#lib} installed in Ant's <<>> directory}}. Using Properties to Access Dependencies <(since 2.0.8)> For each dependency resolved using either inline declaration or a pom reference, the property <<>> is defined pointing to the corresponding file. For example, a resolved dependency on junit can be accessed in the following way: ----- ----- Note about system scope Dependencies that use the <<>> scope specify a path on the local system that may be outside of the local maven repository. An Ant fileset only allows a single base directory, so these dependencies will not be included in the generated fileset for resolved dependencies. They will, however, be included in the path object. Filtering Dependencies by Scope There are two options available for filtering POM dependencies by scope: the <<>> attribute, and the <<>> attribute. One or the other of these attributes should be used but not both. The <<>> attribute follows the Maven conventions for scoping behaviour. This means the attribute can be set to one of three possible scopes: compile, runtime, or test. These scopes will behave as follows. * <<>> - Includes scopes <<>>, <<>> and <<>> * <<>> - Includes scopes <<>> and <<>> * <<>> - Includes scopes <<>>, <<>>, <<>>, <<>> and <<>> For example, using the scope <<>>, any dependencies defined with <<>>, <<>>, or nothing (defaults to <<>>) in the <<>> field will be included in the resulting fileset. ----- ----- <(Since 2.0.10)> The <<>> attribute accepts a comma separated list of scopes to include in the filtering. Only dependencies with these specific scopes will be included in the resulting fileset. If no value is specified, all scopes are included. The following example includes only dependencies with a scope of either <<>> or <<>>. ----- ----- Filtering Dependencies by Type Dependencies can be filtered by type by using the <<>> attribute. This can be set to a comma separated list of the types to select. The following example will only include artifacts of the <<>> type. ----- ----- By default, all artifact types will be included when building the list of dependencies. Generating an Ant build with the dependency properties and references <(Since 2.1.0)> For a project with a large dependency tree, the resolution process can take some time. In these cases, the dependencies task provides an option to generate an Ant build file (called build-dependencies.xml by default) that contains properties and references generated by the dependency resolution. This file can be used as a cache to quickly load the paths to the dependency artifacts. Or it can be used directly in other ant build files via the <> task. There are two parameters to the dependencies task related to this feature <> and <>. The first is a boolean parameter to say whether the build file should be generated. By default the file will be created as "./target/build-dependencies.xml". The second parameter allows the default file name to be changed. For example, to turn on the dependency cache, the following configuration could be used. ----- ----- The first time the build is run, the dependencies will be resolved from the repository, and the task will generate a file called "build-dependencies.xml". This file contains a list of the properties and fileset references generated during the build. The next time the build is run, the dependency references will simply be loaded from the generate file. maven-ant-tasks-2.1.3/src/site/apt/examples/install-deploy.apt000066400000000000000000000105151160434416500243370ustar00rootroot00000000000000 ------ Install and Deploy ------ Brett Porter Hervé Boutemy Paul Gier ------ 2009-05-06 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Install and Deploy If you want to share your built artifacts between projects, you can use two other tasks: <<>> for installing them in your local repository for access as dependencies in other scripts, and <<>> for deploying them to a remote location you have set up to serve as a repository in your organisation. <> that the installation and deployment require that you have a Maven 2.0 POM file to deploy along with it. These are required for the transitive dependency mechanism to work effectively, and can be quite simple to create. The following example shows basic use of the <<>> and <<>> tasks. ----- ... ... ----- Attaching Multiple Artifacts The install and deploy tasks allow you to attach multiple artifact to a single deployment. For example, the sources and javadoc jars can be attached using the nested <> element. ----- ----- Deployment Protocols For deploying using a protocol other than local file system, you need to register a provider to make the other protocols available. For example: ----- ... ... ----- <> that if you use <<>>, the provider isn't available during the Ant call: you have to register it again if you need it. ~~ TODO: Explain more thoroughly when you need to register a provider Maven Ant Tasks contain <<>> and <<>> providers. The other available providers are: *--------------+--------------------------+-------------------+ | Protocol | Artifact ID | Version | *--------------+--------------------------+-------------------+ | <<>> | <<>> | <<<1.0-beta-2>>> | *--------------+--------------------------+-------------------+ | <<>> | <<>> | <<<1.0-beta-2>>> | *--------------+--------------------------+-------------------+ | <<>> | <<>> | <<<1.0-beta-2>>> | *--------------+--------------------------+-------------------+ | <<>> | <<>> | <<<1.0-beta-2>>> | *--------------+--------------------------+-------------------+ | <<>> | <<>> | <<<1.0-beta-2>>> | *--------------+--------------------------+-------------------+ maven-ant-tasks-2.1.3/src/site/apt/examples/mvn.apt.vm000066400000000000000000000100331160434416500226130ustar00rootroot00000000000000 ------ Mvn ------ Paul Gier ------ 2009-05-06 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html The Mvn Task <> The Maven Ant Tasks have some limited support for calling a full Maven build from Ant. The <<>> task is a subclass of the Ant {{{http://ant.apache.org/manual/CoreTasks/java.html}java}} task and supports all of its options such as args, fork, resultproperty, etc. If Maven is already installed on the local system, the Maven build can be called using this local installation by specifying the <<>> parameter. ----- ----- Maven will search for a pom.xml file in the current directory and run the <<>> goal. If the pom file is not located in the current directory, an alternate path to the pom can be specified. ----- ----- Running the Mvn Task without a Maven Installation If no local Maven installation is available, the mvn task will attempt to resolve (download) the necessary jar files from the central Maven repository and run the Maven build using these jar files. When the <<>> attribute is not set, the <<>> task will attempt to automatically resolve the required jar files. ----- ----- <> Using the Java Task The java task can be used directly without any need for the Maven Ant Tasks. However, this method requires that Maven is already installed on the system. A property called <<>> must be set to point to the local Maven installation, then an Ant macro can be defined for calling Maven. ----- ----- This example defines an Ant macro called <<>>. The macro can then be used in the build like this: ----- ----- maven-ant-tasks-2.1.3/src/site/apt/examples/pom.apt000066400000000000000000000120741160434416500221740ustar00rootroot00000000000000 ------ Pom ------ Brett Porter Hervé Boutemy Paul Gier ------ 2009-05-06 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Introduction The pom task can be used in one of two ways, either to read an existing pom file (typically pom.xml), or to define an in memory pom object. Either technique can be used to resolve build dependencies, build the project classpath, and/or define project properties. Reading an existing POM file An example pom is provided here: ----- 4.0.0 com.mycompany.project project-model 1.0-SNAPSHOT junit junit 3.8.2 test org.codehaus.modello modello-core 1.0-alpha-2-SNAPSHOT javax.servlet servlet-api 2.4 provided ----- These elements represent: * - this is the version of the POM layout in use, currently <<<4.0.0>>>. * - the group ID represents your organisation and project name, much like a Java package name. This must be universally unique. This becomes the base directory in the repository as well. * - the artifact ID represents the current build unit. It usually equals the filename of the resulting file, and must be unique within the group. * - the version of the artifact you are building. * - the artifacts that this project is dependent on. This is all that is required for most projects. However, it is also possible to use other fields available in Maven to describe your project, and reference them from your build script. Once the pom file is created, it can be read by the pom task. ----- ----- Defining a POM in Ant If a POM file is not available, the ant task can also be used to define an in-memory pom. ---- ---- Accessing POM information To access a part of the POM as an Ant property, you must define it as a reference. For example, to access the version from a POM, you can use the following: ----- The version is ${mypom.version} ----- You can also access nested parts of the POM. For example, you can read the default value of the <<>> element within the <<>> element using a <<<.>>> separator. ----- The build directory is ${mypom.build.directory} ----- For more information on the elements available in the POM, see the {{{http://maven.apache.org/ref/current/maven-model/maven.html} descriptor reference}}. Accessing dependencies in the POM The <<>> task can be used in combination with the <<>> task to declare a list of dependencies. ----- ----- In this example, the <<>> task will resolve the list of dependencies in the pom and add them to the fileset. Using profiles in the POM POM profiles can be activated or deactivated using the nested profile element. For example to activate a profile called <<>>. ----- ----- This can also be used to deactivate a POM profile that is active by default. ----- ----- maven-ant-tasks-2.1.3/src/site/apt/examples/write-pom.apt000066400000000000000000000061711160434416500233250ustar00rootroot00000000000000 ------ WritePom ------ Paul Gier ------ 2009-11-18 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html The WritePom Task <> The WritePom task can be used to generate a POM file based on information defined in the Ant build. For example, this could be used to generate a POM used when deploying build artifacts to a Maven repository. The first step is to define a pom using the pom task. ----- ---- The next step is to call the writePom task using the pom id created above. ---- ---- This will generate a pom in the location specified. ---- 4.0.0 org.acme project1 1.0 My awesome project apache http://www.apache.org/ junit junit 4.1 test org.codehaus.plexus plexus-utils 1.5.5 compile ---- By default the <<>> task will not include unnecessary information such as build configuration, repositories, and profiles. If this information is needed in the pom, the "trim" option can be set to false. ---- ---- maven-ant-tasks-2.1.3/src/site/apt/index.apt000066400000000000000000000105441160434416500206720ustar00rootroot00000000000000 -------- Introduction -------- Brett Porter Hervé Boutemy -------- 2008-07-17 -------- ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Maven Ant Tasks The Mavent Ant Tasks allow several of Maven's artifact handling features to be used from within an Ant build. These include: * - including transitive dependencies, scope recognition and SNAPSHOT handling * - deployment to a Maven repository (file integrated, other with extensions) * - for reading and writing a Maven 2 <<>> file The Ant tasks can be downloaded from the {{{download.html} download page}}. * System Requirements *-----------------+------------------------------------------------------------------------------------------------+ | <> | JDK version 1.5 or above is required (This is due to dependencies on internal Maven libraries.) *-----------------+------------------------------------------------------------------------------------------------+ | <> | Ant version 1.6.x, 1.7.x or 1.8.x is required *-----------------+------------------------------------------------------------------------------------------------+ * Usage General instructions for installing and using the Maven Ant Tasks can be found on the {{{installation.html}installation page}} and the {{{usage.html}usage page}} respectively. Some more specific use cases are described in the examples given below. Last but not least, users occasionally contribute additional examples, tips or errata to the {{{http://docs.codehaus.org/display/MAVENUSER/Maven+Ant+Tasks}project's wiki page}}. * Examples Several common usage examples are provided for the following tasks: * {{{examples/dependencies.html}Dependencies task}} * {{{examples/install-deploy.html}Install and Deploy tasks}} * {{{examples/pom.html}Pom task}} * {{{examples/write-pom.html}WritePom task}} * {{{examples/mvn.html}Mvn task}} * Getting Help In case you still have questions regarding the Maven Ant Tasks usage, please have a look at the {{{faq.html}FAQ}} and feel free to contact the {{{mail-lists.html}user mailing list}}. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the {{{mail-lists.html}mail archive}}. If you feel like the Ant tasks are missing a feature or have a defect, you can fill a feature request or bug report in our {{{issue-tracking.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, Ant build scripts or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our {{{source-repository.html}source repository}} and will find supplementary information in the {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}. For more information on the Maven functionality behind the Ant tasks, try the following links: * {{{http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html} Dependency Mechanism}} * {{{http://maven.apache.org/ref/current/maven-settings/settings.html} Settings Reference}} * {{{http://maven.apache.org/ref/current/maven-model/maven.html} POM Reference}} maven-ant-tasks-2.1.3/src/site/apt/installation.apt.vm000066400000000000000000000051431160434416500227040ustar00rootroot00000000000000 -------- Installation -------- Brett Porter Hervé Boutemy -------- 2008-07-17 -------- ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Installing Maven Ant Tasks For convenience, Maven Ant Tasks and all its dependencies are packaged together as a single JAR file. This can be downloaded from the {{{download.html} download page}}. There are two ways to use the tasks from your scripts. * Installing in Ant's {<<>>} directory This is the simplest installation method but requires changes on every machine using the build file. You can place the JAR in your Ant <<>> directory, include it in the <<>> environment variable, or pass it in to Ant using the <<<-lib>>> command line parameter. Using this method, to make the tasks available in your build file, add the following namespace to the start of the file: ----- ... ----- * Declaring a {<<>>} Using a <<>> declaration allows you to store the Ant Tasks' library anywhere you like (such as source control) and put it's location in the build file. This can be used to bootstrap the tasks by using <<>> to obtain the library, and then reference it from the build script. The following example shows how to set it up, assuming the library is in the <<>> subdirectory of your current project. ----- ... ... ----- maven-ant-tasks-2.1.3/src/site/apt/reference.apt000066400000000000000000000633661160434416500215330ustar00rootroot00000000000000 ------ Task and Type Reference ------ Brett Porter Hervé Boutemy ------ 2008-07-17 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html {Task} Reference ~~ TODO: Can the task and type classes be generated using Modello? ~~ If so, the reference documentation can be generated from the model. * <<<{dependencies}>>> This task will check if any of the specified dependencies, and their dependencies are missing or updated, and download them if necessary. The dependencies will be made available as a fileset or path reference. The dependencies task accepts the following attributes: *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <> | <> | <> | << Since >> | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The reference ID to store a fileset under, for the resolved dependencies. | No | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The reference ID to store a fileset under, for the javadoc attachments of the resolved dependencies. | No | 2.0.9 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The reference ID to store a path under, for the resolved dependencies. | No | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The reference ID from a POM datatype defined earlier in the build file. | Yes, either this or a <<>> nested element or one or more <<>> nested elements | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The settings file to use. Defaults to <<<$\{user.home\}/.ant/settings.xml>>> or if that doesn't exist <<<$\{user.home\}/.m2/settings.xml>>>. | No | 2.0.6 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The reference ID to store a fileset under, for the sources attachments of the resolved dependencies. | No | 2.0.6 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | A comma separated list of artifact types to be retrieved. By default all artifact types will be included. | No | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | A comma separated list of artifact types to be added to the path object. By default all artifact types will be included. | No | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | Follows the Maven scope behaviour. Can be set to <<>>, <<>>, or <<>>. If no value is provided, all scopes will be included. | No | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | A comma separated list of specific scopes to be retrieved. If no value is provided, all scopes will be included. | No | 2.0.10 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | The property ID to store the versions of the resolved dependencies, for use by a {{{reference.html#VersionMapper} <<>>}}. | No | 2.0.7 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | If set to true, will generate an Ant build file that contains properties and fileset references for the dependencies. Then try to load information from this file in subsequent builds. Default is . | No | 2.1.0 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | <> Add a fileset for each resolved dependency. The fileset has an id of <<>>. Default is (was in 2.0.10). | No | 2.0.10 | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ | <<>> | <> in version 2.1.0. Use the Ant command line -v option for verbose output. | No | | *-------------------------+---------------------------------------------------------------------------+--------------+-------------+ The task can include the <<>> nested type, in addition to the other shared types {{{reference.html#localRepository} <<>>}}, {{{reference.html#pom} <<>>}} and {{{reference.html#remoteRepository} <<>>}}, which will be explained later. You must include either a single <<>> element or a <<>> attribute or one or more <<>> elements. If you have set a value for <<>>, you can later use {{{reference.html#versionMapper} <<>>}}. <(since 2.0.8)> For each dependency resolved, the property <<>> is defined pointing to the corresponding file. ** <<>> Dependency definition is done in Maven Ant Tasks exactly like it is done in Maven: it is summarized here, but you can look at {{{http://maven.apache.org/ref/current/maven-model/maven.html#class_dependency} the reference documentation}} for more information. *------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *------------------+--------------------------------------------------------+--------------+ | <<>> | The group ID of the dependency. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | The artifact ID of the dependency. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | The version of the dependency. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | The type of the dependency. The default is <<>>. | No | *------------------+--------------------------------------------------------+--------------+ | <<>> | The classifier of the dependency. | No | *------------------+--------------------------------------------------------+--------------+ | <<>> | The scope of the usage of the dependency, which {{{http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope} affects which of that dependency's own dependencies are also retrieved}}. This can be <<>> (default), <<>>, <<>>, <<>> or <<>>. | No | *------------------+--------------------------------------------------------+--------------+ | <<>> | FOR SYSTEM SCOPE ONLY. This specifies the path on the filesystem for this dependency. | No | *------------------+--------------------------------------------------------+--------------+ The dependency can also nest multiple <<>> elements. *** Note about system scope Dependencies that use the <<>> scope specify a path on the local system that may be outside of the local maven repository. An Ant fileset only allows a single base directory, so these dependencies will not be included in the generated fileset for resolved dependencies. They will, however, be included in the path object. *** <<>> An exclusion can be used to prevent the resolution of a particular artifact in the tree of the <<>>. *------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *------------------+--------------------------------------------------------+--------------+ | <<>> | The group ID of the dependency to exclude. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | The artifact ID of the dependency to exclude. | Yes | *------------------+--------------------------------------------------------+--------------+ * <<<{install}>>>, <<<{deploy}>>> These tasks will install/deploy the given file into the local/remote repository. It is stored using the information in the supplied POM. Multiple artifacts can be attached during install/deploy using <<>> elements. *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ | <> | <> | <> | << Since >> | *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ | <<>> | The file to install in the repository. | Yes, unless an attached artifact is specified | | *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ | <<>> | The reference ID from a POM datatype defined earlier in the build file. | Yes, unless a <<>> nested element is provided instead | | *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ | <<>> | The settings file to use. Defaults to <<<$\{user.home\}/.ant/settings.xml>>> or if that doesn't exist <<<$\{user.home\}/.m2/settings.xml>>>. | No | 2.0.6 | *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ | <<>> | (<<>> only) Whether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time | No, the default is <<>>. | | *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ The task must take either a nested {{{reference.html#pom} <<>>}} element, or a <<>> attribute. Both release and <<<-SNAPSHOT>>> versions are supported. The task can have an optional {{{reference.html#localRepository} <<>>}} nested element. <<>> can have an optional {{{reference.html#remoteRepository} <<>>}} nested element. If no <<>> nested element is given, the <<>> section of the POM is used. ** <<>> <(since 2.0.6)> Multiple artifacts can be attached to the main artifact, for example: sources, javadocs, ... *------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *------------------+--------------------------------------------------------+--------------+ | <<>> | The file to attach. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | The type of the file. Defaults to <<>>. | No | *------------------+--------------------------------------------------------+--------------+ | <<>> | The classifier of the file. | No | *------------------+--------------------------------------------------------+--------------+ * <<<{install-provider}>>> This task will install a Wagon provider, to add support for more protocols. *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <> | <> | <> | << Since >> | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The artifact ID of the provider to install. | Yes | | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The group ID of the provider to install. The default is <<>>. | No | 2.0.7 | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The version of the provider to install. | Yes | | *------------------+--------------------------------------------------------------------------+--------------+-------------+ * <<<{writepom}>>> <(since 2.1.0)> This task will write a POM object to a file. *------------------+--------------------------------------------------------------------------+--------------+ | <> | <> | <> | *------------------+--------------------------------------------------------------------------+--------------+ | <<>> | The ID of the POM to write. | Yes | *------------------+--------------------------------------------------------------------------+--------------+ | <<>> | The name of the file to write the POM | Yes | *------------------+--------------------------------------------------------------------------+--------------+ | <<>> | A boolean value to determine whether unnecessary information should be removed from the POM. Defaults to <<>>. | No | *------------------+--------------------------------------------------------------------------+--------------+ * <<<{mvn}>>> <(since 2.0.10)> This task will run a Maven process either from a specific Maven Home, or by downloading the required version and running from the local repository directly. The task extends th <<>> task with the following additional attributes. *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <> | <> | <> | << Since >> | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The pom.xml file to use. If not specified Maven will look for a pom.xml in the current directory | No | 2.0.10 | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The MAVEN_HOME of the version of Maven to launch. If not specified then <<>> will control the version of Maven that is launched. | No | 2.0.10 | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The version of Maven to launch. The required dependencies will be resolved and Maven will be launched directly from the local repository. There is no requirement to have Maven installed locally. This is ignored if <<>> is specified. The default value is 2.0.10. Prior to Maven Ant Tasks 2.1.2 only Maven versions in the range <<<[2.0.10,2.2.1]>>> could be launched. Since Maven Ant Tasks 2.1.2 the range has been extended to <<<[2.0.10,3.0.2]>>> newer versions of Maven will probably also work but are untested at this time.| No | 2.0.10 | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | The location of the local repository to be used by Maven. | No | 2.0.10 | *------------------+--------------------------------------------------------------------------+--------------+-------------+ | <<>> | Whether to launch Maven in batch mode or not. Defaults to <<>>. | No | 2.0.10 | *------------------+--------------------------------------------------------------------------+--------------+-------------+ {Type} Reference * <<<{localRepository}>>> Specifies the location of the local repository of artifacts. ~~ TODO: id/refid *------------------+--------------------------------------------------------+--------------+-------------+ | <> | <> | <> | << Since >> | *------------------+--------------------------------------------------------+--------------+-------------+ | <<>> | The layout of the local repository. The valid options are <<>> (Maven 1), or <<>> (Maven 2). Defaults to <<>>. | No | | *------------------+--------------------------------------------------------+--------------+-------------+ | <<>> | The directory of the local repository. | Yes | 2.0.7 | *------------------+--------------------------------------------------------+--------------+-------------+ <>: until 2.0.6, attribute <<>> was named <<>>, but this changed in 2.0.7 to solve a conflict with Ant 1.7. * <<<{remoteRepository}>>> Specifies the location of a remote repository. ~~ TODO: id/refid *----------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *----------------------+--------------------------------------------------------+--------------+ | <<>> | A unique ID of the repository. | Yes | *----------------------+--------------------------------------------------------+--------------+ | <<>> | The URL of the repository. | Yes | *----------------------+--------------------------------------------------------+--------------+ | <<>> | The layout of the remote repository. The valid options are <<>> (Maven 1), or <<>> (Maven 2). Defaults to <<>>. | No | *----------------------+--------------------------------------------------------+--------------+ A <<>> can have the following nested elements: <<>>, <<>>, <<>> and <<>>. ** <<>>, <<>> Policies about downloading different types of artifacts. *----------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *----------------------+--------------------------------------------------------+--------------+ | <<>> | How to treat missing or incorrect checksums for the dependencies that are downloaded. Valid values are <<>> () and <<>>. | No | *----------------------+--------------------------------------------------------+--------------+ | <<>> | Whether to download this type of artifact from the repository. Default is <<>>. | No | *----------------------+--------------------------------------------------------+--------------+ | <<>> | How often to check for updates on dependencies that are snapshots or include a range of versions. Valid values are <<>>, <<>>, <<>> (), <<>>. | No | *----------------------+--------------------------------------------------------+--------------+ ** <<>> The authentication element is used for passing a username, password and other credentials to the repository either on upload or download. The content is the same as for <<>> in the {{{http://maven.apache.org/ref/current/maven-settings/settings.html#class_server} settings reference}}. ** <<>> The proxy element is typically used for HTTP repositories. The content is the same as for <<>> in the {{{http://maven.apache.org/ref/current/maven-settings/settings.html#class_proxy} settings reference}}. * <<<{pom}>>> The POM element will load a POM file and make it available as a reference for the other tasks or as properties. *------------------+--------------------------------------------------------+--------------+-------------+ | <> | <> | <> | << Since >> | *------------------+--------------------------------------------------------+--------------+-------------+ | <<>> | The file of the POM to load. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | The reference ID of this POM. | No | *------------------+--------------------------------------------------------+--------------+ | <<>> | The reference ID to use a previously defined POM. | No | *------------------+--------------------------------------------------------+--------------+ | <<>> | If set to true, all Ant properties will be passed to the Maven POM. If set to false, only user (command-line) properties will be passed. Defaults to true. | No | 2.1.0 | *------------------+--------------------------------------------------------+--------------+ | <<>> | The settings file to use. Defaults to <<<$\{user.home\}/.ant/settings.xml>>> or if that doesn't exist <<<$\{user.home\}/.m2/settings.xml>>>. | No | 2.0.6 | *---------------------+--------------------------------------------------------------------------+-------------------------------------------------+-------------+ ** <<>> <(since 2.0.10)> Multiple profile elements can be nested within the pom element. By default the profile will be activated. If <> is set to false, then the profile will be explicitly deactivated. *------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *------------------+--------------------------------------------------------+--------------+ | <<>> | The id of the profile to be activated/deactivated. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | Set to <<>> or <<>> to determine whether the profile should be active. Default is <<>>. | No | *------------------+--------------------------------------------------------+--------------+ * <<<{versionMapper}>>> <(since 2.0.7)> This is a {{{http://ant.apache.org/manual/CoreTypes/mapper.html}filename mapper}} that removes version info from the filename when copying dependencies. It can also, optionally, remove the directory info from the filename. The full class name to use in <<>> attribute of <<<\>>> element is <<>>. *------------------+--------------------------------------------------------+--------------+ | <> | <> | <> | *------------------+--------------------------------------------------------+--------------+ | <<>> | The versions of the dependencies, as set by <<>> attribute of <<>> task. | Yes | *------------------+--------------------------------------------------------+--------------+ | <<>> | If this is set to <<>> the directory info is also removed from the filename. | No | *------------------+--------------------------------------------------------+--------------+ You can see a full working example in the {{{examples/dependencies.html} examples}}. maven-ant-tasks-2.1.3/src/site/apt/release-notes.apt000066400000000000000000000274631160434416500223410ustar00rootroot00000000000000 ------ Release Notes ------ Hervé Boutemy ------ 2010-07-19 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Maven Ant Tasks * 2.1.3 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11533&version=17307}issue management system}}, and is reproduced below. ** Bug * [MANTTASKS-218] - cacheDependencyRefs is ignored when pulling dependencies from a defined in the build.xml * 2.1.2 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11533&version=16670}issue management system}}, and is reproduced below. ** Bug * [MANTTASKS-206] - dependecies task overrides custom definition of 'central' repository * [MANTTASKS-208] - Change ant groupId to org.apache.ant ** Improvement * [MANTTASKS-199] - Loading dependencies from file echo is ant warning instead of info * [MANTTASKS-210] - When creating path objects using the dependencies task it is not possible to filter out artifacts by type. * [MANTTASKS-211] - Support launching Maven 3.x from the mvn task * [MANTTASKS-217] - Add a pseudo-reactor so that parent pom references can be resolved without pushing poms to the file system * 2.1.1 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11533&version=16024}issue management system}}, and is reproduced below. ** Bug * [MANTTASKS-173] - Value of project.build.finalName is not resolved * [MANTTASKS-178] - artifact:pom task not working with Ant 1.8.0 * [MANTTASKS-179] - Variables nested in pom.xml are not being interpolated * [MANTTASKS-185] - null pointer exception when caching dependency information * [MANTTASKS-187] - maven ant tasks 2.1.0 pom task no longer extrapolates properties * [MANTTASKS-188] - dependencyrefsbuildfile attribute doesn't work with absolute paths. * [MANTTASKS-189] - NPE when using scope="system" * [MANTTASKS-190] - dependency scope attribute is not validated * [MANTTASKS-191] - No explanation of how to use multiple Maven repositories to resolve dependencies * [MANTTASKS-192] - NPE when using remoteRepository with refid which has not been defined * [MANTTASKS-193] - POM properties aren't available as ANT properties contrary to the documentation * [MANTTASKS-195] - Cannot override central repository with my own ** Improvement * [MANTTASKS-181] - update tasks code to use Java 5 ** Wish * [MANTTASKS-172] - extend scope of 'result' variable in org.apache.maven.artifact.ant.DependenciesTask.doExecute() * 2.1.0 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11533&version=13522}issue management system}}, and is reproduced below. ** Bug * [MANTTASKS-4] - System scope not working properly in Maven Antlib * [MANTTASKS-152] - Mvn task omit localRepository param * [MANTTASKS-153] - Properties defined in Ant are not passed to Maven * [MANTTASKS-155] - Dependency fileset should set the current ant project * [MANTTASKS-159] - Wrong credentials used for mirrored repositories * [MANTTASKS-160] - Wrong metadata files created for mirrored remote repositories * [MANTTASKS-167] - Generated ant build file should save version list for version mapper ** Improvement * [MANTTASKS-117] - Setting Maven user-properties not possible * [MANTTASKS-169] - Dependencies "verbose" option should be deprecated in favor of standard ant verbose option ** New Feature * [MANTTASKS-151] - Support for artfacts that are 'classified' from birth * [MANTTASKS-156] - Add feature to dependencies task to write file paths to a file. * [MANTTASKS-168] - New task to write a pom file * 2.0.10 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&pid=11533&fixfor=14199}issue management system}}, and is reproduced below. **Bug * [MANTTASKS-87] - Using a pom.xml for dependencies, in which the pom.xml has a parent pom.xml will cause a "Error downloading parent pom" error * [MANTTASKS-106] - Maven ant tasks artifact has maven inside the jar and so can't be used from inside the maven (maven-antrun-plugin) - classes do conflict * [MANTTASKS-111] - Support for SNAPSHOT deployment * [MANTTASKS-116] - NPE when install target is missing file and pom type is JAR * [MANTTASKS-142] - Default remote repository id not safe * [MANTTASKS-144] - "Error reading settings file" error is reported when settings.xml is deleted from maven/conf folder. * [MANTTASKS-145] - Dependency management doesn't work with pom and dependencies tasks ** Improvement * [MANTTASKS-35] - Support profiles in pom type * [MANTTASKS-114] - improve documentation * [MANTTASKS-146] - Improvements to site documentation * [MANTTASKS-147] - Improvements to scope filtering ** New Feature * [MANTTASKS-71] - running m2 inside Ant * [MANTTASKS-149] - Allow multiple types in the type filter * 2.0.9 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&pid=11533&fixfor=13935&sorter/field=issuekey&sorter/order=DESC}issue management system}}, and is reproduced below. **Bug * [MANTTASKS-13] - Ant Tasks use of is inconsistent * [MANTTASKS-91] - [task dependencies]Trouble between mvn and manttasks * [MANTTASKS-103] - Can't deploy to a file: repository * [MANTTASKS-104] - files returned in sourcesFileset when no dependencies sources available * [MANTTASKS-105] - dependencies task don't read remote repositories from settings xml * [MANTTASKS-107] - repository defined in pom not used to download parent pom when defining pom reference * [MANTTASKS-108] - Maven Ant Tasks are switching the Classloader of the Main Ant Thread **Improvement * [MANTTASKS-88] - Add the ability to download javadoc dependencies * 2.0.8 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&pid=11533&fixfor=13618&sorter/field=issuekey&sorter/order=DESC}issue management system}}, and is reproduced below. **Bug * [MANTTASKS-2] - artifact:dependencies related error: No files specified for filelist * [MANTTASKS-22] - artifact:dependencies does not respect in the generated classpath the order of the dependencies * [MANTTASKS-23] - antlib:deploy doesn't set correct snapshot version * [MANTTASKS-67] - artifact:deploy - The name of deploying element in snapshot repository is wrong * [MANTTASKS-77] - element of settings.xml ignored by artifact:dependencies. * [MANTTASKS-78] - unable to download a dependency when it is a SNAPSHOT and multiple remoteRepositories are used * [MANTTASKS-79] - add XML encoding support for pom.xml and settings.xml * [MANTTASKS-82] - Environment variables are not resolved in settings files * [MANTTASKS-84] - VersionMapper does not work on SNAPSHOT dependencies where uniqueVersion="true" * [MANTTASKS-85] - settings config ignored for remoteRepositories not defined in pom * [MANTTASKS-87] - Using a pom.xml for dependencies, in which the pom.xml has a parent pom.xml will cause a "Error downloading parent pom" error * [MANTTASKS-98] - NPE if user settings file doesn't exist **Improvement * [MANTTASKS-33] - Pass Ant properties for resolved dependency JARs * [MANTTASKS-80] - weak/Inconsistent handling of settings * [MANTTASKS-97] - add support for * * [MANTTASKS-101] - get pom properties values like any other element * 2.0.7 Release Notes <>: there are 2 incompatible changes that you must know before upgrading, to fix your Ant build files: [[1]][MANTTASKS-44]: <<<\>>> instead of <<<\>>> for Ant 1.7 compatibility (location attribute is used internally by Ant 1.7) [[2]][MANTTASKS-65]: central repository is not automatically added any more if a remoteRepository is set: the code has been changed to work as expected and documented (explicit declaration) The full list of changes can be found in our {{{http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&fixfor=13521&pid=11533&sorter/field=issuekey&sorter/order=DESC}issue management system}}, and is reproduced below. **Bug * [MANTTASKS-1] - dependencies ant task incorrectly handles transitive snapshot dependencies * [MANTTASKS-6] - ant artifact doesn't read settings.xml * [MANTTASKS-11] - antlib + http based repository + version range errors badly * [MANTTASKS-12] - No means of preventing ant task from querying repo1.maven.org * [MANTTASKS-15] - scp:// urls not recognised, even when wagon-ssh is installed. * [MANTTASKS-18] - filesetId does not contain all dependencies when artifact was not yet locally installed * [MANTTASKS-26] - artifact:dependencies filesetId attribute causes NPE * [MANTTASKS-65] - [PATCH] add central repository only if no remoteRepository set * [MANTTASKS-70] - m2 tasks not reentrant * [MANTTASKS-75] - [PATCH] NPE if loaded settings.xml does not contain **Improvement * [MANTTASKS-44] - bootstrap of components/trunk fails with ant-1.7.0RC1 * [MANTTASKS-66] - [PATCH] add more information when Ant run in verbose mode (ant -v) * [MANTTASKS-69] - [PATCH] improve sample.build.xml * [MANTTASKS-72] - Remove hardcoded groupId in install-provider task * [MANTTASKS-76] - [PATCH] update Maven Ant Tasks to Maven core 2.0.7 **New Feature * [MANTTASKS-29] - more powerful filesetId **Wish * [MANTTASKS-24] - Not enough diagnostics if failed to validate POM * [MANTTASKS-37] - The Dependencies task of Maven Antlib should override an existing path reference instead of failing * [MANTTASKS-73] - miss RemoteRepository sub-element for tasks pom and install-provider * 2.0.6 Release Notes The full list of changes can be found in our {{{http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&fixfor=13351&pid=11533&sorter/field=issuekey&sorter/order=DESC}issue management system}}, and is reproduced below. **Bug * [MANTTASKS-7] - dependencies ant task does not handle scoped transitive dependencies correctly * [MANTTASKS-62] - Maven 2.0.5 needs Maven 2.0.5 Tasks for Ant and Maven 2.0.5 Embedder for everything to remain sane **Improvement * [MANTTASKS-31] - [PATCH] Ant tasks should allow you to specify a custom location for settings.xml **New Feature * [MANTTASKS-28] - [PATCH] add sourcesFilesetId attribute to dependencies task to download sources * [MANTTASKS-42] - Allow install and deploy tasks to include attached artifacts **Task * [MANTTASKS-30] - rename maven-artifact-ant to maven-ant-tasks **Wish * [MANTTASKS-45] - Document pomRefId attribute for M2 ant tasks on M2 website. maven-ant-tasks-2.1.3/src/site/apt/usage.apt000066400000000000000000000165661160434416500207010ustar00rootroot00000000000000 ------ Usage ------ Brett Porter Hervé Boutemy ------ 2008-07-17 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Using Maven Ant Tasks * Declaring Dependencies The main purpose of the Maven Ant Tasks is to utilize Maven's {{{http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html} dependency management features}}. This is achieved with the <<>> task. The simplest usage involves specifying your dependencies inline, such as in the following example: ----- ----- The above example will download those 3 dependencies, and their dependencies, and so on. They will be stored in the default local repository location, <<<$\{user.home\}/.m2/repository>>>. You may have noticed the <<>> reference. This is optional, but if given will create a classpath reference that includes the local files downloaded as dependencies. This is usually used to pass to <<>> or other tasks: You can also use a Maven 2.0 POM to declare your dependencies, which is {{{examples/pom.html} described in the examples}}. This is the recommended practice so that you can reuse the file to deploy your own artifacts. For more examples of using the dependencies task, see the {{{examples/dependencies.html} examples page}}. * Installing and Deploying Your Own Artifacts to a Repository Maven allows artifacts to be shared between projects by using local and remote repository. The <<>> task allows an artifact to be copied to the local maven repository (typically located in ~/.m2/repository). The <<>> task allows artifacts to be deployed to a remote maven repository where they will be available to other projects. For examples of using the install and deploy tasks, see the {{{examples/install-deploy.html} examples page}}. * Using a Maven {POM} File In Maven, the Project Object Model (POM) represents a unit of work - one exists for each artifact that is built. A Maven 2.0 POM file is required for deploying your own artifact to a repository for use in the dependencies elements of other projects. It can also be reused for declaring your own dependencies, instead of specifying the inline version given earlier. For examples of creating a pom and using the <<>> task, see the {{{examples/pom.html}examples page}}. * Declaring Repositories All of the tasks can optionally take one or more remote repositories to download from and upload to, and a local repository to store downloaded and installed archives to. These can be specified inline, or if you choose to reuse them, they can be declared with an <<>>/<<>> combination. For example, you can specify the remote repository you want to use: ----- ... ... ----- The default {{{http://repo1.maven.org/maven2/} central}} repository is automatically added to remote repositories. Until 2.0.10, if at least one remote repository was specified, central was not automatically added: you had to declare it if you needed it. <> to work with transitive dependencies, you use a Maven 2.0 repository. If your repository requires authentication, you can provide this as a nested element. It accepts the attributes <<>>, <<>>, and for SSH based repositories <<>> and <<>>. For example: ----- ----- * The Settings File The POM can be used to represent most of the information that the tasks have access to, including remote repositories. Information that are user or environment specific, such as the <<>> tag, are specified in the <<>> file in Maven, and can also be accessed from the Ant tasks. The file is first looked for in <<<$\{user.home\}/.ant/settings.xml>>>, then in <<<$\{user.home\}/.m2/settings.xml>>> so that the settings can be shared with Maven 2.0 itself. Since 2.0.7, it is then looked for in <<<$\{ANT_HOME\}/etc/settings.xml>>>, then in <<<$\{M2_HOME\}/conf/settings.xml>>> so that the settings can be set for all users. Since 2.0.6, you can provide access to a settings file anywhere using <<>> attribute: ----- ... ----- For example, to specify your proxy settings, you would specify the following <<>> file: ----- http proxy.host.net 8080 localhost ----- Or to specify a <<>> mirror, you would specify the following <<>> file: ----- central.mirror http://mirror.host.net/maven2 central ----- For more information on configuring <<>>, see: * {{{http://maven.apache.org/guides/mini/guide-configuring-maven.html} Configuring Maven}}. * {{{http://maven.apache.org/settings.html} Information about configuring settings.xml}}. * {{{http://maven.apache.org/ref/current/maven-settings/settings.html} Settings Descriptor Reference}}. * {{{http://maven.apache.org/guides/mini/guide-mirror-settings.html} Using Mirrors for Repositories}}. * More Examples * Maven Ant Tasks's {{{http://svn.apache.org/repos/asf/maven/ant-tasks/trunk/build-tests.xml} build-tests.xml}} is a sample Ant script showing most of the functionality in action (it's used as unit-tests). * Maven itself can be bootstrapped using Maven Ant Tasks: see {{{http://svn.apache.org/repos/asf/maven/maven-3/trunk/build.xml} build.xml}} in Maven Core sources. Note that most content is about building Maven project: there is only a little part that is using Maven Ant Tasks, to get dependencies, ie the <<>> target (with its <<>> targets). maven-ant-tasks-2.1.3/src/site/fml/000077500000000000000000000000001160434416500170435ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/site/fml/faq.fml000066400000000000000000000022431160434416500203130ustar00rootroot00000000000000 How to build a Maven project with Maven Ant Tasks?

See the examples page for the mvn task for information about building a Maven project from Ant.

maven-ant-tasks-2.1.3/src/site/site.xml000066400000000000000000000041461160434416500177600ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/test/000077500000000000000000000000001160434416500163005ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/000077500000000000000000000000001160434416500172215ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/org/000077500000000000000000000000001160434416500200105ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/org/apache/000077500000000000000000000000001160434416500212315ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/org/apache/maven/000077500000000000000000000000001160434416500223375ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/org/apache/maven/artifact/000077500000000000000000000000001160434416500241345ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/org/apache/maven/artifact/ant/000077500000000000000000000000001160434416500247165ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/java/org/apache/maven/artifact/ant/ClassLoaderTask.java000066400000000000000000000043711160434416500306050ustar00rootroot00000000000000package org.apache.maven.artifact.ant; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; /** * Task to test context classloader. * * @author Herve Boutemy * @version $Id: ClassLoaderTask.java 667996 2008-06-15 19:03:37Z hboutemy $ */ public class ClassLoaderTask extends Task { private String set; private String check; public String getSet() { return set; } public void setSet( String set ) { this.set = set; } public String getCheck() { return check; } public void setCheck( String check ) { this.check = check; } public void execute() { if ( set != null ) { getProject().addReference( set, Thread.currentThread().getContextClassLoader() ); log( "context classloader stored in " + set, Project.MSG_INFO ); } if ( check != null ) { ClassLoader classLoader = (ClassLoader) getProject().getReference( check ); ClassLoader found = Thread.currentThread().getContextClassLoader(); if ( classLoader != found ) { throw new BuildException( "found bad context classloader: " + found + " instead of " + classLoader ); } log( "context classloader " + check + " correctly switched back", Project.MSG_INFO ); } } }maven-ant-tasks-2.1.3/src/test/java/org/apache/maven/artifact/ant/PomTestCase.java000066400000000000000000000007671160434416500277620ustar00rootroot00000000000000package org.apache.maven.artifact.ant; import junit.framework.TestCase; public class PomTestCase extends TestCase { public void testDefaultRepositoryId() { RemoteRepository repo = new RemoteRepository(); repo.setUrl( "file:///home/test/stuff" ); Pom task = new Pom(); String defaultId = task.generateDefaultRepositoryId( repo ); if ( defaultId.equals( repo.getUrl() ) ) { fail( "MD5 digest not calculated" ); } } } maven-ant-tasks-2.1.3/src/test/lib/000077500000000000000000000000001160434416500170465ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/lib/empty.jar000066400000000000000000000005161160434416500207040ustar00rootroot00000000000000PK qx; META-INF/PK px;]gbf|META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJ ]lfz&\\PK qx; AMETA-INF/PK px;]gbf|'META-INF/MANIFEST.MFPKymaven-ant-tasks-2.1.3/src/test/pom-order.xml000066400000000000000000000022121160434416500207230ustar00rootroot00000000000000 4.0.0 it.ant-tasks order 0.10-SNAPSHOT jar order Check dependencies order after resolution. org.apache.commons commons-io 1.3.2 commons-lang commons-lang 2.3 commons-logging commons-logging 1.1.1 commons-collections commons-collections 3.2 maven-ant-tasks-2.1.3/src/test/pom-with-parent.xml000066400000000000000000000007331160434416500220600ustar00rootroot00000000000000 4.0.0 it.ant-tasks pom 1.0 project-with-parent-pom 2.0-beta-4-SNAPSHOT maven-ant-tasks-2.1.3/src/test/pom-with-parent2.xml000066400000000000000000000013521160434416500221400ustar00rootroot00000000000000 4.0.0 it.ant-tasks pom 1.1 project-with-parent-pom 2.0-beta-4-SNAPSHOT test.repo file:./src/test/repo false true maven-ant-tasks-2.1.3/src/test/pom-with-profiles.xml000066400000000000000000000020461160434416500224110ustar00rootroot00000000000000 4.0.0 it.ant-tasks profiles 0.10-SNAPSHOT jar profiles Check that the profiles work corretly. noprofile default true default myprofile1 myprofile1 myprofile2 myprofile2 maven-ant-tasks-2.1.3/src/test/pom-with-scopes.xml000077500000000000000000000024241160434416500220650ustar00rootroot00000000000000 4.0.0 it.ant-tasks scope-filtering 1.0-SNAPSHOT jar Filter deps by scope Check dependencies order after resolution. org.apache.commons commons-io 1.3.2 compile commons-lang commons-lang 2.3 provided commons-logging commons-logging 1.1.1 runtime commons-collections commons-collections 3.2 test maven-ant-tasks-2.1.3/src/test/pom-with-system-scope.xml000077500000000000000000000012771160434416500232310ustar00rootroot00000000000000 4.0.0 org.apache.maven.ant-tasks.test pom-system-scope 1.0-SNAPSHOT Test system scope sun.jdk tools 1.5.0 system ${basedir}/lib/empty.jar maven-ant-tasks-2.1.3/src/test/pom.xml000077500000000000000000000006461160434416500176260ustar00rootroot00000000000000 4.0.0 it.ant-tasks simple-pom 1.0 pom Basic Test Pom maven-ant-tasks-2.1.3/src/test/repo/000077500000000000000000000000001160434416500172455ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/000077500000000000000000000000001160434416500176615ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/000077500000000000000000000000001160434416500215665ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/000077500000000000000000000000001160434416500223615ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.0/000077500000000000000000000000001160434416500226575ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.0/pom-1.0.pom000066400000000000000000000010711160434416500244620ustar00rootroot00000000000000 4.0.0 it.ant-tasks pom pom Maven Ant Tasks IT SNAPSHOT pom 1.0 repo file://${user.dir}/repo maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.0/pom-1.0.pom.md5000066400000000000000000000000401160434416500251410ustar00rootroot0000000000000083dc779101b514f898431a0873ee3f1fmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.0/pom-1.0.pom.sha1000066400000000000000000000000501160434416500253110ustar00rootroot000000000000006c262222ef56991b914d11fe7cdba81513abb7f2maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.1/000077500000000000000000000000001160434416500226605ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.1/pom-1.1.pom000066400000000000000000000010711160434416500244640ustar00rootroot00000000000000 4.0.0 it.ant-tasks pom pom Maven Ant Tasks IT SNAPSHOT pom 1.1 repo file://${user.dir}/repo maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.1/pom-1.1.pom.md5000066400000000000000000000000401160434416500251430ustar00rootroot00000000000000d016b01093d23fd2be73458553df5ea1maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/1.1/pom-1.1.pom.sha1000066400000000000000000000000501160434416500253130ustar00rootroot00000000000000401796bed6bc9796aade7e68abd365f552695221maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/maven-metadata.xml000066400000000000000000000004761160434416500257760ustar00rootroot00000000000000 it.ant-tasks pom 1.0 1.0 1.1 20090504193934 maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/maven-metadata.xml.md5000066400000000000000000000000401160434416500264450ustar00rootroot0000000000000099e9954719b82037e47ebe96ee96a3damaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/pom/maven-metadata.xml.sha1000066400000000000000000000000501160434416500266150ustar00rootroot0000000000000098ac2a2f9a09cdbec0ded4c7c6b6a5b509230db6maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/000077500000000000000000000000001160434416500232065ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/000077500000000000000000000000001160434416500236525ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7-javadoc.jar000066400000000000000000000504121160434416500300410ustar00rootroot00000000000000PK Y;8 META-INF/PK Y;8'u_nMETA-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt*AzL t 4K|3+KRs<4yxPK Y;8 resources/PK Y;8it/PK Y;8 it/anttasks/PK Y;8it/anttasks/class-use/PK Y;8jstylesheet.cssN0E͊*@!@b=i&KT8-Ub{qnT,A5'P2V,R Ve B$,4)0ZIJ +n9A\ʰn&"]G5t[S8XO&LY;^11;Pw{Ƅۣ#sVtG +jOU_jw,/6Quw Zijc[P)J)D&qEj-3ӜøYpzj5i\H| K5T$Yfl޳CnwM+?_6{YҤ)ܿ93C9''۹o/y{,όW[U3CsL?ye:{|r{_PK Y;8]allclasses-noframe.htmlMoo0S\-Mj5!M,$a(&7X7bZe~1dS=s!٬bX,k&! cqD!11-HK7Kh l&ޫC=uHfVBȹ3%Vt r5ѐ&XK ?Vߎ6'=~F@y ?mɂ0&0)ų q'PL(prbU{Jܤ̍akh4F~]CXS)_( ThYͨdqEHEi௒EG#'MߡSpT=c ~+VJ"*>ڗqQè/7GNG^< u{™Ka.l#S,]4o-/he݌s3n@ !ȋ(4,\d['kE^"X_ymDrPJۋ3ʅ⪾o5p\d:W+lp{jA:2¿PK Y;8Gc Z! help-doc.htmlZmsHίU N6U9悁9ܗB͌ # ^%T{&nП\7#vG8 {y}o'^g+ЄI,"pVƤ=oݺn?Vf$]Ӯ5h4r;Kh+Ao'ፌF.~H8hKSHbg1Mp+>3 |8;{fw5俲przIldlc*[1aҴIի_8' ڵt2JFld ؀/􃆡JFRh Ь@' /J.3W@s՚-#h9'f,l>?RqiCYہj53w}5T7,V֠OqOPL-U Olj)rZѭB D%2tˀԍ8Wb]n݉"ϧy\"ONJ${cS۷EL|`?^m1 ۵d *1@? 5LR)Y]+'4J(:0u/yZVBcf%H:MњJl!RQ:,$v>dv,W&5@+36#7Q4H{D𬭸 At6\t^ 0HdZ1+g (.JyKmh.$4xJÅc S޾)(t^UEd :dYMhTuƟ'X|$aZm ZbNJ".0OLܸDnVX_7]!c#yuYz^#":aZHhr}'UuAE"&ơ ~ ."mLSuI`_1RY.1=flumϭ4~J!9>8()H"LIQw`0V<P*X= rb:el=C*XqRR`aQ4ʈݪ-kμ;[ֿjT258.a%2SGe6)0ֹwM-~N'`lS9=ʾl'Y2Cxyb_UO 0?p[y$md';Qwvt~n˃w\L{^Ȟ4&6i=P.%ɵ)mk=YPޖ=ZJtFNp3l]ט6ţIXqy&S\E{R ނ^Q̠1SF`\VDRheH[+$ui+:LVs[hi&HU^NUU t{#ާ2cbU_^c׺spV f葯 m7 _ GeNeU>Cf¤JC/_PK Y;8hGconstant-values.html_O8)f]xHVAR) k*5pʤI7vE7NB q'Fj(;/tЇ:\ a﹆Qכ-D";8archzK yY ڟ:l~jSh7P*dn7$ϤF列@\,"7YA+bdx?=6LVh^+D~,"]ńsI@K A$%TcF9rސֳE\$SW,V{8_D|ggm#V=H5ZZM@ 7*hN]s0bHܷacв`St4\r}=Bge[W3Lգ{5 peLX**P_=)˰h){ɨv}~b{ 5aSU^h'pdEqK߾EuEſ--Ŷؖb[Z'*>.SauӻҭCG%jD\b:OPK Y;8sV % index.htmlQo0)*mRJUҕ (=p0BʷiӞb~K|1~e?)jIsmnԁT/9js&$rZ9C/AS j^ ᨰv*!T aSYEtnAVi*u`˃\nr(W8 0* <.ӇPj8K G4u"Wm#%i~PK Y;8lvsoverview-tree.htmlXmoHίR]|l'Us X€cl&ܗj71 6vS.N釓d/<|9{0 !OzCU3=0\Vz Y$hj^:|~hR_yqeȘtHdOծbӴ-ivNn5 ,cl w.4a6IΗvg &F3|vGjT> ƾ& Ku򌳌knTrKGhQ2nP;8O^WqRZ0H_`gD,;@hy]O`)%egPEJteJGoiԊyCԒߥ1U'RRA%t9*XD #^Ŝ8?&zؾdQ6!l/IS>sZWtz{#\̢^xH F s;0,u9K8U9bw*]'j;"cӞ5UT8:BoetqA/<]gMÖߗ\[OtcdץZ&voA/\T8]2v:mc> ONF#;:Twx@ڻ{~ Rai*#_.Eܶ -{$C8Å*}Z)?ds7g4aB!(GxCO|} PK Y;8B/4 packages,K+)I,.PK Y;81 package-list,K+)I,.PK Y;8 index-all.htmlXmFίpjblEIs` |Gk$iZU=gΩm|oqKJd;3;OcCwYѴ}MBd69IYJMG234m^c5˧Zk36ON$ NDJ EL/۴J&є \dE&YeLv Y 2H 7nk{݂Bz Bk&p` s L oT2z ьex۷TtC+9~KV43e'&1A-@րR߀9vU$I:`Ih1ϡ =K*rɈR҃C`h]o_Dy`(pL#~f2d0f m4$gArXs>`kOb|*}AKxV< y=K&TblB@ad~[FT}%/XBrusx@t@z<%yI^r:4{Czoو%G j c4cӲy06b{5O,b/Pfdrd3<"4IDt5* gu >D 9rABs>TsZ!bG>F>wc]c5.}^S9SOHQ|Ob&Hc1~E 唪@>]!j ZڮOM Cl?GǭD&UL E;eהbPK/:WL* Υط?0 vl` 1O$0OUu>fg_B!5#Jp1+jU0PwZ-]W[h*YJ]d$/\ 4MmGfXs7G};5Q M]&+=uYW.s!wq5D$݅tdnYАfI~sOԍ6*ġε[#t@%q ܲG qZG!0sJn' JfWYUG|hn556ؗ,#pX!>Gs_p5!T X~/-nL#`N,p,5{!ww]s Cݿ͗cֹv%~n 7-}%zC&-nD@ NT?qLW׿PK Y;8nd}deprecated-list.htmlXo6_qe6yd;)ŒYmdL`l&֢HD ;Rg>ÀLw;2߹C/~g 1 %P7,-bg)K cX,@FD%FebL5|1`7\p*e?vK"L1\_lfq2~740K:8f~Jxߣ6H`:qTTh~ ʙE&&,/a}UkHԧ=]s4#lSSrpVpXbE6GW4쁿_3JpfwX /& D* pyM]*1e[3N(-< d#yz2g >SWt:!yeIP2jf't/sℽ0b <,M26&QQc-R;v-eTظGol~/"TӰGm<6ܘmA<脑!: ߥi^o`R9lG͑yxѥETEy`>. áE6I"_yص-$=$ÅΫrbq_\Ɵ MMEꀍn1qhHi :OpV R!44s˄g$ӦgvGsy SFŃJ׉dC"oKK0(&c5U]KfDȹ3kt ;jNh PJxOzeJ͉9aP|`3{2{ -k =2&>ha8Z(&A. n8HߪvHܤȌak$!iR2 Kzf|PKBBaAd}jv]#c2_'#_IG#'MV!SpTc UNJ\"Xe_{щba_rPJNj S,2u m'F`*[~r{'֡2PK Y;8Ũit/anttasks/package-use.htmlXSF~_Lxd2IY-y 4}a*Brug;L'{N 4-~}WANO~bفo CZ\2-rv S)gm{\Z(lSyYQnM䄴 iF|9dW4t I89/؂M1]lMj7[P0ˡ͏ÏZ!@3t%ϥIogD/Rc=񔕂K7h6hڣm|\@q C6F ˥dZހ-x^.g TNArY>Yղ{}ñM ! !o3.Ktjc!$a%eߝ20Z`8#? )H֡@q$ \:OĚO%Me? gJ7!լK.@+v!Ӊ9~d9M%dg`wT1Q/wCӎfptₕ粘ցiu:37+] ju!t$Y/'.i6?~A/:ơ?z`%]2Q(w~y7$b+}e:y~Br{x 6v lC@{ǑK:$pZkHD*UQg +o-u|7.^s\tu:vS7 73&Dc;t _&oe2V#v+KΟ\rg6᳒UY0Tȧ KdY@=%|Xʟ YyĀ%&CG=<-P\o)bx\_n)˽.އzDWd+1|*[qaen jrKL;Qjs)3w'4WlzW#U0j&q.۩@kQ{2*`.+U3lW{lS;b҉)&͓I-%(Q^8 Gy(/QMY&M٭rx3ea \Xԗ'PK Y;8C#Af it/anttasks/package-summary.htmlXmo6_qe6 vRk,$'^mɐvݗX"ym7w$%Dz4"$HϽ;OХ>zÁ İGey f4gi8KYbY~@̅Xzm,hdurl%YVps&f<1N;^S >,2Nf2V&~a)_Aue\B| JȧH`clf0͂M,Y^pa&˟Mtw0Y*+ 8OIP51󄳂:s(e>t1m6WU*-aȷYg jClz#rpM qbι CXZ4-PYmbʙjM!DN+7)tOC"/y(pL2h`:4 ?8l|,GghZZ/}FN_okitzzn8 #fiH;uD>pxsjU'RYId U:pc9JB;iq/-9(0y)&qzUr7uzCzaIg6i50px 8)=WQxn4r6QGѭ_`L&6 تr'J}#?]y!lkģ:D ppds˱rsH;S2^woOR[}ΒHMXQ|*2*ZwŶ2b`P8t-EΧOI\6[~,5!Rada` }3*zt)/n_EC~5GrT;r[LlWLa2pǑּuN}=S.ZUGn_,D@#UTw5o,~}K8~#6>ݽ7m{;ŎSYxaEή75u\X{qxzei۝ ^7Akvs |T~6ʞ[4GZlՏշʀVZoGId ij&L%1c|UG$q4kfsJ}j|l W5UgN]qm1k8é Mg~.6Y>w817,ITq?aR.$:S\it =]YC>M(!^ ҋ^gO =x*S&&3^dtD i7]l.a(Ѓ,ێi!w+Vk5M{9\-yN{|OLo3϶vycg0F=Օ ԠQ$]_Mf,M *$Fˉ*!Msm̿$'j #0ʝعNebijlyj g##68Cxg֧f,LL&C yχeNe!PH44'ĉ)Rix;g(Vcyy=pV% pŒD8uoOݬMҶHzBH;p0Ң=tN fmDG ϔtċ ›#Y/u>Y7| "Ь'7)YlEa 74Q`7E3Ӛ _8 Qgk=߼q=˔_5*يXWW>KT)]T{lkA< P3^&P#Wd_=Ћ!BT5U޲&~ 8|p*OR)vmťҎ)JSMMH|ڳ8Kp`vJsybN1Flcb@wNwJ.Q]fQwEkLA\Gy><+Mr=7YeU6~H>7{V]TX?;#^QDIi)ƃ-~|K+Fbj'YLiqT+ lE~vtqw41HC[9 PU(2G^P33phF{͟c6?PK Y;8 d"PTit/anttasks/package-tree.htmlXmo6_qe5 vRk,%'lɐvݗX"y"m7w$v.V`"$2_ǻ>}?ጎG09Ӷ lۣ^5ql@KTE2Cd.mkk}dMc{.oc;+ }f!_O7M*wjNyK& .n#[Y2fж·v~f9t^A}e >NO]PL2]9dPҤ N zXO Rp|Of[=#˥dZ cBYXd~ c9 %8֩(e|1cWNCkכFw@!Bf\9`!!eߝ2L0Z`t8PhyCI.$ \.D'bgŚ2`%BՐj!.@+v!Fy:FQʟ YyԹƘ]<Pī%Ma_WUqc2Ɵm˛.Y~bLD!.̼, obs\4^oۺn p7=_MP2c|b)Sֳ[{וIR>CYgaQB]`(Qv푝F\1QP$-Žo4ű2_YGȯ oW͔=fiD^<}J9'$"#J7$IͣxR-J'Ė[zbKOl?͖6ajCE~0 ŭr1fa1\X'PK Y;8(it/anttasks/class-use/Main.htmlXsF~_LA`g3 $FIӗF,QtwN; iΠq?uΓFA ĴG]_O[&$%y*"m!2bζW:Nb{&nc;+ ά0͐F&vNx3 6;.鴘"ͦд֧fƋ~9ByMAFax EtI˅DBa=Ɍ ?̓7?M :'m\pơnF9TX4n i.Y^. Od*3Ţ OזQpjpWc< sqses/ji%c9vθG R#qI \-:v\jRw_/GVj߱74Q׭j ~Kv0_=BInNckGzx,ֺ֘m aVj:@߮A5+X,?xB `U7⪤ﴽ, STn5 p¨n>36x+8r¯l2 @+w0 d㼅/UmsY)ƭzqXc5 g{m{ ԉ$n|]B;JK4=ڳ=ڳ=ڳ=ځ #BTCB-w*< $XsgM-"PK Y;8 AMETA-INF/PK Y;8'u_n'META-INF/MANIFEST.MFPK Y;8 Aresources/PK Y;8Ait/PK Y;8 Ait/anttasks/PK Y;8A+it/anttasks/class-use/PK Y;8j_stylesheet.cssPK Y;8](allclasses-noframe.htmlPK Y;8Gc Z! `help-doc.htmlPK Y;8M99resources/inherit.gifPK Y;8N@r% packages.htmlPK Y;81 EoptionsPK Y;8hGVconstant-values.htmlPK Y;8sV % index.htmlPK Y;8lvsdoverview-tree.htmlPK Y;8B/4 packagesPK Y;81 package-listPK Y;8 index-all.htmlPK Y;8nd}6%deprecated-list.htmlPK Y;8 )allclasses-frame.htmlPK Y;8Ũ%,it/anttasks/package-use.htmlPK Y;8C#Af 1it/anttasks/package-summary.htmlPK Y;8NjTDX6it/anttasks/package-frame.htmlPK Y;8mxh^"8it/anttasks/Main.htmlPK Y;8 d"PTi@it/anttasks/package-tree.htmlPK Y;8(Eit/anttasks/class-use/Main.htmlPKy{Jmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7-javadoc.jar.md5000066400000000000000000000000401160434416500305150ustar00rootroot00000000000000f8e4b690d305b5eca3ab7c7c54935e1amaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7-javadoc.jar.sha1000066400000000000000000000000501160434416500306650ustar00rootroot0000000000000033eab6f3f0e91c82771b9df025c231213bad4398maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7-sources.jar000066400000000000000000000013661160434416500301210ustar00rootroot00000000000000PK Y;8 META-INF/PK Y;8'u_nMETA-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt*AzL t 4K|3+KRs<4yxPK j6it/PK b6 it/anttasks/PK Z6it/anttasks/Main.java-10Cb*KP`:(I7Txd?ٙH‹(B,vi #UKEA<_!$liCjW?PK Y;8 AMETA-INF/PK Y;8'u_n'META-INF/MANIFEST.MFPK j6Ait/PK b6 Ait/anttasks/PK Z6it/anttasks/Main.javaPK'maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7-sources.jar.md5000066400000000000000000000000401160434416500305710ustar00rootroot0000000000000091b7e34f3a373a633645143e23745a7cmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7-sources.jar.sha1000066400000000000000000000000501160434416500307410ustar00rootroot0000000000000095bea517e3a22f2812d5692eeda31518db08a880maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7.jar000066400000000000000000000043301160434416500264320ustar00rootroot00000000000000PK Y;8 META-INF/PK Y;8&aef|META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJEe]l&zFF\\PK Y;8it/PK Y;8 it/anttasks/PK Y;8i_/it/anttasks/Main.classmQ]KA=ni߹dAcDZKO :F? z; pqf o#5 %3XM[&g2t`5d n~WDm)4:<:I5#I@)>zM.:i>!Cv w=ݖdЯǛxԧn'bǺ* ;Yb8rzs>uB9,T 5_{C^FJ*ᘄԣ ;2Ȧ>,.'yT[twT'DѢ%dX)c촀p rxqoHw$lBݔQ!X%+PK Y;8META-INF/maven/PK Y;8META-INF/maven/it.ant-tasks/PK Y;8$META-INF/maven/it.ant-tasks/release/PK Y;8߼c+META-INF/maven/it.ant-tasks/release/pom.xmlTMk0KkIYZH(Wߣ/Ihicȱm9׭)mဪ *ʢ\&h= C1\FEY~7w^J*@UUVmouNjXʇ8Z BX6Xߝΰ@+@d*K EF'Xx'OPKU=F"*hoEr[{A7ZJ=@Ѩ -c?6T걜SLifl N^WI6,#V}8W{~rsoD7n~v}!jΨ54ve4LK; 19y)7|={2o!317*i|j+ý4֛oeh ! M=1mzXPK Y;8WBgh2META-INF/maven/it.ant-tasks/release/pom.properties 0 {"y-BE4PiLGi_uga% ?|sH0& u['^o`-y.:,~9F0PK Y;8 AMETA-INF/PK Y;8&aef|'META-INF/MANIFEST.MFPK Y;8Ait/PK Y;8 Ait/anttasks/PK Y;8i_/ it/anttasks/Main.classPK Y;8AMETA-INF/maven/PK Y;8AMETA-INF/maven/it.ant-tasks/PK Y;8$AMETA-INF/maven/it.ant-tasks/release/PK Y;8߼c+FMETA-INF/maven/it.ant-tasks/release/pom.xmlPK Y;8WBgh2QMETA-INF/maven/it.ant-tasks/release/pom.propertiesPK maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7.jar.md5000066400000000000000000000000401160434416500271100ustar00rootroot000000000000002482afb81c80ac963265c9fb75071307maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7.jar.sha1000066400000000000000000000000501160434416500272600ustar00rootroot00000000000000aa6046f1cb58d9e8b9c6875a6cc3fe8026df017cmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7.pom000066400000000000000000000025431160434416500264550ustar00rootroot00000000000000 4.0.0 it.ant-tasks release jar Maven Ant Tasks IT release with sources and javadoc 2.0.7 org.apache.maven.plugins maven-source-plugin attach-sources verify jar org.apache.maven.plugins maven-javadoc-plugin attach-sources verify jar repo file://${user.dir}/repo maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7.pom.md5000066400000000000000000000000401160434416500271270ustar00rootroot00000000000000d61fd4a138230282089252132af361c2maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/2.0.7/release-2.0.7.pom.sha1000066400000000000000000000000501160434416500272770ustar00rootroot000000000000003db9440a690c000f1086fb2aa527e1c8fa22620bmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/maven-metadata.xml000066400000000000000000000004471160434416500266210ustar00rootroot00000000000000 it.ant-tasks release 2.0.7 2.0.7 20080127101451 maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/maven-metadata.xml.md5000066400000000000000000000000401160434416500272720ustar00rootroot000000000000004e9dbd4786dd8629755112dd71b7f82fmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/release/maven-metadata.xml.sha1000066400000000000000000000000501160434416500274420ustar00rootroot000000000000002b2c4f3a8199940c9b4fec5f6a712fc69ff89b75maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/000077500000000000000000000000001160434416500255675ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT/000077500000000000000000000000001160434416500274705ustar00rootroot00000000000000maven-metadata.xml000066400000000000000000000005001160434416500330120ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT it.ant-tasks snapshotUniqueFalse 2.0.7-SNAPSHOT 1 20070610180522 maven-metadata.xml.md5000066400000000000000000000000401160434416500334750ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOTd1d30292e56f1247de26b7e5a6123da5maven-metadata.xml.sha1000066400000000000000000000000501160434416500336450ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT11c3918c1a10cbbf0e10537fc1fe250cb4051674snapshotUniqueFalse-2.0.7-SNAPSHOT.jar000066400000000000000000000031011160434416500360020ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOTPK 6 META-INF/PK 60&f|META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJEe]lz񆆼\\PK 6META-INF/maven/PK 6META-INF/maven/it.ant-tasks/PK 60META-INF/maven/it.ant-tasks/snapshotUniqueFalse/PK 6E]7META-INF/maven/it.ant-tasks/snapshotUniqueFalse/pom.xmlR]k0}W& vtcorצ5&]c/iǜ{ϹVZmxbѡ,kk!!%PAXg1GA8=5~ݒxpB!p2bhpB,C hIC*+MgJ0/ʵIʄ mhl % i$Tf5pJ^Rm!2gД>{Prh,-ZuhD|8[}L8 2#csv6J:ْ cx]cKJMETA-INF/maven/it.ant-tasks/snapshotUniqueFalse/pom.properties 0@}"uC HЅO0کeR3owqnC f$ULXZXlksz}mԌCkڟWWbCI-oV$`Wo-|PK 6 AMETA-INF/PK 60&f|'META-INF/MANIFEST.MFPK 6AMETA-INF/maven/PK 6AMETA-INF/maven/it.ant-tasks/PK 60A&META-INF/maven/it.ant-tasks/snapshotUniqueFalse/PK 6E]7tMETA-INF/maven/it.ant-tasks/snapshotUniqueFalse/pom.xmlPK 6#z~>&META-INF/maven/it.ant-tasks/snapshotUniqueFalse/pom.propertiesPK/snapshotUniqueFalse-2.0.7-SNAPSHOT.jar.md5000066400000000000000000000000401160434416500364650ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOTe79b88841ed827762ba9ec61a8f7d11bsnapshotUniqueFalse-2.0.7-SNAPSHOT.jar.sha1000066400000000000000000000000501160434416500366350ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT6c2631cc342671b17302af817a0b2d2231749a0esnapshotUniqueFalse-2.0.7-SNAPSHOT.pom000066400000000000000000000012601160434416500360250ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT 4.0.0 it.ant-tasks snapshotUniqueFalse jar Maven Ant Tasks IT SNAPSHOT uniqueVersion="false" 2.0.7-SNAPSHOT repo file://${user.dir}/snapshotUniqueFalse false snapshotUniqueFalse-2.0.7-SNAPSHOT.pom.md5000066400000000000000000000000401160434416500365040ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOT8bb41bff31db1754472637ed43c02dcesnapshotUniqueFalse-2.0.7-SNAPSHOT.pom.sha1000066400000000000000000000000501160434416500366540ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/2.0.7-SNAPSHOTb69533a448a5b488a70ff2c27d5f503cdf40b59emaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/maven-metadata.xml000066400000000000000000000005051160434416500311750ustar00rootroot00000000000000 it.ant-tasks snapshotUniqueFalse 2.0.7-SNAPSHOT 2.0.7-SNAPSHOT 20070610180522 maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/maven-metadata.xml.md5000066400000000000000000000000401160434416500316530ustar00rootroot000000000000002f304ab4c413fcfbf176d56ea1a8e74amaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueFalse/maven-metadata.xml.sha1000066400000000000000000000000501160434416500320230ustar00rootroot0000000000000020e10fa808f4ec4c7b2628e6c9999b09c11ea65bmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/000077500000000000000000000000001160434416500254545ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT/000077500000000000000000000000001160434416500273555ustar00rootroot00000000000000maven-metadata.xml000066400000000000000000000005541160434416500327100ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT it.ant-tasks snapshotUniqueTrue 2.0.7-SNAPSHOT 20070610.180356 1 20070610180356 maven-metadata.xml.md5000066400000000000000000000000401160434416500333620ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT4a75053fb8d1c96dd7957d7764121904maven-metadata.xml.sha1000066400000000000000000000000501160434416500335320ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOTe91515c9ce29ab01b52587a787e4fa44496e8c6fsnapshotUniqueTrue-2.0.7-20070610.180356-1.jar000066400000000000000000000030711160434416500361250ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOTPK }6 META-INF/PK |60&f|META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJEe]lz񆆼\\PK }6META-INF/maven/PK }6META-INF/maven/it.ant-tasks/PK }6/META-INF/maven/it.ant-tasks/snapshotUniqueTrue/PK q6DW[6META-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.xmlR]k0}W&MSf7&YkMVc}Iks>=Z)CY(; Ր¼Z`mr2d#rxxQtOKJeT8CۀSrZchp7XFlBԙ(ބn:kPryQnt]M2&s!ptWprSpOxe^EbjA.ԖRl %Ϟg/}Z4V MxOcQnE@Ic1yߵy ;%,ɤ#?j՘+R(~Gv^DmZQ2cơզ`+Yw 3i~ȵCxv^A_`mr=%:?~PK |6}Gz}=META-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.properties 0@}"uXB )|@v Lj2)fqV;b(4Op&Vͬ:XvAfysSt{/YjI '>8wo&3?PK }6 AMETA-INF/PK |60&f|'META-INF/MANIFEST.MFPK }6AMETA-INF/maven/PK }6AMETA-INF/maven/it.ant-tasks/PK }6/A&META-INF/maven/it.ant-tasks/snapshotUniqueTrue/PK q6DW[6sMETA-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.xmlPK |6}Gz}="META-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.propertiesPK,snapshotUniqueTrue-2.0.7-20070610.180356-1.jar.md5000066400000000000000000000000401160434416500366020ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT59da3a1d16909a26ae8a4245a4df0fb9snapshotUniqueTrue-2.0.7-20070610.180356-1.jar.sha1000066400000000000000000000000501160434416500367520ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT6e7b36dcfa105ad2c15b040abac8dedc831bf643snapshotUniqueTrue-2.0.7-20070610.180356-1.pom000066400000000000000000000012541160434416500361450ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOT 4.0.0 it.ant-tasks snapshotUniqueTrue jar Maven Ant Tasks IT SNAPSHOT uniqueVersion="true" 2.0.7-SNAPSHOT repo file://${user.dir}/snapshotUniqueTrue true snapshotUniqueTrue-2.0.7-20070610.180356-1.pom.md5000066400000000000000000000000401160434416500366210ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOTa4e79877d5c1a2d65cb504a2900e0a4esnapshotUniqueTrue-2.0.7-20070610.180356-1.pom.sha1000066400000000000000000000000501160434416500367710ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.7-SNAPSHOTcaff40094a5b98048b9d8527a06b68dc7c67fe7dmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOT/000077500000000000000000000000001160434416500273565ustar00rootroot00000000000000maven-metadata.xml000066400000000000000000000005541160434416500327110ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOT it.ant-tasks snapshotUniqueTrue 2.0.8-SNAPSHOT 20070610.180356 1 20070610180356 maven-metadata.xml.md5000066400000000000000000000000401160434416500333630ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOT4a75053fb8d1c96dd7957d7764121904maven-metadata.xml.sha1000066400000000000000000000000501160434416500335330ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOTe91515c9ce29ab01b52587a787e4fa44496e8c6fsnapshotUniqueTrue-2.0.8-20070610.180356-1.jar000066400000000000000000000030711160434416500361270ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOTPK }6 META-INF/PK |60&f|META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJEe]lz񆆼\\PK }6META-INF/maven/PK }6META-INF/maven/it.ant-tasks/PK }6/META-INF/maven/it.ant-tasks/snapshotUniqueTrue/PK q6DW[6META-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.xmlR]k0}W&MSf7&YkMVc}Iks>=Z)CY(; Ր¼Z`mr2d#rxxQtOKJeT8CۀSrZchp7XFlBԙ(ބn:kPryQnt]M2&s!ptWprSpOxe^EbjA.ԖRl %Ϟg/}Z4V MxOcQnE@Ic1yߵy ;%,ɤ#?j՘+R(~Gv^DmZQ2cơզ`+Yw 3i~ȵCxv^A_`mr=%:?~PK |6}Gz}=META-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.properties 0@}"uXB )|@v Lj2)fqV;b(4Op&Vͬ:XvAfysSt{/YjI '>8wo&3?PK }6 AMETA-INF/PK |60&f|'META-INF/MANIFEST.MFPK }6AMETA-INF/maven/PK }6AMETA-INF/maven/it.ant-tasks/PK }6/A&META-INF/maven/it.ant-tasks/snapshotUniqueTrue/PK q6DW[6sMETA-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.xmlPK |6}Gz}="META-INF/maven/it.ant-tasks/snapshotUniqueTrue/pom.propertiesPK,snapshotUniqueTrue-2.0.8-20070610.180356-1.jar.md5000066400000000000000000000000401160434416500366040ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOT59da3a1d16909a26ae8a4245a4df0fb9snapshotUniqueTrue-2.0.8-20070610.180356-1.jar.sha1000066400000000000000000000000501160434416500367540ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOT6e7b36dcfa105ad2c15b040abac8dedc831bf643snapshotUniqueTrue-2.0.8-20070610.180356-1.pom000066400000000000000000000012541160434416500361470ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOT 4.0.0 it.ant-tasks snapshotUniqueTrue jar Maven Ant Tasks IT SNAPSHOT uniqueVersion="true" 2.0.7-SNAPSHOT repo file://${user.dir}/snapshotUniqueTrue true snapshotUniqueTrue-2.0.8-20070610.180356-1.pom.md5000066400000000000000000000000401160434416500366230ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOTa4e79877d5c1a2d65cb504a2900e0a4esnapshotUniqueTrue-2.0.8-20070610.180356-1.pom.sha1000066400000000000000000000000501160434416500367730ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/2.0.8-SNAPSHOTcaff40094a5b98048b9d8527a06b68dc7c67fe7dmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/maven-metadata.xml000066400000000000000000000005041160434416500310610ustar00rootroot00000000000000 it.ant-tasks snapshotUniqueTrue 2.0.7-SNAPSHOT 2.0.7-SNAPSHOT 20070610180356 maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/maven-metadata.xml.md5000066400000000000000000000000401160434416500315400ustar00rootroot00000000000000747d1d058c5d7487cd045cd2bf0dac16maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/snapshotUniqueTrue/maven-metadata.xml.sha1000066400000000000000000000000501160434416500317100ustar00rootroot000000000000000dd3f3bc656120aff33b5c3d20d9422a6632682fmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/000077500000000000000000000000001160434416500234625ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/000077500000000000000000000000001160434416500250305ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/wagon-foo-1.0-beta-2.jar000066400000000000000000000046461160434416500310000ustar00rootroot00000000000000PK 6 META-INF/PK 60&f|META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJEe]lz񆆼\\PK Q6META-INF/plexus/PK 6it/PK 6 it/anttasks/PK Q6UK0META-INF/plexus/components.xmlmA E^ 'ؒ Qmи!y7C>n┙Tw$u>hIሞl!ôMpGe;ݸ+oG)GLH`A,Ե3{tRÞ*XLd^oY'+կCQPK 6e0it/anttasks/FooWagon.classmO1N@MCBt R*s$]twQ!QXq+t_a #Bzm7ل!Jf55AKUK_r"|+&qakqi#Qꗚ?ܻ+B~72cHN0gYK08~m3j~Ln;N_4Z1U7z_;vEPK 6META-INF/maven/PK 6META-INF/maven/it.ant-tasks/PK 6&META-INF/maven/it.ant-tasks/wagon-foo/PK {6(_n-META-INF/maven/it.ant-tasks/wagon-foo/pom.xmln0D|z('FV$R@UohI`H6v$zƉ*%r. ;c1c%PP !*gyF4a!gͿ麮ia[2[.|8).?{hCzY?2c bAjP&0:bW Bj챆\`+eZ\TnǞPb8d" Y!d"˗b<_ߘƞuE jk EQvOו53;Q=;./g^Oiu}⛣{ ȱDa. +gS#oFK4>͸d ./n;k~PK 61"Gmp4META-INF/maven/it.ant-tasks/wagon-foo/pom.properties 0 {"RC<164 j2HF:  G2^p@; cf|e=uK[#7sLAJ&6r5lQJsF铀f;G[UPK 6 AMETA-INF/PK 60&f|'META-INF/MANIFEST.MFPK Q6AMETA-INF/plexus/PK 6Ait/PK 6 Ait/anttasks/PK Q6UK08META-INF/plexus/components.xmlPK 6e0it/anttasks/FooWagon.classPK 6AMETA-INF/maven/PK 6ALMETA-INF/maven/it.ant-tasks/PK 6&AMETA-INF/maven/it.ant-tasks/wagon-foo/PK {6(_n-META-INF/maven/it.ant-tasks/wagon-foo/pom.xmlPK 61"Gmp4META-INF/maven/it.ant-tasks/wagon-foo/pom.propertiesPK NBmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/wagon-foo-1.0-beta-2.jar.md5000066400000000000000000000000401160434416500314440ustar00rootroot00000000000000ccc75b04bc295209cb7573ead5582ef0maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/wagon-foo-1.0-beta-2.jar.sha1000066400000000000000000000000501160434416500316140ustar00rootroot000000000000006313864dafeff900b2ffdef9968f64ea437ffdb0maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/wagon-foo-1.0-beta-2.pom000066400000000000000000000014211160434416500310030ustar00rootroot00000000000000 4.0.0 it.ant-tasks wagon-foo jar Maven Ant Tasks IT SNAPSHOT wagon foo 1.0-beta-2 org.apache.maven.wagon wagon-file 1.0-beta-2 repo file://${user.dir}/repo maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/wagon-foo-1.0-beta-2.pom.md5000066400000000000000000000000401160434416500314630ustar00rootroot00000000000000b344cb511b170ba2084b8ea854371effmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/1.0-beta-2/wagon-foo-1.0-beta-2.pom.sha1000066400000000000000000000000501160434416500316330ustar00rootroot0000000000000059d868fd2aeb0fd33679d7bd6264482e70a197d0maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/maven-metadata.xml000066400000000000000000000004631160434416500270730ustar00rootroot00000000000000 it.ant-tasks wagon-foo 1.0-beta-2 1.0-beta-2 20070619175310 maven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/maven-metadata.xml.md5000066400000000000000000000000401160434416500275460ustar00rootroot000000000000002bb4e14969cc07bab03b456d073dd3dbmaven-ant-tasks-2.1.3/src/test/repo/it/ant-tasks/wagon-foo/maven-metadata.xml.sha1000066400000000000000000000000501160434416500277160ustar00rootroot000000000000001f6154e5f4e65fc6eeaa7cfd37b201cfeed3dea9maven-ant-tasks-2.1.3/src/test/resources/000077500000000000000000000000001160434416500203125ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/resources/test-tasks.xml000066400000000000000000000002241160434416500231340ustar00rootroot00000000000000 maven-ant-tasks-2.1.3/src/test/settings-empty.xml000066400000000000000000000000251160434416500220130ustar00rootroot00000000000000maven-ant-tasks-2.1.3/src/test/settings-mirror-complex.xml000066400000000000000000000014231160434416500236370ustar00rootroot00000000000000 mirror-ca file:./target/null-repo *,!test mirror-cb file:./target/null-repo foo,yat mirror-cc file:./src/test/repo yat mirror-cd file:./src/test/repo dummy,test maven-ant-tasks-2.1.3/src/test/settings-mirror-wildcard.xml000066400000000000000000000006201160434416500237570ustar00rootroot00000000000000 mirror-b file:./src/test/repo * maven-ant-tasks-2.1.3/src/test/settings-mirror.xml000066400000000000000000000006361160434416500221770ustar00rootroot00000000000000 mirror-a file:./src/test/repo fake-repository maven-ant-tasks-2.1.3/src/test/settings-profile-default.xml000066400000000000000000000013471160434416500237470ustar00rootroot00000000000000 test-repo true test.repo file:./src/test/repo false true maven-ant-tasks-2.1.3/src/test/settings-profile-file.xml000066400000000000000000000013471160434416500232420ustar00rootroot00000000000000 test-repo ./pom.xml test.repo file:./src/test/repo false true maven-ant-tasks-2.1.3/src/test/simple-pom.xml000066400000000000000000000002741160434416500211070ustar00rootroot00000000000000 4.0.0 org.apache.maven.test sample-build-test 2.0-beta-4-SNAPSHOT