maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raf...@apache.org
Subject svn commit: r638617 - in /maven/archetype/trunk/archetype-common/src: main/java/org/apache/maven/archetype/common/ main/java/org/apache/maven/archetype/creator/ main/java/org/apache/maven/archetype/generator/ test/archetypes/fileset-1.0/archetype-resou...
Date Tue, 18 Mar 2008 22:41:07 GMT
Author: rafale
Date: Tue Mar 18 15:41:01 2008
New Revision: 638617

URL: http://svn.apache.org/viewvc?rev=638617&view=rev
Log:
Fix for ARCHETYPE-135
the property packageInPathFormat is now part of the generation interpolated from package
both in project generation and archetype creation

Modified:
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/.classpath
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/profiles.xml
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.java
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.ogg
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/inner/package/App2.java
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/App.properties
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/some-dir/App.png
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/apt/usage.apt
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/site.xml
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/src/main/java/App.java
    maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/subsubproject/src/main/java/App.java
    maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java
    maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
    maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java
    maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/WikiArchetypeDataSourceTest.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/.classpath
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/Main.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/TestAll.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/profiles.xml
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/apt/index.apt
    maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/site.xml

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/Constants.java
Tue Mar 18 15:41:01 2008
@@ -72,6 +72,8 @@
 
     /*String PACKAGE_NAME = "packageName";*/
 
+    String PACKAGE_IN_PATH_FORMAT = "packageInPathFormat";
+
     String PARENT_ARTIFACT_ID = "parentArtifactId";
 
     String POM_PATH = Constants.ARCHETYPE_RESOURCES + "/" + Constants.ARCHETYPE_POM;

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java
Tue Mar 18 15:41:01 2008
@@ -498,6 +498,11 @@
     private int id = 0;
     private BidiMap registeredProjects = new DualTreeBidiMap();
 
+    private String getPackageInPathFormat( String aPackage )
+    {
+        return StringUtils.replace( aPackage, ".", "/" );
+    }
+
     private void registerProject( Model pom )
     {
         registeredProjects.put( new Integer( id++ ), pom.getId() );
@@ -1637,6 +1642,10 @@
         reversedProperties.remove( Constants.ARCHETYPE_GROUP_ID );
         reversedProperties.remove( Constants.ARCHETYPE_ARTIFACT_ID );
         reversedProperties.remove( Constants.ARCHETYPE_VERSION );
+        reversedProperties.setProperty(
+            Constants.PACKAGE_IN_PATH_FORMAT,
+            getPackageInPathFormat(properties.getProperty( Constants.PACKAGE ))
+        );
         
         return reversedProperties;
     }

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
Tue Mar 18 15:41:01 2008
@@ -342,6 +342,11 @@
         return ( StringUtils.isEmpty( moduleOffset ) ? "/" : ( "/" + moduleOffset + "/" )
);
     }
 
+    private String getPackageInPathFormat( String aPackage )
+    {
+        return StringUtils.replace( aPackage, ".", "/" );
+    }
+
     private boolean isArchetypeConfigured( ArchetypeDescriptor archetypeDescriptor, ArchetypeGenerationRequest
request )
     {
         boolean configured = true;
@@ -373,6 +378,7 @@
         context.put(Constants.ARTIFACT_ID, request.getArtifactId());
         context.put(Constants.VERSION, request.getVersion());
         context.put(Constants.PACKAGE, request.getPackage());
+        context.put(Constants.PACKAGE_IN_PATH_FORMAT, getPackageInPathFormat(request.getPackage()));
 
         Iterator iterator = request.getProperties().keySet().iterator();
         while ( iterator.hasNext() )

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/.classpath
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/.classpath?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/.classpath
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/.classpath
Tue Mar 18 15:41:01 2008
@@ -1,12 +1,13 @@
 groupId=${groupId}
-        artifactId=${artifactId}
-        version=${version}
-        package=${package}
-        property-without-default-1=${property-without-default-1}
-        property-without-default-2=${property-without-default-2}
-        property-without-default-3=${property-without-default-3}
-        property-without-default-4=${property-without-default-4}
-        property-with-default-1=${property-with-default-1}
-        property-with-default-2=${property-with-default-2}
-        property-with-default-3=${property-with-default-3}
-        property-with-default-4=${property-with-default-4}
\ No newline at end of file
+artifactId=${artifactId}
+version=${version}
+package=${package}
+packageInPathFormat=${packageInPathFormat}
+property-without-default-1=${property-without-default-1}
+property-without-default-2=${property-without-default-2}
+property-without-default-3=${property-without-default-3}
+property-without-default-4=${property-without-default-4}
+property-with-default-1=${property-with-default-1}
+property-with-default-2=${property-with-default-2}
+property-with-default-3=${property-with-default-3}
+property-with-default-4=${property-with-default-4}
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/profiles.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/profiles.xml?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/profiles.xml
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/profiles.xml
Tue Mar 18 15:41:01 2008
@@ -1,12 +1,13 @@
 groupId=${groupId}
-  artifactId=${artifactId}
-  version=${version}
-  package=${package}
-  property-without-default-1=${property-without-default-1}
-  property-without-default-2=${property-without-default-2}
-  property-without-default-3=${property-without-default-3}
-  property-without-default-4=${property-without-default-4}
-  property-with-default-1=${property-with-default-1}
-  property-with-default-2=${property-with-default-2}
-  property-with-default-3=${property-with-default-3}
-  property-with-default-4=${property-with-default-4}
\ No newline at end of file
+artifactId=${artifactId}
+version=${version}
+package=${package}
+packageInPathFormat=${packageInPathFormat}
+property-without-default-1=${property-without-default-1}
+property-without-default-2=${property-without-default-2}
+property-without-default-3=${property-without-default-3}
+property-without-default-4=${property-without-default-4}
+property-with-default-1=${property-with-default-1}
+property-with-default-2=${property-with-default-2}
+property-with-default-3=${property-with-default-3}
+property-with-default-4=${property-with-default-4}
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.java
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.ogg
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.ogg?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.ogg
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/App.ogg
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/inner/package/App2.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/inner/package/App2.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/inner/package/App2.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/java/inner/package/App2.java
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/App.properties
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/App.properties?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/App.properties
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/App.properties
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/some-dir/App.png
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/some-dir/App.png?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/some-dir/App.png
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/main/resources/some-dir/App.png
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}
@@ -9,4 +10,4 @@
 property-with-default-1=${property-with-default-1}
 property-with-default-2=${property-with-default-2}
 property-with-default-3=${property-with-default-3}
-property-with-default-4=${property-with-default-4}
\ No newline at end of file
+property-with-default-4=${property-with-default-4}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/apt/usage.apt?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/apt/usage.apt
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/apt/usage.apt
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/site.xml?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/site.xml
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/src/site/site.xml
Tue Mar 18 15:41:01 2008
@@ -1,12 +1,13 @@
 groupId=${groupId}
-  artifactId=${artifactId}
-  version=${version}
-  package=${package}
-  property-without-default-1=${property-without-default-1}
-  property-without-default-2=${property-without-default-2}
-  property-without-default-3=${property-without-default-3}
-  property-without-default-4=${property-without-default-4}
-  property-with-default-1=${property-with-default-1}
-  property-with-default-2=${property-with-default-2}
-  property-with-default-3=${property-with-default-3}
-  property-with-default-4=${property-with-default-4}
\ No newline at end of file
+artifactId=${artifactId}
+version=${version}
+package=${package}
+packageInPathFormat=${packageInPathFormat}
+property-without-default-1=${property-without-default-1}
+property-without-default-2=${property-without-default-2}
+property-without-default-3=${property-without-default-3}
+property-without-default-4=${property-without-default-4}
+property-with-default-1=${property-with-default-1}
+property-with-default-2=${property-with-default-2}
+property-with-default-3=${property-with-default-3}
+property-with-default-4=${property-with-default-4}
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/src/main/java/App.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/src/main/java/App.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/src/main/java/App.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/src/main/java/App.java
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/subsubproject/src/main/java/App.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/subsubproject/src/main/java/App.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/subsubproject/src/main/java/App.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/archetypes/fileset-1.0/archetype-resources/subproject/subsubproject/src/main/java/App.java
Tue Mar 18 15:41:01 2008
@@ -2,6 +2,7 @@
 artifactId=${artifactId}
 version=${version}
 package=${package}
+packageInPathFormat=${packageInPathFormat}
 property-without-default-1=${property-without-default-1}
 property-without-default-2=${property-without-default-2}
 property-without-default-3=${property-without-default-3}

Modified: maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorTest.java
Tue Mar 18 15:41:01 2008
@@ -211,6 +211,8 @@
         template = getTemplateFile( project, "libs/prj-b/src/main/java/test/com/Component.java"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "libs/prj-b/src/main/java/test/com/package.html"
);
         assertExists( template );
@@ -220,6 +222,8 @@
             getTemplateFile( project, "libs/prj-b/src/test/java/test/common/ComponentTest.java"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "application/pom.xml" );
         assertExists( template );
@@ -233,6 +237,8 @@
         template = getTemplateFile( project, "application/src/main/java/Main.java" );
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template =
             getTemplateFile(
@@ -241,6 +247,8 @@
             );
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template =
             getTemplateFile(
@@ -257,14 +265,20 @@
         template = getTemplateFile( project, "application/src/main/resources/log4j.properties"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "application/src/main/resources/META-INF/MANIFEST.MF"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "application/src/main/resources/test/application/some/Gro.groovy"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "application/src/main/resources/splash.png"
);
         assertExists( template );
@@ -273,6 +287,8 @@
         template = getTemplateFile( project, "application/src/test/java/TestAll.java" );
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template =
             getTemplateFile(
@@ -281,19 +297,27 @@
             );
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "application/src/it-test/java/test/ItTest1.java"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template = getTemplateFile( project, "application/src/it-test/java/ItTestAll.java"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
 
         template =
             getTemplateFile( project, "application/src/it-test/resources/ItTest1Result.txt"
);
         assertExists( template );
         assertContent( template, "${someProperty}" );
+        assertContent( template, "${package}" );
+        assertContent( template, "${packageInPathFormat}" );
     }
 
     protected void tearDown()

Modified: maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/generator/DefaultArchetypeGeneratorTest.java
Tue Mar 18 15:41:01 2008
@@ -965,6 +965,7 @@
         assertEquals( artifactId, properties.getProperty( "artifactId" ) );
         assertEquals( "file-value", properties.getProperty( "version" ) );
         assertEquals( "file.value.package", properties.getProperty( "package" ) );
+        assertEquals( "file/value/package", properties.getProperty( "packageInPathFormat"
) );
     }
 
     private void assertTemplateContentGeneratedWithOldArchetype(
@@ -991,6 +992,7 @@
         assertEquals( "${artifactId}", properties.getProperty( "artifactId" ) );
         assertEquals( "${version}", properties.getProperty( "version" ) );
         assertEquals( "${package}", properties.getProperty( "package" ) );
+        assertEquals( "${packageInPathFormat}", properties.getProperty( "packageInPathFormat"
) );
     }
 
     private void copy( final File in,

Modified: maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/CatalogArchetypeDataSinkTest.java
Tue Mar 18 15:41:01 2008
@@ -86,6 +86,6 @@
 
         int catalogSize = catalog.getArchetypes().size();
 
-        assertEquals( 36, catalogSize );
+        assertEquals( 44, catalogSize );
     }
 }

Modified: maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/WikiArchetypeDataSourceTest.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/WikiArchetypeDataSourceTest.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/WikiArchetypeDataSourceTest.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/java/org/apache/maven/archetype/source/WikiArchetypeDataSourceTest.java
Tue Mar 18 15:41:01 2008
@@ -18,11 +18,11 @@
         ArchetypeDataSource ads = new InternalCatalogArchetypeDataSource();
         List archetypes = ads.getArchetypeCatalog( p ).getArchetypes();
 
-        assertEquals( 36, archetypes.size() );
+        assertEquals( 44, archetypes.size() );
 
         Archetype a = (Archetype) lookup(Archetype.class.getName());
         archetypes=a.getInternalCatalog().getArchetypes();
 
-        assertEquals( 36, archetypes.size() );
+        assertEquals( 44, archetypes.size() );
     }
 }

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/.classpath
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/.classpath?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/.classpath
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/.classpath
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,2 @@
-package projects.create-3.application.src.it-test.java;
-
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,3 @@
-package projects.create-3.application.src.it-test.java.org.apache.maven.archetype.test;
-
+package org.apache.maven.archetype.test;
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
Tue Mar 18 15:41:01 2008
@@ -1 +1,3 @@
-A String to search for
\ No newline at end of file
+A String to search for
+
+org/apache/maven/archetype/test
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/Main.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/Main.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/Main.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/Main.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,2 @@
-package projects.create-3.application.src.main.java;
-
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,3 @@
-package projects.create-3.application.src.main.java.org.apache.maven.archetype.test.application;
-
+package org.apache.maven.archetype.test.application;
+org/apache/maven/archetype/test/application
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/TestAll.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/TestAll.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/TestAll.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/TestAll.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,2 @@
-package projects.create-3.application.src.test.java;
-
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,3 @@
-package projects.create-3.application.src.test.java.org.apache.maven.archetype.test.application;
-
+package org.apache.maven.archetype.test.application;
+org/apache/maven/archetype/test/application
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
-<!-- A String to search for -->
\ No newline at end of file
+<!-- org/apache/maven/archetype/test
+A String to search for -->
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,3 @@
-package projects.create-3.libs.prj-b.src.main.java.org.apache.maven.archetype.test.com;
-
+package org.apache.maven.archetype.test.com;
+org/apache/maven/archetype/test/com
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
-<!-- A String to search for -->
\ No newline at end of file
+<!-- org/apache/maven/archetype/test
+A String to search for -->
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,3 @@
-package projects.create-3.libs.prj-b.src.test.java.org.apache.maven.archetype.test.common;
-
+package org.apache.maven.archetype.test.common;
+org/apache/maven/archetype/test/common
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/profiles.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/profiles.xml?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/profiles.xml
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/profiles.xml
Tue Mar 18 15:41:01 2008
@@ -1,3 +1,4 @@
-<!-- A String to search for -->
+<!-- org/apache/maven/archetype/test
+A String to search for -->
 <profiles>
 </profiles>

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/apt/index.apt?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/apt/index.apt
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/apt/index.apt
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
+org/apache/maven/archetype/test
 A String to search for

Modified: maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/site.xml?rev=638617&r1=638616&r2=638617&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/site.xml
(original)
+++ maven/archetype/trunk/archetype-common/src/test/resources/projects/create-3/src/site/site.xml
Tue Mar 18 15:41:01 2008
@@ -1 +1,2 @@
-<!-- A String to search for -->
\ No newline at end of file
+<!-- org/apache/maven/archetype/test
+A String to search for -->
\ No newline at end of file



Mime
View raw message