maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Scanning for Projects... before
Date Fri, 04 Apr 2014 07:54:45 GMT
There is a *very* hacky way... I hesitate to suggest it... but as you seem
stuck!

Your "delete" mojo can take a wander through the dependency tree and record
the details of all dependencies from the tree that will be affected by the
deleting. You will need to do this for the entire set of reactor projects.
You will need to do this only when you are the first reactor project in the
reactor... for all other projects you will just do a no-op and return
immediately.

Then you do the delete.

Then you request resolution of all the dependencies that were deleted, and
you tell Maven to force the resolution (i.e. ignore the internal state that
says it downloaded them already) There is a flag you can set that will do
the forcing... but as this is an unrecommended HACK, you shall have to find
that flag yourself.

Thus when you mojo is finished executing, Maven's internal state that says
it downloaded these dependencies already will be consistent with the
on-disk state (because the files are present) and all will be right with
the world.

Beware! There be dragons!

Dragon 1: If any of the dependencies you re-download have a different
dependency list... you will be burned

Dragon 2: If any of the dependencies you re-download have a dependency
within the reactor... you will be burned

There are more dragons... and you may find the rug pulled out from under
you if you upgrade Maven...

Beware!


On 4 April 2014 07:55, eugene <eugen.rabii@gmail.com> wrote:

> I think we have found one...
>
> We can create a wrapper around MavenCli and replace it in m2.conf...
>
> On 4/2/14, 8:35 PM, Wayne Fay [via Maven] wrote:
> > >> repo unless their are snapshots, right? Well snapshot is not an option
> > >> right now (due to corporate things).
> > >
> > > It is one of Maven's cardinal assumptions that release versions are
> > > immutable. If you need different contents, use either: A) a different
> >
> > As Curtis already mentioned, you are unlikely to find a solution by
> > continuing to head in this direction. Find another approach - most
> > likely one that involves a process running outside of Maven before
> > your build kicks off.
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > </user/SendEmail.jtp?type=node&node=5790420&i=0>
> > For additional commands, e-mail: [hidden email]
> > </user/SendEmail.jtp?type=node&node=5790420&i=1>
> >
> >
> >
> > ------------------------------------------------------------------------
> > If you reply to this email, your message will be added to the
> > discussion below:
> >
> http://maven.40175.n5.nabble.com/Scanning-for-Projects-before-tp5790393p5790420.html
> >
> > To unsubscribe from Scanning for Projects... before, click here
> > <
> http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5790393&code=ZXVnZW4ucmFiaWlAZ21haWwuY29tfDU3OTAzOTN8MTA1NjEzNjg3MA==
> >.
> > NAML
> > <
> http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Scanning-for-Projects-before-tp5790393p5790474.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message