ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayanan, Gopalakrishnan" <gna...@exchange.ml.com>
Subject RE: Selector
Date Wed, 19 Mar 2003 19:39:30 GMT
The reason for me to do that is to avoid other developers who may need to do a build from having
to install ANT.They could just copy the build dir which contains the build.xml, build.bat
and a lib
folder which contains all the jar file and run build.bat.Is this something that one is not
expected to do ?

What is weird is that I had the same file running fine until last week.


-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Wednesday, March 19, 2003 2:23 PM
To: 'Ant Users List'
Subject: RE: Selector


Maybe you should use the regular one... You batch file should only concern
itself with adding the -verbose -logfile out.log to the command line fed to
the regular ant.bat. Try the regular ant.bat to see if it works.

Also, Ant doesn't normally call its JAR ant-1.5.1.jar... It's much better to
use Ant as distributed rather than trying to pick and choose pieces of it,
IMHO. --DD

-----Original Message-----
From: Narayanan, Gopalakrishnan [mailto:gnaray@exchange.ml.com] 
Sent: Wednesday, March 19, 2003 1:17 PM
To: 'Ant Users List'
Subject: RE: Selector

Thanks for the quick response.I donot use the ant.bat file that comes with
ANT.Instead I use a custom batch file which invokes
org.apache.tools.ant.Main.

This is the source of the batch file

@echo on

set BUILDFILE=build.xml
set LOGFILE=out.log

REM
REM
REM
REM cache original system classpath

set _CLASSPATH=%CLASSPATH%

if "%JAVA_HOME%" == "" goto javahomeerror
if exist %JAVA_HOME%\lib\tools.jar set
CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar



set
CLASSPATH=%CLASSPATH%;.\lib\ant-1.5.1.jar;.\lib\bcel.jar;.\lib\bsf.jar;.\lib
\js.jar
set
CLASSPATH=%CLASSPATH%;.\lib\optional.jar;.\lib\xercesImpl.jar;.\lib\xml-apis
.jar
set CLASSPATH=%CLASSPATH%;.\lib\NetComponents-1.3.8.jar

echo %CLASSPATH%

%JAVA_HOME%\bin\java.exe org.apache.tools.ant.Main -buildfile %BUILDFILE%
-logfile %LOGFILE% -verbose %1 %2 %3 %4 %5 %6 %7 %8 %9

goto end

REM -----------ERROR-------------
:javahomeerror
echo "ERROR: JAVA_HOME not found in your environment."
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."

:end
set CLASSPATH=%_CLASSPATH%
set _CLASSPATH=

And I have the neccessary jar files under lib direcory relative to the
folder where the build.xml resides.

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Wednesday, March 19, 2003 2:12 PM
To: 'Ant Users List'
Subject: RE: Selector


You probably have either a PATH problem or a ANT_HOME one, pointing to an
older version of Ant (pre-selector, like 1.4.1). --DD

-----Original Message-----
From: Narayanan, Gopalakrishnan [mailto:gnaray@exchange.ml.com] 
Sent: Wednesday, March 19, 2003 1:09 PM
To: 'ant-user@jakarta.apache.org'
Subject: Selector

I was running ANT 1.5.1 under jdk 1.3.1.Everything was working fine until I
had to install jdk 1.4 in my machine.Now the same build file fails with the
message even after reverting to jdk 1.3.1.I am
not sure if this is related to JDK version because the error seems to say
that "selector" element is not permissible under project.


BUILD FAILED

C:\build\build.xml:4: Unexpected element "selector"
	at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:135)
	at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
	at org.apache.tools.ant.Main.runBuild(Main.java:439)
	at org.apache.tools.ant.Main.start(Main.java:153)
	at org.apache.tools.ant.Main.main(Main.java:176)

Total time: 2 seconds

The relevant part in the build.xml file is

<project name="test" default="createCCLabel">

	<!-- Docbank Servlets -->
	<selector id="docBANK.selector.servlet.classes" >
		<filename name="**/servlet/**" />		
	</selector>
	....


Any help would be appreciated.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
View raw message