You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/11/21 02:17:32 UTC
svn commit: r345802 - /webservices/axis2/trunk/java/etc/maven.xml
Author: dims
Date: Sun Nov 20 17:17:28 2005
New Revision: 345802
URL: http://svn.apache.org/viewcvs?rev=345802&view=rev
Log:
copy some goodies from geronimo's harness example run "maven hello"
Added:
webservices/axis2/trunk/java/etc/maven.xml
Added: webservices/axis2/trunk/java/etc/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/etc/maven.xml?rev=345802&view=auto
==============================================================================
--- webservices/axis2/trunk/java/etc/maven.xml (added)
+++ webservices/axis2/trunk/java/etc/maven.xml Sun Nov 20 17:17:28 2005
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2003-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+
+<!-- $Rev: 330371 $ $Date: 2005-11-02 16:57:37 -0500 (Wed, 02 Nov 2005) $ -->
+
+<project default="default"
+ xmlns:j="jelly:core"
+ xmlns:u="jelly:util"
+ xmlns:ant="jelly:ant"
+ xmlns:maven="jelly:maven"
+ xmlns:define="jelly:define"
+ xmlns:velocity="jelly:velocity"
+ >
+
+ <!-- ================= -->
+ <!-- Global Properties -->
+ <!-- ================= -->
+
+ <!-- Determine what the top-level project root is -->
+ <j:set var="project.root" value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
+
+ <!-- ==================== -->
+ <!-- Default Global Goals -->
+ <!-- ==================== -->
+
+ <goal name="default">
+ <attainGoal name="jar:install"/>
+ </goal>
+
+ <goal name="build">
+ <attainGoal name="default"/>
+ </goal>
+
+ <goal name="rebuild">
+ <attainGoal name="clean"/>
+ <attainGoal name="build"/>
+ </goal>
+
+ <!-- For testing -->
+ <goal name="hello">
+ <ant:echo>
+ H E L L O
+ ---------
+ Module Name ${pom.name} [${pom.currentVersion}]
+ Axis2: ${axis2_version}
+ </ant:echo>
+ </goal>
+
+ <!-- Remove classes which depend on changed files, so they will rebuild. -->
+ <preGoal name="java:compile">
+ <j:if test="${sourcesPresent}">
+ <ant:depend srcdir="${maven.compile.source}"
+ destdir="${maven.build.dest}"
+ dump="false"
+ closure="false">
+ <j:forEach var="sm" items="${pom.build.sourceModifications}">
+ <ant:available property="classPresent" classname="${sm.className}"/>
+ <j:if test="${classPresent != 'true'}">
+ <j:forEach var="exclude" items="${sm.excludes}">
+ <ant:exclude name="${exclude}"/>
+ </j:forEach>
+ <j:forEach var="include" items="${sm.includes}">
+ <ant:include name="${include}"/>
+ </j:forEach>
+ </j:if>
+ </j:forEach>
+ </ant:depend>
+ </j:if>
+ </preGoal>
+
+ <!-- Construct dependency lists for inclusion in generated jar. -->
+ <!-- putting this goal here produces a circular dependency -->
+
+ <!-- Remove the log files -->
+ <goal name="clobber"
+ description="Removes all (non-repository installed) build generated files">
+
+ <!-- Let clean:clean do some work first -->
+ <attainGoal name="clean:clean"/>
+
+ <j:jelly xmlns="jelly:ant">
+ <delete quiet="false" failonerror="false">
+ <fileset dir="${basedir}">
+ <include name="maven.log"/>
+ <include name="velocity.log*"/>
+ <include name="junit*.properties"/>
+ </fileset>
+ </delete>
+ </j:jelly>
+
+ </goal>
+
+ <!-- Cleanse source files -->
+ <goal name="cleanse-sources"
+ description="Cleanse source files, removing tabs and translating CRLF -> LF">
+
+ <j:scope xmlns="jelly:ant">
+
+ <!-- Cleanse sources -->
+ <j:set var="srcdir" value="${basedir}/src/java"/>
+ <u:available file="">
+ <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
+ <include name="**/*.java"/>
+ </fixcrlf>
+ <fixcrlf srcdir="${basedir}" eol="lf" eof="remove" tab="remove" tablength="4">
+ <include name="**/*.xml"/>
+ <include name="**/*.html"/>
+ </fixcrlf>
+ </u:available>
+
+ <!-- Cleanse test sources -->
+ <j:set var="srcdir" value="${basedir}/src/test"/>
+ <u:available file="${srcdir}">
+ <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
+ <include name="**/*.java"/>
+ <include name="**/*.xml"/>
+ <include name="**/*.html"/>
+ </fixcrlf>
+ <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
+ <include name="**/*.xml"/>
+ <include name="**/*.html"/>
+ </fixcrlf>
+ </u:available>
+
+ <!-- Cleanse xdocs -->
+ <j:set var="srcdir" value="${basedir}/src/xdocs"/>
+ <u:available file="${srcdir}">
+ <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
+ <include name="**/*.xml"/>
+ <include name="**/*.html"/>
+ </fixcrlf>
+ </u:available>
+
+ <!-- Cleanse build files -->
+ <fixcrlf srcdir="." eol="lf" tab="remove" eof="remove" tablength="4">
+ <include name="project.xml"/>
+ <include name="maven.xml"/>
+ </fixcrlf>
+
+ <!-- Cleanse scripts -->
+ <j:set var="srcdir" value="${basedir}/src/bin"/>
+ <u:available file="${srcdir}">
+ <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
+ <include name="**/*"/>
+ </fixcrlf>
+ </u:available>
+
+ </j:scope>
+
+ </goal>
+
+ <goal name="java-src"
+ description="Creates an archive containing only java source.">
+
+ <u:available file="${basedir}/src/java">
+ <j:set var="javaSrcBuilt" value="true"/>
+ <ant:mkdir dir="${basedir}/target"/>
+ <ant:jar destfile="${basedir}/target/${pom.artifactId}-${pom.currentVersion}-java-src.jar">
+ <fileset dir="${basedir}/src/java"/>
+ <u:available file="${basedir}/target/xmlbeans">
+ <fileset dir="${basedir}/target/xmlbeans"/>
+ </u:available>
+ </ant:jar>
+ </u:available>
+
+ <j:if test="${javaSrcBuilt != 'true'}">
+ <u:available file="${basedir}/target/xmlbeans">
+ <j:set var="java-src.built" value="true"/>
+ <ant:mkdir dir="${basedir}/target"/>
+ <ant:jar destfile="${basedir}/target/${pom.artifactId}-${pom.currentVersion}-java-src.jar">
+ <fileset dir="${basedir}/target/xmlbeans"/>
+ </ant:jar>
+ </u:available>
+ </j:if>
+ </goal>
+
+ <!-- If there is no src/test directory you can
+ turn off clover in that module by overriding this goal to do nothing -->
+ <goal name="clover.wrapper">
+ <attainGoal name="clover"/>
+ </goal>
+
+ <preGoal name="clover:test">
+ <j:set var="cloveroverride" value="true"/>
+ </preGoal>
+
+ <!-- Check if the tests need to run -->
+ <preGoal name="test:test">
+ <j:if test="${context.getVariable('maven.test.force') == null}">
+ <j:if test="${cloveroverride != 'true'}">
+ <j:set var="uptodatePropName" value="tests.uptodate"/>
+ <j:remove var="${uptodatePropName}"/>
+ <ant:mkdir dir="${basedir}/target/test-reports/"/>
+ <j:set var="uptodateFile" value="${basedir}/target/test-reports/tstamp"/>
+
+ <ant:uptodate property="${uptodatePropName}" targetfile="${uptodateFile}">
+ <ant:srcfiles dir="${basedir}/src/" includes="**/*"/>
+ </ant:uptodate>
+
+ <j:if test="${context.getVariable(uptodatePropName) == 'true'}">
+ <ant:echo>NOTICE: Skipping tests; they seem to have passed already</ant:echo>
+ <j:set var="maven.test.skip" value="true"/>
+ <j:set var="unitTestSourcesPresent" value="false"/>
+ </j:if>
+ </j:if>
+ </j:if>
+ </preGoal>
+
+ <!-- Update the timestamp of the last successful test -->
+ <postGoal name="test:test">
+ <j:if test="${context.getVariable('maven.test.failure') == null}">
+ <ant:touch file="${basedir}/target/test-reports/tstamp"/>
+ </j:if>
+ </postGoal>
+</project>