[jboss-user] [EJB 3.0] - Re: ant failed.
samwan809
do-not-reply at jboss.com
Fri Jul 17 10:38:46 EDT 2009
I still failed with the same error.
Here is my build.xml:
| <?xml version="1.0"?>
|
| <project name="portlet" basedir="." default="deploy">
| <import file="../build-common-portlet.xml" />
|
| <target name="compile">
| <mkdir dir="docroot/WEB-INF/classes" />
|
| <path id="plugin-lib.classpath">
| <pathelement location="${app.server.classes.portal.dir}" />
| <fileset dir="${app.server.lib.portal.dir}" includes="*.jar" />
| <pathelement location="docroot/WEB-INF/classes" />
| </path>
|
| <javac
| classpathref="plugin.classpath"
| compiler="${javac.compiler}"
| debug="${javac.debug}"
| deprecation="${javac.deprecation}"
| destdir="docroot/WEB-INF/classes"
| nowarn="${javac.nowarn}"
| srcdir="docroot/WEB-INF/src"
| />
|
| <antcall target="build-common-plugin.compile" />
| </target>
|
| <target name="build-lang">
| <antcall target="build-lang-cmd">
| <param name="lang.dir" value="docroot/WEB-INF/src/content/test" />
| <param name="lang.file" value="Language" />
| </antcall>
| </target>
|
| <property name="tst-dir" location="docroot/WEB-INF/src" />
| <property name="TALK" value="false" />
|
| <path id="classpath.base">
| </path>
| <path id="classpath.test">
| <pathelement location="/usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/lib/junit.jar" />
| <pathelement location="${tst-dir}" />
| <path refid="classpath.base" />
| </path>
|
| <target name="compile-test">
| <javac srcdir="${tst-dir}"
| verbose="${TALK}"
| includes="**/*.java"
| >
| <classpath refid="classpath.test"/>
| </javac>
| </target>
|
| <target name="test" depends="compile-test">
| <junit>
| <classpath refid="classpath.test" />
| <formatter type="brief" usefile="false" />
| <test name="com.ip6networks.calling_card_registration.test.Client" />
| </junit>
| </target>
| <target name="test" depends="compile-test">
| <junit>
| <classpath refid="classpath.test" />
| <formatter type="brief" usefile="false" />
| <test name="com.ip6networks.calling_card_registration.test.Client" />
| </junit>
| </target>
|
| <target name="clean-compile-test">
| <delete verbose="${TALK}">
| <fileset dir="${tst-dir}" includes="**/*.class" />
| </delete>
| </target>
| <target name="clean-test" depends="clean-compile-test" />
|
| </project>
|
|
And here is the first few errors:
| calling_card_reg # ant test
| Buildfile: build.xml
|
| compile-test:
| [javac] Compiling 11 source files
| [javac] /usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/src/com/ip6networks/calling_card_registration/struts/action/CallingCardRegistrationAction.java:29: package com.liferay.portal.struts does not exist
| [javac] import com.liferay.portal.struts.PortletAction;
| [javac] ^
| [javac] /usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/src/com/ip6networks/calling_card_registration/struts/action/CallingCardRegistrationAction.java:34: package javax.portlet does not exist
| [javac] import javax.portlet.ActionRequest;
| [javac] ^
| [javac] /usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/src/com/ip6networks/calling_card_registration/struts/action/CallingCardRegistrationAction.java:35: package javax.portlet does not exist
| [javac] import javax.portlet.ActionResponse;
| ....
|
|
It doesn't complained the *.java files in the "test" folder.
Rather, it complained those in the other path. that s why I was asking whether I can restrict ant to compile the files in the "test" directory.
Thanks for the suggestion.
Sam
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244351#4244351
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244351
More information about the jboss-user
mailing list