Goal

The goal is to develop a strategy to migrate all existing Glast projects from Maven1 to Maven2 is as unobtrusive a way as possible. The reasons to switch to maven2 are

We will not be able to move all projects over-night, so we need a strategy for which order to move projects, and how projects which have moved can continue to co-exist with projects which have not moved. We will need to provide clear instructions to developers to allow them to move their projects.

We should start with some simple projects, like org-glast-groupmanager.

Requirements

Possible additional features

For Developers

Developing Projects

Parent Repository

All projects have to specify in the pom file the repositories where to find the parent. So the following code is required in every project:

    <repositories>
        <repository>
            <id>glast-maven2</id>
            <name>GLAST Maven 2 central repository</name>
            <url>http://glast-ground.slac.stanford.edu/maven2</url>
        </repository>
        <repository>
            <id>glast-maven2-snapshots</id>
            <name>GLAST Maven2 central SNAPSHOTS repository</name>
            <url>http://glast-ground.slac.stanford.edu/maven2/SNAPSHOTS</url>
        </repository>
    </repositories>

JAR

Parent

A jar project should inherit from org-glast-maven-jar-project; so in your pom add:

    <parent>
        <groupId>glast</groupId>
        <artifactId>org-glast-maven-jar-project</artifactId>
        <version>1.2</version>
    </parent>

WAR

Parent

A jar project should inherit from org-glast-maven-war-project; so in your pom add:

    <parent>
        <groupId>glast</groupId>
        <artifactId>org-glast-maven-war-project</artifactId>
        <version>1.2</version>
    </parent>

Final Name

The final name of the war file is to be set in the pom file as:

    <build>
        <finalName>ServerMapping</finalName>
    </build>

This name is the name of the produced war file and it must be identical to the Application's context. It is also used by the Maven Tomcat Deploy plugin to find the production deployment server.

Source Location

Maven2 expects the source files to be located in src/main/webapp. Some of our projects have the source code in src/webapp. To tell maven2 to look in the latter location add the following to your pom file:

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <warSourceDirectory>${basedir}/src/webapp</warSourceDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>

SCM Plugin

CVS repositories cannot be inherited by the parent pom, so each project will have to add the following lines to their pom file:

    <scm>
        <connection>scm:cvs:pserver:anoncvs@glast-java.slac.stanford.edu:/cvs/java:${artifactId}</connection>
        <developerConnection>scm:cvs:ext:@glast-java.slac.stanford.edu:/cvs/java:${artifactId}</developerConnection>
        <url>http://www-glast.stanford.edu/cgi-bin/viewcvs/${artifactId}/?root=java</url>
    </scm>

Tomcat manager authentification

To be able to deploy to a tomcat server it is necessary to provide the manager's username and password. This can be done in a file called settings.xml located in your HOME\.m2 directory.

For GLAST you have to add the glastServer server element as shown below:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
   <servers>
     <server>
       <id>glastServer</id>
       <username>glast</username>
       <password>GammaRay</password>
     </server>
   </servers>
</settings>

Automatic version

To have the version number picked up automatically from the pom file add the following lines to web.xml

    <context-param>
        <param-name>
            version
        </param-name>
        <param-value>
            ${pom.version}
        </param-value>
    </context-param>

and the following to the jsp:

Version: ${initParam.version}

List of Modules in javacvs

Current Projects

Module Name

Converted

In Hudson

Comments

Contact

org-glast-maven-project

(tick)

(tick)

 

max

org-glast-maven-jar-project

(tick)

(tick)

 

max

org-glast-maven-jar-archetype

(tick)

(tick)

 

max

org-glast-maven-war-project

(tick)

(tick)

 

max

org-glast-maven-war-archetype

(tick)

(tick)

 

max

org-glast-maven-aida-project

(tick)

(tick)

 

max

org-glast-tomcat-deploy-maven-plugin

(tick)

(tick)

 

max

org-glast-base-web

(tick)

(tick)

 

max

org-glast-base-application

(tick)

(tick)

 

max

org-glast-servermapping

(tick)

(tick)

 

max

org-glast-groupmanager

(tick)

(tick)

Unnecessary dependence on aidatld. Still on branch

tony

org-glast-dataportal-astro-model

(tick)

(tick)

 

tony

org-glast-datahandling-common

(tick)

(tick)

 

tony

org-glast-telemetry-trending

(tick)

(tick)

 

max

org-glast-telemetry-trending-web

(tick)

(tick)

 

max

org-glast-installer-gui

(error)

 

 

tony

org-glast-releasemanager

(error)

 

 

tony

TomcatConfigurationBuilder

(error)

 

 

tony

org-glast-dataportal-astro

(error)

 

 

tony

org-glast-reports-web

(error)

 

 

max

org-glast-resources

(error)

 

 

charlotte

oracle

(error)

 

 

tony

org-glast-dataportal-history

(error)

 

 

tony

org-glast-runquality-web

(tick)

(tick)

 

karen

org-glast-historyprocessing-web

(tick)

(tick)

 

karen

org-glast-latba-web

(tick)

(tick)

 

dan k

org-glast-dataportal-model

(tick)

(tick)

Version 1.8 but depends on SNAPSHOTs

tony

org-glast-dataportal-portal

(error)

 

 

tony

org-glast-jobcontrol

(tick)

(tick)

Version 1.8

tony

org-glast-servermon-web

(error)

 

 

max

org-glast-asp-skimmer

(error)

 

 

tony

org-glast-dataportal-simpleskimmer

(tick)

(tick)

Unnecessary dependence on aidatld

tony

org-glast-latcatalog-web

(error)

 

 

roberto

org-glast-shiftschedule-web

(error)

 

 

charlotte

org-glast-dataportal-skimmer-fits

(error)

 

 

tony

org-glast-aspdataviewer-web

(error)

 

 

roberto

org-glast-dataportal-wired

(error)

 

 

tony

org-glast-skimmer-web

(error)

 

 

tony

org-glast-dataportal-xroot-gateway

(error)

 

 

tony

org-glast-dataprocessing-web

(error)

 

 

max

org-glast-dataqualitymonitoring

(error)

 

 

max

org-glast-dataqualitymonitoring-web

(error)

 

 

max

org-glast-systemtests-web

(error)

 

 

max

org-glast-dataserver-portal

(error)

 

 

tony

org-glast-cas-client-example

(error)

 

 

tony

org-glast-dataserver-web

(error)

 

 

tony

org-glast-cas-server

(error)

 

 

tony

org-glast-downloadmanager

(error)

 

 

tony

org-glast-pipeline-client

(tick)

(tick)

 

tony

org-glast-commons-web

(tick)

(tick)

 

max

org-glast-confluence

(error)

 

 

tony

org-glast-countdown-clock

(error)

 

 

tony

org-glast-pipeline-server

(error)

 

 

dan

org-glast-datacat-client

(tick)

 

Version is 2.3.2 but depends on SNAPSHOTs. Test do not work

dan

org-glast-pipeline-web

(error)

 

 

tony

org-glast-datacat-sp

(tick)

(tick)

Version is 2.2.1, but depends on SNAPSHOTs

dan

org-glast-datacatalog-web

(error)

 

 

tony

org-silicondetecor-web

(error)

 

 

karen

org-glast-groupmanager-example

(error)

 

 

tony

tomcat

(error)

 

 

tony

org-glast-datacat-server

(error)

 

crawler

tony

org-glast-isoc-cfgwebbrowser

(tick)

(tick)

 

jim

org-glast-fcwebview

(error)

 

 

jim

org-glast-isoc-mpwebview

(error)

 

 

jim

Unknown Projects

These should be either upgraded to current projects or demoted to obsolete.

Module Name

Converted

In Hudson

Comments

Contact

org-glast-fcmonitor

(error)

 

Obsolete?

bryson (question)

org-glast-isoc-common

(error)

 

 

steve (question)

org-glast-logging

(error)

 

Is this a duplicate of org-glast-isoc-logging?

steve (question)

org-glast-isoc-logging

(error)

 

 

steve, jim, max (question)

org-glast-telemetry-apidstats

(error)

 

 

david d (question)

org-glast-telemetry-monitor-web

(error)

 

 

david d (question)

org-glast-calibrationtrending

(error)

 

Obsolete (question)

max

org-glast-calibrationtrending-web

(error)

 

Obsolete (question)

max

org-glast-mc-requests

(error)

 

 

(question)

org-glast-clock

(error)

 

 

(question)

org-glast-util-grep

(error)

 

 

tony (question)

org-glast-visitor-web

(error)

 

 

tony (question)

org-glast-dataflow-web

(error)

 

 

(question)

org-glast-glossary

(error)

 

 

(question)

org-glast-tld-timeline

(error)

 

 

(question)

org-glast-telemetry-rtdisplay-web

(error)

 

 

(question)

org-glast-elog-base

(error)

 

 

(question)

org-glast-monitor

(error)

 

 

(question)

org-glast-elog-web

(error)

 

 

(question)

Obsolete Projects

They will be moved to a different directory (obsolete) in the cvs repository.

Module Name

Converted

In Hudson

Comments

Contact

org-glast-fcwebview-portlet

(warning)

 

Obsolete

max

org-glast-portlet

(warning)

 

Obsolete

max

org-glast-portlet-base

(warning)

 

Obsolete

max

org.glast.portlet

(warning)

 

Obsolete

max

org-glast-portlets

(warning)

 

Obsolete

max

org-glast-skeleton-portlet

(warning)

 

Obsolete

max

org-glast-portal-theme

(warning)

 

Obsolete

max

org-glast-grbmonitoring-web

(warning)

 

Obsolete

roberto

org-glast-asdc-sourceviewer

(warning)

 

Obsolete

roberto

org-glast-asp-sourceviewer

(warning)

 

Obsolete

roberto

datacatalog-web

(warning)

 

Obsolete

tony

org-glast-datamonitoring

(warning)

 

Obsolete

max

org-glast-web-base-application

(warning)

 

Obsolete

max

org-glast-datamonitoring-web

(warning)

 

Obsolete

max

org-glast-trendable-db

(warning)

 

Obsolete

max

org-glast-pipeline-log

(warning)

 

Obsolete

tony

org-glast-pipeline-xml

(warning)

 

Obsolete

tony

org-glast-pipeline-core

(warning)

 

Obsolete

tony

org-glast-batch

(warning)

 

Obsolete

tony

org-glast-telemetry-trends

(warning)

 

Obsolete

max

org-glast-sourcemonitoring

(warning)

 

Obsolete

max

org-glast-sourcemonitoring-web

(warning)

 

Obsolete

max

org-glast-maven-web-project

(warning)

 

Obsolete

max

org-glast-fastmonitoring

(warning)

 

Obsolete

max

org-glast-fastmonitoring-web

(warning)

 

Obsolete

max

org-glast-maven-plugin-parent

(warning)

 

Obsolete

matt

org-glast-maven-xmlbeans-plugin

(warning)

 

Obsolete

matt

org-glast

(warning)

 

Obsolete

matt

org.glast.test

(warning)

 

Obsolete

matt

org-glast-hello

(warning)

 

Obsolete

matt

org-glast-profile

(warning)

 

Obsolete

matt

org-glast-common

(warning)

 

Obsolete

matt