ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier De Wolf <o...@skynet.be>
Subject Re: Problem running ant "by hand". project.configureProject() problem
Date Mon, 28 Oct 2002 07:33:06 GMT
Ok, it works, thanks a lot !!.

I have another problem:
when the buildServlet.xml is :

<project name="compile" default="usage" basedir=".">

<property name="mydir" value="/Mydir"/>
	<target name="usage">
		<echo message="Hello, world"/>
	</target>
</project>

It failed again with the following message:

Class org.apache.tools.ant.UnknownElement doesn't support the "name"  
attribute.
	at  
org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelpe 
r.java:422)

It seems that the property tag is not working  ....

What do I miss?

Thanks in advance,

Olivier


On Sunday, October 27, 2002, at 10:42 PM, Adam Murdoch wrote:

>
> You need to call Project.init() to load up the standard taskdefs (and
> typesdefs).  Do this before configuring the project with ProjectHelper.
>
>> -----Original Message-----
>> From: Olivier De Wolf [mailto:odwl@skynet.be]
>>
>>
>> 		Project project = new Project();
>> 		project.setCoreLoader(null);
>> 		ProjectHelper.configureProject(project, new
>> File("buildServlet.xml"));
>> 		System.out.println("Project : "+project.getName());
>> 		System.out.println("defaultTarget :
>> "+project.getDefaultTarget());
>> 		Target target= (Target) project.getTargets().get("usage");
>> 		Task task = target.getTasks()[0];
>> 		System.out.println("task : "+task.getClass());
>> 		//project.executeTarget("usage");
>>
>> Where buildServlet.xml is :
>>
>> <project name="compile" default="usage" basedir=".">
>> 	<target name="usage">
>> 		<echo message="Hello, world"/>
>> 	</target>
>> </project>
>>
>>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message