| Author |
Message |
|
|
Post subject: maven project.xml setProperties(java.util.List)
Posted: Nov 23, 2005 - 09:12 AM
|
|
|
|
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 |
|
|
| |
|
|
|
 |
|
|
| |