maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <ja...@takari.io>
Subject Re: MNG-5899 Project models are no longer mutable in reactor
Date Tue, 27 Oct 2015 13:35:59 GMT
The core model has to be mutable. I think there can be an ancillary model that carried other
types of information like the dependency reduction. But mutation and re-consumption within
the reactor I think is a bad idea and the complication enumerated below seems fairly extreme.
Do you have a concrete use case in mind?

> On Oct 27, 2015, at 2:41 AM, Stephen Connolly <stephen.alan.connolly@gmail.com>
wrote:
> 
> Context: MNG-5899 [1] which was originally reported as MSHADE-206 [2]
> 
> I understand why the change[3] was made... but this change breaks
> about 80-90% of the use cases for the shade plugin...
> 
> Is there any way we can consider a compromise?
> 
> I think it should be permitted for a plugin to replace the project
> model with a dependency reduced model, i.e. one where the transitive
> dependency tree is either the same or a strict subset of the
> transitive dependency tree of the original.
> 
> If a plugin makes such a substitution then the reactor build order
> will remain unaffected but the classpaths of downstream modules would
> be affected.
> 
> As I see it, if we were to try and permit such substitutions, we would
> need to augment the mojo API:
> 
> * A Mojo would need to advertise that it performs Project Dependency
> Reduction, because...
> 
> * The build plan would need to delay concurrent builds of modules that
> depend on the project using such a mojo until after the mojo has
> completed execution
> 
> * The replacement of the project model would have to be via a specific
> API call such that validation of the transitive dependency tree rule
> was maintained as well as restricting usage of that API to mojos that
> have advertised their use of dependency reduction.
> 
> Is there anything else that we would need to consider if we were
> implementing the above?
> 
> (Shade would not be the only consumer of this API as I see it, for
> example the flatten maven plugin may well want to consume this API
> also...)
> 
> WDYT?
> 
> [1]: https://issues.apache.org/jira/browse/MNG-5899
> [2]: https://issues.apache.org/jira/browse/MSHADE-206
> [3]: https://github.com/apache/maven/commit/be3fb200326208ca4b8c41ebf16d5ae6b8049792
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

Simplex sigillum veri. (Simplicity is the seal of truth.)













---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message