[fedora-java] Installing effective Maven POM files

Mikolaj Izdebski mizdebsk at redhat.com
Wed Feb 20 17:07:28 UTC 2013


> > > Are you effectively saying that mvn-local/rpmbuild can/will
> > > continue
> > > to use normal(non-effective) poms always? So mvn-local stays a
> > > usable development tool not just packaging.
> > 
> > Yes. Only %mvn_install installs effective POMs. mvn-rpmbuild,
> > mvn-local,
> > mvn and xmvn tools don't install any files (that includes POMs).
> > When using these POM installation is left to /bin/install command
> > or
> > maven-install-plugin.
> 
> That was not the question. The quesion is if I have maven+plugins
> installed from rpms and I do mvn-local to build something it will
> use the effective poms installed and not the normal poms, rights? So
> is it possible to have both effective and normal poms installed and
> when using mvn-local/rpmbuild it to use the normal poms and not
> effective poms?

By default all these scripts would resolve effective POMs. But you
can specify multiple POM reposirories (in resolverSettings, see my
configuration reference in previous email). So you could have a POM
repository that would store raw POMs and you could enable resolution
from it.

By ordering repositories you can specify priorities. For example you
could ask XMvn to first resolve from raw POM repo and if POM is not
there then fallback to standard system repo (with effective POMs).

That configuration I mentioned can be specified in several ways:
1. artifact configuration -- in POM
2. reactor configuration  -- in ${project.basedir}
3. user configuration     -- in ${user.home}
4. system configuration   -- in %{_sysconfdir}
5. default configuration  -- embedded in XMvn as a resource

All these configuration files are in the same format, which will be
document in detail. Configuration is inherited from files of lower
precedence. For example if some setting is not found in reactor
configuration then it will be inherited from user configuration,
but if this setting is explicitly set in reactor configuration
then it will take precedence over user configuration.

If you combine the wide range of configuration options and sources
where that configuration come from I think it's a very flexible solution.

--
Mikolaj


More information about the java-devel mailing list