You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ra...@apache.org on 2007/10/22 23:40:49 UTC
svn commit: r587273 - in
/maven/sandbox/branches/archetypeng-shared-maven-artifact: ./
archetype-old/ archetypeng-common/
archetypeng-common/src/main/java/org/apache/maven/archetype/
archetypeng-common/src/test/java/org/apache/maven/archetype/source/
Author: rafale
Date: Mon Oct 22 14:40:48 2007
New Revision: 587273
URL: http://svn.apache.org/viewvc?rev=587273&view=rev
Log:
Branching
Added:
maven/sandbox/branches/archetypeng-shared-maven-artifact/
- copied from r587260, maven/sandbox/trunk/archetypeng/
Modified:
maven/sandbox/branches/archetypeng-shared-maven-artifact/archetype-old/pom.xml
maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/pom.xml
maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java
Modified: maven/sandbox/branches/archetypeng-shared-maven-artifact/archetype-old/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/archetypeng-shared-maven-artifact/archetype-old/pom.xml?rev=587273&r1=587260&r2=587273&view=diff
==============================================================================
--- maven/sandbox/branches/archetypeng-shared-maven-artifact/archetype-old/pom.xml (original)
+++ maven/sandbox/branches/archetypeng-shared-maven-artifact/archetype-old/pom.xml Mon Oct 22 14:40:48 2007
@@ -31,6 +31,11 @@
<artifactId>archetype-old</artifactId>
<name>Maven Archetype old</name>
<dependencies>
+ <dependency>
+ <groupId>org.apache.maven.artifact</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
Modified: maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/pom.xml?rev=587273&r1=587260&r2=587273&view=diff
==============================================================================
--- maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/pom.xml (original)
+++ maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/pom.xml Mon Oct 22 14:40:48 2007
@@ -120,6 +120,26 @@
<version>2.0.6</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-repository</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <type>war</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-proxy</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <type>war</type>
+ <scope>provided</scope>
+ </dependency>
+ <!--dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>servlet-api-2.5</artifactId>
+ <version>6.1.4</version>
+ <scope>provided</scope>
+ </dependency-->
</dependencies>
<build>
@@ -332,6 +352,93 @@
</configuration>
<goals>
<goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3.1</version>
+ <dependencies>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>start-repository</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <wait>true</wait>
+ <container>
+ <containerId>tomcat5x</containerId>
+ <home>/home/local/apache-tomcat-5.5.23</home>
+ <systemProperties>
+ <org.apache.maven.archetype.reporitory.directory>${project.basedir}/target/repository</org.apache.maven.archetype.reporitory.directory>
+ </systemProperties>
+ </container>
+ <configuration>
+ <home>${project.basedir}/target/server-repository</home>
+ <properties>
+ <cargo.servlet.port>18881</cargo.servlet.port>
+ </properties>
+ <deployables>
+ <deployable>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-repository</artifactId>
+ <type>war</type>
+ <properties>
+ <context>/repo</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-proxy</artifactId>
+ <type>war</type>
+ <properties>
+ <context>/</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ </configuration>
+ </execution>
+ <!--execution>
+ <id>start-proxy</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <wait>false</wait>
+ <container>
+ <containerId>jetty6x</containerId>
+ <type>embedded</type>
+ </container>
+ <configuration>
+ <home>${project.basedir}/target/server-proxy</home>
+ <properties>
+ <cargo.servlet.port>18882</cargo.servlet.port>
+ </properties>
+ <deployables>
+ <deployable>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-proxy</artifactId>
+ <type>war</type>
+ <properties>
+ <context>/</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ </configuration>
+ </execution-->
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
</goals>
</execution>
</executions>
Modified: maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java?rev=587273&r1=587260&r2=587273&view=diff
==============================================================================
--- maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java (original)
+++ maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationRequest.java Mon Oct 22 14:40:48 2007
@@ -19,18 +19,35 @@
package org.apache.maven.archetype;
+import java.util.ArrayList;
+import java.util.List;
import org.apache.maven.artifact.repository.ArtifactRepository;
-
import java.util.Properties;
import org.apache.maven.archetype.catalog.Archetype;
+import org.apache.maven.settings.Mirror;
+import org.apache.maven.settings.Proxy;
+import org.apache.maven.settings.Server;
+import org.apache.maven.wagon.events.TransferListener;
/** @author Jason van Zyl */
public class ArchetypeGenerationRequest
{
+ private boolean offline;
+
+ private boolean interactiveMode;
+
+ private TransferListener transferListener;
+
private String outputDirectory;
private ArtifactRepository localRepository;
+ private Proxy activeProxy;
+
+ private List servers = new ArrayList( );
+
+ private List mirrors = new ArrayList( );
+
// Archetype definition
private String archetypeName;
@@ -53,28 +70,28 @@
private String packageName;
- private Properties properties = new Properties();
+ private Properties properties = new Properties( );
private String remoteRepository;
- public ArchetypeGenerationRequest()
+ public ArchetypeGenerationRequest( )
{
}
public ArchetypeGenerationRequest( Archetype archetype )
{
- this.archetypeGroupId = archetype.getGroupId();
+ this.archetypeGroupId = archetype.getGroupId( );
- this.archetypeArtifactId = archetype.getArtifactId();
+ this.archetypeArtifactId = archetype.getArtifactId( );
- this.archetypeVersion = archetype.getVersion();
+ this.archetypeVersion = archetype.getVersion( );
- this.remoteRepository = archetype.getRepository();
+ this.remoteRepository = archetype.getRepository( );
- this.archetypeRepository = archetype.getRepository();
+ this.archetypeRepository = archetype.getRepository( );
}
- public String getArchetypeGroupId()
+ public String getArchetypeGroupId( )
{
return archetypeGroupId;
}
@@ -86,7 +103,7 @@
return this;
}
- public String getArchetypeArtifactId()
+ public String getArchetypeArtifactId( )
{
return archetypeArtifactId;
}
@@ -98,7 +115,7 @@
return this;
}
- public String getArchetypeVersion()
+ public String getArchetypeVersion( )
{
return archetypeVersion;
}
@@ -110,7 +127,7 @@
return this;
}
- public String getArchetypeGoals()
+ public String getArchetypeGoals( )
{
return archetypeGoals;
}
@@ -122,7 +139,7 @@
return this;
}
- public String getArchetypeName()
+ public String getArchetypeName( )
{
return archetypeName;
}
@@ -134,7 +151,7 @@
return this;
}
- public String getArchetypeRepository()
+ public String getArchetypeRepository( )
{
return archetypeRepository;
}
@@ -146,7 +163,7 @@
return this;
}
- public String getArtifactId()
+ public String getArtifactId( )
{
return artifactId;
}
@@ -158,7 +175,7 @@
return this;
}
- public String getGroupId()
+ public String getGroupId( )
{
return groupId;
}
@@ -170,7 +187,7 @@
return this;
}
- public String getVersion()
+ public String getVersion( )
{
return version;
}
@@ -182,7 +199,7 @@
return this;
}
- public String getPackage()
+ public String getPackage( )
{
return packageName;
}
@@ -194,7 +211,7 @@
return this;
}
- public Properties getProperties()
+ public Properties getProperties( )
{
return properties;
}
@@ -206,7 +223,7 @@
return this;
}
- public ArtifactRepository getLocalRepository()
+ public ArtifactRepository getLocalRepository( )
{
return localRepository;
}
@@ -218,7 +235,7 @@
return this;
}
- public String getRemoteRepository()
+ public String getRemoteRepository( )
{
return remoteRepository;
}
@@ -230,8 +247,7 @@
return this;
}
-
- public String getOutputDirectory()
+ public String getOutputDirectory( )
{
return outputDirectory;
}
@@ -242,4 +258,76 @@
return this;
}
-}
+
+ public boolean isInteractiveMode( )
+ {
+ return interactiveMode;
+ }
+
+ public ArchetypeGenerationRequest setInteractiveMode( boolean interactiveMode )
+ {
+ this.interactiveMode = interactiveMode;
+
+ return this;
+ }
+
+ public boolean isOffline( )
+ {
+ return offline;
+ }
+
+ public ArchetypeGenerationRequest setOffline( boolean offline )
+ {
+ this.offline = offline;
+
+ return this;
+ }
+
+ public TransferListener getTransferListener( )
+ {
+ return transferListener;
+ }
+
+ public ArchetypeGenerationRequest setTransferListener( TransferListener transferListener )
+ {
+ this.transferListener = transferListener;
+
+ return this;
+ }
+
+ public Proxy getActiveProxy( )
+ {
+ return activeProxy;
+ }
+
+ public ArchetypeGenerationRequest setActiveProxy( Proxy activeProxy )
+ {
+ this.activeProxy = activeProxy;
+
+ return this;
+ }
+
+ public ArchetypeGenerationRequest addMirror( Mirror mirror )
+ {
+ mirrors.add( mirror );
+
+ return this;
+ }
+
+ public List getMirrors( )
+ {
+ return mirrors;
+ }
+
+ public ArchetypeGenerationRequest addMirror( Server server )
+ {
+ servers.add( server );
+
+ return this;
+ }
+
+ public List getServers( )
+ {
+ return servers;
+ }
+}
\ No newline at end of file
Modified: maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java?rev=587273&r1=587260&r2=587273&view=diff
==============================================================================
--- maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java (original)
+++ maven/sandbox/branches/archetypeng-shared-maven-artifact/archetypeng-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java Mon Oct 22 14:40:48 2007
@@ -62,29 +62,29 @@
assertEquals( "http://magicbunny.com/maven2", a1.getRepository() );
}
- public void testPuttingTheWikiSourceIntoACatalogSink()
- throws Exception
- {
- Writer writer = new StringWriter();
-
- ArchetypeDataSink sink = new CatalogArchetypeDataSink();
-
- Properties p = new Properties();
-
- p.setProperty( WikiArchetypeDataSource.URL, new File( getBasedir(), "test/sources/wiki-source.txt" ).toURI().toURL().toExternalForm() );
-
- sink.putArchetypes( new WikiArchetypeDataSource(), null , writer );
-
- StringReader reader = new StringReader( writer.toString() );
-
- ArchetypeCatalogXpp3Reader catalogReader = new ArchetypeCatalogXpp3Reader();
-
- ArchetypeCatalog catalog = catalogReader.read( reader );
-
- Archetyper archetype = (Archetyper) lookup( Archetyper.ROLE );
-
- int size = archetype.getAvailableArchetypes().size();
-
- assertEquals( size, catalog.getArchetypes().size() );
- }
+// public void testPuttingTheWikiSourceIntoACatalogSink()
+// throws Exception
+// {
+// Writer writer = new StringWriter();
+//
+// ArchetypeDataSink sink = new CatalogArchetypeDataSink();
+//
+// Properties p = new Properties();
+//
+// p.setProperty( WikiArchetypeDataSource.URL, new File( getBasedir(), "test/sources/wiki-source.txt" ).toURI().toURL().toExternalForm() );
+//
+// sink.putArchetypes( new WikiArchetypeDataSource(), null , writer );
+//
+// StringReader reader = new StringReader( writer.toString() );
+//
+// ArchetypeCatalogXpp3Reader catalogReader = new ArchetypeCatalogXpp3Reader();
+//
+// ArchetypeCatalog catalog = catalogReader.read( reader );
+//
+// Archetyper archetype = (Archetyper) lookup( Archetyper.ROLE );
+//
+// int size = archetype.getAvailableArchetypes().size();
+//
+// assertEquals( size, catalog.getArchetypes().size() );
+// }
}