466774 - Update jetty-all module for Jetty 9.3

+ Switching from assembly plugin to shade plugin
  to get added benefit of META-INF/services/ merging
+ Assembled jar also has fixed MANIFEST.MF to make
  it more sane with regards to OSGi
+ Fixing licensing files included to use Eclipse licenses
  in as-built jar file.
This commit is contained in:
Joakim Erdfelt 2015-05-07 14:15:04 -07:00
parent b8b4c4deb7
commit 33f153073c
2 changed files with 68 additions and 50 deletions

View File

@ -9,38 +9,87 @@
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
<name>Jetty :: Aggregate :: All core Jetty</name>
<description>UberJar for Core Jetty features</description>
<packaging>pom</packaging>
<url>http://www.eclipse.org/jetty</url>
<properties>
<uber-jar>${project.build.directory}/${project.artifactId}-${project.version}-uber.jar</uber-jar>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.1</version>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>uberjar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/uberjar.xml</descriptor>
</descriptors>
<attach>true</attach>
<archive>
<manifest>
</manifest>
<manifestEntries>
<mode>development</mode>
<url>http://eclipse.org/jetty</url>
<Built-By>${user.name}</Built-By>
<package>org.eclipse.jetty</package>
<Bundle-License>http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/NOTICE.txt</Bundle-License>
<Bundle-Name>Jetty</Bundle-Name>
</manifestEntries>
</archive>
<shadedClassifierName>uber</shadedClassifierName>
<outputFile>${uber-jar}</outputFile>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<mode>development</mode>
<url>http://eclipse.org/jetty</url>
<Built-By>${user.name}</Built-By>
<package>org.eclipse.jetty</package>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Import-Package>javax.naming,javax.net.ssl,javax.security.auth,javax.servlet;version="[3.1,4)",javax.servlet.descriptor;version="[3.1,4)",javax.servlet.http;version="[3.1,4)",javax.sql,javax.annotation;version="[1.2,2)",javax.annotation.security;version="[1.2,2)",javax.servlet.annotation;version="[3.1,4)",org.objectweb.asm;version="[5.1,6)",javax.websocket;version="[1.0,2)",javax.websocket.server;version="[1.0,2)"</Import-Package>
<Bundle-SymbolicName>${project.groupId}.all</Bundle-SymbolicName>
<Bundle-Description>${project.description}</Bundle-Description>
<Bundle-License>http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/NOTICE.txt</Bundle-License>
<Bundle-Name>Jetty Core UberJar</Bundle-Name>
</manifestEntries>
</transformer>
</transformers>
<artifactSet>
<excludes>
<exclude>javax:*</exclude>
<exclude>org.eclipse.jetty.orbit:*</exclude>
<exclude>org.mortbay.jetty:*</exclude>
<exclude>org.mortbay.jetty.alpn:*</exclude>
<exclude>org.slf4j:*</exclude>
<exclude>org.ow2.asm:*</exclude>
<exclude>*:javax</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${uber-jar}</file>
<type>jar</type>
<classifier>uber</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>

View File

@ -1,31 +0,0 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>uber</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useTransitiveDependencies>true</useTransitiveDependencies>
<unpack>true</unpack>
<excludes>
<exclude>javax:*</exclude>
<exclude>org.eclipse.jetty.orbit:*</exclude>
<exclude>org.mortbay.jetty:*</exclude>
<exclude>org.mortbay.jetty.alpn:*</exclude>
<exclude>org.slf4j:*</exclude>
<exclude>org.ow2.asm:*</exclude>
<exclude>:javax:*</exclude>
</excludes>
<unpackOptions>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/javax.*/**</exclude>
<exclude>javax/**</exclude>
</excludes>
</unpackOptions>
</dependencySet>
</dependencySets>
</assembly>