<build><plugins><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><archive><manifest><mainClass>fully.qualified.MainClass</mainClass></manifest></archive><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs></configuration><executions><execution><id>make-assembly</id> <!-- this is used for inheritance merges --><phase>package</phase> <!-- bind to the packaging phase --><goals><goal>single</goal></goals></execution></executions></plugin></plugins></build>
<plugins><!-- This plugin provides the capability to packagethe artifact in an über-JAR file, includingits dependencies and to shade - i.e. rename -the packages of some of the dependencies. --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><version>1.4</version><executions><execution><phase>package</phase><goals><goal>shade</goal></goals><configuration><artifactSet><!-- Signed JAR files--><excludes><exclude>bouncycastle:bcprov-jdk15</exclude></excludes></artifactSet>
<transformers><transformerimplementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"><!-- Main class --><mainClass>com.main.MyMainClass</mainClass></transformer>
<!-- Use resource transformers to prevent file overwrites --><transformerimplementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>properties.properties</resource></transformer><transformerimplementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>applicationContext.xml</resource></transformer><transformerimplementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>META-INF/cxf/cxf.extension</resource></transformer><transformerimplementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/cxf/bus-extensions.xml</resource></transformer></transformers></configuration></execution></executions></plugin></plugins>
<!-- Use the assembly plugin to create a zip file of all our dependencies. --><plugin><artifactId>maven-assembly-plugin</artifactId><version>2.2.1</version><executions><execution><id>make-assembly</id><phase>package</phase><goals><goal>single</goal></goals><configuration><descriptorId>assembly-zip-for-wid</descriptorId></configuration></execution></executions><dependencies><dependency><groupId>cz.ness.ct.ip.assemblies</groupId><artifactId>TEST_SharedAssemblyDescriptor</artifactId><version>1.0.0-SNAPSHOT</version></dependency></dependencies></plugin>
<plugin><!--groupId>org.dstovall</groupId--> <!-- not available on the central --><groupId>com.jolira</groupId><artifactId>onejar-maven-plugin</artifactId><executions><execution><configuration><mainClass>${fully.qualified.main.class}</mainClass><attachToBuild>true</attachToBuild><!-- https://code.google.com/p/onejar-maven-plugin/issues/detail?id=8 --><!-- classifier>onejar</classifier --><filename>${project.build.finalName}-onejar.${project.packaging}</filename></configuration><goals><goal>one-jar</goal></goals></execution></executions></plugin>
<build><plugins><plugin><!-- Build an executable JAR --><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>2.4</version><configuration><archive><manifest><addClasspath>true</addClasspath><classpathPrefix>lib/</classpathPrefix><mainClass>WordListDriver</mainClass></manifest></archive></configuration></plugin></plugins></build>
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-assembly-plugin</artifactId><version>2.4.1</version><configuration><!-- get all project dependencies --><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs></configuration><executions><execution><id>make-assembly</id><!-- bind to the packaging phase --><phase>package</phase><goals><goal>single</goal></goals></execution></executions></plugin></plugins></build>