Author: alessio.soldano(a)jboss.com
Date: 2008-05-19 10:27:24 -0400 (Mon, 19 May 2008)
New Revision: 7097
Added:
stack/cxf/trunk/src/main/distro/build-project-gen.xml
stack/cxf/trunk/src/main/distro/user-project-build.xml
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/src/main/distro/build.xml
stack/cxf/trunk/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-2029] Project generator in CXF stack
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt 2008-05-19 14:26:29 UTC
(rev 7096)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt 2008-05-19 14:27:24 UTC
(rev 7097)
@@ -98,9 +98,6 @@
# [JBWS-2097] Unlock WS-ReliableMessaging in all stacks
org/jboss/test/ws/jaxws/wsrm/**
-# [JBWS-2029] Make the project generator available for all stacks
-org/jboss/test/ws/projectGenerator/**
-
# [JBWS-2165] Fix xop tests with maven build
org/jboss/test/ws/jaxws/samples/xop/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt 2008-05-19 14:26:29 UTC
(rev 7096)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt 2008-05-19 14:27:24 UTC
(rev 7097)
@@ -98,9 +98,6 @@
# [JBWS-2097] Unlock WS-ReliableMessaging in all stacks
org/jboss/test/ws/jaxws/wsrm/**
-# [JBWS-2029] Make the project generator available for all stacks
-org/jboss/test/ws/projectGenerator/**
-
# [JBWS-2165] Fix xop tests with maven build
org/jboss/test/ws/jaxws/samples/xop/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-05-19 14:26:29 UTC
(rev 7096)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-05-19 14:27:24 UTC
(rev 7097)
@@ -106,9 +106,6 @@
# [JBWS-2097] Unlock WS-ReliableMessaging in all stacks
org/jboss/test/ws/jaxws/wsrm/**
-# [JBWS-2029] Make the project generator available for all stacks
-org/jboss/test/ws/projectGenerator/**
-
# [JBWS-2165] Fix xop tests with maven build
org/jboss/test/ws/jaxws/samples/xop/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-19 14:26:29 UTC
(rev 7096)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-19 14:27:24 UTC
(rev 7097)
@@ -121,9 +121,6 @@
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/samples/webservice/**
-# [JBWS-2029] Make the project generator available for all stacks
-org/jboss/test/ws/projectGenerator/**
-
# [JBWS-2165] Fix xop tests with maven build
org/jboss/test/ws/jaxws/samples/xop/**
Added: stack/cxf/trunk/src/main/distro/build-project-gen.xml
===================================================================
--- stack/cxf/trunk/src/main/distro/build-project-gen.xml (rev 0)
+++ stack/cxf/trunk/src/main/distro/build-project-gen.xml 2008-05-19 14:27:24 UTC (rev
7097)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at
http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <target name="init-project-properties" depends="tests-init">
+ <fail message="Did you copy the ant.properties.example to
ant.properties?" unless="jboss.home"/>
+ <property file="./user-project.properties" />
+ <property name="project.home"
value="${workspace.home}/${project.name}"/>
+
+ <filterset id="project">
+ <filter token="projectName" value="${project.name}" />
+ <filter token="jbossHome" value="${project.jboss.home}"
/>
+ </filterset>
+
+ <path id="jbws-ant.path">
+ <pathelement location="${thirdparty.dir}/jbossws-common.jar" />
+ </path>
+ <taskdef name="pathFixer"
classname="org.jboss.ws.tools.ant.FixPathTask"
classpathref="jbws-ant.path"/>
+ <taskdef name="eclipseClasspathGenerator"
classname="org.jboss.ws.tools.ant.EclipseClasspathTask"
classpathref="jbws-ant.path"/>
+ <taskdef name="eclipseProjectGenerator"
classname="org.jboss.ws.tools.ant.EclipseProjectTask"
classpathref="jbws-ant.path"/>
+ <taskdef name="pathWriter"
classname="org.jboss.ws.tools.ant.PathWriterTask"
classpathref="jbws-ant.path"/>
+ </target>
+
+ <target name="setup-new-project"
depends="init-project-properties" description="Prompt for settings and
setup configuration for a new user project">
+ <property file="./user-project.properties" prefix="old" />
+
+ <echo message="-------------------------------------------------"/>
+ <echo message=" Welcome to the JBossWS user project generator"/>
+ <echo message="-------------------------------------------------"/>
+ <echo message=""/>
+
+ <property name="old.workspace.home" value="C:/Projects"/>
+ <input addproperty="workspace.home.new"
+ message="Enter your Java project workspace (the directory that contains
your projects) "
+ defaultvalue="${old.workspace.home}"/>
+ <pathFixer property="workspace.home.new" />
+
+ <property name="old.project.name" value="myproject"/>
+ <input addproperty="project.name.new"
+ message="Enter the project name "
+ defaultvalue="${old.project.name}"/>
+
+ <property name="old.project.type" value="jar"/>
+ <input addproperty="project.type.new"
+ message="Is this project deployed as an JAR (with EJB3 components) or a
WAR (with no EJB3 support) "
+ validargs="jar,war"
+ defaultvalue="${old.project.type}"/>
+
+ <delete file="user-project.properties"/>
+ <propertyfile file="user-project.properties" comment="Generated by
JBossWS user project setup">
+ <entry key="workspace.home"
value="${workspace.home.new}"/>
+ <entry key="project.name"
value="${project.name.new}"/>
+ <entry key="project.type"
value="${project.type.new}"/>
+ <entry key="project.jboss.home"
value="${jboss.home}"/>
+ <entry key="project.jboss.conf"
value="${jboss.server.instance}"/>
+ </propertyfile>
+
+ <echo message=""/>
+ <echo message="Your project settings have been saved in file
'user-project.properties'."/>
+ <echo message="Please type 'ant create-project' to create the new
project."/>
+ </target>
+
+ <target name="create-project" depends="validate-settings,
configure-project" description="Create a new user project">
+ <echo message="A basic webservice project named '${project.name}' has
been created in the ${workspace.home} directory."/>
+ <echo message="It includes a simple Ant build file and references the
required libraries."/>
+ <echo message="Please refer to
http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS for the authoritative
documentation."/>
+ <echo message=""/>
+ <echo message="If you are an Eclipse user, import the project into Eclipse:
right click in "/>
+ <echo message="'Package Explorer -> Import...' and select
'General -> Existing Projects into Workspace'."/>
+ <echo message="Then click on 'Next' and set the root directory
browsing to your workspace directory."/>
+ </target>
+
+ <target name="validate-settings"
depends="init-project-properties">
+ <fail message="No project name specified (run 'ant setup-new-project'
first)">
+ <condition>
+ <or>
+ <not><isset property="project.name"/></not>
+ <equals arg1="${project.name}" arg2=""/>
+ </or>
+ </condition>
+ </fail>
+ <fail message="No project workspace specified (run 'ant
setup-new-project' first)">
+ <condition>
+ <or>
+ <not><isset property="workspace.home"/></not>
+ <equals arg1="${workspace.home}" arg2=""/>
+ </or>
+ </condition>
+ </fail>
+ </target>
+
+ <target name="configure-project">
+ <mkdir dir="${project.home}/src/main/java"/>
+ <mkdir dir="${project.home}/src/main/resources"/>
+ <copy tofile="${project.home}/build.xml"
file="${basedir}/build/user-project-build.xml">
+ <filterset refid="project"/>
+ </copy>
+ <copy tofile="${project.home}/build.properties"
file="${basedir}/user-project.properties"/>
+ <path id="project.classpath">
+ <pathelement location="${jboss.client}/jbossws-common.jar"/>
+ <pathelement location="${jboss.client}/jbossws-spi.jar"/>
+ <pathelement location="${jboss.client}/jbossws-cxf-client.jar"/>
+ <pathelement
location="${jboss.client}/geronimo-ws-metadata_2.0_spec.jar"/>
+ <path refid="integration.target.javac.classpath" />
+ </path>
+ <eclipseClasspathGenerator pathId="project.classpath"
outputFile="${project.home}/.classpath" srcPath="src/main/java"
srcOutput="bin/main" />
+ <eclipseProjectGenerator projectName="${project.name}"
outputFile="${project.home}/.project" />
+ <pathWriter pathId="project.classpath"
outputFile="${project.home}/libraries.xml"
variables="project.jboss.home" />
+ </target>
+
+ <target name="delete-project" depends="validate-settings"
description="Delete the configured user project">
+ <echo message="Deleting the entire project in ${project.home}" />
+ <delete dir="${project.home}" />
+ </target>
+
+ <target name="settings" depends="init-project-properties"
description="Print the current project settings">
+ <echo message="Java project workspace: ${workspace.home}"/>
+ <echo message="JBoss home: ${project.jboss.home}"/>
+ <echo message="JBoss conf: ${project.jboss.conf}"/>
+ <echo message="Project name: ${project.name}"/>
+ <echo message="Project type: ${project.type}"/>
+ </target>
+
+</project>
\ No newline at end of file
Property changes on: stack/cxf/trunk/src/main/distro/build-project-gen.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/cxf/trunk/src/main/distro/build.xml
===================================================================
--- stack/cxf/trunk/src/main/distro/build.xml 2008-05-19 14:26:29 UTC (rev 7096)
+++ stack/cxf/trunk/src/main/distro/build.xml 2008-05-19 14:27:24 UTC (rev 7097)
@@ -37,6 +37,7 @@
<import file="${build.dir}/build-deploy.xml"/>
<import file="${build.dir}/jbossws-deploy-macros.xml"/>
<import file="${tests.dir}/ant-import/build-testsuite.xml"/>
+ <import file="${build.dir}/build-project-gen.xml"/>
<!-- ================================================================== -->
<!-- Initialization -->
Added: stack/cxf/trunk/src/main/distro/user-project-build.xml
===================================================================
--- stack/cxf/trunk/src/main/distro/user-project-build.xml (rev
0)
+++ stack/cxf/trunk/src/main/distro/user-project-build.xml 2008-05-19 14:27:24 UTC (rev
7097)
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<project name="@projectName@" default="deploy"
basedir="." >
+
+ <property file="${basedir}/build.properties" />
+ <import file="libraries.xml" />
+
+ <!-- set global properties for this build -->
+ <property name="project.name" value="@projectName@" />
+ <property name="dist.dir" value="dist" />
+ <property name="deploy.dir"
value="${project.jboss.home}/server/${project.jboss.conf}/deploy" />
+ <property name="output.dir" value="output" />
+ <property name="src.main.dir" value="src/main/java" />
+ <property name="resources.main.dir" value="src/main/resources"
/>
+ <property name="classes.main.dir" value="classes/main/java"
/>
+ <property name="javac.debug" value="true" />
+ <property name="javac.deprecation" value="false" />
+
+ <condition property="project.war" value="true">
+ <equals arg1="${project.type}" arg2="war"/>
+ </condition>
+
+ <target name="clean">
+ <delete dir="${output.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+ <target name="init">
+ <mkdir dir="${output.dir}" />
+ <mkdir dir="${dist.dir}" />
+ </target>
+
+ <target name="compile" depends="init" description="Compile
the Java source code" unless="eclipse.running">
+ <tstamp/>
+ <javac destdir="${output.dir}" classpathref="project.classpath"
debug="${javac.debug}" deprecation="${javac.deprecation}"
nowarn="on">
+ <src path="${src.main.dir}" />
+ </javac>
+ </target>
+
+ <target name="copyclasses" depends="init" description="Copy
the classes that were compiled by Eclipse" if="eclipse.running">
+ <copy todir="${output.dir}">
+ <fileset dir="${classes/main}">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="dist" depends="clean,compile,copyclasses"
description="Create the application distribution archive">
+ <fail unless="project.type">project.type not set</fail>
+ <jar jarfile="${dist.dir}/${project.name}.${project.type}">
+ <fileset dir="${output.dir}" />
+ <fileset dir="${resources.main.dir}">
+ <include name="META-INF/**"/>
+ <include name="WEB-INF/**" if="project.war" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="deploy" depends="dist" description="Deploy to
JBoss AS">
+ <fail unless="project.jboss.home">project.jboss.home not
set</fail>
+ <copy todir="${deploy.dir}"
file="${dist.dir}/${project.name}.${project.type}" />
+ </target>
+
+ <target name="undeploy" description="Undeploy from JBoss AS">
+ <fail unless="project.jboss.home">project.jboss.home not
set</fail>
+ <fail unless="project.jboss.conf">project.jboss.conf not
set</fail>
+ <delete file="${deploy.dir}/${project.name}.${project.type}" />
+ </target>
+
+</project>
Property changes on: stack/cxf/trunk/src/main/distro/user-project-build.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/cxf/trunk/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/cxf/trunk/src/main/scripts/assembly-bin-dist.xml 2008-05-19 14:26:29 UTC (rev
7096)
+++ stack/cxf/trunk/src/main/scripts/assembly-bin-dist.xml 2008-05-19 14:27:24 UTC (rev
7097)
@@ -33,6 +33,8 @@
<include>build-setup.xml</include>
<include>jbossws-default-deploy.conf</include>
<include>jbossws-deploy-macros.xml</include>
+ <include>build-project-gen.xml</include>
+ <include>user-project-build.xml</include>
</includes>
</fileSet>
<!-- docs -->
@@ -82,8 +84,12 @@
<unpackOptions>
<includes>
<include>ant-import/**</include>
+ <include>java/org/jboss/test/ws/console/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
+ <include>java/org/jboss/test/ws/projectGenerator/**</include>
+ <include>resources/console/**</include>
<include>resources/jaxws/samples/**</include>
+ <include>resources/projectGenerator/**</include>
</includes>
</unpackOptions>
</dependencySet>