Plugins (1057)


Training and Consulting (44)



EPIC Poll

What is your favourite developer portal?

[ Results | Polls ]

Votes: 541
Comments: 0

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
huette
Post subject: maven project.xml setProperties(java.util.List)  PostPosted: Nov 23, 2005 - 09:12 AM
Guest





Hello

I try to write a project.xml file programaticly in java.
I use the maven-given typ org.apache.maven.project.Project to set the dependencies.

Within this dependencies one can call setProperties (from org.apache.maven.project.BaseObject). In my version (1.0.2) of maven this method needs a java.util.List as param. The doc to this method says the following:
"They are stored in a List of name:value entries"

What does it mean. I tried to use java.util.Properties but it doesn't work.

Here is some code:
Properties prop = new Properties();
prop.setProperty("ear.bundle", "true");
ArrayList al = new ArrayList();
al.add(prop);
dep.setProperties(al);
myProject.addDependency(dep);

As mentioned this code fails when calling:
import org.mevenide.project.io.CarefulProjectMarshaller;
...
new CarefulProjectMarshaller().marshall(strWriter, pom);

Has anybody any idea??

greetings from Potsdam
huette
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits