1 package org.apache.archiva.metadata.repository.storage.maven2;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import java.util.HashMap;
25 import org.apache.archiva.metadata.model.ProjectVersionFacet;
27 public class MavenProjectFacet
28 implements ProjectVersionFacet
30 private String groupId;
32 private String artifactId;
34 private MavenProjectParent parent;
36 private String packaging;
38 public static final String FACET_ID = "org.apache.archiva.metadata.repository.storage.maven2";
40 public String getGroupId()
45 public void setGroupId( String groupId )
47 this.groupId = groupId;
50 public String getArtifactId()
55 public void setArtifactId( String artifactId )
57 this.artifactId = artifactId;
60 public MavenProjectParent getParent()
65 public void setParent( MavenProjectParent parent )
70 public String getPackaging()
75 public void setPackaging( String packaging )
77 this.packaging = packaging;
80 public String getFacetId()
85 public Map<String, String> toProperties()
87 Map<String, String> properties = new HashMap<String,String>();
88 properties.put( getFacetId() + ":groupId", groupId );
89 properties.put( getFacetId() + ":artifactId", artifactId );
90 properties.put( getFacetId() + ":packaging", packaging );
93 properties.put( getFacetId() + ":parent.groupId", parent.getGroupId() );
94 properties.put( getFacetId() + ":parent.artifactId", parent.getArtifactId() );
95 properties.put( getFacetId() + ":parent.version", parent.getVersion() );