mirror of https://github.com/apache/activemq.git
Removing the mave-dependency-plugin... this was a little experiment to see if we could use a plugin to dump all the activemq dependencies to a local repository. Seem that the assembly plugin can allready do this, but the maven-proxy project http://maven-proxy.codehaus.org/ can do it even better.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@432448 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73e5a3024c
commit
8f112fe208
|
@ -1,19 +0,0 @@
|
|||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-archiver/1.0-alpha-3/plexus-archiver-1.0-alpha-3.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0/maven-model-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
|
||||
</classpath>
|
|
@ -1,18 +0,0 @@
|
|||
<projectDescription>
|
||||
<name>maven-dependency-plugin</name>
|
||||
<comment>The Apache Software Foundation provides support for the Apache community of open-source software projects.
|
||||
The Apache projects are characterized by a collaborative, consensus based development process, an open and
|
||||
pragmatic software license, and a desire to create high quality software that leads the way in its field.
|
||||
We consider ourselves not simply a group of projects sharing a server, but rather a community of developers
|
||||
and users.</comment>
|
||||
<projects/>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments/>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,5 +0,0 @@
|
|||
#Tue Jun 13 01:49:56 EDT 2006
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.source=1.4
|
||||
org.eclipse.jdt.core.compiler.compliance=1.4
|
|
@ -1,68 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>ActiveMQ :: Dependency Plugin</name>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>apache-repo</id>
|
||||
<name>Apache CVS Repository</name>
|
||||
<url>scp://minotaur.apache.org/www/cvs.apache.org/maven-snapshot-repository</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>apache-snapshots</id>
|
||||
<name>Apache CVS Development Repository</name>
|
||||
<url>scp://minotaur.apache.org/www/cvs.apache.org/maven-snapshot-repository</url>
|
||||
</snapshotRepository>
|
||||
<site>
|
||||
<id>apache-website</id>
|
||||
<url>scpexe://people.apache.org/www/incubator.apache.org/activemq/maven/tooling/maven-dependency-plugin/</url>
|
||||
</site>
|
||||
</distributionManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/incubator/activemq/trunk/tooling/maven-dependency-plugin</connection>
|
||||
<developerConnection>scm:svn:http://svn.apache.org/repos/asf/incubator/activemq/trunk/tooling/maven-dependency-plugin</developerConnection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/incubator/activemq/trunk/tooling/maven-dependency-plugin/</url>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>1.0-alpha-3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-artifact</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-project</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,152 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.apache.activemq.maven;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
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.repository.ArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
|
||||
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
|
||||
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
/**
|
||||
* This is a useful little mojo that allows you to copy all the transitive
|
||||
* dependencies to a specified deployment repository. Great if you want to create
|
||||
* a new repo for your project's dependencies.
|
||||
*
|
||||
* @goal deploy-dependencies
|
||||
* @requiresDependencyResolution compile
|
||||
* @phase process-sources
|
||||
*/
|
||||
public class DeployDependenciesMojo extends AbstractMojo {
|
||||
|
||||
/**
|
||||
* @parameter expression="${project}"
|
||||
* @readonly
|
||||
* @required
|
||||
*/
|
||||
private MavenProject project;
|
||||
|
||||
/**
|
||||
* @parameter expression="${reactorProjects}"
|
||||
* @required
|
||||
* @readonly
|
||||
*/
|
||||
private List reactorProjects;
|
||||
|
||||
/**
|
||||
* @parameter expression="${component.org.apache.maven.artifact.deployer.ArtifactDeployer}"
|
||||
* @required
|
||||
* @readonly
|
||||
*/
|
||||
private ArtifactDeployer deployer;
|
||||
|
||||
/**
|
||||
* @parameter expression="${localRepository}"
|
||||
* @required
|
||||
* @readonly
|
||||
*/
|
||||
private ArtifactRepository localRepository;
|
||||
|
||||
/**
|
||||
* @parameter
|
||||
*/
|
||||
private ArtifactRepository deploymentRepository;
|
||||
|
||||
/**
|
||||
* @parameter
|
||||
*/
|
||||
private String deploymentRepositoryId;
|
||||
|
||||
/**
|
||||
* @parameter
|
||||
*/
|
||||
private String deploymentRepositoryUrl;
|
||||
|
||||
/**
|
||||
* @parameter
|
||||
*/
|
||||
private ArtifactRepositoryLayout deploymentRepositoryLayout = new DefaultRepositoryLayout();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void execute() throws MojoExecutionException {
|
||||
|
||||
if ( deploymentRepository == null )
|
||||
{
|
||||
deploymentRepository = new DefaultArtifactRepository(deploymentRepositoryId, deploymentRepositoryUrl, deploymentRepositoryLayout);
|
||||
}
|
||||
|
||||
|
||||
getLog().info("repo type="+deploymentRepository.getClass());
|
||||
|
||||
String protocol = deploymentRepository.getProtocol();
|
||||
|
||||
if( protocol.equals( "scp" ) )
|
||||
{
|
||||
File sshFile = new File( System.getProperty( "user.home" ), ".ssh" );
|
||||
|
||||
if( !sshFile.exists() )
|
||||
{
|
||||
sshFile.mkdirs();
|
||||
}
|
||||
}
|
||||
|
||||
Set dependencies = new HashSet();
|
||||
|
||||
for (Iterator i = reactorProjects.iterator(); i.hasNext();) {
|
||||
MavenProject p = (MavenProject) i.next();
|
||||
List dependencyArtifacts = p.getTestArtifacts();
|
||||
|
||||
if( dependencyArtifacts !=null )
|
||||
dependencies.addAll(dependencyArtifacts);
|
||||
}
|
||||
|
||||
for (Iterator iter = dependencies.iterator(); iter.hasNext();) {
|
||||
Artifact artifact = (Artifact) iter.next();
|
||||
deploy( artifact );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void deploy(Artifact artifact) throws MojoExecutionException {
|
||||
try
|
||||
{
|
||||
getLog().info( "Copying " + artifact.getFile().getAbsolutePath() + " to " + deploymentRepository );
|
||||
deployer.deploy( artifact.getFile(), artifact, deploymentRepository, localRepository );
|
||||
}
|
||||
catch ( ArtifactDeploymentException e )
|
||||
{
|
||||
throw new MojoExecutionException( e.getMessage(), e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -33,7 +33,6 @@
|
|||
<module>maven-activemq-memtest-plugin</module>
|
||||
<module>maven-activemq-perf-plugin</module>
|
||||
<module>maven-activemq-plugin</module>
|
||||
<module>maven-dependency-plugin</module>
|
||||
<module>maven-bundle-plugin</module>
|
||||
<module>maven-gram-plugin</module>
|
||||
</modules>
|
||||
|
|
Loading…
Reference in New Issue