*/
import javax.xml.bind.annotation.XmlRootElement;
+
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import java.util.Properties;
@XmlRootElement( name = "projectVersionMetadata" )
public class ProjectVersionMetadata
private List<Dependency> dependencies = new ArrayList<>();
+ private Map<String, String> properties = new HashMap<String, String>();
+
private boolean incomplete;
public String getId()
this.dependencies.add( dependency );
}
+ public Map<String, String> getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties( Map<String, String> properties )
+ {
+ this.properties = properties;
+ }
+
+ @SuppressWarnings( { "unchecked", "rawtypes" } )
+ public void setProperties( Properties properties )
+ {
+ setProperties( new HashMap<String, String>((Map) properties ) );
+ }
+
public boolean isIncomplete()
{
return incomplete;
metadata.setOrganization( convertOrganization( model.getOrganization() ) );
metadata.setScm( convertScm( model.getScm() ) );
metadata.setUrl( model.getUrl() );
+ metadata.setProperties( model.getProperties() );
MavenProjectFacet facet = new MavenProjectFacet();
facet.setGroupId( model.getGroupId() != null ? model.getGroupId() : model.getParent().getGroupId() );
assertDependency( dependencies.get( 7 ), "junit", "junit", "3.8.1", "test" );
assertDependency( dependencies.get( 8 ), "easymock", "easymock", "1.2_Java1.3", "test" );
assertDependency( dependencies.get( 9 ), "easymock", "easymockclassextension", "1.2", "test" );
+
+ assertEquals( 8, metadata.getProperties().size() );
+ assertEquals( "http://www.apache.org/images/asf_logo_wide.gif", metadata.getProperties().get("organization.logo") );
}
@Test