[ 
https://jira.codehaus.org/browse/MNG-3989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291380#comment-291380
 ] 

Basil K. commented on MNG-3989:
-------------------------------

The 'addjars-maven-plugin' simplifies handling of external jars. Just add the 
following declaration to your pom.xml:

{code:xml} 
<plugin>
    <groupId>com.googlecode.addjars-maven-plugin</groupId>
    <artifactId>addjars-maven-plugin</artifactId>
    <version>1.0.1</version>
    <executions>
        <execution>
            <goals>
                <goal>add-jars</goal>
            </goals>
            <configuration>
                <resources>
                    <resource>
                        <directory>lib</directory>
                    </resource>
                </resources>
            </configuration>
        </execution>
    </executions>
</plugin>
{code} 

In the given example, all jars from the 'lib' directory (including 
subdirectories) will be added. You can also specify the dependency scope and 
lists of includes and excludes.
                
> Simple handling of external jars
> --------------------------------
>
>                 Key: MNG-3989
>                 URL: https://jira.codehaus.org/browse/MNG-3989
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>    Affects Versions: 2.0.9
>            Reporter: Greg Wilkins
>         Attachments: MNG-3989.zip, MNG-3989.zip
>
>
> For whatever reason, there will always be jars that don't exist in a maven 
> repository.
> There are numerous techniques for these - installing them in your local repo 
> (either manually or with
> some bootstrap.sh script or special profile activation).   Checking in the 
> jars into a local maven repository that is checked into svn 
> and then point to it from your settings.xml and/or top level pom (with aid of 
> an env variable).
> But all these methods lack a very important features.  You can just do: "svn 
> co http:/myproj.com/foo; cd foo; mvn"
> If the jars change, you can't just do "svn up; mvn", you have to re-run 
> whatever script/profile installed the repo.
> It's all rather a PITA.
> What I want, is some way to have a module of a project that contains some 
> non-maven jars that when I
> do a "mvn install" in that project, install those jars in my local repository 
> for use by my other modules. If the
> jars are not updated, then nothing is done.
> With something like this, projects that have external dependencies could 
> describe them to maven and 
> make them available for use, without manual steps and special scripts.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to