diff options
Diffstat (limited to 'archiva-modules/metadata')
4 files changed, 2 insertions, 192 deletions
diff --git a/archiva-modules/metadata/metadata-model-maven2/pom.xml b/archiva-modules/metadata/metadata-model-maven2/pom.xml deleted file mode 100644 index ef1d0ade7..000000000 --- a/archiva-modules/metadata/metadata-model-maven2/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>metadata</artifactId> - <groupId>org.apache.archiva</groupId> - <version>3.0.0-SNAPSHOT</version> - </parent> - <artifactId>metadata-model-maven2</artifactId> - <name>Archiva Metadata :: Maven 2 Model</name> - - <properties> - <site.staging.base>${project.parent.parent.basedir}</site.staging.base> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.archiva</groupId> - <artifactId>metadata-model</artifactId> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> - </dependencies> - -</project> diff --git a/archiva-modules/metadata/metadata-model-maven2/src/main/java/org/apache/archiva/metadata/model/maven2/MavenArtifactFacet.java b/archiva-modules/metadata/metadata-model-maven2/src/main/java/org/apache/archiva/metadata/model/maven2/MavenArtifactFacet.java deleted file mode 100644 index 56580f38f..000000000 --- a/archiva-modules/metadata/metadata-model-maven2/src/main/java/org/apache/archiva/metadata/model/maven2/MavenArtifactFacet.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.apache.archiva.metadata.model.maven2; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.archiva.metadata.model.MetadataFacet; -import org.apache.commons.lang.StringUtils; - -import java.util.HashMap; -import java.util.Map; - -public class MavenArtifactFacet - implements MetadataFacet -{ - private String classifier; - - private String type; - - private String timestamp; - - private int buildNumber; - - public static final String FACET_ID = "org.apache.archiva.metadata.repository.storage.maven2.artifact"; - - public String getClassifier() - { - return classifier; - } - - public void setClassifier( String classifier ) - { - this.classifier = classifier; - } - - public String getType() - { - return type; - } - - public void setType( String type ) - { - this.type = type; - } - - public String getTimestamp() - { - return timestamp; - } - - public void setTimestamp( String timestamp ) - { - this.timestamp = timestamp; - } - - public int getBuildNumber() - { - return buildNumber; - } - - public void setBuildNumber( int buildNumber ) - { - this.buildNumber = buildNumber; - } - - @Override - public String getFacetId() - { - return FACET_ID; - } - - @Override - public String getName() - { - // TODO: not needed, perhaps artifact/version metadata facet should be separate interface? - return null; - } - - @Override - public Map<String, String> toProperties() - { - Map<String, String> properties = new HashMap<>(); - properties.put( "type", type ); - if ( classifier != null ) - { - properties.put( "classifier", classifier ); - } - if ( timestamp != null ) - { - properties.put( "timestamp", timestamp ); - } - if ( buildNumber > 0 ) - { - properties.put( "buildNumber", Integer.toString( buildNumber ) ); - } - return properties; - } - - @Override - public void fromProperties( Map<String, String> properties ) - { - type = properties.get( "type" ); - classifier = properties.get( "classifier" ); - timestamp = properties.get( "timestamp" ); - String buildNumber = properties.get( "buildNumber" ); - if ( buildNumber != null ) - { - this.buildNumber = Integer.parseInt( buildNumber ); - } - } - - @Override - public boolean equals( Object o ) - { - if ( this == o ) - { - return true; - } - if ( !( o instanceof MavenArtifactFacet ) ) - { - return false; - } - - MavenArtifactFacet that = (MavenArtifactFacet) o; - - return StringUtils.equals( that.getClassifier(), this.classifier ); - } - -} diff --git a/archiva-modules/metadata/metadata-statistics-api/pom.xml b/archiva-modules/metadata/metadata-statistics-api/pom.xml index 1fbbcc8b4..5c9b0a13d 100644 --- a/archiva-modules/metadata/metadata-statistics-api/pom.xml +++ b/archiva-modules/metadata/metadata-statistics-api/pom.xml @@ -37,8 +37,8 @@ <artifactId>metadata-repository-api</artifactId> </dependency> <dependency> - <groupId>org.apache.archiva</groupId> - <artifactId>metadata-model-maven2</artifactId> + <groupId>org.apache.archiva.maven</groupId> + <artifactId>archiva-maven-metadata</artifactId> </dependency> </dependencies> </project> diff --git a/archiva-modules/metadata/pom.xml b/archiva-modules/metadata/pom.xml index b86b8751a..10735d432 100644 --- a/archiva-modules/metadata/pom.xml +++ b/archiva-modules/metadata/pom.xml @@ -35,7 +35,6 @@ <modules> <module>metadata-model</module> <module>metadata-repository-api</module> - <module>metadata-model-maven2</module> <module>metadata-statistics-api</module> <module>test-repository</module> </modules> |