I'm currently working with a Legacy app, whose process for building plugins requires adding dependencies on about 150 non-maven (ant I believe?) jar files. Ideally, I'd like to package these 150-jars into a single JAR, place it on Artifactory, and use that as a maven-dependency so that my team can more easily setup their development environment.
I've been experimenting with one-jar, maven-assembly-plugin, and maven-shade-plugin, which appears to just create one jar that contains several other jars (i.e. unzip the contents). However when adding that jar as a maven dependency, maven appears unable to resolve the contents/dependencies within these "sub-jars."
The code below is only an example of something I've tried; so feel free to suggest other approaches.
<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>
<groupId>com.company</groupId>
<artifactId>some-jars</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<name>someName</name>
<properties>
<jdk.version>1.8</jdk.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.mycompany.mypackage.MyMainClass</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.dstovall</groupId>
<artifactId>onejar-maven-plugin</artifactId>
<version>1.4.4</version>
<executions>
<execution>
<configuration>
<binlibs>
<fileSet>
<directory>${basedir}/jars</directory>
<includes>
<include>*</include>
</includes>
</fileSet>
</binlibs>
<!-- Optional, default is false -->
<attachToBuild>true</attachToBuild>
<!-- Optional, default is "onejar" -->
<classifier>onejar</classifier>
</configuration>
<goals>
<goal>one-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>onejar-maven-plugin.googlecode.com</id>
<url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
</pluginRepository>
</pluginRepositories>
</project>