Adding maven assembly pluging to produce self contained ZIP ready for execution scala-emailer
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 29 Nov 2009 19:28:15 +0100
branchscala-emailer
changeset 1571f49195b49e8
parent 155 388a3511c433
child 158 0e8b21fcaeb0
Adding maven assembly pluging to produce self contained ZIP ready for execution
emailer/all-zip.xml
emailer/pom.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/emailer/all-zip.xml	Sun Nov 29 19:28:15 2009 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<assembly>
     1.6 + <id>all</id>
     1.7 +  <formats>
     1.8 +    <format>zip</format>
     1.9 +  </formats>
    1.10 +  <dependencySets>
    1.11 +    <dependencySet>
    1.12 +        <useProjectArtifact>false</useProjectArtifact>
    1.13 +        <outputDirectory>lib</outputDirectory>
    1.14 +    </dependencySet>
    1.15 +  </dependencySets>
    1.16 +  <files>
    1.17 +    <file>
    1.18 +      <source>target/emailer-${version}.jar</source>
    1.19 +      <outputDirectory>/</outputDirectory>
    1.20 +    </file>
    1.21 +  </files>
    1.22 +</assembly>
     2.1 --- a/emailer/pom.xml	Thu Nov 26 20:30:55 2009 +0100
     2.2 +++ b/emailer/pom.xml	Sun Nov 29 19:28:15 2009 +0100
     2.3 @@ -33,7 +33,39 @@
     2.4            </args>
     2.5          </configuration>
     2.6        </plugin>
     2.7 -    </plugins>
     2.8 +      <plugin>
     2.9 +          <artifactId>maven-assembly-plugin</artifactId>
    2.10 +          <version>2.2-beta-2</version>
    2.11 +          <executions>
    2.12 +              <execution>
    2.13 +                  <id>create-executable-jar</id>
    2.14 +                  <phase>package</phase>
    2.15 +                  <goals>
    2.16 +                      <goal>single</goal>
    2.17 +                  </goals>
    2.18 +                  <configuration>
    2.19 +                      <descriptors>
    2.20 +                          <descriptor>all-zip.xml</descriptor>
    2.21 +                      </descriptors>
    2.22 +                      <finalName>emailer-${version}</finalName>
    2.23 +                  </configuration>
    2.24 +              </execution>
    2.25 +          </executions>
    2.26 +      </plugin>
    2.27 +      <plugin>
    2.28 +          <groupId>org.apache.maven.plugins</groupId>
    2.29 +          <artifactId>maven-jar-plugin</artifactId>
    2.30 +          <configuration>
    2.31 +              <archive>
    2.32 +                  <manifest>
    2.33 +                      <addClasspath>true</addClasspath>
    2.34 +                      <classpathPrefix>lib/</classpathPrefix>
    2.35 +                      <mainClass>cz.xelfi.quoridor.emailer.Main</mainClass>
    2.36 +                  </manifest>
    2.37 +              </archive>
    2.38 +          </configuration>
    2.39 +      </plugin>
    2.40 +  </plugins>
    2.41    </build>
    2.42    <repositories>
    2.43      <repository>
    2.44 @@ -67,13 +99,6 @@
    2.45        <version>1.2.5</version>
    2.46        <scope>test</scope>
    2.47      </dependency>
    2.48 -    <!--
    2.49 -    <dependency>
    2.50 -      <groupId>javax.mail</groupId>
    2.51 -      <artifactId>mail</artifactId>
    2.52 -      <version>1.4.2</version>
    2.53 -    </dependency>
    2.54 -    -->
    2.55      <dependency>
    2.56        <groupId>javax.mail</groupId>
    2.57        <artifactId>mail</artifactId>