Hi Sagara,

On Wed, Feb 12, 2014 at 12:07 AM, Sagara Gunathunga <sag...@wso2.com> wrote:

>
> Please find POM restructuring guidelines in addition to things we
> discussed during today's meeting.
>
> 1.  Top level POM file is the 'parent POM' for your project and there is
> no real requirement to have separate Maven module to host parent POM file.
>
> 2. Eliminate POM files available on 'component' , 'service-stub' and
> 'features' directories as there is no gain from them instead directly call
> real Maven modules from parent pom file ( REF - [1] )
>
> e.g -
>
>
>   <modules>
>         <module>service-stubs/service-mgt</module>
>         <module>service-stubs/webapp-mgt</module>
>
>         <module>components/service-mgt</module>
>         <module>components/webapp-mgt</module>
>
>         <module>features/as-runtimes</module>
>
>         <module>features/service-mgt</module>
>         <module>features/webapp-mgt</module>
>
>     </modules>
>
>
>
> [ You can keep same directory structure to enhance human readability ]
>
> 3. You must have a <dependencyManagement>    section on parent POM and
> should define all your project dependencies along with versions. ( REF -
> [1] )
>
>
> 5. You CAN'T have <dependencyManagement>  sections on any other POM file
> other than parent POM.
>
> 6. In each submodule make sure you have Maven dependencies WITHOUT
> versions ( REF - [2] )
>
>  e.g -        <dependency>
>
>             <groupId>org.apache.axis2.wso2</groupId>
>
>             <artifactId>axis2</artifactId>
>
>         </dependency>
>
>
> When you introduce a new Maven dependency define it's version under 
> <dependencyManagement>
> section of parent POM file.
>
> 7. Make sure you have defined following repositories and plugin
> repositories on parent POM file. These will be used to drag SNAPSHOT
> versions of other carbon projects which used as dependencies of your
> project.
>
> <repositories>
>
>
>        <repository>
>             <id>wso2-nexus</id>
>             <name>WSO2 internal Repository</name>
>             <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
>
>             <releases>
>                 <enabled>true</enabled>
>
>                 <updatePolicy>daily</updatePolicy>
>                 <checksumPolicy>ignore</checksumPolicy>
>             </releases>
>         </repository>
>
>
>         <repository>
>             <id>wso2.releases</id>
>             <name>WSO2 internal Repository</name>
>             
> <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
>
>             <releases>
>                 <enabled>true</enabled>
>
>                 <updatePolicy>daily</updatePolicy>
>                 <checksumPolicy>ignore</checksumPolicy>
>             </releases>
>         </repository>
>
>
>         <repository>
>             <id>wso2.snapshots</id>
>             <name>Apache Snapshot Repository</name>
>
>             
> <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
>
>             <snapshots>
>                 <enabled>true</enabled>
>
>                 <updatePolicy>daily</updatePolicy>
>             </snapshots>
>             <releases>
>
>                 <enabled>false</enabled>
>             </releases>
>         </repository>
>
>     </repositories>
>
>
> <pluginRepositories>
>
>         <pluginRepository>
>             <id>wso2.releases</id>
>
>             <name>WSO2 internal Repository</name>
>
>             
> <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
>
>             <releases>
>                 <enabled>true</enabled>
>
>                 <updatePolicy>daily</updatePolicy>
>
>                 <checksumPolicy>ignore</checksumPolicy>
>             </releases>
>
>         </pluginRepository>
>
>
>         <pluginRepository>
>             <id>wso2.snapshots</id>
>             <name>Apache Snapshot Repository</name>
>
>             
> <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
>
>             <snapshots>
>                 <enabled>true</enabled>
>
>                 <updatePolicy>daily</updatePolicy>
>
>             </snapshots>
>             <releases>
>
>                 <enabled>false</enabled>
>             </releases>
>
>         </pluginRepository>
>
>         <pluginRepository>
>             <id>wso2-nexus</id>
>
>             <name>WSO2 internal Repository</name>
>
>             <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
>
>             <releases>
>                 <enabled>true</enabled>
>
>                 <updatePolicy>daily</updatePolicy>
>
>                 <checksumPolicy>ignore</checksumPolicy>
>             </releases>
>
>         </pluginRepository>
>
>     </pluginRepositories>
>
>
>
>
> 8. Make sure you have defined distribution management section  as follows
> on your parent POM file.  Jenkins will use these details to deploy your
> project's SNAPSHOT artefacts into Nexus so that others can use your
> components without building locally.
>
>   <distributionManagement>
>
>         <repository>
>             <id>wso2.releases</id>
>
>             <name>WSO2 internal Repository</name>
>             
> <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
>
>         </repository>
>
>         <snapshotRepository>
>             <id>wso2.snapshots</id>
>
>             <name>Apache Snapshot Repository</name>
>
> Why this is called *Apache* Snapshot Repository ? I guess name should be
changed.

Thanks.

>             
> <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
>
>         </snapshotRepository>
>     </distributionManagement>
>
>
>
>
> Please use carbon-deployment[3] as a reference project.  Eranda/Geeth
> please add if I missed anything.
>
>
> [1] - https://github.com/wso2/carbon-deployment/blob/master/pom.xml
>
> [2] -
> https://github.com/wso2/carbon-deployment/blob/master/components/webapp-mgt/org.wso2.carbon.webapp.mgt.ui/pom.xml
>
> [3] - https://github.com/wso2/carbon-deployment/
>
>
>
> Thanks !
> --
> Sagara Gunathunga
>
> Senior Technical Lead; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;    http://ws.apache.org/
> Linkedin; http://www.linkedin.com/in/ssagara
> Blog ;  http://ssagara.blogspot.com
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Isuru Udana*
Senior
* Software Engineer*
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
twitter: http://twitter.com/isudana
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to