karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@gmail.com>
Subject Re: svn commit: r991463 - in /karaf/trunk/tooling/features-maven-plugin/src: main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java test/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojoTest.java
Date Wed, 01 Sep 2010 08:42:22 GMT
Shoudn't we not include "jar" as it's the default value ?

On Wed, Sep 1, 2010 at 10:23,  <jbonofre@apache.org> wrote:
> Author: jbonofre
> Date: Wed Sep  1 08:23:10 2010
> New Revision: 991463
>
> URL: http://svn.apache.org/viewvc?rev=991463&view=rev
> Log:
> [KARAF-163] Generate Features XML should handle artifact types.
>
> Modified:
>    karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java
>    karaf/trunk/tooling/features-maven-plugin/src/test/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojoTest.java
>
> Modified: karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java
> URL: http://svn.apache.org/viewvc/karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java?rev=991463&r1=991462&r2=991463&view=diff
> ==============================================================================
> --- karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java
(original)
> +++ karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java
Wed Sep  1 08:23:10 2010
> @@ -507,7 +507,7 @@ public class GenerateFeaturesXmlMojo ext
>     }
>
>     public static String toString(Artifact artifact) {
> -        return String.format("%s/%s/%s", artifact.getGroupId(), artifact.getArtifactId(),
artifact.getVersion());
> +        return String.format("%s/%s/%s/%s", artifact.getGroupId(), artifact.getArtifactId(),
artifact.getVersion(), artifact.getType());
>     }
>
>     private class Feature {
> @@ -554,8 +554,8 @@ public class GenerateFeaturesXmlMojo ext
>                     out.println("    <feature version='"
>                        + next.getBaseVersion() + "'>" + String.format("%s</feature>",
next.getArtifactId()));
>                 } else {
> -                       out.println(String.format("    <bundle>mvn:%s/%s/%s</bundle>",
> -                            next.getGroupId(), next.getArtifactId(), next.getBaseVersion()));
> +                       out.println(String.format("    <bundle>mvn:%s/%s/%s/%s</bundle>",
> +                            next.getGroupId(), next.getArtifactId(), next.getBaseVersion(),
next.getType()));
>                 }
>             }
>             out.println("  </feature>");
>
> Modified: karaf/trunk/tooling/features-maven-plugin/src/test/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojoTest.java
> URL: http://svn.apache.org/viewvc/karaf/trunk/tooling/features-maven-plugin/src/test/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojoTest.java?rev=991463&r1=991462&r2=991463&view=diff
> ==============================================================================
> --- karaf/trunk/tooling/features-maven-plugin/src/test/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojoTest.java
(original)
> +++ karaf/trunk/tooling/features-maven-plugin/src/test/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojoTest.java
Wed Sep  1 08:23:10 2010
> @@ -34,10 +34,11 @@ public class GenerateFeaturesXmlMojoTest
>         expect(artifact.getGroupId()).andReturn("org.apache.karaf.test");
>         expect(artifact.getArtifactId()).andReturn("test-artifact");
>         expect(artifact.getVersion()).andReturn("1.2.3");
> +        expect(artifact.getType()).andReturn("jar");
>
>         replay(artifact);
>
> -        assertEquals("org.apache.karaf.test/test-artifact/1.2.3", GenerateFeaturesXmlMojo.toString(artifact));
> +        assertEquals("org.apache.karaf.test/test-artifact/1.2.3/jar", GenerateFeaturesXmlMojo.toString(artifact));
>     }
>
>  }
>
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Mime
View raw message