You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Wooten <jw...@shoulderscorp.com> on 2009/02/21 14:48:49 UTC

Using super pom

I have the following file structure:

/Deep6MasterPOM
	pom.xml
/Foundation
	pom.xml

I have a local maven repository in ~woo/.m2/repository, of course.

I'm trying to put a few common things into the Deep6MasterPOM like the  
JDepends plugin for later components of the entire Deep6 build to use.
Right now, I have the Deep6MasterPOM/pom.xml as
--------------
<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>com.areteq</groupId>
   <artifactId>Deep6MasterPOM</artifactId>
   <packaging>pom</packaging>
   <modules>
     <module>../Foundation</module>
   </modules>
   <version>0.0.1-SNAPSHOT</version>
   <name>Deep6MasterPOM</name>
   <url>http://maven.apache.org</url>
   <description>This project provides a Super POM with the JDepend  
plugin specified</description>
   <inceptionYear>Feb-20-2009</inceptionYear>
   <issueManagement>
   	<system>Mantis</system>
   	<url>http://localhost/~woo/mantis</url>
   </issueManagement>
   <developers>
   	<developer>
   		<id>woo</id>
   		<name>John Wooten</name>
   		<email>jwooten@shoulderscorp.com</email>
   		<organization>ShouldersCorp</organization>
   		<organizationUrl>http://www.shoulderscorp.com</organizationUrl>
   		<timezone>EST</timezone>
   		<roles>
   			<role>Architect/Lead-Developer</role>
   		</roles>
   	</developer>
   </developers>
   <scm>
   	<connection>scm:svn:svn+ssh://woo37830@www.areteq.com/Deep6</ 
connection>
   	<tag>Deep6Master</tag>
   	<url>http://localhost</url>
   </scm>
   <organization>
   	<name>ShouldersCorp.</name>
   	<url>http://www.shoulderscorp.com</url>
   </organization>
   <!-- repositories>
   </repositories -->
   <dependencies>
   	<dependency>
   		<groupId>junit</groupId>
   		<artifactId>junit</artifactId>
   		<version>3.8.1</version>
   		<scope>test</scope>
   	</dependency>
   </dependencies>
    <reporting>
   <plugins>
     <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>jdepend-maven-plugin</artifactId>
     </plugin>
    </plugins>
  </reporting>

</project>

----------
and the /Foundation/pom.xml as

<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 
">
   <parent>
     <groupId>com.areteq</groupId>
     <artifactId>Deep6MasterPOM</artifactId>
     <version>1</version>
     <relativePath>../Deep6MasterPOM/pom.xml</relativePath>
   </parent>
  <modelVersion>4.0.0</modelVersion>
   <artifactId>Foundation</artifactId>
   <name>Foundation</name>
   <version>0.0.1-SNAPSHOT</version>
   <description>The base classes for all AreteQ projects</description>
   <repositories>
     <!--   repository>
       <id>local</id>
       <name>Local Repository Switchboard</name>
       <layout>default</layout>
       <url>file://Users/woo/</url>
       <snapshots>
         <enabled>false</enabled>
       </snapshots>
     </repository -->
   </repositories>

</project>

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

My intent is to have the mvn site:site for Foundation use the super  
pom (i.e. parent ) and incorporate that into the child pom, so that  
the JDepends works there as
well as other things I'll have in common.

1)  Should I be creating a pom in Deep6MasterPOM/pom.xml?  Apparently  
when Foundation tries to run, it looks in the maven remote repository  
for
my pom file for Deep6MasterPOM?

-------
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/com/areteq/Deep6MasterPOM/1/Deep6MasterPOM-1.pom
[ERROR]

Failed to resolve parent-POM from repository.

Parent POM Information:

Group-Id: com.areteq
Artifact-Id: Deep6MasterPOM
Version: 1

Local Repository: /Users/woo/.m2/repository

Remote Repositories:
central -> http://repo1.maven.org/maven2

Reason: Unable to download the artifact from any repository

   com.areteq:Deep6MasterPOM:pom:1

from the specified remote repositories:
   central (http://repo1.maven.org/maven2)



Project Id: [inherited]:Foundation:jar:0.0.1-SNAPSHOT
 From file: /Users/woo/Development/workspaces/Qworkspace/Foundation/ 
pom.xml



[INFO]  
------------------------------------------------------------------------
[INFO] For more information, run with the -e flag
[INFO]  
------------------------------------------------------------------------
[INFO]  + Ignoring build failures

How do I make it keep my stuff local, and use the master only for the  
jars, etc. that it needs?



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


Re: Using super pom

Posted by John Wooten <jw...@shoulderscorp.com>.
Oh, BTW, when I do a maven clean, it removes the target/classes  
folder.  That is where maven is supposed to compile the classes.  Do I  
have to separately compile within Eclipse, or can maven do the compile  
also?

On Feb 21, 2009, at 1:12 PM, Rusty Wright wrote:

> John, go to sonatype.com and look at their book;
>
> http://www.sonatype.com/documentation/books
>
> I was able to figure it out from that and they're good at exhorting  
> you to use best practices.
>
> Another good online book is
>
> http://www.exist.com/better-build-maven
>
>
>
> John Wooten wrote:
>> Thanks,
>> I think the problem is not understand the life cycle of a maven  
>> build and how these things relate.
>> So, as I understand it, you create a master pom, no modules, but  
>> default information.  Then mvn install it to put it into a  
>> repository.  It should be a "pop" package, though.
>> Then in the child pom refer to the same release number as 0.0.1- 
>> SNAPSHOT in this case?
>> On Feb 21, 2009, at 10:13 AM, Wendy Smoak wrote:
>>> On Sat, Feb 21, 2009 at 6:48 AM, John Wooten <jwooten@shoulderscorp.com 
>>> > wrote:
>>>> I have the following file structure:
>>>>
>>>> /Deep6MasterPOM
>>>>      pom.xml
>>>> /Foundation
>>>>      pom.xml
>>>>
>>>> I have a local maven repository in ~woo/.m2/repository, of course.
>>>>
>>>> I'm trying to put a few common things into the Deep6MasterPOM  
>>>> like the
>>>> JDepends plugin for later components of the entire Deep6 build to  
>>>> use.
>>>> Right now, I have the Deep6MasterPOM/pom.xml as
>>>> --------------
>>>> <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>com.areteq</groupId>
>>>> <artifactId>Deep6MasterPOM</artifactId>
>>>> <packaging>pom</packaging>
>>>> <modules>
>>>>  <module>../Foundation</module>
>>>> </modules>
>>>
>>> I would not expect to see modules in a master pom.  Typically you  
>>> have
>>> an organization-wide master pom that sets defaults at a high level.
>>> It has a separate release cycle, and no modules.
>>>
>>>> <version>0.0.1-SNAPSHOT</version>
>>>
>>> So the version of Deep6MasterPOM is 0.0.1-SNAPSHOT...
>>>
>>>> and the /Foundation/pom.xml as
>>> ...
>>>> <parent>
>>>>  <groupId>com.areteq</groupId>
>>>>  <artifactId>Deep6MasterPOM</artifactId>
>>>>  <version>1</version>
>>>>  <relativePath>../Deep6MasterPOM/pom.xml</relativePath>
>>>> </parent>
>>>
>>> ...but you're trying to use version 1, which probably hasn't been  
>>> released yet.
>>>
>>>> How do I make it keep my stuff local, and use the master only for  
>>>> the jars,
>>>> etc. that it needs?
>>>
>>> Use 'mvn install' to put it in your local repository, and use the
>>> correct version number.
>>>
>>> -- 
>>> Wendy
>>>
>>> ---------------------------------------------------------------------
>>> 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: Using super pom

Posted by John Wooten <jw...@shoulderscorp.com>.
Thanks,

I'm getting those printed out so I can read a bit more leisurely.  I  
finally copied the pom.xml to the directory above the various eclipse  
projects and it seems to find them now.  I keep getting errors now  
about some of the tools ( plugins ) not finding VM software,  and not  
being able to unzip some file that I didn't even know I had.

On Feb 21, 2009, at 1:12 PM, Rusty Wright wrote:

> John, go to sonatype.com and look at their book;
>
> http://www.sonatype.com/documentation/books
>
> I was able to figure it out from that and they're good at exhorting  
> you to use best practices.
>
> Another good online book is
>
> http://www.exist.com/better-build-maven
>
>
>
> John Wooten wrote:
>> Thanks,
>> I think the problem is not understand the life cycle of a maven  
>> build and how these things relate.
>> So, as I understand it, you create a master pom, no modules, but  
>> default information.  Then mvn install it to put it into a  
>> repository.  It should be a "pop" package, though.
>> Then in the child pom refer to the same release number as 0.0.1- 
>> SNAPSHOT in this case?
>> On Feb 21, 2009, at 10:13 AM, Wendy Smoak wrote:
>>> On Sat, Feb 21, 2009 at 6:48 AM, John Wooten <jwooten@shoulderscorp.com 
>>> > wrote:
>>>> I have the following file structure:
>>>>
>>>> /Deep6MasterPOM
>>>>      pom.xml
>>>> /Foundation
>>>>      pom.xml
>>>>
>>>> I have a local maven repository in ~woo/.m2/repository, of course.
>>>>
>>>> I'm trying to put a few common things into the Deep6MasterPOM  
>>>> like the
>>>> JDepends plugin for later components of the entire Deep6 build to  
>>>> use.
>>>> Right now, I have the Deep6MasterPOM/pom.xml as
>>>> --------------
>>>> <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>com.areteq</groupId>
>>>> <artifactId>Deep6MasterPOM</artifactId>
>>>> <packaging>pom</packaging>
>>>> <modules>
>>>>  <module>../Foundation</module>
>>>> </modules>
>>>
>>> I would not expect to see modules in a master pom.  Typically you  
>>> have
>>> an organization-wide master pom that sets defaults at a high level.
>>> It has a separate release cycle, and no modules.
>>>
>>>> <version>0.0.1-SNAPSHOT</version>
>>>
>>> So the version of Deep6MasterPOM is 0.0.1-SNAPSHOT...
>>>
>>>> and the /Foundation/pom.xml as
>>> ...
>>>> <parent>
>>>>  <groupId>com.areteq</groupId>
>>>>  <artifactId>Deep6MasterPOM</artifactId>
>>>>  <version>1</version>
>>>>  <relativePath>../Deep6MasterPOM/pom.xml</relativePath>
>>>> </parent>
>>>
>>> ...but you're trying to use version 1, which probably hasn't been  
>>> released yet.
>>>
>>>> How do I make it keep my stuff local, and use the master only for  
>>>> the jars,
>>>> etc. that it needs?
>>>
>>> Use 'mvn install' to put it in your local repository, and use the
>>> correct version number.
>>>
>>> -- 
>>> Wendy
>>>
>>> ---------------------------------------------------------------------
>>> 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: Using super pom

Posted by Rusty Wright <ru...@gmail.com>.
John, go to sonatype.com and look at their book;

http://www.sonatype.com/documentation/books

I was able to figure it out from that and they're good at exhorting you to use best practices.

Another good online book is

http://www.exist.com/better-build-maven



John Wooten wrote:
> Thanks,
> 
> I think the problem is not understand the life cycle of a maven build 
> and how these things relate.
> 
> So, as I understand it, you create a master pom, no modules, but default 
> information.  Then mvn install it to put it into a repository.  It 
> should be a "pop" package, though.
> 
> Then in the child pom refer to the same release number as 0.0.1-SNAPSHOT 
> in this case?
> 
> 
> On Feb 21, 2009, at 10:13 AM, Wendy Smoak wrote:
> 
>> On Sat, Feb 21, 2009 at 6:48 AM, John Wooten 
>> <jw...@shoulderscorp.com> wrote:
>>> I have the following file structure:
>>>
>>> /Deep6MasterPOM
>>>       pom.xml
>>> /Foundation
>>>       pom.xml
>>>
>>> I have a local maven repository in ~woo/.m2/repository, of course.
>>>
>>> I'm trying to put a few common things into the Deep6MasterPOM like the
>>> JDepends plugin for later components of the entire Deep6 build to use.
>>> Right now, I have the Deep6MasterPOM/pom.xml as
>>> --------------
>>> <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>com.areteq</groupId>
>>> <artifactId>Deep6MasterPOM</artifactId>
>>> <packaging>pom</packaging>
>>> <modules>
>>>   <module>../Foundation</module>
>>> </modules>
>>
>> I would not expect to see modules in a master pom.  Typically you have
>> an organization-wide master pom that sets defaults at a high level.
>> It has a separate release cycle, and no modules.
>>
>>> <version>0.0.1-SNAPSHOT</version>
>>
>> So the version of Deep6MasterPOM is 0.0.1-SNAPSHOT...
>>
>>> and the /Foundation/pom.xml as
>> ...
>>> <parent>
>>>   <groupId>com.areteq</groupId>
>>>   <artifactId>Deep6MasterPOM</artifactId>
>>>   <version>1</version>
>>>   <relativePath>../Deep6MasterPOM/pom.xml</relativePath>
>>> </parent>
>>
>> ...but you're trying to use version 1, which probably hasn't been 
>> released yet.
>>
>>> How do I make it keep my stuff local, and use the master only for the 
>>> jars,
>>> etc. that it needs?
>>
>> Use 'mvn install' to put it in your local repository, and use the
>> correct version number.
>>
>> -- 
>> Wendy
>>
>> ---------------------------------------------------------------------
>> 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: Using super pom

Posted by John Wooten <jw...@shoulderscorp.com>.
Thanks,

I think the problem is not understand the life cycle of a maven build  
and how these things relate.

So, as I understand it, you create a master pom, no modules, but  
default information.  Then mvn install it to put it into a  
repository.  It should be a "pop" package, though.

Then in the child pom refer to the same release number as 0.0.1- 
SNAPSHOT in this case?


On Feb 21, 2009, at 10:13 AM, Wendy Smoak wrote:

> On Sat, Feb 21, 2009 at 6:48 AM, John Wooten <jwooten@shoulderscorp.com 
> > wrote:
>> I have the following file structure:
>>
>> /Deep6MasterPOM
>>       pom.xml
>> /Foundation
>>       pom.xml
>>
>> I have a local maven repository in ~woo/.m2/repository, of course.
>>
>> I'm trying to put a few common things into the Deep6MasterPOM like  
>> the
>> JDepends plugin for later components of the entire Deep6 build to  
>> use.
>> Right now, I have the Deep6MasterPOM/pom.xml as
>> --------------
>> <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>com.areteq</groupId>
>> <artifactId>Deep6MasterPOM</artifactId>
>> <packaging>pom</packaging>
>> <modules>
>>   <module>../Foundation</module>
>> </modules>
>
> I would not expect to see modules in a master pom.  Typically you have
> an organization-wide master pom that sets defaults at a high level.
> It has a separate release cycle, and no modules.
>
>> <version>0.0.1-SNAPSHOT</version>
>
> So the version of Deep6MasterPOM is 0.0.1-SNAPSHOT...
>
>> and the /Foundation/pom.xml as
> ...
>> <parent>
>>   <groupId>com.areteq</groupId>
>>   <artifactId>Deep6MasterPOM</artifactId>
>>   <version>1</version>
>>   <relativePath>../Deep6MasterPOM/pom.xml</relativePath>
>> </parent>
>
> ...but you're trying to use version 1, which probably hasn't been  
> released yet.
>
>> How do I make it keep my stuff local, and use the master only for  
>> the jars,
>> etc. that it needs?
>
> Use 'mvn install' to put it in your local repository, and use the
> correct version number.
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> 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: Using super pom

Posted by Wendy Smoak <ws...@gmail.com>.
On Sat, Feb 21, 2009 at 6:48 AM, John Wooten <jw...@shoulderscorp.com> wrote:
> I have the following file structure:
>
> /Deep6MasterPOM
>        pom.xml
> /Foundation
>        pom.xml
>
> I have a local maven repository in ~woo/.m2/repository, of course.
>
> I'm trying to put a few common things into the Deep6MasterPOM like the
> JDepends plugin for later components of the entire Deep6 build to use.
> Right now, I have the Deep6MasterPOM/pom.xml as
> --------------
> <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>com.areteq</groupId>
>  <artifactId>Deep6MasterPOM</artifactId>
>  <packaging>pom</packaging>
>  <modules>
>    <module>../Foundation</module>
>  </modules>

I would not expect to see modules in a master pom.  Typically you have
an organization-wide master pom that sets defaults at a high level.
It has a separate release cycle, and no modules.

>  <version>0.0.1-SNAPSHOT</version>

So the version of Deep6MasterPOM is 0.0.1-SNAPSHOT...

> and the /Foundation/pom.xml as
...
>  <parent>
>    <groupId>com.areteq</groupId>
>    <artifactId>Deep6MasterPOM</artifactId>
>    <version>1</version>
>    <relativePath>../Deep6MasterPOM/pom.xml</relativePath>
>  </parent>

...but you're trying to use version 1, which probably hasn't been released yet.

> How do I make it keep my stuff local, and use the master only for the jars,
> etc. that it needs?

Use 'mvn install' to put it in your local repository, and use the
correct version number.

-- 
Wendy

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