Thanks all for quick responses !!! Special Thanks to Eric Kolotyluk and Manfred Moser.
Blog is super cool. Thanks for posting it. * * * * On Wed, Mar 14, 2012 at 2:51 PM, Amir Gheibi <aghe...@fmep.ag.gov.bc.ca>wrote: > Got it. Thanks. > > -----Original Message----- > From: Eric Kolotyluk [mailto:eric.koloty...@gmail.com] > Sent: March-14-12 2:57 PM > To: Amir Gheibi > Cc: Maven Users List > Subject: Re: Which is the BEST Approach to define Global POM.XML > > Amir, my Project POM has more modules inside (platform.Java & > platform.NET), and they in turn are packaging type "POM" because there are > more modules in those, that typically are types like "JAR" so my structure > looks like > > Corporate POM > +-- Project POM 1 > +--+-- Platform POM 1.1 > +--+--+-- Artifact POM 1.1.1 > +--+--+-- Artifact POM 1.1.2 > +--+-- Platform POM 1.2 > +--+--+-- Artifact POM 1.2.1 > +--+--+-- Artifact POM 1.2.2 > > The Project and Platform POM are just there for structural reasons. For > example if I want I can do a clean and deploy in the Project POM directory > and everything gets built, tested and deployed, or I work on more specific > pieces. > > Cheers, Eric > > On 2012-03-14 2:34 PM, Amir Gheibi wrote: > > Hi Eric, > > > > I was wondering why your project POM's packaging type is "POM". If I > understand correctly, with "POM" packaging type you'd only get 3 default > goals bound to their phases (I read it here: > http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Built-in_Lifecycle_Bindings > ). > > > > Thanks, > > Amir > > > > -----Original Message----- > > From: Eric Kolotyluk [mailto:eric.koloty...@gmail.com] > > Sent: March-14-12 2:22 PM > > To: users@maven.apache.org > > Subject: Re: Which is the BEST Approach to define Global POM.XML > > > > What I do is have a top-level POM like (see below), and then I have my > > top level project POMs reference that (see further below). This may > > not be the best example, as I am still in the process of building the > > infrastructure, but > > > > 1. I put the Parent POM in its own place in source control and I > > manually deploy it with Maven when I make changes. > > 2. You need to do this before creating any Project POMs that reference > > it because they should reference it via Maven and not the file > > system - if you work in a large company you will soon discover why. > > 3. There is of course a bootstrapping issue because now the project > > POMs need to know how to find your Repository Manager, which is why > > I include that information in the top level (Corporate) POM so > > people can use it as a reference. > > 4. As you may gather I am using Sonatype's Nexus as a Repository > Manager. > > 5. We are still developing our corporate repository infrastructure so > > the content of the Corporate POM will evolve over time as our > > corporate governance and policies are better codified. > > > > Does that help? > > > > <?xml version="1.0" encoding="UTF-8"?> <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/xsd/maven-4.0.0.xsd"> > > <!-- > > Copyright (c) My Company 2012 > > > > Proprietary& Confidential > > > > This is the top level POM for My Company Maven projects. It > contains rules and standards common to all projects. > > > > Changes: > > > > 2011-09-23 0.0.1-SNAPSHOT Eric Kolotyluk > > Created initial version for check-in into source control. > > > > 2012-02-27 0.0.1-SNAPSHOT Eric Kolotyluk > > Reconfigured for Nexus 2.0 on sonatype. > > --> > > <modelVersion>4.0.0</modelVersion> > > <groupId>com</groupId> > > <artifactId>my-company</artifactId> > > <version>0.0.1-SNAPSHOT</version> > > <packaging>pom</packaging> > > <name>My Company Corporate POM</name> > > <description>Corporate Project Object Module for standard conventions > > and rules.</description> <developers> <developer> <id>10069959</id> > > <name>Eric Kolotyluk</name> <email>eric.koloty...@gmail.com</email> > > <organization>My Company Ltd.</organization> <timezone>Vancouver > > PDT</timezone> <roles> <role>Software Architect</role> > > <role>Software Developer</role> </roles> </developer> </developers> > > <organization> <name>My Company</name> </organization> > > <distributionManagement> > > <downloadUrl>http://sonatype:8081/nexus/content/groups/public</downloa > > dUrl> > > <repository> > > <uniqueVersion>false</uniqueVersion> > > <id>nexus</id> > > <name>My Company Release Repository</name> > > <url>http://sonatype:8081/nexus/content/repositories/releases</url> > > <layout>default</layout> > > </repository> > > <snapshotRepository> > > <id>nexus</id> > > <name>My Company Snapshot Repository</name> > > <url>http://sonatype:8081/nexus/content/repositories/snapshots</url> > > <layout>default</layout> > > </snapshotRepository> > > </distributionManagement> > > <build> > > </build> > > <repositories> > > <repository> > > <releases> > > <updatePolicy>always</updatePolicy> > > </releases> > > <id>info.collide.mvn</id> > > <name>Collide</name> > > <url>http://sonatype:8081/nexus/content/repositories/info.collide.mvn/ > > </url> > > </repository> > > <repository> > > <id>thirdparty</id> > > <name>3rd party</name> > > <url>http://sonatype:8081/nexus/content/repositories/thirdparty/</url> > > </repository> > > </repositories> > > <dependencies> > > </dependencies> > > <reporting> > > <plugins> > > </plugins> > > </reporting> > > <dependencyManagement> > > </dependencyManagement> > > <properties> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > > </properties> > > </project> > > > > - - - - - - - > > > > <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/xsd/maven-4.0.0.xsd"> > > <modelVersion>4.0.0</modelVersion> > > <parent> > > <groupId>com</groupId> > > <artifactId>my-company</artifactId> > > <version>0.0.1-SNAPSHOT</version> > > </parent> > > <groupId>com.my-company</groupId> > > <artifactId>intersystem</artifactId> > > <version>0.0.2-SNAPSHOT</version> > > <packaging>pom</packaging> > > <name>My Company Intersystem</name> > > <description>Service layer for collaborative, distributed applications > > and services</description> <licenses> <license> <name>My Company > > Intersystem</name> > > <url>https://collaborate.my-company.com/sites/SoftwareStandardsAndGuid > > elines/Intersystem/default.aspx</url> > > <distribution>repo</distribution> > > </license> > > </licenses> > > <developers> > > <developer> > > <id>10069959</id> > > <name>Eric Kolotyluk</name> > > <email>eric.koloty...@gmail.com</email> > > <organization>My Company</organization> <timezone>Vancouver > > PDT</timezone> <roles> <role>Software Architect</role> <role>Software > > Developer</role> <role>Intersystem Architect</role> </roles> > > </developer> </developers> <organization> <name>My Company</name> > > </organization> <distributionManagement> > > <downloadUrl>http://sonatype:8081/nexus/content/groups/public</downloa > > dUrl> > > <repository> > > <uniqueVersion>false</uniqueVersion> > > <id>nexus</id> > > <name>My Company Release Repository</name> > > <url>http://sonatype:8081/nexus/content/repositories/releases</url> > > <layout>default</layout> > > </repository> > > <snapshotRepository> > > <id>nexus</id> > > <name>My Company Snapshot Repository</name> > > <url>http://sonatype:8081/nexus/content/repositories/snapshots</url> > > <layout>default</layout> > > </snapshotRepository> > > </distributionManagement> > > <build> > > </build> > > <repositories> > > <repository> > > <releases> > > <updatePolicy>always</updatePolicy> > > </releases> > > <id>info.collide.mvn</id> > > <name>Collide</name> > > <url>http://sonatype:8081/nexus/content/repositories/info.collide.mvn/ > > </url> > > </repository> > > <repository> > > <id>thirdparty</id> > > <name>3rd party</name> > > <url>http://sonatype:8081/nexus/content/repositories/thirdparty/</url> > > </repository> > > </repositories> > > <dependencies> > > </dependencies> > > <reporting> > > <plugins> > > </plugins> > > </reporting> > > <dependencyManagement> > > </dependencyManagement> > > <properties> > > <net.sf.jni4net.version>0.8.6.0</net.sf.jni4net.version> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > > </properties> > > <modules> > > <module>platform.Java</module> > > <module>platform.NET</module> > > </modules> > > </project> > > > > On 2012-03-14 1:29 PM, Daivish Shah wrote: > >> Hi Maven Team, > >> > >> I am trying to find out what is the best way to define company > >> specific GLOBAL POM.XML. Which each team can inherit it in EACH > Projects. > >> > >> Can some one provide me guideline on that ? Is that going to be > >> profile or just simple POM.XML ? And how to inherit that. Please > >> provide me guideline to implement it. As this is very critical before > >> we implement all projects with MAVEN. > >> > >> Thanks, > >> Daivish. > >> > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >