maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1153259 - in /maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype: ./ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/src/main/java/ src/main/resources/archetype-resources/src/main/resources/ src/m...
Date Tue, 02 Aug 2011 19:57:35 GMT
Author: hboutemy
Date: Tue Aug  2 19:57:33 2011
New Revision: 1153259

URL: http://svn.apache.org/viewvc?rev=1153259&view=rev
Log:
added properties in file path replacement

Added:
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
  (with props)
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
  (with props)
Modified:
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/pom.xml
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/java/App.java
    maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/verify.bsh

Modified: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/pom.xml?rev=1153259&r1=1153258&r2=1153259&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/pom.xml (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/pom.xml Tue Aug  2
19:57:33 2011
@@ -29,6 +29,7 @@ under the License.
   <packaging>maven-archetype</packaging>
 
   <name>build-archetype</name>
+  <description>packages an archetype then runs IT (archetype:integration-test)</description>
 
   <build>
     <extensions>

Modified: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1153259&r1=1153258&r2=1153259&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
(original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
Tue Aug  2 19:57:33 2011
@@ -30,5 +30,11 @@ under the License.
         <include>**/*.java</include>
       </includes>
     </fileSet>
+    <fileSet filtered="true" packaged="false" encoding="UTF-8">
+      <directory>src/main/resources</directory>
+      <includes>
+        <include>**/*.properties</include>
+      </includes>
+    </fileSet>
   </fileSets>
 </archetype-descriptor>

Modified: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/java/App.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/java/App.java?rev=1153259&r1=1153258&r2=1153259&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/java/App.java
(original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/java/App.java
Tue Aug  2 19:57:33 2011
@@ -28,5 +28,9 @@ public class App 
     public static void main( String[] args )
     {
         System.out.println( "Hello World!" );
+        System.out.println( "groupId = ${groupId}" );
+        System.out.println( "artifactId = ${artifactId}" );
+        System.out.println( "package = ${package}" );
+        System.out.println( "packageInPathFormat = ${packageInPathFormat}" );
     }
 }

Added: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties?rev=1153259&view=auto
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
(added)
+++ maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
Tue Aug  2 19:57:33 2011
@@ -0,0 +1,3 @@
+# test file path __propertyName__ replacement with its value
+# __packageInPathFormat__ in file directory was replaced with "${packageInPathFormat}"
+# __package__ in filename was replaced with "${package}"

Propchange: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties?rev=1153259&view=auto
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
(added)
+++ maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
Tue Aug  2 19:57:33 2011
@@ -0,0 +1,3 @@
+# test file path __propertyName__ replacement with its value
+# __artifactId__ in filename was replaced with "${artifactId}"
+# rootArtifactId = ${rootArtifactId}

Propchange: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/verify.bsh
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/verify.bsh?rev=1153259&r1=1153258&r2=1153259&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/verify.bsh (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/it/build-archetype/verify.bsh Tue Aug
 2 19:57:33 2011
@@ -20,10 +20,26 @@
 
 import java.io.*;
 
-File target = new File( basedir, "target/test-classes/projects/basic/project/basic/src/main/java/build/archetype/App.java"
);
-if ( !target.isFile() )
+File main = new File( basedir, "target/test-classes/projects/basic/project/basic/src/main"
);
+
+// check <fileset packaged="true">
+File app = new File( main, "java/build/archetype/App.java" );
+if ( !app.isFile() )
+{
+    throw new Exception( app + " file is missing or not a file." );
+}
+
+// check __propertyName__ path replacement
+File artifactId = new File( main, "resources/test-basic.properties" );
+if ( !artifactId.isFile() )
+{
+    throw new Exception( artifactId + " file is missing or not a file." );
+}
+
+File packageInPathFormat = new File( main, "resources/build/archetype/build.archetype.properties"
);
+if ( !packageInPathFormat.isFile() )
 {
-    throw new Exception( target + " file is missing or not a file." );
+    throw new Exception( packageInPathFormat + " file is missing or not a file." );
 }
 
 return true;



Mime
View raw message