[ 
http://opensource.atlassian.com/projects/roller/browse/ROL-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Petersson updated ROL-1537:
---------------------------------

    Attachment: roller_mvn20070819_0.patch

This patch implements a maven build system for Roller trunk (rev #566690). 

The patch dose not rearrange any of the current project structure and can 
coexist with the current ant build system.  
At this point tests are not included but you may want to check out the mvn 
jetty:run-war command on roller weblogger.

Usage
=====
Some simple use cases to get a maven novice started. 
>From roller root or any sub directory containing a pom:
 * Issue mvn install or mvn clean install to build and install roller artifacts 
in your local maven repository.
 * Issue mvn dependency:analyze to analyze dependencies for the current 
artifact.
>From the roller root directory
 * Issue mvn deploy to deploy roller artifacts to remote maven repository.   
>From root/apps/weblogger/roller-weblogger
 * Issue mvn jetty:run-war to start up and run roller in jetty at 
http://localhost:8080/
>From any pom containing a dependencyManagement section
 * Change a version number for a artifact in a dependencyManagement section to 
run and test roller with a updated dependency.  

For more information and to fetch the latest maven stuff visit 
http://maven.apache.org. You may also want to take look at the known issues 
section below.

Patch Structure
===============
root (you roller root directory) 
 The top level project POM Roller :: Parent.
 * dependencyManagement section for version handling of artifacts used in all 
child sections.  
 * repositories section specifying repository look:up of artifacts used by the 
roller project.
 * modules section specifying the child modules
 * distributionManagement section specifying the repositories to use when 
deploying roller artifacts to a remote maven repository.
   Currently this section specifies dummy test repositories change this to the 
repositories you want to use.    
   
root/components 
 Roller :: Components POM.
 * modules section specifying the child modules.

root/components/core 
 Roller :: Components :: Core POM. Builds the roller-core jar. 
 * dependencies section for artifacts needed by this artifact.
 * maven-jar-plugin in the plugins section for building this artifact.  
 
root/apps 
 Roller :: Apllications POM.
 * dependencyManagement section for version handling of artifacts used in child 
sections (planet,weblogger).
 * modules section specifying the child modules.

root/apps/planet
 Roller :: Roller :: Applications :: Planet POM.
 * modules section specifying the child modules.

root/apps/planet/roller-planet-assembly
 Roller :: Planet :: Assembly POM. Builds the roller-planet-assembly jar needed 
for assembling the planet web and business jars.
 * dependencies section for artifacts needed by this artifact.  
 * Maven 2 Jar Plugin maven-jar-plugin. 
 * OpenJPA Enhancer tool openjpa-maven-plugin.

root/apps/planet/roller-planet-web
 Roller :: Planet :: JAR POM. Assembles the roller-planet-web.jar.
 * Maven Assembly and Dependency plugins that uses the 
roller-planet-assembly.jar to build this artifact. 
 * src/main/assembly/bin.xml file specifying the assembly.

root/apps/planet/roller-planet-business
 Roller :: Planet :: Business POM. Assembles the roller-planet-business.jar.
 * Maven Assembly and Dependency plugins that uses the 
roller-planet-assembly.jar to build this artifact.
 * src/main/assembly/bin.xml file specifying the assembly.

root/apps/planet/roller-planet
 Roller :: Planet :: WAR POM. Builds the roller-planet war.
 * dependencies section for artifacts needed by this artifact.
 * maven-war-plugin in the plugins section for building this artifact.   

root/apps/weblogger
 Roller :: Applications :: Weblogger POM.
 * dependencyManagement section for version handling of artifacts used in child 
sections .
 * modules section specifying the child modules.

root/apps/weblogger/roller-weblogger-assembly
 Roller :: Weblogger :: Assembly POM. Builds the roller-assembly jar needed for 
assembling the web and business jars.
 * dependencies section for artifacts needed by this artifact.  
 * Maven 2 Jar Plugin maven-jar-plugin. 
 * OpenJPA Enhancer tool openjpa-maven-plugin.

root/apps/weblogger/roller-business
 Roller :: Weblogger :: Business POM. Assembles the roller-business jar.
 * Maven Assembly and Dependency plugins that uses the 
roller-weblogger-assembly.jar to build this artifact.
 * Maven AntRun Plugin. Provides the ability to run Ant tasks from within 
Maven2. 
 * build.xml file containing a ant target.
 * src/main/assembly/bin.xml file specifying the assembly.

root/apps/weblogger/roller-web
 Roller :: Weblogger :: JAR POM. Assembles the roller-web.jar
 * Maven Assembly and Dependency plugins that uses the 
roller-weblogger-assembly.jar to build this artifact.
 * src/main/assembly/bin.xml file specifying the assembly.

root/apps/weblogger/roller-weblogger
 Roller :: Weblogger :: WAR POM. Builds the roller-weblogger war.
 * dependencies section for artifacts needed by this artifact.
 * maven-war-plugin in the plugins section for building this artifact.
 * Maven AntRun Plugin. Provides the ability to run Ant tasks from within 
Maven2. 
 * build.xml file containing a ant target.
 * jetty directory containing roller custom properties needed to run roller in 
jetty. The files are set up to run roller with mysql and places the log files 
in the roller-weblogger/target directory. 

Known issues
============
Due to http://jira.codehaus.org/browse/MANTRUN-59 the ant-run target in 
roller-weblogger currently uses jars from the tools directory see 
root/apps/weblogger/roller-weblogger/pom.xml and 
root/apps/weblogger/roller-weblogger/build.xml. I haven't checked lately but 
maybe maven 2.0.7 has a fix for this and are able to use the 
maven.compile.classpath specified in the pom to pull in dependencies. This is 
the only time maven touches roller svn managed jars. 

Some artifacts may currently not be available from a maven repository used by 
roller so you may need to look them up in roller/tools and install them in you 
local repository by issuing the following commands. 
mvn install:install-file -DgroupId=rome -DartifactId=rome-fetcher -Dversion=0.9 
-Dpackaging=jar  -Dfile=rome-fetcher-0.9.jar
mvn install:install-file -DgroupId=commons-id -DartifactId=commons-id 
-Dversion=0.1-SNAPSHOT -Dpackaging=jar  -Dfile=commons-id-0.1-SNAPSHOT.jar
mvn install:install-file -DgroupId=javax.sql -DartifactId=jdbc2_0-stdext 
-Dversion=2.0 -Dpackaging=jar  -Dfile=jdbc2_0-stdext.jar
mvn install:install-file -DgroupId=org.apache.openjpa -DartifactId=openjpa 
-Dversion=0.9.7-incubating-SNAPSHOT -Dpackaging=jar 
-Dfile=openjpa-0.9.7-incubating.jar




> Maven build system for Roller
> -----------------------------
>
>                 Key: ROL-1537
>                 URL: 
> http://opensource.atlassian.com/projects/roller/browse/ROL-1537
>             Project: Roller
>          Issue Type: New Feature
>          Components: Build Process
>    Affects Versions: 4.1
>            Reporter: Peter Petersson
>            Assignee: Roller Unassigned
>            Priority: Minor
>         Attachments: roller_mvn20070819_0.patch
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to