Open GoogleCodeExporter opened 9 years ago
Here's the start of a port from bash to pure Maven. I didn't finish it, because I found this plugin and it solved my issue: <groupId>org.sonatype.plugins</groupId> <artifactId>jarjar-maven-plugin</artifactId> <version>1.8</version> Hopefully this Maven pom will be useful for someone who cant use the jarjar-maven-plugin. Included: 1. get the dependency sources 2. upack them 3. filter out some files <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> <artifactId>jarjar</artifactId> <packaging>jar</packaging> <name>jarjar - Third Party Dependencies</name> <properties> <http.component.version>4.2.3</http.component.version> <commons.codec.version>1.8</commons.codec.version> <gson.version>2.1</gson.version> </properties> <dependencies> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>${http.component.version}</version> <classifier>sources</classifier> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>${http.component.version}</version> <classifier>sources</classifier> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> <version>${http.component.version}</version> <classifier>sources</classifier> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient-cache</artifactId> <version>${http.component.version}</version> <classifier>sources</classifier> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>${commons.codec.version}</version> <classifier>sources</classifier> </dependency> <dependency> <groupId>com.google.gson</groupId> <artifactId>gson</artifactId> <version>${gson.version}</version> <classifier>sources</classifier> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>unpack-httpclient</id> <phase>generate-resources</phase> <goals> <goal>unpack-dependencies</goal> </goals> <configuration> <includeArtifacIds>httpclient,httpcore,httpmime,httpclient-cache</includeArtifacIds> <includeGroupIds>org.apache.httpcomponents</includeGroupIds> <includeClassifiers>sources</includeClassifiers> <excludes>**/org/apache/http/impl/client/cache/ehcache/*, **/org/apache/http/impl/client/cache/memcached/*, **/NegotiateScheme.java,**/NegotiateSchemeFactory.java, **/GGSSchemeBase.java,**/KerberosScheme.java, **/KerberosSchemeFactory.java,**/SPNegoScheme.java, **/SPNegoSchemeFactory.java</excludes> <outputDirectory>${project.build.directory}/jarjar</outputDirectory> </configuration> </execution> <execution> <id>unpack-commons-codec</id> <phase>generate-resources</phase> <goals> <goal>unpack-dependencies</goal> </goals> <configuration> <includeArtifacIds>commons-codec</includeArtifacIds> <includeGroupIds>commons-codec</includeGroupIds> <outputDirectory>${project.build.directory}/jarjar</outputDirectory> <includeClassifiers>sources</includeClassifiers> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
Original issue reported on code.google.com by m...@systemsplanet.com on 12 Oct 2013 at 8:27
m...@systemsplanet.com
Original issue reported on code.google.com by
m...@systemsplanet.com
on 12 Oct 2013 at 8:27