JBossWS SVN: r5973 - in stack/native/trunk: src/main/distro and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-03-13 20:45:44 -0400 (Thu, 13 Mar 2008)
New Revision: 5973
Removed:
stack/native/trunk/src/main/distro/eclipse.classpath
Modified:
stack/native/trunk/ant-import/build-bin-dist.xml
stack/native/trunk/src/main/distro/bin-dist-build.xml
stack/native/trunk/src/main/distro/bin-dist-project-gen.xml
stack/native/trunk/src/main/distro/user-project-build.xml
Log:
[JBWS-1888] Reference libraries instead of copying them in the user prj generator
Modified: stack/native/trunk/ant-import/build-bin-dist.xml
===================================================================
--- stack/native/trunk/ant-import/build-bin-dist.xml 2008-03-14 00:44:03 UTC (rev 5972)
+++ stack/native/trunk/ant-import/build-bin-dist.xml 2008-03-14 00:45:44 UTC (rev 5973)
@@ -53,7 +53,6 @@
<fileset dir="${core.distro.dir}">
<include name="user-project-build.xml"/>
<include name="eclipse.project"/>
- <include name="eclipse.classpath"/>
</fileset>
</copy>
Modified: stack/native/trunk/src/main/distro/bin-dist-build.xml
===================================================================
--- stack/native/trunk/src/main/distro/bin-dist-build.xml 2008-03-14 00:44:03 UTC (rev 5972)
+++ stack/native/trunk/src/main/distro/bin-dist-build.xml 2008-03-14 00:45:44 UTC (rev 5973)
@@ -98,9 +98,9 @@
<fail message="JDK1.5 or above is required" unless="HAVE_JDK_1.5"/>
<import file="${basedir}/build/build-deploy.xml"/>
- <import file="${basedir}/build/build-project-gen.xml"/>
<import file="${basedir}/build/jbossws-deploy-macros.xml"/>
<import file="${basedir}/tests/ant-import/build-testsuite.xml"/>
+ <import file="${basedir}/build/build-project-gen.xml"/>
<!-- ================================================================== -->
<!-- Initialization -->
Modified: stack/native/trunk/src/main/distro/bin-dist-project-gen.xml
===================================================================
--- stack/native/trunk/src/main/distro/bin-dist-project-gen.xml 2008-03-14 00:44:03 UTC (rev 5972)
+++ stack/native/trunk/src/main/distro/bin-dist-project-gen.xml 2008-03-14 00:45:44 UTC (rev 5973)
@@ -22,43 +22,37 @@
<filter token="jbossHome" value="${project.jboss.home}" />
</filterset>
- <path id="jbws-ant.path" path="${basedir}/lib/jbossws-core.jar"/>
+ <path id="jbws-ant.path">
+ <pathelement location="${thirdparty.dir}/jbossws-core.jar" />
+ <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="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">
+ <target name="setup-new-project" depends="init-project-properties, tests-init" 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"/>
+
+ <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) [${old.workspace.home}]"
+ message="Enter your Java project workspace (the directory that contains your projects) "
defaultvalue="${old.workspace.home}"/>
<pathFixer property="workspace.home.new" />
- <property name="old.jboss.home" value="C:/Program Files/jboss-4.2.2.GA"/>
- <input addproperty="jboss.home.new"
- message="Enter your JBoss home directory [${old.jboss.home}]"
- defaultvalue="${old.jboss.home}"/>
- <pathFixer property="jboss.home.new" />
-
- <property name="old.jboss.conf" value="default"/>
- <input addproperty="jboss.conf.new"
- message="Enter the JBoss configuration you would like to use [${old.jboss.conf}]"
- defaultvalue="${old.jboss.conf}"/>
-
<property name="old.project.name" value="myproject"/>
<input addproperty="project.name.new"
- message="Enter the project name [${old.project.name}]"
+ 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) [${old.project.type}] "
+ 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}"/>
@@ -67,8 +61,8 @@
<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.new}"/>
- <entry key="project.jboss.conf" value="${jboss.conf.new}"/>
+ <entry key="project.jboss.home" value="${jboss.home}"/>
+ <entry key="project.jboss.conf" value="${jboss.server.instance}"/>
</propertyfile>
<echo message=""/>
@@ -76,9 +70,9 @@
<echo message="Please type 'ant create-project' to create the new project."/>
</target>
- <target name="create-project" depends="validate-settings,configure-project,copy-libraries" description="Create a new user project">
+ <target name="create-project" depends="tests-init, 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 the required libraries."/>
+ <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 "/>
@@ -108,44 +102,25 @@
<target name="configure-project">
<mkdir dir="${project.home}/src/main/java"/>
<mkdir dir="${project.home}/src/main/resources"/>
- <mkdir dir="${project.home}/lib"/>
<copy tofile="${project.home}/build.xml" file="${basedir}/build/user-project-build.xml">
<filterset refid="project"/>
</copy>
<copy tofile="${project.home}/.project" file="${basedir}/build/eclipse.project">
<filterset refid="project"/>
</copy>
- <copy tofile="${project.home}/.classpath" file="${basedir}/build/eclipse.classpath"/>
<copy tofile="${project.home}/build.properties" file="${basedir}/user-project.properties"/>
+ <path id="project.classpath">
+ <path refid="integration.target.javac.classpath" />
+ <pathelement location="${jboss.client}/jbossws-common.jar"/>
+ <pathelement location="${jboss.client}/jbossws-spi.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxws.jar"/>
+ <pathelement location="${jboss.client}/jboss-saaj.jar"/>
+ <pathelement location="${jboss.client}/jbossws-client.jar"/>
+ </path>
+ <eclipseClasspathGenerator pathId="project.classpath" outputFile="${project.home}/.classpath" srcPath="src/main/java" srcOutput="bin/main" />
+ <pathWriter pathId="project.classpath" outputFile="${project.home}/libraries.xml" variables="project.jboss.home" />
</target>
-
- <target name="copy-libraries">
- <echo message="Copying JBossWS libraries to the ${project.home}/lib directory..." />
- <copy todir="${project.home}/lib" overwrite="true">
- <fileset dir="${basedir}/lib" >
- <include name="jaxb-api.jar"/>
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-jaxws.jar"/>
- <include name="jbossws-client.jar"/>
- <include name="jbossws-core.jar"/>
- <include name="jbossws-spi.jar"/>
- </fileset>
- </copy>
- <echo message="Copying other JBoss libraries to the ${project.home}/lib directory..." />
- <copy todir="${project.home}/lib" overwrite="true">
- <fileset dir="${project.jboss.home}/client" >
- <include name="jbossall-client.jar"/>
- <include name="jboss-ejb3x.jar"/>
- <include name="ejb3-persistence.jar"/>
- </fileset>
- </copy>
- </target>
-
-
- <target name="update-project" depends="validate-settings,copy-libraries" description="Update user project libs">
- <echo message="Libraries from the current configuration have been copied to the '${project.name}' project's lib directory."/>
- <echo message="Please refresh / rebuild your project now." />
- </target>
<target name="delete-project" depends="validate-settings" description="Delete the configured user project">
<echo message="Deleting the entire project in ${project.home}" />
Deleted: stack/native/trunk/src/main/distro/eclipse.classpath
===================================================================
--- stack/native/trunk/src/main/distro/eclipse.classpath 2008-03-14 00:44:03 UTC (rev 5972)
+++ stack/native/trunk/src/main/distro/eclipse.classpath 2008-03-14 00:45:44 UTC (rev 5973)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="classes/main" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lib/ejb3-persistence.jar"/>
- <classpathentry kind="lib" path="lib/jaxb-api.jar"/>
- <classpathentry kind="lib" path="lib/jboss-ejb3x.jar"/>
- <classpathentry kind="lib" path="lib/jboss-jaxrpc.jar"/>
- <classpathentry kind="lib" path="lib/jboss-jaxws.jar"/>
- <classpathentry kind="lib" path="lib/jbossall-client.jar"/>
- <classpathentry kind="lib" path="lib/jbossws-client.jar"/>
- <classpathentry kind="lib" path="lib/jbossws-core.jar"/>
- <classpathentry kind="lib" path="lib/jbossws-spi.jar"/>
- <classpathentry kind="output" path="classes"/>
-</classpath>
Modified: stack/native/trunk/src/main/distro/user-project-build.xml
===================================================================
--- stack/native/trunk/src/main/distro/user-project-build.xml 2008-03-14 00:44:03 UTC (rev 5972)
+++ stack/native/trunk/src/main/distro/user-project-build.xml 2008-03-14 00:45:44 UTC (rev 5973)
@@ -2,11 +2,11 @@
<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="lib.dir" value="lib" />
<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" />
@@ -19,14 +19,6 @@
<equals arg1="${project.type}" arg2="war"/>
</condition>
- <fileset id="lib" dir="${lib.dir}">
- <include name="*.jar" />
- </fileset>
-
- <path id="build.classpath">
- <fileset refid="lib" />
- </path>
-
<target name="clean">
<delete dir="${output.dir}" />
<delete dir="${dist.dir}" />
@@ -39,7 +31,7 @@
<target name="compile" depends="init" description="Compile the Java source code" unless="eclipse.running">
<tstamp/>
- <javac destdir="${output.dir}" classpathref="build.classpath" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
+ <javac destdir="${output.dir}" classpathref="project.classpath" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
<src path="${src.main.dir}" />
</javac>
</target>