You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Morten Primdahl <mo...@kikobu.com> on 2005/07/19 13:15:18 UTC

Including newly baked .class file on classpath

Hi,

After compiling, I would like to invoke a class in order to generate 
some properties files in the target/classes/doof/bar/ directory. I've 
tried the following:

<postGoal name="java:compile">
	<ant:path id="justbuilt">
		<ant:pathelement path="${maven.build.dest}"/>
	</ant:path>
	<addPath id="maven.dependency.classpath" refid="justbuilt"/>
	<j:new var="helper" className="foo.bar.PropertyFileGenerator"/>
	<ant:echo>${helper.ping()}</ant:echo>		
</postGoal>

But this fails - Maven cannot find the class. I will be referencing the 
helper class multiple times in a forEach block where I do some ant:copy 
with filtering to generate the properties files (so I'd rather not have 
to use ant:java).

Any hints on how to place a newly baked class file on the classpath for 
invocation? Is it even possible?

Thanks,

Morten


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org