Hello Anders,

You actually need only 2 poms, the compile of classes and packaging into a
war is one, and the packaging into a ear is another.

If you are willing to add a second directory next to each one, say with name
WebProject-ear, this project's pom would refer to the xml file that is
outside its sub-directory structure (ugly, but...) "../WebProject/...", and
would have a dependency on the war project.

Note: if you have many of those projects, it may also be of use to have a
common parent pom with the bulk of the configuration.

Note 2: Consider (progressively?) moving to some of the defaults maven
follows instead of customizing them, you'll find build to be more peaceful
one on the long run :-)

HTH,
w

On Mon, Dec 8, 2008 at 1:37 PM, Anders Kristian Andersen <
[EMAIL PROTECTED]> wrote:

> I see
> it is still possible to make the three artifacts I describe
> You just have to change the source/build location a lot
> You can specify sources outside a project by "../../../here/there/"
> probably ugly, and probably hard to understand
> /Anders
>
>
> On 08/12/2008, at 11.13, Shananin, Alexei wrote:
>
>  Hi Anders!
>>
>>  -----Original Message-----
>>> From: Anders Kristian Andersen
>>> [mailto:[EMAIL PROTECTED]
>>> Sent: Monday, December 08, 2008 12:44
>>> To: Maven Users List
>>> Subject: Re: How to build classes, WAR, EAR in one POM?
>>>
>>> Hi Alex
>>>
>>> One pom produces one artifact !!!!
>>>
>>> You can see it as a structure
>>>
>>> parent
>>>        ear-artifact
>>>        war-artifact
>>>
>>>  This is obvious structure and if I had not legacy JDeveloper project I
>> would use it for sure.
>> Unfortunately, we can not get rid of JDeveloper as it has TopLink
>> Workbench able to edit mappings that can not be opened by standalone
>> workbenches (damn Oracle! >:( ).
>> So we bound to project structure below.
>> Additionally, we consider EAR file as the only artifact. No JAR or WAR
>> files makes sense without EAR. This is the second point in my struggling
>> to use single POM.
>>
>>
>>  It is not worth trying other things..
>>> Maven assembly plugins can make attachments, but this is not good in
>>> your situation
>>>
>>> /Anders
>>>
>>>
>>> On 08/12/2008, at 09.10, Shananin, Alexei wrote:
>>>
>>>  Dear All!
>>>> I am new to Maven 2.0.9 and I am facing the following problem.
>>>>
>>>> We started migration from JDeveloper 10g towards Maven. Current
>>>> JDeveloper project structure looks like that:
>>>> 1) WebProject/src -- java sources, resources
>>>> 2) WebProject/public_html -- web sources (jsp, html, libs, compiled
>>>> classes)
>>>>
>>>> The build sequence from JDev perspective contains these phases:
>>>> 1) compile classes and JSPs to WebProject/public_html/classes
>>>> 2) build war file with contents from previous step
>>>> 3) build ear containing war from previous step and add
>>>> META-INF/orion-application.xml
>>>>
>>>> This build can be done using 3 different POMs with 3
>>>>
>>> packaging types:
>>>
>>>> JAR, WAR, EAR.
>>>> I want to incorporate 3 phases above in one pom.xml as we can not
>>>> change
>>>> the directory structure. The result must be EAR.
>>>>
>>>> Is that possible to do "all-in-one"? Please give me a clue
>>>>
>>> of how to
>>>
>>>> do
>>>> it.
>>>>
>>>> Thanks for your help!
>>>> Alex.
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to