aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-model
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-12-02 02:33:02 +0000
committerBrett Porter <brett@apache.org>2009-12-02 02:33:02 +0000
commit7a63bee6dedc4a58acbbac36ff18a6c18e500275 (patch)
treee652379eba390bb9f0695f6940747ee280a75770 /archiva-modules/archiva-base/archiva-model
parentcb96e18f97711202e3c33a00aca2095a02b582a1 (diff)
downloadarchiva-7a63bee6dedc4a58acbbac36ff18a6c18e500275.tar.gz
archiva-7a63bee6dedc4a58acbbac36ff18a6c18e500275.zip
[MRM-1025] remove project model as this is all now in the metadata repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@886037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-model')
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java12
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java184
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java12
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java317
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/DependencyScope.java102
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/Keys.java5
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/functors/UnprocessedArtifactPredicate.java58
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java46
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ProjectReferenceKey.java46
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml1148
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java59
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/DependencyScopeTest.java72
12 files changed, 4 insertions, 2057 deletions
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java
index bf9d95ac4..cf6017b1a 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java
@@ -19,10 +19,10 @@ package org.apache.maven.archiva.model;
* under the License.
*/
-import org.apache.commons.lang.StringUtils;
-
import java.io.Serializable;
+import org.apache.commons.lang.StringUtils;
+
/**
* <p>
* AbstractArtifactKey - a artifact reference to a versioned project.
@@ -44,14 +44,6 @@ import java.io.Serializable;
* <th>Type</th>
* </tr>
* <tr>
- * <td>{@link AbstractProjectKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * </tr>
- * <tr>
* <td>{@link AbstractVersionedKey}</td>
* <td align="center">Yes</td>
* <td align="center">Yes</td>
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java
deleted file mode 100644
index 445c21e99..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package org.apache.maven.archiva.model;
-
-/*
- * 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.commons.lang.StringUtils;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * AbstractProjectKey - A versionless reference to a Project.
- * This refers to all versions, and all artifacts of a project.
- * This type of reference is typically used by {@link ArchivaRepositoryMetadata} objects.
- * </p>
- *
- * <p>
- * If you require things like "Version" or "Type", consider the other keys below.
- * </p>
- *
- * <table border="1" cellpadding="3">
- * <tr>
- * <th>Key Type</th>
- * <th>Group ID</th>
- * <th>Artifact ID</th>
- * <th>Version</th>
- * <th>Classifier</th>
- * <th>Type</th>
- * </tr>
- * <tr>
- * <td>{@link AbstractProjectKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * </tr>
- * <tr>
- * <td>{@link AbstractVersionedKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * </tr>
- * <tr>
- * <td>{@link AbstractArtifactKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * </tr>
- * </table>
- *
- * <p>
- * NOTE: This is a jpox required compound key handler class.
- * </p>
- *
- * @version $Id$
- */
-public class AbstractProjectKey
- implements CompoundKey, Serializable
-{
- private static final long serialVersionUID = 4949927971768396064L;
-
- /**
- * The Group ID. (JPOX Requires this remain public)
- */
- public String groupId = "";
-
- /**
- * The Artifact ID. (JPOX Requires this remain public)
- */
- public String artifactId = "";
-
- /**
- * Default Constructor. Required by JPOX.
- */
- public AbstractProjectKey()
- {
- /* do nothing */
- }
-
- /**
- * Key Based Constructor. Required by JPOX.
- *
- * @param key the String representing this object's values.
- */
- public AbstractProjectKey( String key )
- {
- String parts[] = StringUtils.splitPreserveAllTokens( key, ":" );
- groupId = parts[0];
- artifactId = parts[1];
- }
-
- /**
- * Get the String representation of this object. - Required by JPOX.
- */
- @Override
- public String toString()
- {
- return StringUtils.join( new String[] { groupId, artifactId } );
- }
-
- /**
- * Get the hashcode for this object's values - Required by JPOX.
- */
- @Override
- public int hashCode()
- {
- final int PRIME = 31;
- int result = super.hashCode();
- result = PRIME * result + ( ( groupId == null ) ? 0 : groupId.hashCode() );
- result = PRIME * result + ( ( artifactId == null ) ? 0 : artifactId.hashCode() );
- return result;
- }
-
- /**
- * Get the equals for this object's values - Required by JPOX.
- */
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
-
- if ( !super.equals( obj ) )
- {
- return false;
- }
-
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
-
- final AbstractProjectKey other = (AbstractProjectKey) obj;
-
- if ( groupId == null )
- {
- if ( other.groupId != null )
- {
- return false;
- }
- }
- else if ( !groupId.equals( other.groupId ) )
- {
- return false;
- }
-
- if ( artifactId == null )
- {
- if ( other.artifactId != null )
- {
- return false;
- }
- }
- else if ( !artifactId.equals( other.artifactId ) )
- {
- return false;
- }
-
- return true;
- }
-}
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java
index 14f1db386..115385394 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java
@@ -19,10 +19,10 @@ package org.apache.maven.archiva.model;
* under the License.
*/
-import org.apache.commons.lang.StringUtils;
-
import java.io.Serializable;
+import org.apache.commons.lang.StringUtils;
+
/**
* <p>
* AbstractVersionedKey - a versioned reference to a Project.
@@ -44,14 +44,6 @@ import java.io.Serializable;
* <th>Type</th>
* </tr>
* <tr>
- * <td>{@link AbstractProjectKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * <td>&nbsp;</td>
- * </tr>
- * <tr>
* <td>{@link AbstractVersionedKey}</td>
* <td align="center">Yes</td>
* <td align="center">Yes</td>
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
index 66af52d93..cffabc277 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
@@ -21,7 +21,6 @@ package org.apache.maven.archiva.model;
import java.util.ArrayList;
import java.util.Enumeration;
-import java.util.Iterator;
import java.util.List;
import java.util.Properties;
@@ -32,43 +31,6 @@ import java.util.Properties;
*/
public class ArchivaModelCloner
{
- public static ArchivaProjectModel clone( ArchivaProjectModel model )
- {
- if ( model == null )
- {
- return null;
- }
-
- ArchivaProjectModel cloned = new ArchivaProjectModel();
-
- cloned.setGroupId( model.getGroupId() );
- cloned.setArtifactId( model.getArtifactId() );
- cloned.setVersion( model.getVersion() );
-
- cloned.setParentProject( clone( model.getParentProject() ) );
-
- cloned.setName( model.getName() );
- cloned.setDescription( model.getDescription() );
- cloned.setUrl( model.getUrl() );
- cloned.setPackaging( model.getPackaging() );
- cloned.setOrigin( model.getOrigin() );
-
- cloned.setMailingLists( cloneMailingLists( model.getMailingLists() ) );
- cloned.setCiManagement( clone( model.getCiManagement() ) );
- cloned.setIndividuals( cloneIndividuals( model.getIndividuals() ) );
- cloned.setIssueManagement( clone( model.getIssueManagement() ) );
- cloned.setLicenses( cloneLicenses( model.getLicenses() ) );
- cloned.setOrganization( clone( model.getOrganization() ) );
- cloned.setScm( clone( model.getScm() ) );
- cloned.setRepositories( cloneRepositories( model.getRepositories() ) );
- cloned.setDependencies( cloneDependencies( model.getDependencies() ) );
- cloned.setPlugins( clonePlugins( model.getPlugins() ) );
- cloned.setReports( cloneReports( model.getReports() ) );
- cloned.setDependencyManagement( cloneDependencies( model.getDependencyManagement() ) );
- cloned.setProperties( clone(model.getProperties() ) );
-
- return cloned;
- }
public static ArtifactReference clone( ArtifactReference artifactReference )
{
@@ -88,101 +50,6 @@ public class ArchivaModelCloner
return cloned;
}
- public static CiManagement clone( CiManagement ciManagement )
- {
- if ( ciManagement == null )
- {
- return null;
- }
-
- CiManagement cloned = new CiManagement();
-
- cloned.setSystem( ciManagement.getSystem() );
- cloned.setUrl( ciManagement.getUrl() );
- cloned.setCiUrl( ciManagement.getCiUrl() );
-
- return cloned;
- }
-
- public static Dependency clone( Dependency dependency )
- {
- if ( dependency == null )
- {
- return null;
- }
-
- Dependency cloned = new Dependency();
-
- // Identification
- cloned.setGroupId( dependency.getGroupId() );
- cloned.setArtifactId( dependency.getArtifactId() );
- cloned.setVersion( dependency.getVersion() );
- cloned.setClassifier( dependency.getClassifier() );
- cloned.setType( dependency.getType() );
-
- // The rest.
- cloned.setTransitive( dependency.isTransitive() );
- cloned.setScope( dependency.getScope() );
- cloned.setOptional( dependency.isOptional() );
- cloned.setSystemPath( dependency.getSystemPath() );
- cloned.setUrl( dependency.getUrl() );
- cloned.setExclusions( cloneExclusions( dependency.getExclusions() ) );
-
- return cloned;
- }
-
- public static IssueManagement clone( IssueManagement issueManagement )
- {
- if ( issueManagement == null )
- {
- return null;
- }
-
- IssueManagement cloned = new IssueManagement();
-
- cloned.setIssueManagementUrl( issueManagement.getIssueManagementUrl() );
- cloned.setSystem( issueManagement.getSystem() );
- cloned.setUrl( issueManagement.getUrl() );
-
- return cloned;
- }
-
- public static MailingList clone( MailingList mailingList )
- {
- if ( mailingList == null )
- {
- return null;
- }
-
- MailingList cloned = new MailingList();
-
- cloned.setName( mailingList.getName() );
- cloned.setSubscribeAddress( mailingList.getSubscribeAddress() );
- cloned.setUnsubscribeAddress( mailingList.getUnsubscribeAddress() );
- cloned.setPostAddress( mailingList.getPostAddress() );
- cloned.setMainArchiveUrl( mailingList.getMainArchiveUrl() );
- cloned.setOtherArchives( cloneSimpleStringList( mailingList.getOtherArchives() ) );
-
- return cloned;
- }
-
- public static Organization clone( Organization organization )
- {
- if ( organization == null )
- {
- return null;
- }
-
- Organization cloned = new Organization();
-
- cloned.setFavicon( organization.getFavicon() );
- cloned.setName( organization.getName() );
- cloned.setUrl( organization.getUrl() );
- cloned.setOrganizationName( organization.getOrganizationName() );
-
- return cloned;
- }
-
@SuppressWarnings("unchecked")
public static Properties clone( Properties properties )
{
@@ -204,22 +71,6 @@ public class ArchivaModelCloner
return cloned;
}
- public static Scm clone( Scm scm )
- {
- if ( scm == null )
- {
- return null;
- }
-
- Scm cloned = new Scm();
-
- cloned.setConnection( scm.getConnection() );
- cloned.setDeveloperConnection( scm.getDeveloperConnection() );
- cloned.setUrl( scm.getUrl() );
-
- return cloned;
- }
-
public static SnapshotVersion clone( SnapshotVersion snapshotVersion )
{
if ( snapshotVersion == null )
@@ -268,174 +119,6 @@ public class ArchivaModelCloner
return ret;
}
- public static List<Dependency> cloneDependencies( List<Dependency> dependencies )
- {
- if ( dependencies == null )
- {
- return null;
- }
-
- List<Dependency> ret = new ArrayList<Dependency>();
-
- for ( Dependency dep : dependencies )
- {
- if ( dep == null )
- {
- // Skip null dependency.
- continue;
- }
-
- ret.add( clone( dep ) );
- }
-
- return ret;
- }
-
- public static List<Exclusion> cloneExclusions( List<Exclusion> exclusions )
- {
- if ( exclusions == null )
- {
- return null;
- }
-
- List<Exclusion> ret = new ArrayList<Exclusion>();
-
- for ( Exclusion exclusion : exclusions )
- {
- Exclusion cloned = new Exclusion();
-
- cloned.setGroupId( exclusion.getGroupId() );
- cloned.setArtifactId( exclusion.getArtifactId() );
-
- ret.add( cloned );
- }
-
- return ret;
- }
-
- public static List<Individual> cloneIndividuals( List<Individual> individuals )
- {
- if ( individuals == null )
- {
- return individuals;
- }
-
- List<Individual> ret = new ArrayList<Individual>();
-
- Iterator<Individual> it = individuals.iterator();
- while ( it.hasNext() )
- {
- Individual individual = it.next();
- Individual cloned = new Individual();
-
- cloned.setPrincipal( individual.getPrincipal() );
-
- cloned.setEmail( individual.getEmail() );
- cloned.setName( individual.getName() );
- cloned.setOrganization( individual.getOrganization() );
- cloned.setOrganizationUrl( individual.getOrganizationUrl() );
- cloned.setUrl( individual.getUrl() );
- cloned.setTimezone( individual.getTimezone() );
- cloned.setIndividualEmail( individual.getIndividualEmail() );
-
- cloned.setRoles( cloneRoles( individual.getRoles() ) );
- cloned.setProperties( clone( individual.getProperties() ) );
-
- ret.add( cloned );
- }
-
- return ret;
- }
-
- public static List<License> cloneLicenses( List<License> licenses )
- {
- if ( licenses == null )
- {
- return null;
- }
-
- List<License> ret = new ArrayList<License>();
-
- for ( License license : licenses )
- {
- License cloned = new License();
-
- cloned.setId( license.getId() );
- cloned.setName( license.getName() );
- cloned.setUrl( license.getUrl() );
- cloned.setComments( license.getComments() );
-
- ret.add( cloned );
- }
-
- return ret;
- }
-
- public static List<MailingList> cloneMailingLists( List<MailingList> mailingLists )
- {
- if ( mailingLists == null )
- {
- return null;
- }
-
- List<MailingList> ret = new ArrayList<MailingList>();
-
- for ( MailingList mailingList : mailingLists )
- {
- if ( mailingList == null )
- {
- // Skip null mailing list.
- continue;
- }
-
- ret.add( clone( mailingList ) );
- }
-
- return ret;
- }
-
- public static List<ArtifactReference> clonePlugins( List<ArtifactReference> plugins )
- {
- return cloneArtifactReferences( plugins );
- }
-
- public static List<ArtifactReference> cloneReports( List<ArtifactReference> reports )
- {
- return cloneArtifactReferences( reports );
- }
-
- public static List<ProjectRepository> cloneRepositories( List<ProjectRepository> repositories )
- {
- if ( repositories == null )
- {
- return null;
- }
-
- List<ProjectRepository> ret = new ArrayList<ProjectRepository>();
-
- for ( ProjectRepository repository : repositories )
- {
- ProjectRepository cloned = new ProjectRepository();
-
- cloned.setId( repository.getId() );
- cloned.setName( repository.getName() );
- cloned.setUrl( repository.getUrl() );
- cloned.setLayout( repository.getLayout() );
- cloned.setPlugins( repository.isPlugins() );
- cloned.setReleases( repository.isReleases() );
- cloned.setSnapshots( repository.isSnapshots() );
-
- ret.add( cloned );
- }
-
- return ret;
- }
-
- public static List<String> cloneRoles( List<String> roles )
- {
- return cloneSimpleStringList( roles );
- }
-
private static List<String> cloneSimpleStringList( List<String> simple )
{
if ( simple == null )
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/DependencyScope.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/DependencyScope.java
deleted file mode 100644
index 4881499e6..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/DependencyScope.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.apache.maven.archiva.model;
-
-/*
- * 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.commons.collections.map.MultiValueMap;
-import org.apache.commons.lang.StringUtils;
-
-/**
- * DependencyScope - utility methods and constants for working with scopes.
- *
- * @version $Id$
- */
-public class DependencyScope
-{
- public static final String SYSTEM = "system";
-
- public static final String COMPILE = "compile";
-
- public static final String PROVIDED = "provided";
-
- public static final String RUNTIME = "runtime";
-
- public static final String TEST = "test";
-
- private static final MultiValueMap scopeMap;
-
- static
- {
- // Store the map of scopes to what other scopes are 'within' that scope.
- scopeMap = new MultiValueMap();
-
- scopeMap.put( COMPILE, COMPILE );
- scopeMap.put( COMPILE, RUNTIME );
- scopeMap.put( COMPILE, PROVIDED );
- scopeMap.put( COMPILE, SYSTEM );
-
- scopeMap.put( TEST, COMPILE );
- scopeMap.put( TEST, RUNTIME );
- scopeMap.put( TEST, PROVIDED );
- scopeMap.put( TEST, SYSTEM );
- scopeMap.put( TEST, TEST );
-
- scopeMap.put( RUNTIME, RUNTIME );
- scopeMap.put( RUNTIME, PROVIDED );
- scopeMap.put( RUNTIME, SYSTEM );
-
- scopeMap.put( PROVIDED, RUNTIME );
- scopeMap.put( PROVIDED, PROVIDED );
- scopeMap.put( PROVIDED, SYSTEM );
-
- scopeMap.put( SYSTEM, SYSTEM );
- }
-
- public static boolean isSystemScoped( Dependency dep )
- {
- return StringUtils.equals( SYSTEM, dep.getScope() );
- }
-
- /**
- * Test the provided scope against the desired scope to see if it is
- * within that scope's pervue.
- *
- * Examples:
- * actual:compile, desired:test = true
- * actual:compile, desired:compile = true
- * actual:test, desired:compile = false
- * actual:provided, desired:compile = false
- *
- * @param actualScope
- * @param desiredScope
- * @return
- */
- public static boolean isWithinScope( String actualScope, String desiredScope )
- {
- if ( StringUtils.isBlank( desiredScope ) )
- {
- // nothing desired? everything should fail.
- return false;
- }
-
- String scope = StringUtils.defaultIfEmpty( actualScope, COMPILE );
-
- return scopeMap.containsValue( desiredScope, scope );
- }
-}
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/Keys.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/Keys.java
index 365d6d718..0cfcebfd9 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/Keys.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/Keys.java
@@ -28,11 +28,6 @@ import org.apache.commons.lang.StringUtils;
*/
public class Keys
{
- public static String toKey( ArchivaProjectModel model )
- {
- return toKey( model.getGroupId(), model.getArtifactId(), model.getVersion() );
- }
-
public static String toKey( String groupId, String artifactId, String version, String classifier, String type )
{
StringBuffer key = new StringBuffer();
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/functors/UnprocessedArtifactPredicate.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/functors/UnprocessedArtifactPredicate.java
deleted file mode 100644
index 2a9e33f9a..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/functors/UnprocessedArtifactPredicate.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.apache.maven.archiva.model.functors;
-
-/*
- * 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.commons.collections.Predicate;
-import org.apache.maven.archiva.model.ArchivaArtifact;
-import org.apache.maven.archiva.model.ArchivaArtifactModel;
-
-/**
- * Allows for selection of unprocessed artifacts.
- *
- * @version $Id$
- */
-public class UnprocessedArtifactPredicate
- implements Predicate
-{
- private static UnprocessedArtifactPredicate INSTANCE = new UnprocessedArtifactPredicate();
-
- public static UnprocessedArtifactPredicate getInstance()
- {
- return INSTANCE;
- }
-
- public boolean evaluate( Object object )
- {
- boolean satisfies = false;
-
- if ( object instanceof ArchivaArtifact )
- {
- ArchivaArtifact artifact = (ArchivaArtifact) object;
- satisfies = !artifact.getModel().isProcessed();
- }
- else if ( object instanceof ArchivaArtifactModel )
- {
- ArchivaArtifactModel model = (ArchivaArtifactModel) object;
- satisfies = !model.isProcessed();
- }
-
- return satisfies;
- }
-}
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java
deleted file mode 100644
index 9f3535ead..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.maven.archiva.model.jpox;
-
-/*
- * 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.maven.archiva.model.AbstractVersionedKey;
-
-import java.io.Serializable;
-
-/**
- * ArchivaProjectModelKey - unique classid-key for JPOX.
- *
- * @version $Id$
- */
-public class ArchivaProjectModelKey
- extends AbstractVersionedKey
- implements Serializable
-{
- private static final long serialVersionUID = 7789859208617327581L;
-
- public ArchivaProjectModelKey()
- {
- }
-
- public ArchivaProjectModelKey( String key )
- {
- super( key );
- }
-
-}
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ProjectReferenceKey.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ProjectReferenceKey.java
deleted file mode 100644
index 1036c781b..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ProjectReferenceKey.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.maven.archiva.model.jpox;
-
-/*
- * 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.maven.archiva.model.AbstractProjectKey;
-
-import java.io.Serializable;
-
-/**
- * ProjectReferenceKey - unique classid-key for JPOX.
- *
- * @version $Id$
- */
-public class ProjectReferenceKey
- extends AbstractProjectKey
- implements Serializable
-{
- private static final long serialVersionUID = 7803774484166902823L;
-
- public ProjectReferenceKey()
- {
- super();
- }
-
- public ProjectReferenceKey( String key )
- {
- super( key );
- }
-}
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml b/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
index de08a8d7b..0c9a400f0 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
+++ b/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
@@ -25,16 +25,6 @@
This object is not serialized to the Database.
</description>
<fields>
- <!-- Note: these are only managed repositories. This should be reviewed as to whether they are still needed
- <field>
- <name>repositories</name>
- <version>1.0.0+</version>
- <association>
- <type>ArchivaRepositoryModel</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- -->
<field>
<name>artifacts</name>
<version>1.0.0+</version>
@@ -52,14 +42,6 @@
</association>
</field>
<field>
- <name>projects</name>
- <version>1.0.0+</version>
- <association>
- <type>ArchivaProjectModel</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
<name>repositoryProblems</name>
<version>1.0.0+</version>
<association>
@@ -87,127 +69,6 @@
</class>
<!-- _______________________________________________________________
- ____ _ _
- | _ \ ___ _ __ ___ ___(_) |_ ___ _ __ _ _
- | |_) / _ \ '_ \ / _ \/ __| | __/ _ \| '__| | | |
- | _ < __/ |_) | (_) \__ \ | || (_) | | | |_| |
- |_| \_\___| .__/ \___/|___/_|\__\___/|_| \__, |
- |_| |___/
- -->
- <!--
- <class stash.storable="true"
- jpox.table="REPOSITORIES">
- <name>ArchivaRepositoryModel</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off">
- <name>id</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The unique ID for the repository.
- </description>
- </field>
- <field stash.maxSize="250">
- <name>name</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The Name of the repository.
- </description>
- </field>
- <field stash.maxSize="250">
- <name>url</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The URL of the repository.
- </description>
- </field>
- <field stash.maxSize="250">
- <name>repositoryUsername</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <description>
- The Username of the repository.
- </description>
- </field>
- <field stash.maxSize="250">
- <name>repositoryPassword</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <description>
- The Password of the repository.
- </description>
- </field>
- <field stash.maxSize="20">
- <name>creationSource</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The Source of this repository.
- (Example: Configuration, POM)
- </description>
- </field>
- <field stash.maxSize="16">
- <name>layoutName</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The layout of the repository.
- (Either 'default', or 'legacy')
- </description>
- <defaultValue>default</defaultValue>
- </field>
- <field>
- <name>releasePolicy</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>boolean</type>
- <required>true</required>
- <description>
- The releases policy of the repository.
- </description>
- <defaultValue>true</defaultValue>
- </field>
- <field>
- <name>snapshotPolicy</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>boolean</type>
- <required>true</required>
- <description>
- The snapshot policy of the repository.
- </description>
- <defaultValue>false</defaultValue>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 6823195399928260795L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
- -->
-
- <!-- _______________________________________________________________
_ _ _ __ _
/ \ _ __| |_(_)/ _| __ _ ___| |_
/ _ \ | '__| __| | |_ / _` |/ __| __|
@@ -1059,1015 +920,6 @@
</class>
<!-- _______________________________________________________________
- __ __ ____ _ _
- | \/ | __ ___ _____ _ __ | _ \ _ __ ___ (_) ___ ___| |_
- | |\/| |/ _` \ \ / / _ \ '_ \ | |_) | '__/ _ \| |/ _ \/ __| __|
- | | | | (_| |\ V / __/ | | | | __/| | | (_) | | __/ (__| |_
- |_| |_|\__,_| \_/ \___|_| |_| |_| |_| \___// |\___|\___|\__|
- |__/
- -->
-
- <class stash.storable="true"
- jpox.table="PROJECT"
- jpox.use-identifiers-as-primary-key="false"
- jpox.identity-type="application"
- jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaProjectModelKey">
- <name>ArchivaProjectModel</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
- <name>groupId</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The Group ID of the repository content.
- </description>
- </field>
- <field stash.maxSize="80"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
- <name>artifactId</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The Artifact ID of the repository content.
- </description>
- </field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
- <name>version</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The version of the repository content.
- </description>
- </field>
- <field>
- <name>parentProject</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <association stash.part="true"
- jpox.join="false">
- <type>VersionedReference</type>
- <multiplicity>1</multiplicity>
- </association>
- <description>
- The content key for a parent reference.
- </description>
- </field>
- <field>
- <name>packaging</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>true</required>
- <type>String</type>
- <description>
- The declared packaging for this project model.
- </description>
- </field>
- <field>
- <name>name</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <type>String</type>
- <description>
- The name of this project.
- </description>
- </field>
- <field stash.maxSize="8192">
- <name>description</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <type>String</type>
- <description>
- The description of this project.
- </description>
- </field>
- <field>
- <name>origin</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>true</required>
- <type>String</type>
- <description>
- The Origin of this Model. (Filesystem, Proxy, or Deploy)
- </description>
- </field>
- <field>
- <name>whenIndexed</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <type>Date</type>
- <description>
- The timestamp when this model was indexed.
- </description>
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <type>String</type>
- <description>
- The URL for the project's homepage.
- </description>
- </field>
- <field>
- <name>organization</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <association stash.part="true"
- jpox.join="false">
- <type>Organization</type>
- </association>
- </field>
- <field>
- <name>licenses</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <required>false</required>
- <association stash.part="true"
- jpox.join="false">
- <type>License</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>mailingLists</name>
- <version>1.0.0+</version>
- <description>The mailing lists.</description>
- <required>false</required>
- <association stash.part="true"
- jpox.join="false">
- <type>MailingList</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>issueManagement</name>
- <version>1.0.0+</version>
- <description><![CDATA[The project's issue management system information.]]></description>
- <association stash.part="true"
- jpox.join="false">
- <type>IssueManagement</type>
- </association>
- </field>
- <field>
- <name>ciManagement</name>
- <version>1.0.0+</version>
- <description><![CDATA[The project's continuous integration information.]]></description>
- <association stash.part="true"
- jpox.join="false">
- <type>CiManagement</type>
- </association>
- </field>
- <field>
- <name>scm</name>
- <version>1.0.0+</version>
- <description>
- <![CDATA[Specification for the SCM used by the project, such as CVS, Subversion, etc.]]></description>
- <association stash.part="true"
- jpox.join="false">
- <type>Scm</type>
- </association>
- </field>
- <field>
- <name>individuals</name>
- <version>1.0.0+</version>
- <description>
- The list of individuals around this project.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>Individual</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>dependencies</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- This element describes all of the dependencies associated with a
- project.
- ]]></description>
- <association stash.part="true"
- jpox.join="false">
- <type>Dependency</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>dependencyManagement</name>
- <version>1.0.0+</version>
- <description>
- The list of dependency management settings.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>Dependency</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>repositories</name>
- <version>1.0.0+</version>
- <description>
- The list project repositories in use by this project.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>ProjectRepository</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>plugins</name>
- <version>1.0.0+</version>
- <description>
- The list of plugins that this project uses.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>ArtifactReference</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>reports</name>
- <version>1.0.0+</version>
- <description>
- The list of reports that this project uses.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>ArtifactReference</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>buildExtensions</name>
- <version>1.0.0+</version>
- <description>
- The list of build extensions that this project uses.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>ArtifactReference</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>properties</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- Properties on the project. Only really used to resolve
- variables inside of the project during an effective project
- model resolution.
- ]]></description>
- <type>Properties</type>
- <association xml.mapStyle="inline">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>relocation</name>
- <version>1.0.0+</version>
- <description>If relocated, this is the new location reference</description>
- <association stash.part="true"
- jpox.join="false">
- <type>VersionedReference</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = -4216128775884469616L;
- ]]></code>
- </codeSegment>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- public Dependency asDependency()
- {
- Dependency dep = new Dependency();
-
- dep.setGroupId( groupId );
- dep.setArtifactId( artifactId );
- dep.setVersion( version );
- dep.setType( packaging );
-
- return dep;
- }
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="MAILING_LISTS">
- <name>MailingList</name>
- <description>A Mailing List</description>
- <version>1.0.0+</version>
- <fields>
- <field>
- <name>name</name>
- <version>1.0.0+</version>
- <description>The name of the mailing list.</description>
- <type>String</type>
- </field>
- <field>
- <name>subscribeAddress</name>
- <version>1.0.0+</version>
- <description>The email address to subscribe to this mailing list.</description>
- <type>String</type>
- </field>
- <field>
- <name>unsubscribeAddress</name>
- <version>1.0.0+</version>
- <description>The email address to unsubscribe to this mailing list.</description>
- <type>String</type>
- </field>
- <field>
- <name>postAddress</name>
- <version>1.0.0+</version>
- <description>The email address to post to this mailing list.</description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>mainArchiveUrl</name>
- <version>1.0.0+</version>
- <description>The url to the archive for this mailing list.</description>
- <type>String</type>
- </field>
- <field>
- <name>otherArchives</name>
- <version>1.0.0+</version>
- <description>The email address to subscribe to this mailing list.</description>
- <association stash.part="true"
- jpox.join="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 843006855864469245L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="ORGANIZATION">
- <name>Organization</name>
- <description>Specifies the organization that produces this project.</description>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250">
- <name>name</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <description><![CDATA[The generated id of the organization object. Due to problems in upgrading,
- we cannot unset this as the identifier and we cannot rename this as well.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="250" null-value="default">
- <name>organizationName</name>
- <version>1.2.1+</version>
- <description><![CDATA[The full name of the organization.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <version>1.0.0+</version>
- <description><![CDATA[The URL to the organization's home page.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020"
- jpox.column="FAVICON_URL">
- <name>favicon</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The URL to the organization's logo image. This can be an URL relative
- to the base directory of the generated web site,
- (e.g., <code>/images/org-logo.png</code>) or an absolute URL
- (e.g., <code>http://my.corp/logo.png</code>). This value is used
- when generating the project documentation.
- ]]></description>
- <type>String</type>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = -7782212828768434535L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="LICENSES">
- <name>License</name>
- <description><![CDATA[
- Describes the licenses for this project. This is used to generate
- the license page of the project's web site, as well as being taken into consideration in other reporting and
- validation. The licenses listed for the project are that of the project itself, and not of dependencies.
- ]]></description>
- <version>1.0.0+</version>
- <fields>
- <field jpox.column="LICENSE_ID">
- <name>id</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>int</type>
- <description>
- The type of license.
- </description>
- </field>
- <field stash.maxSize="250">
- <name>name</name>
- <version>1.0.0+</version>
- <description><![CDATA[The full legal name of the license.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <version>1.0.0+</version>
- <description><![CDATA[The official url for the license text.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="8192">
- <name>comments</name>
- <description>
- Addendum information pertaining to this license.
- </description>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 6078130909089038238L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="ISSUE_MANAGEMENT">
- <name>IssueManagement</name>
- <description>
- Information about the issue tracking (or bug tracking) system used to manage this project.
- </description>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250">
- <name>url</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <description><![CDATA[The generated id for the issue management object. Due to problems in upgrading,
- we cannot unset this as the identifier and we cannot rename this as well.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020" null-value="default">
- <name>issueManagementUrl</name>
- <version>1.2.1+</version>
- <description><![CDATA[URL for the issue management system used by the project.]]></description>
- <type>String</type>
- </field>
- <field jpox.column="SYSTEM_NAME">
- <name>system</name>
- <version>1.0.0+</version>
- <description><![CDATA[The name of the issue management system, e.g. Bugzilla]]></description>
- <type>String</type>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = -8881904886381224821L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class>
- <name>CiManagement</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250">
- <name>url</name>
- <version>1.0.0+</version>
- <identifier>true</identifier>
- <description>
- <![CDATA[The generated id for the CI management object. Due to problems in upgrading,
- we cannot unset this as the identifier and we cannot rename this as well.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020" null-value="default">
- <name>ciUrl</name>
- <version>1.2.1+</version>
- <description>
- <![CDATA[URL for the continuous integration system used by the project if it has a web interface.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="50"
- jpox.column="SYSTEM_NAME">
- <name>system</name>
- <version>1.0.0+</version>
- <description>
- <![CDATA[The name of the continuous integration system, e.g. <code>continuum</code>.]]></description>
- <type>String</type>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 7592740408468517476L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true">
- <name>Individual</name>
- <description>
- Description of a person who has contributed to the project.
- This includes contributors and commitors.
- </description>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250">
- <name>email</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <description><![CDATA[The generated id for the object. Due to problems in upgrading,
- we cannot unset this as the identifier and we cannot rename this as well.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="250" null-value="default">
- <name>individualEmail</name>
- <version>1.2.1+</version>
- <description><![CDATA[The email address of the individual.]]></description>
- <type>String</type>
- </field>
- <field>
- <name>name</name>
- <version>1.0.0+</version>
- <description><![CDATA[The full name of the individual.]]></description>
- <type>String</type>
- </field>
- <field>
- <name>principal</name>
- <version>1.0.0+</version>
- <description>
- The RedBack (plexus security) principal associated with this Invididual.
- </description>
- <type>String</type>
- </field>
- <field>
- <name>commitor</name>
- <version>1.0.0+</version>
- <description>
- The flag if this user is a developer and/or commitor.
- </description>
- <type>boolean</type>
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <version>1.0.0+</version>
- <description><![CDATA[The URL for the homepage of the individual.]]></description>
- <type>String</type>
- </field>
- <!-- TODO: should this just be a single Organization element -->
- <field>
- <name>organization</name>
- <alias>organisation</alias>
- <version>1.0.0+</version>
- <description><![CDATA[The organization to which the individual belongs.]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>organizationUrl</name>
- <alias>organisationUrl</alias>
- <version>1.0.0+</version>
- <description><![CDATA[The URL of the organization.]]></description>
- <type>String</type>
- </field>
- <field jpox.column="CONTRIBUTOR_ROLES">
- <name>roles</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The roles the individual plays in the project. Each role is
- described by a <code>role</code> element, the body of which is a
- role name. This can also be used to describe the contribution.
- ]]></description>
- <association stash.part="true"
- jpox.join="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>timezone</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The timezone the individual is in. This is a number in the range -11 to 12.
- ]]></description>
- <type>String</type>
- </field>
- <field>
- <name>properties</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- Properties about the individual, such as an instant messenger handle.
- ]]></description>
- <type>Properties</type>
- <association xml.mapStyle="inline">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = -3847642264665088605L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="DEPENDENCY">
- <name>Dependency</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250">
- <name>groupId</name>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The Group ID of the repository content.
- </description>
- </field>
- <field stash.maxSize="80">
- <name>artifactId</name>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The Artifact ID of the repository content.
- </description>
- </field>
- <field stash.maxSize="50">
- <name>version</name>
- <version>1.0.0+</version>
- <type>String</type>
- <required>false</required>
- <description>
- The version of the repository content.
- </description>
- </field>
- <field stash.maxSize="50">
- <name>classifier</name>
- <version>1.0.0+</version>
- <type>String</type>
- <required>false</required>
- <defaultValue></defaultValue>
- <description><![CDATA[
- The classifier of the dependency. This allows distinguishing two artifacts that belong to the same POM but
- were built differently, and is appended to the filename after the version. For example,
- <code>jdk14</code> and <code>jdk15</code>.
- ]]></description>
- </field>
- <field stash.maxSize="50"
- jpox.column="DEPENDENCY_TYPE">
- <name>type</name>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description><![CDATA[
- The type of dependency. This defaults to <code>jar</code>. While it usually represents the extension on
- the filename of the dependency, that is not always the case. A type can be mapped to a different
- extension and a classifier.
- The type often correspongs to the packaging used, though this is also not always the case.
- Some examples are <code>jar</code>, <code>war</code>, <code>ejb-client</code> and <code>test-jar</code>.
- New types can be defined by plugins that set
- <code>extensions</code> to <code>true</code>, so this is not a complete list.
- ]]></description>
- <defaultValue>jar</defaultValue>
- </field>
- <field>
- <name>transitive</name>
- <version>1.0.0+</version>
- <required>false</required>
- <description>True if the dependency is only here due a transitive resolution</description>
- <type>boolean</type>
- <!-- <defaultValue>false</defaultValue> -->
- </field>
- <field>
- <name>fromParent</name>
- <version>1.0.0+</version>
- <required>false</required>
- <description>True if the dependency is only here due a parent pom</description>
- <type>boolean</type>
- <!-- <defaultValue>false</defaultValue> -->
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- This url will be provided to the user if the jar file cannot be downloaded
- from the central repository.
- ]]></description>
- <type>String</type>
- </field>
- <field jpox.column="DEPENDENCY_SCOPE">
- <name>scope</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The scope of the dependency - <code>compile</code>, <code>runtime</code>, <code>test</code>,
- <code>system</code>, and <code>provided</code>. Used to
- calculate the various classpaths used for compilation, testing, and so on. It also assists in determining
- which artifacts to include in a distribution of this project. For more information, see
- <a href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
- dependency mechanism</a>.
- ]]>
- </description>
- <type>String</type>
- </field>
- <field stash.maxSize="250">
- <name>systemPath</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- FOR SYSTEM SCOPE ONLY. Note that use of this property is <b>discouraged</b> and may be replaced in later
- versions. This specifies the path on the filesystem for this dependency.
- Requires an absolute path for the value, not relative.
- Use a property that gives the machine specific absolute path,
- e.g. <code>${java.home}</code>.
- ]]></description>
- <type>String</type>
- </field>
- <field>
- <name>exclusions</name>
- <version>1.0.0+</version>
- <description>
- Lists a set of artifacts that should be excluded from this dependency's artifact list when it comes to
- calculating transitive dependencies.
- </description>
- <association stash.part="true"
- jpox.join="false">
- <type>Exclusion</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>optional</name>
- <version>1.0.0+</version>
- <description>
- Indicates the dependency is optional for use of this library. While the version of the dependency will be
- taken into account for dependency calculation if the library is used elsewhere, it will not be passed on
- transitively.
- </description>
- <type>boolean</type>
- <defaultValue>false</defaultValue>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = -5401218809636164002L;
- ]]></code>
- </codeSegment>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- public String toString()
- {
- return Dependency.toKey( this );
- }
-
- public static String toKey( Dependency dep )
- {
- StringBuffer key = new StringBuffer();
-
- key.append( dep.getGroupId() ).append( ":" );
- key.append( dep.getArtifactId() ).append( ":" );
- key.append( dep.getVersion() ).append( ":" );
- if ( dep.getClassifier() != null )
- {
- key.append( dep.getClassifier() );
- }
- key.append( ":" );
- key.append( dep.getType() );
-
- return key.toString();
- }
-
- public static String toVersionlessKey( Dependency dep )
- {
- StringBuffer key = new StringBuffer();
-
- key.append( dep.getGroupId() ).append( ":" );
- key.append( dep.getArtifactId() ).append( ":" );
- if ( dep.getClassifier() != null )
- {
- key.append( dep.getClassifier() );
- }
- key.append( ":" );
- key.append( dep.getType() );
-
- return key.toString();
- }
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="EXCLUSIONS">
- <name>Exclusion</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250">
- <name>groupId</name>
- <version>1.0.0+</version>
- <description><![CDATA[The group ID of the project to exclude.]]></description>
- <type>String</type>
- <required>true</required>
- </field>
- <field stash.maxSize="80">
- <name>artifactId</name>
- <version>1.0.0+</version>
- <description><![CDATA[The artifact ID of the project to exclude.]]></description>
- <type>String</type>
- <required>true</required>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 5655957444245343314L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true"
- jpox.table="SCM">
- <name>Scm</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="1020" jpox.column="SCM_URL">
- <name>connection</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The source control management system URL
- that describes the repository and how to connect to the
- repository. For more information, see the
- <a href="http://maven.apache.org/scm/scm-url-format.html">URL format</a>
- and <a href="http://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>.
- This connection is read-only.
- ]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>developerConnection</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- Just like <code>connection</code>, but for developers, i.e. this scm connection
- will not be read only.
- ]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <version>1.0.0+</version>
- <description>
- <![CDATA[The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.]]></description>
- <type>String</type>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 4075086167850885575L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class stash.storable="true" jpox.table="PROJECT_REPOSITORIES">
- <name>ProjectRepository</name>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="50">
- <name>id</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- A unique identifier for a repository. This is used to match the repository to configuration in
- the <code>settings.xml</code> file, for example.
- ]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="250">
- <name>name</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- Human readable name of the repository.
- ]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="1020">
- <name>url</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The url of the repository, in the form <code>protocol://hostname/path</code>.
- ]]></description>
- <type>String</type>
- </field>
- <field stash.maxSize="16">
- <name>layout</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The type of layout this repository uses for locating and storing artifacts - can be <code>legacy</code> or
- <code>default</code>.
- ]]></description>
- <type>String</type>
- <defaultValue>default</defaultValue>
- </field>
- <field>
- <name>plugins</name>
- <version>1.0.0+</version>
- <description>
- Flag indicating if this repository is for plugin resolution.
- </description>
- <type>boolean</type>
- </field>
- <field>
- <name>releases</name>
- <version>1.0.0+</version>
- <description>
- Flag indicating if this repository has release versioned artifacts.
- </description>
- <type>boolean</type>
- </field>
- <field>
- <name>snapshots</name>
- <version>1.0.0+</version>
- <description>
- Flag indicating if this repository has snapshot versioned artifacts.
- </description>
- <type>boolean</type>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = 8906309721278091848L;
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <!-- _______________________________________________________________
_ _ _ _ _
| | | | ___ __ _| | |_| |__
| |_| |/ _ \/ _` | | __| '_ \
diff --git a/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java b/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java
deleted file mode 100644
index 7b4017ff5..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.apache.maven.archiva.model;
-
-/*
- * 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.codehaus.plexus.spring.PlexusInSpringTestCase;
-
-/**
- * ArchivaModelClonerTest
- *
- * @version $Id$
- */
-public class ArchivaModelClonerTest
- extends PlexusInSpringTestCase
-{
- public void testCloneProjectModelWithParent()
- {
- ArchivaProjectModel actualModel = new ArchivaProjectModel();
- actualModel.setGroupId( null );
- actualModel.setArtifactId( "archiva-common" );
- actualModel.setVersion( null );
- actualModel.setParentProject( new VersionedReference() );
- actualModel.getParentProject().setGroupId( "org.apache.maven.archiva" );
- actualModel.getParentProject().setArtifactId( "archiva-parent" );
- actualModel.getParentProject().setVersion( "1.0" );
-
- ArchivaProjectModel clonedModel = ArchivaModelCloner.clone( actualModel );
-
- // Should not be the same object (in memory)
- assertNotSame( clonedModel, actualModel );
-
- // Should be equal in value.
- assertEquals( clonedModel, actualModel );
-
- // Test specific fields.
- assertNull( "Group Id", clonedModel.getGroupId() );
- assertNull( "Version", clonedModel.getVersion() );
- assertNotNull( "Parent Reference", clonedModel.getParentProject() );
- assertEquals( "Parent Group Id", "org.apache.maven.archiva", clonedModel.getParentProject().getGroupId() );
- assertEquals( "Parent Artifact Id", "archiva-parent", clonedModel.getParentProject().getArtifactId() );
- assertEquals( "Parent Version", "1.0", clonedModel.getParentProject().getVersion() );
- }
-}
diff --git a/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/DependencyScopeTest.java b/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/DependencyScopeTest.java
deleted file mode 100644
index cc2f06740..000000000
--- a/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/DependencyScopeTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.maven.archiva.model;
-
-/*
- * 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 junit.framework.TestCase;
-
-/**
- * DependencyScopeTest
- *
- * @version $Id$
- */
-public class DependencyScopeTest
- extends TestCase
-{
- public void testIsWithinScope()
- {
- // Test on blank / empty desired scopes.
- assertFalse( DependencyScope.isWithinScope( "compile", null ) );
- assertFalse( DependencyScope.isWithinScope( "test", null ) );
- assertFalse( DependencyScope.isWithinScope( "runtime", null ) );
- assertFalse( DependencyScope.isWithinScope( "provided", null ) );
- assertFalse( DependencyScope.isWithinScope( "compile", "" ) );
- assertFalse( DependencyScope.isWithinScope( "test", "" ) );
- assertFalse( DependencyScope.isWithinScope( "runtime", "" ) );
- assertFalse( DependencyScope.isWithinScope( "provided", "" ) );
-
- // Tests on blank / empty actual scopes.
- assertTrue( DependencyScope.isWithinScope( "", DependencyScope.COMPILE ) );
- assertTrue( DependencyScope.isWithinScope( null, DependencyScope.COMPILE ) );
- assertTrue( DependencyScope.isWithinScope( "", DependencyScope.TEST ) );
- assertTrue( DependencyScope.isWithinScope( null, DependencyScope.TEST ) );
- assertFalse( DependencyScope.isWithinScope( "", DependencyScope.PROVIDED ) );
- assertFalse( DependencyScope.isWithinScope( null, DependencyScope.PROVIDED ) );
- assertFalse( DependencyScope.isWithinScope( "", DependencyScope.RUNTIME ) );
- assertFalse( DependencyScope.isWithinScope( null, DependencyScope.RUNTIME ) );
-
- // Tests on compile desired scopes.
- assertTrue( DependencyScope.isWithinScope( "compile", DependencyScope.COMPILE ) );
- assertFalse( DependencyScope.isWithinScope( "test", DependencyScope.COMPILE ) );
-
- // Tests on test desired scopes.
- assertTrue( DependencyScope.isWithinScope( "compile", DependencyScope.TEST ) );
- assertTrue( DependencyScope.isWithinScope( "test", DependencyScope.TEST ) );
-
- // Tests on oddball scopes.
- assertFalse( DependencyScope.isWithinScope( "compile", DependencyScope.PROVIDED ) );
- assertFalse( DependencyScope.isWithinScope( "test", DependencyScope.PROVIDED ) );
- assertTrue( DependencyScope.isWithinScope( "provided", DependencyScope.PROVIDED ) );
-
- assertFalse( DependencyScope.isWithinScope( "compile", DependencyScope.RUNTIME ) );
- assertFalse( DependencyScope.isWithinScope( "test", DependencyScope.RUNTIME ) );
- assertTrue( DependencyScope.isWithinScope( "provided", DependencyScope.RUNTIME ) );
- assertTrue( DependencyScope.isWithinScope( "runtime", DependencyScope.RUNTIME ) );
- }
-}