Re: [EXTERNAL] Use 2 pom.xml files with different names

2015-08-10 Thread Mark Derricutt
On 11 Aug 2015, at 3:25, Alex Ditu wrote: > No, but is irrelevant, because the search on the install phase is purely > based on the name pom.xml (it dosent take into account the -f option, or > the pom's content). later I will look into the sources for a better > understanding. So the root cause

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Alex Ditu
I don't have acces to the files right now (i don't have my laptop with me), but I am not sure it matters what they contain because the command 'mvn -f otherPom.xml deploy' works fine (it builds the project in the correct way), so the package phase works, but when it reaches the install phase it is

RE: Use 2 pom.xml files with different names

2015-08-10 Thread Sander Verhagen
Hi, I think you're being treated unfairly ;-) Yes, it's not the Maven way, but you have acknowledged that. But sometimes projects are the way they are. I do my best to deliver nice Maven projects, but I have one project also where the sources are so intertwined that I cannot possibly spl

RE: [EXTERNAL] Re: Use 2 pom.xml files with different names

2015-08-10 Thread Alex Ditu
No, but is irrelevant, because the search on the install phase is purely based on the name pom.xml (it dosent take into account the -f option, or the pom's content). later I will look into the sources for a better understanding. On Aug 10, 2015 6:20 PM, "Justin Georgeson" wrote: > Do you have the

RE: [EXTERNAL] Re: Use 2 pom.xml files with different names

2015-08-10 Thread Justin Georgeson
Do you have the same groupId, artifactId, and version specified in both POM files? > -Original Message- > From: Alex Ditu [mailto:ditu.alexan...@gmail.com] > Sent: Monday, August 10, 2015 10:17 AM > To: Maven Users List > Subject: [EXTERNAL] Re: Use 2 pom.xml files with different names >

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Alex Ditu
So the answer is: one cannot use a pom file with a different name than 'pom.xml'. In such case, why the -f option exists? On Aug 10, 2015 6:13 PM, "Benson Margulies" wrote: > On Mon, Aug 10, 2015 at 11:04 AM, Alex Ditu > wrote: > > I know how to solve my problem (by changing the project configu

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Benson Margulies
On Mon, Aug 10, 2015 at 11:04 AM, Alex Ditu wrote: > I know how to solve my problem (by changing the project configuration). > > My question is: why mvn -f otherPomName.xml deploy doesen't work? And I > said above how it fails. It does not _fail_. It does precisely what it is designed to do. mvn

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Alex Ditu
I know how to solve my problem (by changing the project configuration). My question is: why mvn -f otherPomName.xml deploy doesen't work? And I said above how it fails. On Aug 10, 2015 5:59 PM, "Barrie Treloar" wrote: > On 10 August 2015 at 23:22, Alex Ditu wrote: > > > Ok, look what I am tryin

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Barrie Treloar
On 10 August 2015 at 23:22, Alex Ditu wrote: > Ok, look what I am trying to achieve: I have a project with 2 > profileDeployments (it produces 2 types of artifacts: a jar and a war) > but from the same sources. So, I did the following thing: I have > written 2 pom.xml files with 2 different names

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Ron Wheeler
Everyone needs to do this. It is the basic concept behind java servlets. You put all the code in the project that creates the jar and you make that jar a dependency in the war which has all your servlet configuration and resources. Ron On 10/08/2015 9:52 AM, Alex Ditu wrote: Ok, look what I

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Alex Ditu
Ok, look what I am trying to achieve: I have a project with 2 profileDeployments (it produces 2 types of artifacts: a jar and a war) but from the same sources. So, I did the following thing: I have written 2 pom.xml files with 2 different names (for example: pom.xml and pom2.xml). When I want to bu

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Greg Trasuk
> On Aug 10, 2015, at 7:12 AM, Alex Ditu wrote: > > 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 like this: > (…snip…) > > P.S. Don't ask me why I want to use 2 pom files, if anyo

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Benson Margulies
Formally, a project has can only produce one POM artifact. So, you can do whatever you want with -f, but when it comes to install or deploy, you are pushing the one-and-only pom (selected from the file system with -f), and it gets the immutable, conventional, name of the pom artifact in the reposit

Use 2 pom.xml files with different names

2015-08-10 Thread Alex Ditu
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 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 run