[
http://jira.codehaus.org/browse/MNG-3989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=261657#action_261657
]
Brett Porter commented on MNG-3989:
-----------------------------------
Updating for those still referring to the ticket:
This appears not to work in Maven 3.0 due to
https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository
You can "trick" it by giving the repository in repository/pom.xml the same
repository ID as one that will be in use (though it must be the ID of your
mirror if you are using a repository manager - which defeats the purpose).
I think under Maven 3, it might be better to write an extension that supplies
the additional repository as an additional source of artifacts. I took a quick
hack at this here:
*
http://svn.apache.org/repos/asf/maven/sandbox/trunk/examples/extensions/bundled-repository-extension
* http://svn.apache.org/repos/asf/maven/sandbox/trunk/examples/MNG-3989-maven3
There are likely to be much better ways to do this once I had time to review
the code that delegates the reactor resolution, but this might work as a
starting point to customise for your needs.
Note that the same pitfalls still apply - you can't deploy the projects to a
repository without the dependencies, and in this case you can't build just
"my-artifact" (unless you do mvn install -pl my-artifact" from the reactor root)
> Simple handling of external jars
> --------------------------------
>
> Key: MNG-3989
> URL: http://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 contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira