Re: Use 2 pom.xml files with different names

2015-08-11 Thread Jörg Schaible
Hi Alex, 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 (for example: pom.xml

Re: Use 2 pom.xml files with different names

2015-08-11 Thread Martin Hoeller
Hi! Am Mon, 10 Aug 2015 19:23:51 +0300 schrieb Alex Ditu ditu.alexan...@gmail.com: I cannot test right now, but it can be tested very simple: in a simple project, rename pom.xml and run install/deploy, and see if it works. If it is ok, then is smth that I've done wrong. Else maybe it is the

Re: Use 2 pom.xml files with different names

2015-08-11 Thread Daniel Johnson (danijoh2)
I would expect this behavior that Martin has shown. Create a pom.xml and pom2.xml, and run 'mvn clean install -f pom2.xml’, you will see pom2.xml get installed into local maven repository. As Martin shows, pom.xml or pom2.xml name is not what is copied to repository, but instead the

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 baerr...@gmail.com wrote: On 10 August 2015 at 23:22, Alex Ditu

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 ditu.alexan...@gmail.com 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

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

2015-08-10 Thread Alex Ditu
: 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
. Thank you! -Original Message- From: Alex Ditu [mailto:ditu.alexan...@gmail.com javascript:;] Sent: Monday, August 10, 2015 8:17 To: Maven Users List Subject: Re: Use 2 pom.xml files with different names So the answer is: one cannot use a pom file with a different

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 bimargul...@gmail.com wrote: On Mon, Aug 10, 2015 at 11:04 AM, Alex Ditu ditu.alexan...@gmail.com wrote: I know how to solve my

Re: Use 2 pom.xml files with different names

2015-08-10 Thread Barrie Treloar
On 10 August 2015 at 23:22, Alex Ditu ditu.alexan...@gmail.com 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

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

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 So

RE: Use 2 pom.xml files with different names

2015-08-10 Thread Sander Verhagen
san...@sanderverhagen.netmailto:san...@sanderverhagen.net from now on. Please update your address book. Thank you! -Original Message- From: Alex Ditu [mailto:ditu.alexan...@gmail.com] Sent: Monday, August 10, 2015 8:17 To: Maven Users List Subject: Re: Use 2 pom.xml files

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

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 ditu.alexan...@gmail.com 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 pom-name like this: (…snip…) P.S. Don't ask me why I want to

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