You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by fa...@mpsa.com on 2005/09/20 10:06:41 UTC

Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs




Nobody has an answer for these 2 little questions?

For the second question, I've struggled with scopes, but it seems that
because of the transitive dependencies feature, the Ear plugin packages
every Jar set to compile/runtime in the pom of the War...

Fabrice.


---------------------------------------------------------------------------------------------

Hi guys!

I've 2 little questions about the Ear plugin (version 2.0beta1):

1- how can I tell the Ear plugin to use a specific root-context for a War
when it generates the application.xml? (instead of using the artifactId)
Something like the "<ear.appxml.war.context-root>" in m1.

2- when the plugin generates the Ear, it packages most dependencies of the
War module, while they already exist the the WEB-INF/lib of the War (and I
don't want them to be copied a second time at the root of the Ear). Those
dependencies have a "compile" scope in the pom of the War module. Is it the
normal behaviour? Is there a property or something to tell m2 not to
package them?

Thanks for your help!
Cheers,
Fabrice.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by Brett Porter <br...@gmail.com>.
On 9/22/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
> So I would say that the packaging for an Ear should be more complex
> concerning the dependencies declared in its pom:
> - for a Jar or an Ejb, then I agree that the transitive dependencies must
> be included in the Ear
> - for a War, the default behaviour should be to include only the War
> itself, without all its transitive dependencies. There could be a property
> 'included' to tell the packager to take a specific dependency of the War
> and put it up in the Ear. (this would be the opposite behaviour as
> currently with the 'excluded' property)
>
> What do you guys think of this? Is this relevant? If so, is this feasible?

This is equivalent to:
http://jira.codehaus.org/browse/MNG-818

- Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] How to use "relativePath" of in a pom?

Posted by Brett Porter <br...@gmail.com>.
Got it one Kenney.

On 9/29/05, Kenney Westerhof <ke...@apache.org> wrote:
> On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
> > Hi,
> >
> > I've seen that there's a "relativePath" attribute for the "parent" element
> > of the pom. According to the documentation, this is "the relative path of
> > the parent-pom within the project hierarchy". If this property exists, I
> > guess this allows to discover the parent pom without specifying the
> > version, the artifactId and the groupId of the parent, which would be
> > _very_ handy. However, I get the following error when launching maven:
> > "Missing groupId element from parent element".
> >
> > So my question is: is this property working? I guess no:
> > http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> > But maybe this doesn't work this way. So my second question is: how does
> > this property work?
>
> I'm not entirely up-to-speed on this new feature, but AFAIK the
> artifactId and groupId are mandatory in a <parent> element (version too
> IIRC).
> POMs should be able to be used stand-alone. A client that uses your pom
> wouldn't know where to look for that parent pom, since the directory
> structure on ibiblio is not quite the same as the project tree structure.
>
> Before this attribute was in, m2 always checked ../pom.xml to see if it
> matched the declared parent. If so, it used that (and the data in
> target/*) instead of going to your local/remote repositories for the pom.
> I guess this attribute is just an extension to that, so you can specify
> other locations for your parent project than ../.
>
> Other m2 devs - jump in if this is incorrect!
>
> -- Kenney
>
> > Thanks in advance for your answers!
> >
> > Best Regards / Cordialement,
> > Fabrice BELLINGARD
> > DINQ/DSIN/INSI/EATE/IDVS/AIDV
> > (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] "reporting" element of profiles not merged?

Posted by fa...@mpsa.com.



OK, http://jira.codehaus.org/browse/MNG-1112 for those interested.

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


                                                                           
             Brett Porter                                                  
             <brett.porter@gm                                              
             ail.com>                                                 Pour 
                                       Maven Users List                    
             06/10/2005 11:16          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [M2] "reporting" element of     
             Maven Users List          profiles not merged?                
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




Yes, looks like a bug.

- Brett

On 10/6/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Hi all,
>
> I'm playing a bit with profiles, and it seems to me that report plugins
> listed in a profile are not added to the list of reports when the profile
> is activated. That is, it seems that when a profile is activated, its
> "reporting" element is not merged with the "reporting" element of the
pom.
>
> For instance, try the following command with the pom given below: "m2
> site:site -Denv=TEST"
> -> you will have the JXR report generated, but not the taglist. (and you
> can check that the profile is activated though, because the "index.html"
> generated page shows "Profile Activated" instead of "${foo}" in the
> description)
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>test</groupId>
>       <artifactId>test</artifactId>
>       <packaging>jar</packaging>
>       <name>Test</name>
>       <version>1.0.0</version>
>       <description>Test project - ${foo}</description>
>       <reporting>
>             <plugins>
>                   <plugin>
>                         <groupId>org.codehaus.mojo</groupId>
>                         <artifactId>jxr-maven-plugin</artifactId>
>                         <version>2.0-beta-1</version>
>                   </plugin>
>             </plugins>
>       </reporting>
>       <profiles>
>             <profile>
>                   <id>test-site-profile</id>
>                   <activation>
>                         <property>
>                               <name>env</name>
>                               <value>TEST</value>
>                         </property>
>                   </activation>
>                   <reporting>
>                         <plugins>
>                               <plugin>
>                                     <groupId>org.codehaus.mojo</groupId>
>                                     <artifactId>taglist-maven-plugin
> </artifactId>
>                                     <version>2.0-beta-1</version>
>                               </plugin>
>                         </plugins>
>                   </reporting>
>                   <properties>
>                         <foo>Profile Activated</foo>
>                   </properties>
>             </profile>
>       </profiles>
> </project>
>
> Is this a bug? If so, I will add it to Jira.
>
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] "reporting" element of profiles not merged?

Posted by Brett Porter <br...@gmail.com>.
Yes, looks like a bug.

- Brett

On 10/6/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Hi all,
>
> I'm playing a bit with profiles, and it seems to me that report plugins
> listed in a profile are not added to the list of reports when the profile
> is activated. That is, it seems that when a profile is activated, its
> "reporting" element is not merged with the "reporting" element of the pom.
>
> For instance, try the following command with the pom given below: "m2
> site:site -Denv=TEST"
> -> you will have the JXR report generated, but not the taglist. (and you
> can check that the profile is activated though, because the "index.html"
> generated page shows "Profile Activated" instead of "${foo}" in the
> description)
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>test</groupId>
>       <artifactId>test</artifactId>
>       <packaging>jar</packaging>
>       <name>Test</name>
>       <version>1.0.0</version>
>       <description>Test project - ${foo}</description>
>       <reporting>
>             <plugins>
>                   <plugin>
>                         <groupId>org.codehaus.mojo</groupId>
>                         <artifactId>jxr-maven-plugin</artifactId>
>                         <version>2.0-beta-1</version>
>                   </plugin>
>             </plugins>
>       </reporting>
>       <profiles>
>             <profile>
>                   <id>test-site-profile</id>
>                   <activation>
>                         <property>
>                               <name>env</name>
>                               <value>TEST</value>
>                         </property>
>                   </activation>
>                   <reporting>
>                         <plugins>
>                               <plugin>
>                                     <groupId>org.codehaus.mojo</groupId>
>                                     <artifactId>taglist-maven-plugin
> </artifactId>
>                                     <version>2.0-beta-1</version>
>                               </plugin>
>                         </plugins>
>                   </reporting>
>                   <properties>
>                         <foo>Profile Activated</foo>
>                   </properties>
>             </profile>
>       </profiles>
> </project>
>
> Is this a bug? If so, I will add it to Jira.
>
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


[M2] "reporting" element of profiles not merged?

Posted by fa...@mpsa.com.



Hi all,

I'm playing a bit with profiles, and it seems to me that report plugins
listed in a profile are not added to the list of reports when the profile
is activated. That is, it seems that when a profile is activated, its
"reporting" element is not merged with the "reporting" element of the pom.

For instance, try the following command with the pom given below: "m2
site:site -Denv=TEST"
-> you will have the JXR report generated, but not the taglist. (and you
can check that the profile is activated though, because the "index.html"
generated page shows "Profile Activated" instead of "${foo}" in the
description)

<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>test</groupId>
      <artifactId>test</artifactId>
      <packaging>jar</packaging>
      <name>Test</name>
      <version>1.0.0</version>
      <description>Test project - ${foo}</description>
      <reporting>
            <plugins>
                  <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>jxr-maven-plugin</artifactId>
                        <version>2.0-beta-1</version>
                  </plugin>
            </plugins>
      </reporting>
      <profiles>
            <profile>
                  <id>test-site-profile</id>
                  <activation>
                        <property>
                              <name>env</name>
                              <value>TEST</value>
                        </property>
                  </activation>
                  <reporting>
                        <plugins>
                              <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>taglist-maven-plugin
</artifactId>
                                    <version>2.0-beta-1</version>
                              </plugin>
                        </plugins>
                  </reporting>
                  <properties>
                        <foo>Profile Activated</foo>
                  </properties>
            </profile>
      </profiles>
</project>

Is this a bug? If so, I will add it to Jira.


Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Réf. : Re: [M2] How to use "relativePath" of in a pom?

Posted by fa...@mpsa.com.



> And if you check out the EAR in isolation, how should it behave? Break?
"Check out the EAR in isolation"? What do you mean? Check out from SCM? If
so, I don't see troubles with this case... Well, I guess you have a broader
view of those issues :o)
As for me (and as for now), I experience that the <extend> of M1 pom was
really handy, and I can't do that with M2. Hope I'm just missing some
details.

> It's an option, but one that has burned many a Maven 1 user. is there
> a reason you can't enter the groupId/artifactId as well/instead?

Actually, specifying only groupId and artifactId would be fine, for they
never change during the development lifecycle. But version changes often,
and version is mandatory in children as well, isn't it? ("Missing version
element from parent element") And this is my concern: I don't wanna change
the version in every pom but only in one place, like it used to be in M1.



Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


                                                                           
             Brett Porter                                                  
             <brett.porter@gm                                              
             ail.com>                                                 Pour 
                                       Maven Users List                    
             29/09/2005 16:02          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [M2] How to use "relativePath"  
             Maven Users List          of <parent> in a pom?               
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




And if you check out the EAR in isolation, how should it behave? Break?

It's an option, but one that has burned many a Maven 1 user. is there
a reason you can't enter the groupId/artifactId as well/instead?

- Brett

On 9/29/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Right, thanks for your answer Kenney!
> However, this is definitely not handy when you have a multi-module
project
> (for instance when you build an Ear). When your parent is part of the
same
> build process (using built-in reactor) and on the same file system, using
> only "relativePath" would be far more handy. And when installing or
> deploying the artifacts, this "relativePath" could be replaced by the
real
> artifactId/groupId/version values of the parent (which would make you pom
> stand-alone).
>
> I've just seen there's an issue concerning this topic
> (http://jira.codehaus.org/browse/MNG-624), but it targets version 2.1...
> :o(
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
>
>              Kenney Westerhof
>              <kenney@apache.o
>              rg>
Pour
>                                        Maven Users List
>              29/09/2005 15:28          <us...@maven.apache.org>
>
cc
>
>                  Veuillez
Objet
>                 répondre à             Re: [M2] How to use "relativePath"
>              Maven Users List          of <parent>  in a pom?
>              <users@maven.apa
>                  che.org>
>
>
>
>
>
>
>
>
> On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
> > Hi,
> >
> > I've seen that there's a "relativePath" attribute for the "parent"
> element
> > of the pom. According to the documentation, this is "the relative path
of
> > the parent-pom within the project hierarchy". If this property exists,
I
> > guess this allows to discover the parent pom without specifying the
> > version, the artifactId and the groupId of the parent, which would be
> > _very_ handy. However, I get the following error when launching maven:
> > "Missing groupId element from parent element".
> >
> > So my question is: is this property working? I guess no:
> > http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned
yet)
> > But maybe this doesn't work this way. So my second question is: how
does
> > this property work?
>
> I'm not entirely up-to-speed on this new feature, but AFAIK the
> artifactId and groupId are mandatory in a <parent> element (version too
> IIRC).
> POMs should be able to be used stand-alone. A client that uses your pom
> wouldn't know where to look for that parent pom, since the directory
> structure on ibiblio is not quite the same as the project tree structure.
>
> Before this attribute was in, m2 always checked ../pom.xml to see if it
> matched the declared parent. If so, it used that (and the data in
> target/*) instead of going to your local/remote repositories for the pom.
> I guess this attribute is just an extension to that, so you can specify
> other locations for your parent project than ../.
>
> Other m2 devs - jump in if this is incorrect!
>
> -- Kenney
>
> > Thanks in advance for your answers!
> >
> > Best Regards / Cordialement,
> > Fabrice BELLINGARD
> > DINQ/DSIN/INSI/EATE/IDVS/AIDV
> > (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [ann] Maven 2.0 Beta 3 Released

Posted by fa...@mpsa.com.



> The Apache Maven team are proud to announce the  third beta release
> of Maven 2.0.

Wouah, the new CSS is cool! :o)

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] How to use "relativePath" of in a pom?

Posted by Brett Porter <br...@gmail.com>.
And if you check out the EAR in isolation, how should it behave? Break?

It's an option, but one that has burned many a Maven 1 user. is there
a reason you can't enter the groupId/artifactId as well/instead?

- Brett

On 9/29/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Right, thanks for your answer Kenney!
> However, this is definitely not handy when you have a multi-module project
> (for instance when you build an Ear). When your parent is part of the same
> build process (using built-in reactor) and on the same file system, using
> only "relativePath" would be far more handy. And when installing or
> deploying the artifacts, this "relativePath" could be replaced by the real
> artifactId/groupId/version values of the parent (which would make you pom
> stand-alone).
>
> I've just seen there's an issue concerning this topic
> (http://jira.codehaus.org/browse/MNG-624), but it targets version 2.1...
> :o(
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
>
>              Kenney Westerhof
>              <kenney@apache.o
>              rg>                                                      Pour
>                                        Maven Users List
>              29/09/2005 15:28          <us...@maven.apache.org>
>                                                                         cc
>
>                  Veuillez                                            Objet
>                 répondre à             Re: [M2] How to use "relativePath"
>              Maven Users List          of <parent>  in a pom?
>              <users@maven.apa
>                  che.org>
>
>
>
>
>
>
>
>
> On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
> > Hi,
> >
> > I've seen that there's a "relativePath" attribute for the "parent"
> element
> > of the pom. According to the documentation, this is "the relative path of
> > the parent-pom within the project hierarchy". If this property exists, I
> > guess this allows to discover the parent pom without specifying the
> > version, the artifactId and the groupId of the parent, which would be
> > _very_ handy. However, I get the following error when launching maven:
> > "Missing groupId element from parent element".
> >
> > So my question is: is this property working? I guess no:
> > http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> > But maybe this doesn't work this way. So my second question is: how does
> > this property work?
>
> I'm not entirely up-to-speed on this new feature, but AFAIK the
> artifactId and groupId are mandatory in a <parent> element (version too
> IIRC).
> POMs should be able to be used stand-alone. A client that uses your pom
> wouldn't know where to look for that parent pom, since the directory
> structure on ibiblio is not quite the same as the project tree structure.
>
> Before this attribute was in, m2 always checked ../pom.xml to see if it
> matched the declared parent. If so, it used that (and the data in
> target/*) instead of going to your local/remote repositories for the pom.
> I guess this attribute is just an extension to that, so you can specify
> other locations for your parent project than ../.
>
> Other m2 devs - jump in if this is incorrect!
>
> -- Kenney
>
> > Thanks in advance for your answers!
> >
> > Best Regards / Cordialement,
> > Fabrice BELLINGARD
> > DINQ/DSIN/INSI/EATE/IDVS/AIDV
> > (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] How to use "relativePath" of in a pom?

Posted by fa...@mpsa.com.



Right, thanks for your answer Kenney!
However, this is definitely not handy when you have a multi-module project
(for instance when you build an Ear). When your parent is part of the same
build process (using built-in reactor) and on the same file system, using
only "relativePath" would be far more handy. And when installing or
deploying the artifacts, this "relativePath" could be replaced by the real
artifactId/groupId/version values of the parent (which would make you pom
stand-alone).

I've just seen there's an issue concerning this topic
(http://jira.codehaus.org/browse/MNG-624), but it targets version 2.1...
:o(

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


                                                                           
             Kenney Westerhof                                              
             <kenney@apache.o                                              
             rg>                                                      Pour 
                                       Maven Users List                    
             29/09/2005 15:28          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [M2] How to use "relativePath"  
             Maven Users List          of <parent>  in a pom?              
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:

Hi,

> Hi,
>
> I've seen that there's a "relativePath" attribute for the "parent"
element
> of the pom. According to the documentation, this is "the relative path of
> the parent-pom within the project hierarchy". If this property exists, I
> guess this allows to discover the parent pom without specifying the
> version, the artifactId and the groupId of the parent, which would be
> _very_ handy. However, I get the following error when launching maven:
> "Missing groupId element from parent element".
>
> So my question is: is this property working? I guess no:
> http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> But maybe this doesn't work this way. So my second question is: how does
> this property work?

I'm not entirely up-to-speed on this new feature, but AFAIK the
artifactId and groupId are mandatory in a <parent> element (version too
IIRC).
POMs should be able to be used stand-alone. A client that uses your pom
wouldn't know where to look for that parent pom, since the directory
structure on ibiblio is not quite the same as the project tree structure.

Before this attribute was in, m2 always checked ../pom.xml to see if it
matched the declared parent. If so, it used that (and the data in
target/*) instead of going to your local/remote repositories for the pom.
I guess this attribute is just an extension to that, so you can specify
other locations for your parent project than ../.

Other m2 devs - jump in if this is incorrect!

-- Kenney

> Thanks in advance for your answers!
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] How to use "relativePath" of in a pom?

Posted by Kenney Westerhof <ke...@apache.org>.
On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:

Hi,

> Hi,
>
> I've seen that there's a "relativePath" attribute for the "parent" element
> of the pom. According to the documentation, this is "the relative path of
> the parent-pom within the project hierarchy". If this property exists, I
> guess this allows to discover the parent pom without specifying the
> version, the artifactId and the groupId of the parent, which would be
> _very_ handy. However, I get the following error when launching maven:
> "Missing groupId element from parent element".
>
> So my question is: is this property working? I guess no:
> http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> But maybe this doesn't work this way. So my second question is: how does
> this property work?

I'm not entirely up-to-speed on this new feature, but AFAIK the
artifactId and groupId are mandatory in a <parent> element (version too
IIRC).
POMs should be able to be used stand-alone. A client that uses your pom
wouldn't know where to look for that parent pom, since the directory
structure on ibiblio is not quite the same as the project tree structure.

Before this attribute was in, m2 always checked ../pom.xml to see if it
matched the declared parent. If so, it used that (and the data in
target/*) instead of going to your local/remote repositories for the pom.
I guess this attribute is just an extension to that, so you can specify
other locations for your parent project than ../.

Other m2 devs - jump in if this is incorrect!

-- Kenney

> Thanks in advance for your answers!
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


[M2] How to use "relativePath" of in a pom?

Posted by fa...@mpsa.com.



Hi,

I've seen that there's a "relativePath" attribute for the "parent" element
of the pom. According to the documentation, this is "the relative path of
the parent-pom within the project hierarchy". If this property exists, I
guess this allows to discover the parent pom without specifying the
version, the artifactId and the groupId of the parent, which would be
_very_ handy. However, I get the following error when launching maven:
"Missing groupId element from parent element".

So my question is: is this property working? I guess no:
http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
But maybe this doesn't work this way. So my second question is: how does
this property work?

Thanks in advance for your answers!

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by fa...@mpsa.com.



> To be honest, I don't know maven-core enough to answer your question.
> Could you please file an improvement in Jira with this description? I
> will try to discuss this ASAP with the dev team.
>
> Otherwise, I think this make sense.

Great :o)
http://jira.codehaus.org/browse/MNG-954 : I let you specify a fix version
for this improvement - IMHO, this is quite important and should be fixed
for final 2.0.

Thanks!

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by Stephane Nicoll <st...@gmail.com>.
On 9/22/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
> Kenney, Stéphane,
>
> Thanks for your answers! :o)

You're welcome.

> As for the 'excluded' property, this may be helpful in some cases, but
> IMHO, I'm not sure this is the good way to handle the problem.

Yes, I agree. Actually, I did not faced the problem. Thanks for
pointing this out!

> So I would say that the packaging for an Ear should be more complex
> concerning the dependencies declared in its pom:
> - for a Jar or an Ejb, then I agree that the transitive dependencies must
> be included in the Ear
> - for a War, the default behaviour should be to include only the War
> itself, without all its transitive dependencies. There could be a property
> 'included' to tell the packager to take a specific dependency of the War
> and put it up in the Ear. (this would be the opposite behaviour as
> currently with the 'excluded' property)
>
> What do you guys think of this? Is this relevant? If so, is this feasible?
>

To be honest, I don't know maven-core enough to answer your question.
Could you please file an improvement in Jira with this description? I
will try to discuss this ASAP with the dev team.

Otherwise, I think this make sense.

Cheers,
Stéphane


>
> On 9/20/05, Kenney Westerhof <ke...@apache.org> wrote:
> > On Tue, 20 Sep 2005 fabrice.belingard@mpsa.com wrote:
> >
> > Hi,
> >
> >
> > > Nobody has an answer for these 2 little questions?
>
> Sorry, was quite busy yesterday.
>
> > > 1- how can I tell the Ear plugin to use a specific root-context for a
> War
> > > when it generates the application.xml? (instead of using the
> artifactId)
> > > Something like the "<ear.appxml.war.context-root>" in m1.
> >
> > Use the plugin configuration. You can specify configuration options for
> > the modules:
> >
> >   <modules>
> >     <webModule>
> >       <contextRoot>/yourContextRoot/</contextRoot>
> >       <uri>the_web_uri</uri> <!-- if needed.. -->
> >     </webModule>
> >   </modules>
> >
> > Maybe Stephane Nicoll can confirm if this is correct?
>
> It is except that you need of course to identify which artifact you
> want to customize. There's an help page on the web site but it's not
> linked properly :/
>
> http://maven.apache.org/maven2/plugins/maven-ear-plugin/configuration-examples.html
>
>
> You should find all usefull information there. We will fix the link for
> beta2.
>
> > > 2- when the plugin generates the Ear, it packages most dependencies of
> the
> > > War module, while they already exist the the WEB-INF/lib of the War
> (and I
> > > don't want them to be copied a second time at the root of the Ear).
> Those
> > > dependencies have a "compile" scope in the pom of the War module. Is it
> the
> > > normal behaviour? Is there a property or something to tell m2 not to
> > > package them?
> >
> > Well this is a bit of a problem.
> > You can specify the dependencies in the war pom with scope 'provided',
> > so they won't end up in the war.
> > This works great if you always use the war within an ear that also has
> > those dependencies, but if you use that war standalone it'll break.
> > Also, those war dependencies are not transferred to the ear project,
> > so you have to respecify them there.
>
> The link above explains the 'excluded' property you can set on an
> artifact to ignore it application.xml generation. As kenny said, this
> is indeed a bit of a problem. I'll think on that, do not hesitate to
> ping us if you have ideas.
>
> Cheers,
> Stéphane
>
> --
> .::You're welcome ::.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
.::You're welcome ::.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by Stephane Nicoll <st...@gmail.com>.
On 9/21/05, Stephane Nicoll <st...@gmail.com> wrote:
>
> The link above explains the 'excluded' property you can set on an
> artifact to ignore it for application.xml generation. 

And, of course, does not copy the artifact in the generated EAR.

Cheers,
Stéphane

-- 
.::You're welcome ::.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by fa...@mpsa.com.



Kenney, Stéphane,

Thanks for your answers! :o)

Indeed, the help page is valuable. The config to set the context-root works
well. :o)

As for the 'excluded' property, this may be helpful in some cases, but
IMHO, I'm not sure this is the good way to handle the problem. Indeed, a
War module usually have lots of depedencies, and :
- usually, you want to have most of them in the WEB-INF/lib of the War, not
in the Ear (for you may have singletons, for instance, that you don't want
to share between Wars)
- the 'excluded' property in this case is not handy because that means you
would have to do this (in the pom of the ear module) for every Jars you
want to exclude (and as I say, Web modules usually have lots of
dependencies). What's more, if you don't use the 'excluded' property, Jars
exist twice (one in the War and once in the Ear).

So I would say that the packaging for an Ear should be more complex
concerning the dependencies declared in its pom:
- for a Jar or an Ejb, then I agree that the transitive dependencies must
be included in the Ear
- for a War, the default behaviour should be to include only the War
itself, without all its transitive dependencies. There could be a property
'included' to tell the packager to take a specific dependency of the War
and put it up in the Ear. (this would be the opposite behaviour as
currently with the 'excluded' property)

What do you guys think of this? Is this relevant? If so, is this feasible?


Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


                                                                           
             Stephane Nicoll                                               
             <stephane.nicoll                                              
             @gmail.com>                                              Pour 
                                       Maven Users List                    
             21/09/2005 08:58          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: Fw :[m2-beta-1] Ear plugin:     
             Maven Users List          root-context & copied JARs/WARs     
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




On 9/20/05, Kenney Westerhof <ke...@apache.org> wrote:
> On Tue, 20 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
>
> > Nobody has an answer for these 2 little questions?

Sorry, was quite busy yesterday.

> > 1- how can I tell the Ear plugin to use a specific root-context for a
War
> > when it generates the application.xml? (instead of using the
artifactId)
> > Something like the "<ear.appxml.war.context-root>" in m1.
>
> Use the plugin configuration. You can specify configuration options for
> the modules:
>
>   <modules>
>     <webModule>
>       <contextRoot>/yourContextRoot/</contextRoot>
>       <uri>the_web_uri</uri> <!-- if needed.. -->
>     </webModule>
>   </modules>
>
> Maybe Stephane Nicoll can confirm if this is correct?

It is except that you need of course to identify which artifact you
want to customize. There's an help page on the web site but it's not
linked properly :/

http://maven.apache.org/maven2/plugins/maven-ear-plugin/configuration-examples.html


You should find all usefull information there. We will fix the link for
beta2.

> > 2- when the plugin generates the Ear, it packages most dependencies of
the
> > War module, while they already exist the the WEB-INF/lib of the War
(and I
> > don't want them to be copied a second time at the root of the Ear).
Those
> > dependencies have a "compile" scope in the pom of the War module. Is it
the
> > normal behaviour? Is there a property or something to tell m2 not to
> > package them?
>
> Well this is a bit of a problem.
> You can specify the dependencies in the war pom with scope 'provided',
> so they won't end up in the war.
> This works great if you always use the war within an ear that also has
> those dependencies, but if you use that war standalone it'll break.
> Also, those war dependencies are not transferred to the ear project,
> so you have to respecify them there.

The link above explains the 'excluded' property you can set on an
artifact to ignore it application.xml generation. As kenny said, this
is indeed a bit of a problem. I'll think on that, do not hesitate to
ping us if you have ideas.

Cheers,
Stéphane

--
.::You're welcome ::.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by Stephane Nicoll <st...@gmail.com>.
On 9/20/05, Kenney Westerhof <ke...@apache.org> wrote:
> On Tue, 20 Sep 2005 fabrice.belingard@mpsa.com wrote:
> 
> Hi,
> 
> 
> > Nobody has an answer for these 2 little questions?

Sorry, was quite busy yesterday.

> > 1- how can I tell the Ear plugin to use a specific root-context for a War
> > when it generates the application.xml? (instead of using the artifactId)
> > Something like the "<ear.appxml.war.context-root>" in m1.
> 
> Use the plugin configuration. You can specify configuration options for
> the modules:
> 
>   <modules>
>     <webModule>
>       <contextRoot>/yourContextRoot/</contextRoot>
>       <uri>the_web_uri</uri> <!-- if needed.. -->
>     </webModule>
>   </modules>
> 
> Maybe Stephane Nicoll can confirm if this is correct?

It is except that you need of course to identify which artifact you
want to customize. There's an help page on the web site but it's not
linked properly :/

http://maven.apache.org/maven2/plugins/maven-ear-plugin/configuration-examples.html

You should find all usefull information there. We will fix the link for beta2.

> > 2- when the plugin generates the Ear, it packages most dependencies of the
> > War module, while they already exist the the WEB-INF/lib of the War (and I
> > don't want them to be copied a second time at the root of the Ear). Those
> > dependencies have a "compile" scope in the pom of the War module. Is it the
> > normal behaviour? Is there a property or something to tell m2 not to
> > package them?
> 
> Well this is a bit of a problem.
> You can specify the dependencies in the war pom with scope 'provided',
> so they won't end up in the war.
> This works great if you always use the war within an ear that also has
> those dependencies, but if you use that war standalone it'll break.
> Also, those war dependencies are not transferred to the ear project,
> so you have to respecify them there.

The link above explains the 'excluded' property you can set on an
artifact to ignore it application.xml generation. As kenny said, this
is indeed a bit of a problem. I'll think on that, do not hesitate to
ping us if you have ideas.

Cheers,
Stéphane

-- 
.::You're welcome ::.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


[m2-beta-1] bug for 'warSourceExcludes' property?

Posted by fa...@mpsa.com.



Hi all,

has anybody already used the 'warSourceExcludes' property of the War
plugin? (didn't find any thread about this)

Because I experience a strange behaviour with this property. When I grab
some Web projects from the CVS of my company, I usually get all the
WEB-INF/lib Jars that the developers put in the CVS:
- With Maven 1, I use the 'maven.war.src.excludes' property to exclude
those Jars ('maven.war.src.excludes=**/lib/*.*'), and it works well: the
Jars packaged in the War are only the ones defined in the pom.
- With m2, I tried to use the 'warSourceExcludes' property, which seemed to
me to be the equivalent property. However, when the War is generated, there
is no jar in the WEB-INF/lib folder. This is as if the plugin is excluding
files after having copied the needed dependencies in the WEB-INF/lib folder
(whereas in the Maven 1 version, it was excluding them before).

Is this a bug or am I missing something?

Thanks for your help! :o)

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs

Posted by Kenney Westerhof <ke...@apache.org>.
On Tue, 20 Sep 2005 fabrice.belingard@mpsa.com wrote:

Hi,


> Nobody has an answer for these 2 little questions?

Sorry but I missed this one!

>
> For the second question, I've struggled with scopes, but it seems that
> because of the transitive dependencies feature, the Ear plugin packages
> every Jar set to compile/runtime in the pom of the War...

See below.

> Fabrice.
>
> ---------------------------------------------------------------------------------------------
>
> Hi guys!
>
> I've 2 little questions about the Ear plugin (version 2.0beta1):
>
> 1- how can I tell the Ear plugin to use a specific root-context for a War
> when it generates the application.xml? (instead of using the artifactId)
> Something like the "<ear.appxml.war.context-root>" in m1.

Use the plugin configuration. You can specify configuration options for
the modules:

  <modules>
    <webModule>
      <contextRoot>/yourContextRoot/</contextRoot>
      <uri>the_web_uri</uri> <!-- if needed.. -->
    </webModule>
  </modules>

Maybe Stephane Nicoll can confirm if this is correct?

I personally use xdoclet and j2ee specific descriptor files within the
WEB-INF directory of the war itself, because you can specify the
location there too, and it'll work even if you deploy the war standalone.
On the other hand, for ears, it's best to use application.xml.

> 2- when the plugin generates the Ear, it packages most dependencies of the
> War module, while they already exist the the WEB-INF/lib of the War (and I
> don't want them to be copied a second time at the root of the Ear). Those
> dependencies have a "compile" scope in the pom of the War module. Is it the
> normal behaviour? Is there a property or something to tell m2 not to
> package them?

Well this is a bit of a problem.
You can specify the dependencies in the war pom with scope 'provided',
so they won't end up in the war.
This works great if you always use the war within an ear that also has
those dependencies, but if you use that war standalone it'll break.
Also, those war dependencies are not transferred to the ear project,
so you have to respecify them there.

>
> Thanks for your help!

Sorry we missed this!

-- Kenney

> Cheers,
> Fabrice.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org