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 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 build the .jar artifact I would use the
command 'mvn deploy' when I want the .war artifact I would use: 'mvn
-f pom2.xml' ---> after this, I encounter the problem I mentioned
earlier.
Note that the artifactIds are different.
On Mon, Aug 10, 2015 at 4:38 PM, Greg Trasuk <tras...@stratuscom.com> wrote:
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 use 2 pom files, if anyone encountered
this situation and knows how to deal with it, help will be much
appreciated :)
The problem is, it’s kind of like asking “When I try to drive on the railroad
tracks with my car, I keep falling off the rails - has anyone else encountered
this problem?” The fundamental concept of Maven is that an artifact is
uniquely identified, and the pom file describes the artifact. As such, when
Maven puts the artifact into the local repository, it follows the naming
conventions.
You might be better off to describe what you’re actually trying to achieve, and
then we can suggest how to do that.
Cheers,
Greg Trasuk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org