|
From: msegvich <do-...@jb...> - 2006-07-10 16:10:06
|
I had that too. My default server is under: C:\jboss-4.0.4\server\default I'm running jdk 5.0 and I have a JAVA_HOME environment variable. Here's my build.xml file, which is under: C:\jboss-test-1.0.0.CR1\examples | <?xml version="1.0"?> | | <project name="jboss-test-example" default="" xmlns:server="http://jboss.org/ns/test/ant/server"> | | <property name="examples.home" value="."/> | <property name="jboss.test.home" value="../"/> | <property environment="env"/> | <property name="jboss.home" value="C:\jboss-4.0.4"/> | | | <!-- ========================================================================== | Classpath | =========================================================================== --> | <path id="compile.classpath"> | | <fileset dir="${jboss.test.home}/lib"> | <include name="*.jar"/> | </fileset> | <fileset dir="${examples.home}/lib"> | <include name="*.jar"/> | </fileset> | <pathelement location="${examples.home}/lib"/> | </path> | | <path id="jboss.test.classpath"> | <pathelement path="${jboss.test.home}/lib/jboss-test.jar"/> | </path> | | <property name="node0" value="localhost" /> | <property name="node0.jndi.url" value="jnp://${node0}:1099" /> | <property name="jpda.cmdline" value="" /> | <property name="junit.formatter.usefile" value="true" /> | <property name="jboss-junit-configuration" value="YOUR_SERVER_VERSION" /> | | <!-- ========================================================================== | Compile the source | =========================================================================== --> | <target name="compile"> | | <mkdir dir="output"/> | | <javac destdir="output" | debug="on" | deprecation="on" | optimize="on" | classpathref="compile.classpath"> | <src path="src"/> | </javac> | | </target> | | <!-- ========================================================================== | Task Definition | =========================================================================== --> | <taskdef name="config" classname="org.jboss.ant.taskdefs.server.ConfigManagerTask" | uri="http://jboss.org/ns/test/ant/server" loaderref="server.loader"> | <classpath id="server.taskdef.classpath"> | <path refid="jboss.test.classpath"/> | </classpath> | </taskdef> | <taskdef name="start" classname="org.jboss.ant.taskdefs.server.StartServerTask" | uri="http://jboss.org/ns/test/ant/server" loaderref="server.loader"> | <classpath refid="server.taskdef.classpath"/> | </taskdef> | <taskdef name="stop" classname="org.jboss.ant.taskdefs.server.StopServerTask" | uri="http://jboss.org/ns/test/ant/server" loaderref="server.loader"> | <classpath refid="server.taskdef.classpath"/> | </taskdef> | | <!-- ========================================================================== | Server Tasks | =========================================================================== --> | <server:config javaHome="${env.JAVA_HOME}" jbossHome="${jboss.home}"> | <server name="default" host="${node0}"> | <jvmarg value="${jpda.cmdline}" /> | <jvmarg value="-Xmx256m" /> | <sysproperty key="java.endorsed.dirs" value="${jboss.home}/lib/endorsed" /> | </server> | </server:config> | | | <target name="test" depends="compile"> | <server:start name="default"/> | | <junit printsummary="yes" haltonfailure="yes"> | <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/> | | <classpath> | <path refid="compile.classpath"/> | <pathelement location="output"/> | </classpath> | <formatter type="plain"/> | | <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/> | <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="${junit.formatter.usefile}" extension="-${jboss-junit-configuration}.xml" /> | | <test name="org.jboss.test.naming.test.SimpleUnitTestCase" haltonfailure="no"/> | </junit> | | <server:stop name="all"/> | </target> | | </project> | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956632#3956632 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956632 |