Hello, I want to use pom.xml files for my project with 2 different names: pom.xml and pom2.xml. In order to select wich one to execute/use I use -f <pom-name> like this:
mvn -f pom2.xml deploy Using this aproach I've encountered some problems in 2 scenarios: 1. If both pom.xml and pom2.xml exist when running the install phase, altough I've specified -f pom2.xml, maven is still using 'pom.xml' when installing my jar in .m2: output looks like this: installing .../project/pom.xml ..../.m2/.../project/artifact-1.0.0-SNAPSHOT.pom it should be: installing .../project/pom2.xml ..../.m2/.../project/artifact-1.0.0-SNAPSHOT.pom but because it finds pom.xml it passes this phase, and when it reaches deploy phase it gives this error: deploy failed: Cannot add two different pieces of metadata for: project dvh.web.sockets.push.server:webSocketsPushServerCommon 2. If I have just one pom file but with a different name (for eg. pom2.xml) it doesn't pass the install phase, because it searches for pom.xml not for pom2.xml (so it appears that 'mvn -f otherPomName.xml' doesn't work for install phase). Am I missing something here? Or is just a bug? P.S. Don't ask me why I want to use 2 pom files, if anyone encountered this situation and knows how to deal with it, help will be much appreciated :) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org