I find the lure of the custom scopes to be a siren's call.

There are maybe 2-3 "missing" scopes. all other needs are better addressed
with a different project structure in my view.

We have the separation between test and non-test... but test is an all or
nothing... need the symmetry between the non-test scopes and the test
scopes, e.g.

compile -> test-compile
runtime -> test-runtime

I'd also want a "none" scope so that things like the maven dependency and
assembly plugins can reference project dependencies without polluting
compile classpaths.

of course the real issue that the above masks is that unit tests should not
be using such tricks... and integration tests should be in a separate
module, but we need the integration tests failing to block the module that
they are testing from being built.

What is also needed is a way to signify architecturally specific artifacts,
and also a way to signify that artifact A subsumes or provides an
equivalent API to artifact B so that when A is on the classpath, B is
automatically excluded from transitive dependencies.

But what I'd really like to understand is what you think you need these
custom scopes for... because perhaps I am being arrogant and assuming I
have thought of all the valid use cases and you can show me the error of my
thinking

-Stephen


On 30 July 2013 13:22, Francesco Mari <mari.france...@gmail.com> wrote:

> Hi,
>
> I was wondering why using custom dependency scopes issues a warning
> when the POM model is validated. Why Maven just don't ignore dependecy
> scopes he cannot understand?
>
> I was thinking to treat dependency scopes in a different way. The only
> logic I've found about dependency scopes is in [1] and [2] (I'm pretty
> sure there is more around), respectively how dependency scope
> inheritance is computed and whether to import POM dependencies with
> scope "import".
>
> Can this logic be encapsulated in a component which is able to track
> other optional "dependency scope" components? Each "dependency scope"
> component will define a new dependency scope and will encapsulate the
> rules about it (i.e. what happens if a dependency of the given scope
> is inherited, if it can be imported, and so on).
>
> An alternative and simpler solution could be that a "dependency scope"
> component maps a custom dependency scope to one standard scope defined
> by Maven, so to establish an "is-a" relationship between a custom
> dependency scope and a standard one.
>
> What do you think?
>
> [1]:
> https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java#L351
> [2]:
> https://github.com/apache/maven/blob/master/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L876
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

Reply via email to