| <?xml version="1.0" encoding="UTF-8"?> |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| <!-- |
| /** |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| |
| ON MVN COMPILE NOT WORKING |
| |
| If you wondering why 'mvn compile' does not work building HBase |
| (in particular, if you are doing it for the first time), instead do |
| 'mvn package'. If you are interested in the full story, see |
| https://issues.apache.org/jira/browse/HBASE-6795. |
| |
| --> |
| <modelVersion>4.0.0</modelVersion> |
| <parent> |
| <groupId>org.apache.hbase.thirdparty</groupId> |
| <artifactId>hbase-thirdparty</artifactId> |
| <version>${revision}</version> |
| <relativePath>..</relativePath> |
| </parent> |
| <artifactId>hbase-shaded-jetty</artifactId> |
| <name>Apache HBase Relocated (Shaded) Jetty Libs</name> |
| <description> |
| Pulls down Jetty, relocates it and makes a far jar. |
| </description> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <configuration> |
| <filesets> |
| <fileset> |
| <directory>${basedir}</directory> |
| <includes> |
| <include>dependency-reduced-pom.xml</include> |
| </includes> |
| </fileset> |
| </filesets> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <shadeSourcesContent>true</shadeSourcesContent> |
| <createSourcesJar>true</createSourcesJar> |
| <relocations> |
| <relocation> |
| <pattern>org.eclipse.jetty</pattern> |
| <shadedPattern>${rename.offset}.org.eclipse.jetty</shadedPattern> |
| </relocation> |
| <!-- |
| This is for relocating the blacklist in |
| org.eclipse.jetty.webapp.WebAppContext.__dftServerClasses, |
| where we have a '-' in front of the class name |
| --> |
| <relocation> |
| <pattern>-org.eclipse.jetty</pattern> |
| <shadedPattern>-${rename.offset}.org.eclipse.jetty</shadedPattern> |
| </relocation> |
| </relocations> |
| <artifactSet> |
| <excludes> |
| <!-- |
| Anything added here needs to be excluded from the jar that pulls it in |
| also else we give an odd signal in the META-INF/DEPENDENCIES that we |
| produce. See below for how to exclusion of transitive dependencies. |
| --> |
| <exclude>javax.servlet:javax.servlet-api</exclude> |
| <!-- On the "next" build, exclude a lingering shaded jar if it exists (user did not `clean`). |
| Maven will happily pick up the previous shaded jar and try to include that in the N+1th build |
| if we don't exclude it. This will result in a failure in the ServicesResourceTransformer claiming |
| that we've already packaged a services file once. --> |
| <exclude>org.apache.hbase.thirdparty:hbase-shaded-jetty</exclude> |
| </excludes> |
| </artifactSet> |
| <transformers> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"> |
| </transformer> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> |
| <addHeader>false</addHeader> |
| </transformer> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| </transformers> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <!-- |
| The webdefault.xml contains some jetty servlet classes which should also be relocated |
| --> |
| <execution> |
| <id>relocate-web-xml</id> |
| <phase>package</phase> |
| <configuration> |
| <target> |
| <echo message="unjar" /> |
| <unzip src="${project.build.directory}/${project.artifactId}-${project.version}.jar" dest="${project.build.directory}/unpacked/" /> |
| <echo message="Replace content in webdefault.xml" /> |
| <replace file="${project.build.directory}/unpacked/${rename.offset.dir}/org/eclipse/jetty/webapp/webdefault.xml"> |
| <replacetoken>org.eclipse.jetty</replacetoken> |
| <replacevalue>${rename.offset}.org.eclipse.jetty</replacevalue> |
| </replace> |
| <echo message="Redo jar" /> |
| <jar destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar" basedir="${project.build.directory}/unpacked" /> |
| </target> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <dependencies> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-server</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-servlet</artifactId> |
| <version>${jetty.version}</version> |
| <exclusions> |
| <exclusion> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>servlet-api</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-security</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-http</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-util</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-io</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-jmx</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-webapp</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty</groupId> |
| <artifactId>jetty-util-ajax</artifactId> |
| <version>${jetty.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>javax.servlet</groupId> |
| <artifactId>javax.servlet-api</artifactId> |
| <version>${servlet-api.version}</version> |
| </dependency> |
| </dependencies> |
| </project> |