Brown, Carlton wrote:
Hi all, newb question here...

Somewhere long ago, an internal dev project started depending on
foo-corp/lib/**/* of a 3rd-party framework, which ends up being a random
collection of 50 jars or so.  What's the Maven best practice for
representing a "big bag o' jars" as a single dependency?
I know it would be ideal to resolve our dependency graph with greater
granularity, but until someone has copious free time to do that, we'd
need a simple interim solution to move us forward on the Maven track.

Just to make it clear, the repository dir would look something like:
/foo-corp/bigbagofjars/5.7/

And it would contain a random selection of goodies such as:
apache-commons-codec_1.3.jar
apache-commons-discovery_1.1.jar
apache-commons-logging_1.1.jar
axis-jaxrpc_1.1.jar
axis-saaj_1.1.jar
axis-wsdl4j_1.1.jar
axis_1.1.jar
bsh_1.3.0.jar
jdom_b8.jar
junit_3.8.1.jar
ldapjdk_5.2.jar
log4j_1.2.8.jar
oracle_9.2.0.5.jar
xalan_2.6.0.jar
xerces-xml-apis_2.6.2.jar
xerces_2.6.2.jar
xpp3_min-1.1.3.4.I.jar
xstream-1.1.3.jar

Make sure that all these artifacts are accessible through some Maven repo. Then create a new pom along these lines:

<project ...>
    <groupId>foo-corp</groupId>
    <artifactId>bigbagofjars</artifactId>
    <version>5.7</version>
    <packaging>pom</packaging>

    <dependencies>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.3</version>
        </dependency>
        .... etc etc etc ..
    </dependencies>
</project>

Deploy that pom to your inhouse repo and have everybody reference it as:

<depenency>
    <groupId>foo-corp</groupId>
    <artifactId>bigbagofjars</artifactId>
    <version>5.7</version>
    <type>pom</type>
</dependency>

voila.

-dirk

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to