-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again,

> I did not yet get the point, why you have to write a new pom.xml to the disc.
> My naive illusion was that there is a central component that reads and parses
> the POM in maven where you can hook into and perform the transformation.
> Then all additional work is to assure, that plugins such as the install plugin
> do NOT simply copy the pom.xml to the local repo but include the 
> transformation.
> Here we might run into the problem that the POM XML is de-serialized with
> a parser (was it XPP or is it StAX) and the internal representation
> looses information so it can NOT be serialized again without loosing
> indentation, comments, etc. of the original pom.xml.

I read your patch and started to get some parts of the puzzle.

1. The component that reads and parses the POMs is the MavenProjectBuilder.
So it is generally possible to do the transformation there.

2. Installing and deploying is NOT diretly done in the according plugins,
but in ArtifactInstaller/ArtifactDeployer. Wise decision of the maven
designers so we do NOT have to touch all MOJOs that deal with this.
Still I do NOT know if these plugins need some dependency-update to see
such change or if they just depend on the according API and the
implementation (DefaultArtifact*) comes with the artifact-version of maven 
itself.

So maybe my idea is right that for the long run maven developers should
think about being able to have a 1:1 (de)serialization possibility
from pom.xml to MavenProject and vice versa. This way one could
make transformations on the POM and ArtifactInstaller/ArtifactDeployer
will serialize the project to XML instead of copying.

But are there some MOJO-hacks out there that also manipulate
the MavenProject and would cause to modify POMs accidently on
install/deploy? Or is it NOT possible for regular MOJO to
change the MavenProject. As far as I see it is just a plain
POJO but it could be proxied or whatever.

Regards
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJ8dIACgkQmPuec2Dcv/9dcACeL7SEqDxSwuBJMUETpfFEEsRt
3VUAnApJkG7mPAYfF1ADSBslgP1k6lGk
=NAWp
-----END PGP SIGNATURE-----

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

Reply via email to