geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r573417 - in /geronimo/server/trunk/maven-plugins/car-maven-plugin/src: it/metadatageneration/ it/metadatageneration/src/test/resources/META-INF/ main/java/org/apache/geronimo/mavenplugins/car/ test/java/org/apache/geronimo/mavenplugins/car/
Date Fri, 07 Sep 2007 00:11:45 GMT
Author: djencks
Date: Thu Sep  6 17:11:44 2007
New Revision: 573417

URL: http://svn.apache.org/viewvc?rev=573417&view=rev
Log:
GERONIMO-3453 cleanup, add back substitution to allow copying expressions into config.xml

Removed:
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Attribute.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CopyFile.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Gbean.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Prerequisite.java
Modified:
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/src/test/resources/META-INF/geronimo-plugin.xml
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/test/java/org/apache/geronimo/mavenplugins/car/PluginMetadataTest.java

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml?rev=573417&r1=573416&r2=573417&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/pom.xml
Thu Sep  6 17:11:44 2007
@@ -144,7 +144,7 @@
                             <config-xml-content>
                                 <gbean name="DownloadedPluginRepos">
                                     <attribute name="repositoryList">http://geronimo.apache.org/plugins/plugin-repository-list-2.1.txt</attribute>
-                                    <attribute name="userRepositories">~/.m2/repository</attribute>
+                                    <attribute name="userRepositories">~/.m2/repository,#{key1}</attribute>
                                 </gbean>
                             </config-xml-content>
                             <source-repository>http://foo.com</source-repository>

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/src/test/resources/META-INF/geronimo-plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/src/test/resources/META-INF/geronimo-plugin.xml?rev=573417&r1=573416&r2=573417&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/src/test/resources/META-INF/geronimo-plugin.xml
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/metadatageneration/src/test/resources/META-INF/geronimo-plugin.xml
Thu Sep  6 17:11:44 2007
@@ -44,7 +44,7 @@
         <config-xml-content>
             <ns2:gbean>
                 <ns2:attribute name="repositoryList">http://geronimo.apache.org/plugins/plugin-repository-list-2.1.txt</ns2:attribute>
-                <ns2:attribute name="userRepositories">~/.m2/repository</ns2:attribute>
+                <ns2:attribute name="userRepositories">~/.m2/repository,${key1}</ns2:attribute>
             </ns2:gbean>
         </config-xml-content>
         <artifact-alias key="org.apache.geronimo.test/foo//car">org.apache.geronimo.test/bar/1.0/car</artifact-alias>

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java?rev=573417&r1=573416&r2=573417&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
Thu Sep  6 17:11:44 2007
@@ -122,10 +122,10 @@
         if (this.instance == null || this.instance.getChild("plugin-artifact") == null) {
             instance = new PluginArtifactType();
         } else {
-            instance = PluginInstallerGBean.loadPluginArtifactMetadata(new StringReader(this.instance.getChild("plugin-artifact").toString()));
+            instance = PluginInstallerGBean.loadPluginArtifactMetadata(new StringReader(this.instance.getChild("plugin-artifact").toString().replace("#{",
"${")));
         }
         if (this.commonInstance != null && this.commonInstance.getChild("plugin-artifact")
!= null) {
-            PluginArtifactType commonInstance = PluginInstallerGBean.loadPluginArtifactMetadata(new
StringReader(this.commonInstance.getChild("plugin-artifact").toString()));
+            PluginArtifactType commonInstance = PluginInstallerGBean.loadPluginArtifactMetadata(new
StringReader(this.commonInstance.getChild("plugin-artifact").toString().replace("#{", "${")));
             //merge
             if (instance.getArtifactAlias().isEmpty()) {
                 instance.getArtifactAlias().addAll(commonInstance.getArtifactAlias());

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/test/java/org/apache/geronimo/mavenplugins/car/PluginMetadataTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/test/java/org/apache/geronimo/mavenplugins/car/PluginMetadataTest.java?rev=573417&r1=573416&r2=573417&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/test/java/org/apache/geronimo/mavenplugins/car/PluginMetadataTest.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/test/java/org/apache/geronimo/mavenplugins/car/PluginMetadataTest.java
Thu Sep  6 17:11:44 2007
@@ -32,13 +32,8 @@
  */
 public class PluginMetadataTest extends TestCase {
 
-    public void testAttributeEscape() throws Exception {
-        Attribute attr = new Attribute("foo", "#{bar}");
-        assertEquals("${bar}", attr.getValue());
-        assertEquals("${bar}", "#{bar}".replace("#{", "${"));
-    }
 
-    private static final String PROLOGUE = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
+//    private static final String PROLOGUE = "<?xml version=\"1.0\" encoding=\"UTF-8\"
standalone=\"yes\"?>\n";
     private static final String INSTANCE1="<plugin-artifact>\n" +
             " <jvm-version>1.5</jvm-version>\n" +
             " <jvm-version>1.5.2</jvm-version>\n" +
@@ -62,8 +57,9 @@
             " <config-substitution key=\"key1\">value1</config-substitution>\n"
+
             "</plugin-artifact>";
 
+    //TODO test #{ to ${ replacement
     public void testReadInstance() throws Exception {
-        PluginArtifactType instance = PluginInstallerGBean.loadPluginArtifactMetadata(new
StringReader(PROLOGUE + INSTANCE1));
-//        assertEquals(2, instance.getConfigSubstitution().size());
+        PluginArtifactType instance = PluginInstallerGBean.loadPluginArtifactMetadata(new
StringReader(INSTANCE1));
+        assertEquals(2, instance.getConfigSubstitution().size());
     }
 }



Mime
View raw message