| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| 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. |
| --> |
| |
| <!-- $Rev$ $Date$ --> |
| |
| <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"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.geronimo.gshell</groupId> |
| <artifactId>gshell</artifactId> |
| <version>1.0-alpha-1-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>gshell-embeddable</artifactId> |
| <name>GShell Embeddable</name> |
| |
| <description> |
| Provides an all in one dependency for easily embedding GShell. |
| </description> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.geronimo.gshell</groupId> |
| <artifactId>gshell-core</artifactId> |
| <version>${version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.geronimo.gshell.commands</groupId> |
| <artifactId>gshell-builtins</artifactId> |
| <version>${version}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-remote-resources-plugin</artifactId> |
| <executions> |
| <!-- |
| Skip processing, we handle legal files below. |
| --> |
| <execution> |
| <goals> |
| <goal>process</goal> |
| </goals> |
| <configuration> |
| <skip>true</skip> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>shade-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <artifactSet> |
| <excludes> |
| <!-- |
| Exclude org.codehaus.plexus:plexus-component-api because plexus-container-default already includes it (lame) |
| --> |
| <exclude>org.codehaus.plexus:plexus-component-api</exclude> |
| |
| <!-- |
| Exclude org.codehaus.plexus:plexus-classworlds because it will already be on our bootstrap classloader. |
| --> |
| <exclude>org.codehaus.plexus:plexus-classworlds</exclude> |
| |
| <!-- |
| FIXME: For some reason we get test scope stuff in here... so exclude them |
| https://issues.apache.org/jira/browse/GSHELL-45 |
| --> |
| <exclude>org.slf4j:slf4j-simple</exclude> |
| <exclude>junit:junit</exclude> |
| <exclude>org.apache.geronimo.genesis.config:logging-config</exclude> |
| </excludes> |
| </artifactSet> |
| <transformers> |
| <transformer implementation="org.codehaus.mojo.shade.resource.ComponentsXmlResourceTransformer"/> |
| </transformers> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo.groovy</groupId> |
| <artifactId>groovy-maven-plugin</artifactId> |
| <executions> |
| <!-- |
| This will unzip the shaded file and handle cleaning up the legal files in the artifact, |
| basically replacing what is included by the shader with staticly defined versions. |
| --> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <source> |
| // First clean up |
| def dir = new File(project.build.directory, 'legal-work') |
| ant.delete(dir: dir) |
| ant.mkdir(dir: dir) |
| |
| // Then unpack the main artifact, excluding the legal muck |
| def file = new File(project.build.directory, "${project.build.finalName}.jar") |
| ant.unzip(src: file, dest: dir) { |
| patternset { |
| // Exclude any legal muck we find, cause its probably wrong |
| exclude(name: 'META-INF/LICENSE*') |
| exclude(name: 'META-INF/NOTICE*') |
| |
| // Exclude, as the LICENSE and NOTICE should include all legal details, this just makes things fuzzy |
| exclude(name: 'META-INF/NOTES.TXT') |
| |
| // Exclude this too, all details should be in the LICENSE and NOTICE files |
| exclude(name: 'licenses/**') |
| } |
| } |
| |
| // Then install our static bits |
| def resources = new File(project.basedir, 'src/main/resources') |
| ant.copy(todir: dir) { |
| fileset(dir: resources) { |
| include(name: '**') |
| } |
| } |
| |
| // And make a copy for sanity and re-zip her up |
| ant.copy(file: file, tofile: "${file}.orig", overwrite: true) |
| ant.delete(file: file) |
| ant.zip(destfile: file, basedir: dir) |
| </source> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |