You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alexander Kriegisch <Al...@Kriegisch.name> on 2015/04/09 16:19:44 UTC

Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Hi users and devs.

Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?

Regards
-- 
Alexander Kriegisch


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Manfred Moser <ma...@mosabuam.com>.
Just for reference. Sonatype controls this book and I act as the curator of changes. There is no active work going on but it is all CC licensed and the github repo is available to the public. 

https://github.com/sonatype/maven-reference-en

We do appreciate any pull requests and contributions and I can get them merged and published.

The same applies for the example book btw.

https://github.com/sonatype/maven-example-en

Regards

manfred

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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Alexander Kriegisch <Al...@Kriegisch.name>.
Here is the repo: https://github.com/kriegaex/Maven-Grouped-Test-Dependencies

Please don't bash me for top-posting.
-- 
Alexander Kriegisch
http://scrum-master.de


> Am 10.04.2015 um 13:11 schrieb Barrie Treloar <ba...@gmail.com>:
> 
>> On 10 April 2015 at 20:06, Alexander Kriegisch <Al...@kriegisch.name> wrote:
>> That is exactly the table I tried to understand prior to even writing to the mailing lists and basically the same table as the one I mentioned in my previous answer. I consider myself an advanced Maven user, BTW. Not an expert, but definitely advanced. The explanation is so bad, it needs to be improved and supported by examples (plain, understandable prose would be enough, POM examples would be nice to have).
> 
> 
>> 
>> In addition to that table in chapter 3.4.4 which is not even referenced from the book chapter 3.6.1 explaining usage of the "grouping dependencies" feature, I repeat that it is necessary to mention how to use the feature with test dependencies. I also repeat that I volunteer to contribute if someone tells me how and nobody else wants to improve the documentation. My criticism is valid IMO, but constructive. I am not just complaining. The goal should be to keep questions like mine away from the Maven mailing lists in the future. That is part of the purpose of user documentation, is it not?
> 
> Thanks for volunteering.
> 
> Your best way of working out how it works is to try to build some
> small examples and see.
> The benefit being you will also have your example poms for use in the
> documentation at the same time.
> 
> Maybe build your examples as a git repo so others can see working code
> and/or contribute to the feedback.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Barrie Treloar <ba...@gmail.com>.
On 10 April 2015 at 20:06, Alexander Kriegisch <Al...@kriegisch.name> wrote:
> That is exactly the table I tried to understand prior to even writing to the mailing lists and basically the same table as the one I mentioned in my previous answer. I consider myself an advanced Maven user, BTW. Not an expert, but definitely advanced. The explanation is so bad, it needs to be improved and supported by examples (plain, understandable prose would be enough, POM examples would be nice to have).


>
> In addition to that table in chapter 3.4.4 which is not even referenced from the book chapter 3.6.1 explaining usage of the "grouping dependencies" feature, I repeat that it is necessary to mention how to use the feature with test dependencies. I also repeat that I volunteer to contribute if someone tells me how and nobody else wants to improve the documentation. My criticism is valid IMO, but constructive. I am not just complaining. The goal should be to keep questions like mine away from the Maven mailing lists in the future. That is part of the purpose of user documentation, is it not?

Thanks for volunteering.

Your best way of working out how it works is to try to build some
small examples and see.
The benefit being you will also have your example poms for use in the
documentation at the same time.

Maybe build your examples as a git repo so others can see working code
and/or contribute to the feedback.

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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Alexander Kriegisch <Al...@Kriegisch.name>.
That is exactly the table I tried to understand prior to even writing to the mailing lists and basically the same table as the one I mentioned in my previous answer. I consider myself an advanced Maven user, BTW. Not an expert, but definitely advanced. The explanation is so bad, it needs to be improved and supported by examples (plain, understandable prose would be enough, POM examples would be nice to have).

In addition to that table in chapter 3.4.4 which is not even referenced from the book chapter 3.6.1 explaining usage of the "grouping dependencies" feature, I repeat that it is necessary to mention how to use the feature with test dependencies. I also repeat that I volunteer to contribute if someone tells me how and nobody else wants to improve the documentation. My criticism is valid IMO, but constructive. I am not just complaining. The goal should be to keep questions like mine away from the Maven mailing lists in the future. That is part of the purpose of user documentation, is it not?
-- 
Alexander Kriegisch


> Am 10.04.2015 um 11:00 schrieb nithin kovoor <ni...@oracle.com>:
> 
> The table here provides good information on how transitive dependencies with different scopes work.
> https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
> 
> Thanks,
> Nithin
>> On 4/10/2015 1:14 PM, Alexander Kriegisch wrote:
>> No, sorry, it definitely does not work with Maven 3.0.5 or 3.2.5. I just created two new projects, one simple Java SE "hello world" application with one Spock unit test and one with the GMavenPlus plugin and test dependencies on Groovy and Spock. When I install the pom-packaged dependency project, I can import it in the application project as shown in the reference manual. The plugin is not imported, which was to be expected. Fine, I added it to the application POM. But when it runs, it complains about the missing Groovy dependency even though the dependencies are definitely declared within the dependency POM. It just does not work. 'mvn dependency:tree' proves that.
>> 
>> (Spending some time with desperate experiments...)
>> 
>> OMG, it works if I declare a default scope for my dependencies in the dependency POM instead of a test scope! Why is that? I only need Groovy and Spock during tests, not during runtime. The (for me rather counter-intuitive) solution is to declare the test scope when "importing" the dependency pom, like so:
>> 
>> <dependency>
>>   <groupId>...
>>   <artifactId>...
>>   <version>...
>>   <type>pom</type>
>>   <scope>test</scope>
>> </dependency>
>> 
>> While this works, I have to decide about the scope of my test dependencies not where they are declared in the dependency module, but each time they are included. I also cannot mix test and compile dependencies in my dependency POM, because after import they all have the same scope.
>> 
>> Maybe all this is common knowledge, but the reference manual does not mention it at all. I think it should. Can I help extending it? I mean, is it based on a wiki or so?
>> 
>> I would be glad about so e feedback and maybe an explanation about dependency scope inheritance. In the same manual I have seen a mysterious table explaining transitive dependencies and scope in chapter 3.4.4, but I do not really understand it. Maybe if I did I would understand why my approach did not work as expected.
>> 
>> Regards
> 
> -- 
> <http://www.oracle.com> Nithin Kovoor | Principal Member Technical Staff
> Phone: +918041086083 <tel:+918041086083> | Mobile: +9880480059 <tel:+9880480059>
> Oracle Server Technologies
> 
> ORACLE India | 560029 Bangalore
> <http://www.oracle.com/commitment> Oracle is committed to developing practices and products that help protect the environment

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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by nithin kovoor <ni...@oracle.com>.
The table here provides good information on how transitive dependencies 
with different scopes work.
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

Thanks,
Nithin
On 4/10/2015 1:14 PM, Alexander Kriegisch wrote:
> No, sorry, it definitely does not work with Maven 3.0.5 or 3.2.5. I just created two new projects, one simple Java SE "hello world" application with one Spock unit test and one with the GMavenPlus plugin and test dependencies on Groovy and Spock. When I install the pom-packaged dependency project, I can import it in the application project as shown in the reference manual. The plugin is not imported, which was to be expected. Fine, I added it to the application POM. But when it runs, it complains about the missing Groovy dependency even though the dependencies are definitely declared within the dependency POM. It just does not work. 'mvn dependency:tree' proves that.
>
> (Spending some time with desperate experiments...)
>
> OMG, it works if I declare a default scope for my dependencies in the dependency POM instead of a test scope! Why is that? I only need Groovy and Spock during tests, not during runtime. The (for me rather counter-intuitive) solution is to declare the test scope when "importing" the dependency pom, like so:
>
> <dependency>
>    <groupId>...
>    <artifactId>...
>    <version>...
>    <type>pom</type>
>    <scope>test</scope>
> </dependency>
>
> While this works, I have to decide about the scope of my test dependencies not where they are declared in the dependency module, but each time they are included. I also cannot mix test and compile dependencies in my dependency POM, because after import they all have the same scope.
>
> Maybe all this is common knowledge, but the reference manual does not mention it at all. I think it should. Can I help extending it? I mean, is it based on a wiki or so?
>
> I would be glad about so e feedback and maybe an explanation about dependency scope inheritance. In the same manual I have seen a mysterious table explaining transitive dependencies and scope in chapter 3.4.4, but I do not really understand it. Maybe if I did I would understand why my approach did not work as expected.
>
> Regards

-- 
<http://www.oracle.com> Nithin Kovoor | Principal Member Technical Staff
Phone: +918041086083 <tel:+918041086083> | Mobile: +9880480059 
<tel:+9880480059>
Oracle Server Technologies

ORACLE India | 560029 Bangalore
<http://www.oracle.com/commitment> Oracle is committed to developing 
practices and products that help protect the environment

Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Chris Graham <ch...@gmail.com>.
I have had issues with scope dependency issues. I opened an issue on it
once, but I think that it was blanket closed in one of the issue clean
outs. Let me find one of my WAS based projects and I'll see what I had.


On Fri, Apr 10, 2015 at 5:44 PM, Alexander Kriegisch <
Alexander@kriegisch.name> wrote:

> No, sorry, it definitely does not work with Maven 3.0.5 or 3.2.5. I just
> created two new projects, one simple Java SE "hello world" application with
> one Spock unit test and one with the GMavenPlus plugin and test
> dependencies on Groovy and Spock. When I install the pom-packaged
> dependency project, I can import it in the application project as shown in
> the reference manual. The plugin is not imported, which was to be expected.
> Fine, I added it to the application POM. But when it runs, it complains
> about the missing Groovy dependency even though the dependencies are
> definitely declared within the dependency POM. It just does not work. 'mvn
> dependency:tree' proves that.
>
> (Spending some time with desperate experiments...)
>
> OMG, it works if I declare a default scope for my dependencies in the
> dependency POM instead of a test scope! Why is that? I only need Groovy and
> Spock during tests, not during runtime. The (for me rather
> counter-intuitive) solution is to declare the test scope when "importing"
> the dependency pom, like so:
>
> <dependency>
>   <groupId>...
>   <artifactId>...
>   <version>...
>   <type>pom</type>
>   <scope>test</scope>
> </dependency>
>
> While this works, I have to decide about the scope of my test dependencies
> not where they are declared in the dependency module, but each time they
> are included. I also cannot mix test and compile dependencies in my
> dependency POM, because after import they all have the same scope.
>
> Maybe all this is common knowledge, but the reference manual does not
> mention it at all. I think it should. Can I help extending it? I mean, is
> it based on a wiki or so?
>
> I would be glad about so e feedback and maybe an explanation about
> dependency scope inheritance. In the same manual I have seen a mysterious
> table explaining transitive dependencies and scope in chapter 3.4.4, but I
> do not really understand it. Maybe if I did I would understand why my
> approach did not work as expected.
>
> Regards
> --
> Alexander Kriegisch
>
>
> > Am 09.04.2015 um 16:50 schrieb Robert Patrick <robert.patrick@oracle.com
> >:
> >
> > Yes, this works.  You can create a POM like the one shown in Section
> 3.6.1 *and* install it into your repo.  Then, you can declare a dependency
> on it like so:
> >
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> >  <modelVersion>4.0.0</modelVersion>
> >  <groupId>test.packaging</groupId>
> >  <artifactId>dependency-grouping-pom</artifactId>
> >  <packaging>jar</packaging>
> >  <version>1.0.0</version>
> >  <dependencies>
> >    <dependency>
> >      <groupId>org.sonatype.mavenbook</groupId>
> >      <artifactId>persistence-deps</artifactId>
> >      <version>1.0</version>
> >      <type>pom</type>
> >    </dependency>
> >  </dependencies>
> > </project>
> >
> > --
> > Robert Patrick <ro...@oracle.com>
> > VP, Oracle Corporation
> > 7460 Warren Pkwy, Ste. 300    Office: +1.972.963.2872
> > Frisco, TX 75034, USA        Mobile: +1.469.556.9450
> >
> > Professional Oracle WebLogic Server
> > by Robert Patrick, Gregory Nyberg, and Philip Aston
> > with Josh Bregman and Paul Done
> > Book Home Page: http://www.wrox.com/
> > Kindle Version: http://www.amazon.com/
> >
> >
> > -----Original Message-----
> > From: Alexander Kriegisch [mailto:Alexander@Kriegisch.name]
> > Sent: Thursday, April 09, 2015 9:20 AM
> > To: Users List Maven; Developers List Maven
> > Subject: Wrong info in "Maven: The Complete Reference", chapter 3.6.1
> >
> > Hi users and devs.
> >
> > Am I too stupid to get it working or is the description in chapter
> 3.6.1, "Grouping Dependencies" (
> http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html)
> actually wrong? What is described there does not work at all in Maven 3.x.
> Did it ever?
> >
> > Regards
> > --
> > Alexander Kriegisch
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Alexander Kriegisch <Al...@Kriegisch.name>.
No, sorry, it definitely does not work with Maven 3.0.5 or 3.2.5. I just created two new projects, one simple Java SE "hello world" application with one Spock unit test and one with the GMavenPlus plugin and test dependencies on Groovy and Spock. When I install the pom-packaged dependency project, I can import it in the application project as shown in the reference manual. The plugin is not imported, which was to be expected. Fine, I added it to the application POM. But when it runs, it complains about the missing Groovy dependency even though the dependencies are definitely declared within the dependency POM. It just does not work. 'mvn dependency:tree' proves that.

(Spending some time with desperate experiments...)

OMG, it works if I declare a default scope for my dependencies in the dependency POM instead of a test scope! Why is that? I only need Groovy and Spock during tests, not during runtime. The (for me rather counter-intuitive) solution is to declare the test scope when "importing" the dependency pom, like so:

<dependency>
  <groupId>...
  <artifactId>...
  <version>...
  <type>pom</type>
  <scope>test</scope>
</dependency>

While this works, I have to decide about the scope of my test dependencies not where they are declared in the dependency module, but each time they are included. I also cannot mix test and compile dependencies in my dependency POM, because after import they all have the same scope.

Maybe all this is common knowledge, but the reference manual does not mention it at all. I think it should. Can I help extending it? I mean, is it based on a wiki or so?

I would be glad about so e feedback and maybe an explanation about dependency scope inheritance. In the same manual I have seen a mysterious table explaining transitive dependencies and scope in chapter 3.4.4, but I do not really understand it. Maybe if I did I would understand why my approach did not work as expected.

Regards
-- 
Alexander Kriegisch


> Am 09.04.2015 um 16:50 schrieb Robert Patrick <ro...@oracle.com>:
> 
> Yes, this works.  You can create a POM like the one shown in Section 3.6.1 *and* install it into your repo.  Then, you can declare a dependency on it like so:
> 
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>test.packaging</groupId>
>  <artifactId>dependency-grouping-pom</artifactId>
>  <packaging>jar</packaging>
>  <version>1.0.0</version>
>  <dependencies>
>    <dependency>
>      <groupId>org.sonatype.mavenbook</groupId>
>      <artifactId>persistence-deps</artifactId>
>      <version>1.0</version>
>      <type>pom</type>
>    </dependency>
>  </dependencies>
> </project>  
> 
> --
> Robert Patrick <ro...@oracle.com>
> VP, Oracle Corporation
> 7460 Warren Pkwy, Ste. 300    Office: +1.972.963.2872
> Frisco, TX 75034, USA        Mobile: +1.469.556.9450
> 
> Professional Oracle WebLogic Server
> by Robert Patrick, Gregory Nyberg, and Philip Aston
> with Josh Bregman and Paul Done
> Book Home Page: http://www.wrox.com/
> Kindle Version: http://www.amazon.com/
> 
> 
> -----Original Message-----
> From: Alexander Kriegisch [mailto:Alexander@Kriegisch.name] 
> Sent: Thursday, April 09, 2015 9:20 AM
> To: Users List Maven; Developers List Maven
> Subject: Wrong info in "Maven: The Complete Reference", chapter 3.6.1
> 
> Hi users and devs.
> 
> Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?
> 
> Regards
> -- 
> Alexander Kriegisch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Alexander Kriegisch <Al...@Kriegisch.name>.
No, sorry, it definitely does not work with Maven 3.0.5 or 3.2.5. I just created two new projects, one simple Java SE "hello world" application with one Spock unit test and one with the GMavenPlus plugin and test dependencies on Groovy and Spock. When I install the pom-packaged dependency project, I can import it in the application project as shown in the reference manual. The plugin is not imported, which was to be expected. Fine, I added it to the application POM. But when it runs, it complains about the missing Groovy dependency even though the dependencies are definitely declared within the dependency POM. It just does not work. 'mvn dependency:tree' proves that.

(Spending some time with desperate experiments...)

OMG, it works if I declare a default scope for my dependencies in the dependency POM instead of a test scope! Why is that? I only need Groovy and Spock during tests, not during runtime. The (for me rather counter-intuitive) solution is to declare the test scope when "importing" the dependency pom, like so:

<dependency>
  <groupId>...
  <artifactId>...
  <version>...
  <type>pom</type>
  <scope>test</scope>
</dependency>

While this works, I have to decide about the scope of my test dependencies not where they are declared in the dependency module, but each time they are included. I also cannot mix test and compile dependencies in my dependency POM, because after import they all have the same scope.

Maybe all this is common knowledge, but the reference manual does not mention it at all. I think it should. Can I help extending it? I mean, is it based on a wiki or so?

I would be glad about so e feedback and maybe an explanation about dependency scope inheritance. In the same manual I have seen a mysterious table explaining transitive dependencies and scope in chapter 3.4.4, but I do not really understand it. Maybe if I did I would understand why my approach did not work as expected.

Regards
-- 
Alexander Kriegisch


> Am 09.04.2015 um 16:50 schrieb Robert Patrick <ro...@oracle.com>:
> 
> Yes, this works.  You can create a POM like the one shown in Section 3.6.1 *and* install it into your repo.  Then, you can declare a dependency on it like so:
> 
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>test.packaging</groupId>
>  <artifactId>dependency-grouping-pom</artifactId>
>  <packaging>jar</packaging>
>  <version>1.0.0</version>
>  <dependencies>
>    <dependency>
>      <groupId>org.sonatype.mavenbook</groupId>
>      <artifactId>persistence-deps</artifactId>
>      <version>1.0</version>
>      <type>pom</type>
>    </dependency>
>  </dependencies>
> </project>  
> 
> --
> Robert Patrick <ro...@oracle.com>
> VP, Oracle Corporation
> 7460 Warren Pkwy, Ste. 300    Office: +1.972.963.2872
> Frisco, TX 75034, USA        Mobile: +1.469.556.9450
> 
> Professional Oracle WebLogic Server
> by Robert Patrick, Gregory Nyberg, and Philip Aston
> with Josh Bregman and Paul Done
> Book Home Page: http://www.wrox.com/
> Kindle Version: http://www.amazon.com/
> 
> 
> -----Original Message-----
> From: Alexander Kriegisch [mailto:Alexander@Kriegisch.name] 
> Sent: Thursday, April 09, 2015 9:20 AM
> To: Users List Maven; Developers List Maven
> Subject: Wrong info in "Maven: The Complete Reference", chapter 3.6.1
> 
> Hi users and devs.
> 
> Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?
> 
> Regards
> -- 
> Alexander Kriegisch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

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


RE: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Robert Patrick <ro...@oracle.com>.
Yes, this works.  You can create a POM like the one shown in Section 3.6.1 *and* install it into your repo.  Then, you can declare a dependency on it like so:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>test.packaging</groupId>
  <artifactId>dependency-grouping-pom</artifactId>
  <packaging>jar</packaging>
  <version>1.0.0</version>
  <dependencies>
    <dependency>
      <groupId>org.sonatype.mavenbook</groupId>
      <artifactId>persistence-deps</artifactId>
      <version>1.0</version>
      <type>pom</type>
    </dependency>
  </dependencies>
</project>  

--
Robert Patrick <ro...@oracle.com>
VP, Oracle Corporation
7460 Warren Pkwy, Ste. 300	Office: +1.972.963.2872
Frisco, TX 75034, USA		Mobile: +1.469.556.9450

Professional Oracle WebLogic Server
by Robert Patrick, Gregory Nyberg, and Philip Aston
with Josh Bregman and Paul Done
Book Home Page: http://www.wrox.com/
Kindle Version: http://www.amazon.com/


-----Original Message-----
From: Alexander Kriegisch [mailto:Alexander@Kriegisch.name] 
Sent: Thursday, April 09, 2015 9:20 AM
To: Users List Maven; Developers List Maven
Subject: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Hi users and devs.

Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?

Regards
-- 
Alexander Kriegisch


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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Anders Hammar <an...@hammar.net>.
It works with Maven 3.0.4 at least. I have a customer that uses that for
the deps of their app server platform.

/Anders

On Thu, Apr 9, 2015 at 4:19 PM, Alexander Kriegisch <
Alexander@kriegisch.name> wrote:

> Hi users and devs.
>
> Am I too stupid to get it working or is the description in chapter 3.6.1,
> "Grouping Dependencies" (
> http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html)
> actually wrong? What is described there does not work at all in Maven 3.x.
> Did it ever?
>
> Regards
> --
> Alexander Kriegisch
>
>

RE: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Robert Patrick <ro...@oracle.com>.
Yes, this works.  You can create a POM like the one shown in Section 3.6.1 *and* install it into your repo.  Then, you can declare a dependency on it like so:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>test.packaging</groupId>
  <artifactId>dependency-grouping-pom</artifactId>
  <packaging>jar</packaging>
  <version>1.0.0</version>
  <dependencies>
    <dependency>
      <groupId>org.sonatype.mavenbook</groupId>
      <artifactId>persistence-deps</artifactId>
      <version>1.0</version>
      <type>pom</type>
    </dependency>
  </dependencies>
</project>  

--
Robert Patrick <ro...@oracle.com>
VP, Oracle Corporation
7460 Warren Pkwy, Ste. 300	Office: +1.972.963.2872
Frisco, TX 75034, USA		Mobile: +1.469.556.9450

Professional Oracle WebLogic Server
by Robert Patrick, Gregory Nyberg, and Philip Aston
with Josh Bregman and Paul Done
Book Home Page: http://www.wrox.com/
Kindle Version: http://www.amazon.com/


-----Original Message-----
From: Alexander Kriegisch [mailto:Alexander@Kriegisch.name] 
Sent: Thursday, April 09, 2015 9:20 AM
To: Users List Maven; Developers List Maven
Subject: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Hi users and devs.

Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?

Regards
-- 
Alexander Kriegisch


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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Alexander Kriegisch <Al...@Kriegisch.name>.
I am not talking about packaging dependencies into an assembly JAR, neither does the reference manual in the chapter I have pointed to.

Thanks anyway
-- 
Alexander Kriegisch


> Am 09.04.2015 um 17:21 schrieb Ron Wheeler <rw...@artifact-software.com>:
> 
> 
> http://blog.artifact-software.com/tech/?p=121
> Does this help.
> We have been doing this for years.
> 
> What problems are you having?
> Don't be afraid to look inside the JAR files to see if the contents match your expectations.
> Watch out for duplicate filenames. Only 1 will survive.
> 
> Ron
> 
> 
>> On 09/04/2015 10:19 AM, Alexander Kriegisch wrote:
>> Hi users and devs.
>> 
>> Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?
>> 
>> Regards
> 
> 
> -- 
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
> 
> 
> ---------------------------------------------------------------------
> 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: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Ron Wheeler <rw...@artifact-software.com>.
http://blog.artifact-software.com/tech/?p=121
Does this help.
We have been doing this for years.

What problems are you having?
Don't be afraid to look inside the JAR files to see if the contents 
match your expectations.
Watch out for duplicate filenames. Only 1 will survive.

Ron


On 09/04/2015 10:19 AM, Alexander Kriegisch wrote:
> Hi users and devs.
>
> Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?
>
> Regards


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: Wrong info in "Maven: The Complete Reference", chapter 3.6.1

Posted by Chris Graham <ch...@gmail.com>.
Yes it works as advertised. I use it for all of my websphere projects.

Sent from my iPad

> On 10 Apr 2015, at 12:19 am, Alexander Kriegisch <Al...@Kriegisch.name> wrote:
> 
> Hi users and devs.
> 
> Am I too stupid to get it working or is the description in chapter 3.6.1, "Grouping Dependencies" (http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html) actually wrong? What is described there does not work at all in Maven 3.x. Did it ever?
> 
> Regards
> -- 
> Alexander Kriegisch
> 

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