You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <Fe...@day.com> on 2007/10/18 08:42:01 UTC

Re: svn commit: r585881 - /incubator/sling/whiteboard/microsling/pom.xml

Wouldn't it be easier to just configure the JAR plugin to the project
instead of the antrun and attach-artifacts plugin ? IIRC the jar plugin
creates an attachment if it is not run as the main packager of the
project or you may be able to configure the plugin correctly.

Regards
Felix

Am Donnerstag, den 18.10.2007, 06:13 +0000 schrieb
bdelacretaz@apache.org:
> Author: bdelacretaz
> Date: Wed Oct 17 23:13:56 2007
> New Revision: 585881
> 
> URL: http://svn.apache.org/viewvc?rev=585881&view=rev
> Log:
> SLING-66 : Create a microsling jar artifact in addition to the war file
> 
> Modified:
>     incubator/sling/whiteboard/microsling/pom.xml
> 
> Modified: incubator/sling/whiteboard/microsling/pom.xml
> URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/pom.xml?rev=585881&r1=585880&r2=585881&view=diff
> ==============================================================================
> --- incubator/sling/whiteboard/microsling/pom.xml (original)
> +++ incubator/sling/whiteboard/microsling/pom.xml Wed Oct 17 23:13:56 2007
> @@ -90,6 +90,46 @@
>          </configuration>
>        </plugin>
>        <plugin>
> +        <!-- SLING-66: create a jar in addition to our war, to make our servlets reusable -->
> +        <artifactId>maven-antrun-plugin</artifactId>
> +        <executions>
> +          <execution>
> +            <phase>package</phase>
> +            <configuration>
> +              <tasks>
> +                <jar basedir="${project.build.outputDirectory}"
> +                  destfile="${project.build.directory}/${project.name}-${project.version}.jar"/>
> +              </tasks>
> +            </configuration>
> +            <goals>
> +              <goal>run</goal>
> +            </goals>
> +          </execution>
> +        </executions>
> +      </plugin>
> +      <plugin>
> +        <!-- SLING-66: add the jar created by maven-antrun-plugin in our artifacts -->
> +        <groupId>org.codehaus.mojo</groupId>
> +        <artifactId>build-helper-maven-plugin</artifactId>
> +        <executions>
> +          <execution>
> +            <id>attach-artifacts</id>
> +            <phase>package</phase>
> +            <goals>
> +              <goal>attach-artifact</goal>
> +            </goals>
> +            <configuration>
> +                <artifacts>
> +                  <artifact>
> +                    <file>${project.build.directory}/${project.name}-${project.version}.jar</file>
> +                    <type>jar</type>
> +                  </artifact>
> +                </artifacts>
> +            </configuration>
> +          </execution>
> +        </executions>
> +      </plugin>
> +      <plugin>
>          <groupId>org.mortbay.jetty</groupId>
>          <artifactId>maven-jetty-plugin</artifactId>
>          <version>6.1.5</version>
> 
> 


Re: svn commit: r585881 - /incubator/sling/whiteboard/microsling/pom.xml

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 10/18/07, Felix Meschberger <Fe...@day.com> wrote:
> Wouldn't it be easier to just configure the JAR plugin to the project
> instead of the antrun and attach-artifacts plugin ? IIRC the jar plugin
> creates an attachment if it is not run as the main packager of the
> project or you may be able to configure the plugin correctly....

You're probably right, but I'm not sure how to do that. Feel free to
do it if you know how!

-Bertrand