repaint-io / maven-tiles

Injecting maven configurations by composition rather than inheritance
154 stars 32 forks source link

Tiles need to be injected somehow per-artifact #40

Closed talios closed 8 years ago

talios commented 8 years ago

One issue I've been hitting lately, and usually only affects the command line usage, but has recently started rearing its head in IntelliJ again is that the fact we're injecting and mutating the parents of tiles in a global namespace manner.

For single module projects this works fine, but the moment you use a reactor, or have multiple POMs configured in a single IntelliJ project the problem of circularly parents arrises.

tiles

This can be mitigated by always keeping your tiles ALWAYS in the same order, but this also only works if only always have the same tiles as well, the moment you omit one you risk changing the ordering.

This is primarily only a problem in IntelliJ ( unless your doing a reactor/multi-module build ) it only affects code completion/resolution ( but that in turn can prevent one from running tests or debugging as IntelliJ can no longer compile code ).

rvowles commented 8 years ago

So mutate and then put back? Its not like Maven has any other option?

talios commented 8 years ago

The problem is it IS mutated. So it's a circular reference. They need to be made unique artifacts somehow. I'm thinking it might be possible to just set the classifier to that of the calling artifact.

talios commented 8 years ago

I think this can be closed after the changes we made in the 2.6/2.7 releases. I thought we had closed it.