The problem with that is,

See this structure,
--Common
        --pom.xml
-J2EE-component1
        --pom.xml (inherits the Common/pom.xml)
        --jar/pom.xml
        --ejb/pom.xml
        --ear.pom.xml
-J2EE-component2
        --pom.xml (inherits the Common/pom.xml)
        --jar/pom.xml
        --ejb/pom.xml
        --ear.pom.xml

I am using module build to build from the J2EE component pom. So the
jar, ejb, ear all inherit the same parent pom. So I don't see anyway for
the ejb to inherit a diff pom from the jar file.
I think that's the requirement, top level pom will have <modules> and
the module pom's will inherit the parent. 

So my plan was to put the ant task in the Common/pom.xml and have the
condition to execute that only if packaging is "pom".

If you see anyother option of doing it please let me know.

Thanks
-Jagan

-----Original Message-----
From: Wim Deblauwe [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 01, 2006 7:46 AM
To: Maven Users List
Subject: Re: maven-antrun-plugin - <if> issue

The inheritance of the parent pom's can be multiple levels. So you can
have parent-all that defines all things common for jars, wars, ejbs, ...
and then a parent-ejb pom that you use as a parent for the ejb projects
that defines the ejb specific things (and has parent-all as his parent)

regards,


Wim

2006/5/1, Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc.
at
Cisco) <[EMAIL PROTECTED]>:
>
>
> I have some ant tasks which needs to be executed only if packaging is 
> "ejb".
> But don't want to repeat this code in all ejb POMs.
> So thought of adding this to a parent POM, which all other modules 
> (many
> components- ejbs, wars, jars, ears, etc) inherit.
>
> So in order to make sure that this gets executed only for ejb 
> projects, I want to check, <tasks> <if> <equals 
> arg1="${project.packaging}" arg2="pom" /> <then>
>    ant tasks details...
> </then>
> </if>
>
> Does this makes sense ?
>
> -Jagan
>
>
> -----Original Message-----
> From: Kenney Westerhof [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 01, 2006 2:42 AM
> To: Maven Users List
> Subject: Re: maven-antrun-plugin - <if> issue
>
> On Mon, 1 May 2006, Jagan Padmanabha Pillai -X (jpadmana - Insight 
> Solutions, Inc. at Cisco) wrote:
>
> Can you give me an example of what you're doing? A POM snippet for 
> example?
>
> It's true that
>         <tasks if="..." unless="...">
>
> does not work. It's on my todo list.
>
> -- Kenney
>
> >
> > Hi,
> >
> > ANT <if> condition doesn't seem to work while using
> maven-antrun-plugin.
> > I have added the ant-contrib dependency.
> >
> > Could someone please let me know what may be the issue. Please send 
> > me
>
> > a sample code if you have any.
> >
> > Thanks
> > -Jagan
> >
> >
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> 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]

  • ... Jagan Padmanabha Pillai -X \(jpadmana - Insight Solutions, Inc. at Cisco\)
    • ... Jagan Padmanabha Pillai -X \(jpadmana - Insight Solutions, Inc. at Cisco\)

Reply via email to