From 7e5d667be32272e83b828c3c89ae927265065bbf Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 5 Apr 2007 01:10:45 +0000 Subject: [PATCH] Correcting primary-key handling of compound keys in jpox by flatting out sub-objects in primary-key. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@525672 13f79535-47bb-0310-9956-ffa450edef68 --- archiva-base/archiva-model/pom.xml | 2 + .../archiva/model/AbstractArtifactKey.java | 236 +++++ .../archiva/model/AbstractProjectKey.java | 180 ++++ ...tentKey.java => AbstractVersionedKey.java} | 106 ++- .../maven/archiva/model/ArchivaArtifact.java | 86 +- .../archiva/model/ArchivaModelCloner.java | 380 +++++++++ .../jpox/ArchivaArtifactJavaDetailsKey.java | 46 + .../model/jpox/ArchivaArtifactModelKey.java | 45 + .../model/jpox/ArchivaProjectModelKey.java | 46 + .../jpox/ArchivaRepositoryMetadataKey.java | 46 + .../model/jpox/ArtifactReferenceKey.java | 46 + .../archiva/model/jpox/DependencyKey.java | 45 + .../model/jpox/VersionedReferenceKey.java | 47 + .../src/main/mdo/archiva-base.xml | 807 +++++++++++------- 14 files changed, 1709 insertions(+), 409 deletions(-) create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java rename archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/{RepositoryContentKey.java => AbstractVersionedKey.java} (65%) create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactJavaDetailsKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactModelKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArtifactReferenceKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/DependencyKey.java create mode 100644 archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/VersionedReferenceKey.java diff --git a/archiva-base/archiva-model/pom.xml b/archiva-base/archiva-model/pom.xml index f0a4acd2a..52c185ea7 100755 --- a/archiva-base/archiva-model/pom.xml +++ b/archiva-base/archiva-model/pom.xml @@ -78,8 +78,10 @@ xsd jpox-jdo-mapping jpox-metadata-class + diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java new file mode 100644 index 000000000..2c4f987a9 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractArtifactKey.java @@ -0,0 +1,236 @@ +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; + +/** + *

+ * AbstractArtifactKey - a artifact reference to a versioned project. + * This refers to all artifacts of a specific version of a project. + * This type of reference is typically used by {@link ArchivaProjectModel} objects. + *

+ * + *

+ * If you don't require things like "Version" or "Type", consider the other keys below. + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Key TypeGroup IDArtifact IDVersionClassifierType
{@link AbstractProjectKey}YesYes   
{@link AbstractVersionedKey}YesYesYes  
{@link AbstractArtifactKey}YesYesYesYesYes
+ * + *

+ * NOTE: This is a jpox required compound key handler class. + *

+ * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class AbstractArtifactKey implements Serializable +{ + /** + * The Group ID. (JPOX Requires this remain public) + */ + public String groupId = ""; + + /** + * The Artifact ID. (JPOX Requires this remain public) + */ + public String artifactId = ""; + + /** + * The Version. (JPOX Requires this remain public) + */ + public String version = ""; + + /** + * The Classifier. (JPOX Requires this remain public) + */ + public String classifier; + + /** + * The Type. (JPOX Requires this remain public) + */ + public String type; + + /** + * Default Constructor. Required by JPOX. + */ + public AbstractArtifactKey() + { + /* do nothing */ + } + + /** + * Key Based Constructor. Required by JPOX. + * + * @param key the String representing this object's values. + */ + public AbstractArtifactKey( String key ) + { + String parts[] = StringUtils.splitPreserveAllTokens( key, ":" ); + groupId = parts[1]; + artifactId = parts[2]; + version = parts[3]; + classifier = parts[4]; + type = parts[5]; + } + + /** + * Get the String representation of this object. - Required by JPOX. + */ + public String toString() + { + return StringUtils.join( new String[] { groupId, artifactId, version, classifier, type } ); + } + + /** + * Get the hashcode for this object's values - Required by JPOX. + */ + 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() ); + result = PRIME * result + ( ( version == null ) ? 0 : version.hashCode() ); + result = PRIME * result + ( ( classifier == null ) ? 0 : classifier.hashCode() ); + result = PRIME * result + ( ( type == null ) ? 0 : type.hashCode() ); + return result; + } + + /** + * Get the equals for this object's values - Required by JPOX. + */ + public boolean equals( Object obj ) + { + if ( this == obj ) + { + return true; + } + + if ( !super.equals( obj ) ) + { + return false; + } + + if ( getClass() != obj.getClass() ) + { + return false; + } + + final AbstractArtifactKey other = (AbstractArtifactKey) 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; + } + + if ( version == null ) + { + if ( other.version != null ) + { + return false; + } + } + else if ( !version.equals( other.version ) ) + { + return false; + } + + if ( classifier == null ) + { + if ( other.classifier != null ) + { + return false; + } + } + else if ( !classifier.equals( other.classifier ) ) + { + return false; + } + + if ( type == null ) + { + if ( other.type != null ) + { + return false; + } + } + else if ( !type.equals( other.type ) ) + { + return false; + } + + return true; + } +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java new file mode 100644 index 000000000..23f628cb6 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractProjectKey.java @@ -0,0 +1,180 @@ +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; + +/** + *

+ * 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. + *

+ * + *

+ * If you require things like "Version" or "Type", consider the other keys below. + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Key TypeGroup IDArtifact IDVersionClassifierType
{@link AbstractProjectKey}YesYes   
{@link AbstractVersionedKey}YesYesYes  
{@link AbstractArtifactKey}YesYesYesYesYes
+ * + *

+ * NOTE: This is a jpox required compound key handler class. + *

+ * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class AbstractProjectKey + implements Serializable +{ + /** + * 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[1]; + artifactId = parts[2]; + } + + /** + * Get the String representation of this object. - Required by JPOX. + */ + public String toString() + { + return StringUtils.join( new String[] { groupId, artifactId } ); + } + + /** + * Get the hashcode for this object's values - Required by JPOX. + */ + 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. + */ + 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-base/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java similarity index 65% rename from archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java rename to archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java index a198eaec2..c173a3574 100644 --- a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/AbstractVersionedKey.java @@ -24,18 +24,60 @@ import org.apache.commons.lang.StringUtils; import java.io.Serializable; /** - * RepositoryContentKey - the jpox application key support class for all content within the repository. + *

+ * AbstractVersionedKey - a versioned reference to a Project. + * This refers to all artifacts of a specific version of a project. + * This type of reference is typically used by {@link ArchivaProjectModel} objects. + *

+ * + *

+ * If you require things like "Version" or "Type", consider the other keys below. + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Key TypeGroup IDArtifact IDVersionClassifierType
{@link AbstractProjectKey}YesYes   
{@link AbstractVersionedKey}YesYesYes  
{@link AbstractArtifactKey}YesYesYesYesYes
+ * + *

+ * NOTE: This is a jpox required compound key handler class. + *

* * @author Joakim Erdfelt * @version $Id$ */ -public class RepositoryContentKey implements Serializable +public class AbstractVersionedKey implements Serializable { - /** - * The Repository ID. (JPOX Requires this remain public) - */ - public String repositoryId = ""; - /** * The Group ID. (JPOX Requires this remain public) */ @@ -50,35 +92,34 @@ public class RepositoryContentKey implements Serializable * The Version. (JPOX Requires this remain public) */ public String version = ""; - + /** * Default Constructor. Required by JPOX. */ - public RepositoryContentKey() + public AbstractVersionedKey() { - + /* do nothing */ } - + /** * Key Based Constructor. Required by JPOX. * * @param key the String representing this object's values. */ - public RepositoryContentKey( String key ) + public AbstractVersionedKey( String key ) { - String parts[] = StringUtils.splitPreserveAllTokens( key, ':' ); - repositoryId = parts[0]; + String parts[] = StringUtils.splitPreserveAllTokens( key, ":" ); groupId = parts[1]; artifactId = parts[2]; version = parts[3]; } - + /** * Get the String representation of this object. - Required by JPOX. */ public String toString() { - return StringUtils.join( new String[] { repositoryId, groupId, artifactId, version } ); + return StringUtils.join( new String[] { groupId, artifactId, version } ); } /** @@ -87,8 +128,7 @@ public class RepositoryContentKey implements Serializable public int hashCode() { final int PRIME = 31; - int result = 1; - result = PRIME * result + ( ( repositoryId == null ) ? 0 : repositoryId.hashCode() ); + int result = super.hashCode(); result = PRIME * result + ( ( groupId == null ) ? 0 : groupId.hashCode() ); result = PRIME * result + ( ( artifactId == null ) ? 0 : artifactId.hashCode() ); result = PRIME * result + ( ( version == null ) ? 0 : version.hashCode() ); @@ -104,31 +144,19 @@ public class RepositoryContentKey implements Serializable { return true; } - - if ( obj == null ) + + if ( !super.equals( obj ) ) { return false; } - + if ( getClass() != obj.getClass() ) { return false; } - - final RepositoryContentKey other = (RepositoryContentKey) obj; - - if ( repositoryId == null ) - { - if ( other.repositoryId != null ) - { - return false; - } - } - else if ( !repositoryId.equals( other.repositoryId ) ) - { - return false; - } - + + final AbstractVersionedKey other = (AbstractVersionedKey) obj; + if ( groupId == null ) { if ( other.groupId != null ) @@ -140,7 +168,7 @@ public class RepositoryContentKey implements Serializable { return false; } - + if ( artifactId == null ) { if ( other.artifactId != null ) @@ -152,7 +180,7 @@ public class RepositoryContentKey implements Serializable { return false; } - + if ( version == null ) { if ( other.version != null ) @@ -164,7 +192,7 @@ public class RepositoryContentKey implements Serializable { return false; } - + return true; } } diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java index 8e4f2c4ac..e3920f45c 100644 --- a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java @@ -19,8 +19,8 @@ package org.apache.maven.archiva.model; * under the License. */ +import org.apache.commons.lang.StringUtils; import org.apache.maven.archiva.common.utils.VersionUtil; -import org.codehaus.plexus.util.StringUtils; /** * ArchivaArtifact - Mutable artifact object. @@ -31,7 +31,7 @@ import org.codehaus.plexus.util.StringUtils; public class ArchivaArtifact { private ArchivaArtifactModel model; - + private ArchivaArtifactPlatformDetails platformDetails; private String baseVersion; @@ -68,14 +68,10 @@ public class ArchivaArtifact model = new ArchivaArtifactModel(); - if ( repository == null ) - { - model.setContentKey( new RepositoryContent( groupId, artifactId, version ) ); - } - else - { - model.setContentKey( new RepositoryContent( repository.getModel(), groupId, artifactId, version ) ); - } + model.setGroupId( groupId ); + model.setArtifactId( artifactId ); + model.setVersion( version ); + model.setRepositoryId( repository.getId() ); model.setClassifier( StringUtils.defaultString( classifier ) ); model.setType( type ); @@ -90,17 +86,17 @@ public class ArchivaArtifact public String getGroupId() { - return model.getContentKey().getGroupId(); + return model.getGroupId(); } public String getArtifactId() { - return model.getContentKey().getArtifactId(); + return model.getArtifactId(); } public String getVersion() { - return model.getContentKey().getVersion(); + return model.getVersion(); } public String getBaseVersion() @@ -134,15 +130,11 @@ public class ArchivaArtifact int result = 1; if ( model != null ) { - RepositoryContent key = model.getContentKey(); - if ( key != null ) - { - result = PRIME * result + ( ( key.getGroupId() == null ) ? 0 : key.getGroupId().hashCode() ); - result = PRIME * result + ( ( key.getArtifactId() == null ) ? 0 : key.getArtifactId().hashCode() ); - result = PRIME * result + ( ( key.getVersion() == null ) ? 0 : key.getVersion().hashCode() ); - result = PRIME * result + ( ( model.getClassifier() == null ) ? 0 : model.getClassifier().hashCode() ); - result = PRIME * result + ( ( model.getType() == null ) ? 0 : model.getType().hashCode() ); - } + result = PRIME * result + ( ( model.getGroupId() == null ) ? 0 : model.getGroupId().hashCode() ); + result = PRIME * result + ( ( model.getArtifactId() == null ) ? 0 : model.getArtifactId().hashCode() ); + result = PRIME * result + ( ( model.getVersion() == null ) ? 0 : model.getVersion().hashCode() ); + result = PRIME * result + ( ( model.getClassifier() == null ) ? 0 : model.getClassifier().hashCode() ); + result = PRIME * result + ( ( model.getType() == null ) ? 0 : model.getType().hashCode() ); } return result; } @@ -173,63 +165,27 @@ public class ArchivaArtifact return false; } } - else - { - RepositoryContent key = model.getContentKey(); - RepositoryContent otherkey = other.model.getContentKey(); - - if ( key == null ) - { - if ( otherkey != null ) - { - return false; - } - } - else - { - if ( !equals( key.getGroupId(), otherkey.getGroupId() ) - || !equals( key.getArtifactId(), otherkey.getArtifactId() ) - || !equals( key.getVersion(), otherkey.getVersion() ) - || !equals( model.getClassifier(), other.model.getClassifier() ) - || !equals( model.getType(), other.model.getType() ) ) - { - return false; - } - } - } - - return true; - } - - private boolean equals( String left, String right ) - { - if ( left == null ) - { - if ( right != null ) - { - return false; - } - } - else if ( !left.equals( right ) ) + if ( !model.equals( other.model ) ) { return false; } + return true; } public String toString() { StringBuffer sb = new StringBuffer(); - if ( model.getContentKey().getGroupId() != null ) + if ( model.getGroupId() != null ) { - sb.append( model.getContentKey().getGroupId() ); + sb.append( model.getGroupId() ); sb.append( ":" ); } appendArtifactTypeClassifierString( sb ); sb.append( ":" ); - if ( model.getContentKey().getVersion() != null ) + if ( model.getVersion() != null ) { - sb.append( model.getContentKey().getVersion() ); + sb.append( model.getVersion() ); } return sb.toString(); @@ -237,7 +193,7 @@ public class ArchivaArtifact private void appendArtifactTypeClassifierString( StringBuffer sb ) { - sb.append( model.getContentKey().getArtifactId() ); + sb.append( model.getArtifactId() ); sb.append( ":" ); sb.append( getType() ); if ( hasClassifier() ) diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java new file mode 100644 index 000000000..8b50de846 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java @@ -0,0 +1,380 @@ +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 java.util.ArrayList; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; + +/** + * Utility methods for cloning various Archiva Model objects. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +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.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() ) ); + + return cloned; + } + + public static ArtifactReference clone( ArtifactReference artifactReference ) + { + if ( artifactReference == null ) + { + return null; + } + + ArtifactReference cloned = new ArtifactReference(); + + cloned.setGroupId( artifactReference.getGroupId() ); + cloned.setArtifactId( artifactReference.getArtifactId() ); + cloned.setVersion( artifactReference.getVersion() ); + cloned.setClassifier( artifactReference.getClassifier() ); + cloned.setType( artifactReference.getType() ); + + 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() ); + + return cloned; + } + + public static IssueManagement clone( IssueManagement issueManagement ) + { + if ( issueManagement == null ) + { + return null; + } + + IssueManagement cloned = new IssueManagement(); + + cloned.setSystem( issueManagement.getSystem() ); + cloned.setUrl( issueManagement.getUrl() ); + + 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() ); + + return cloned; + } + + public static Properties clone( Properties properties ) + { + if ( properties == null ) + { + return null; + } + + Properties cloned = new Properties(); + + Enumeration keys = properties.propertyNames(); + while ( keys.hasMoreElements() ) + { + String key = (String) keys.nextElement(); + String value = properties.getProperty( key ); + cloned.setProperty( key, value ); + } + + 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 VersionedReference clone( VersionedReference versionedReference ) + { + if ( versionedReference == null ) + { + return null; + } + + VersionedReference cloned = new VersionedReference(); + + cloned.setGroupId( versionedReference.getGroupId() ); + cloned.setArtifactId( versionedReference.getArtifactId() ); + cloned.setVersion( versionedReference.getVersion() ); + + return cloned; + } + + public static List cloneArtifactReferences( List artifactReferenceList ) + { + if ( artifactReferenceList == null ) + { + return null; + } + + List ret = new ArrayList(); + + Iterator it = artifactReferenceList.iterator(); + while ( it.hasNext() ) + { + ArtifactReference artifactReference = (ArtifactReference) it.next(); + ret.add( clone( artifactReference ) ); + } + + return ret; + } + + public static List cloneDependencies( List dependencies ) + { + if ( dependencies == null ) + { + return null; + } + + List ret = new ArrayList(); + + Iterator it = dependencies.iterator(); + while ( it.hasNext() ) + { + Dependency dep = (Dependency) it.next(); + Dependency cloned = new Dependency(); + + cloned.setGroupId( dep.getGroupId() ); + cloned.setArtifactId( dep.getArtifactId() ); + cloned.setVersion( dep.getVersion() ); + + cloned.setClassifier( dep.getClassifier() ); + cloned.setType( dep.getType() ); + cloned.setScope( dep.getScope() ); + cloned.setOptional( dep.isOptional() ); + cloned.setSystemPath( dep.getSystemPath() ); + cloned.setUrl( dep.getUrl() ); + cloned.setExclusions( cloneExclusions( dep.getExclusions() ) ); + + ret.add( cloned ); + } + + return ret; + } + + public static List cloneExclusions( List exclusions ) + { + if ( exclusions == null ) + { + return null; + } + + List ret = new ArrayList(); + + Iterator it = exclusions.iterator(); + while ( it.hasNext() ) + { + Exclusion exclusion = (Exclusion) it.next(); + Exclusion cloned = new Exclusion(); + + cloned.setGroupId( exclusion.getGroupId() ); + cloned.setArtifactId( exclusion.getArtifactId() ); + + ret.add( cloned ); + } + + return ret; + } + + public static List cloneIndividuals( List individuals ) + { + if ( individuals == null ) + { + return individuals; + } + + List ret = new ArrayList(); + + Iterator it = individuals.iterator(); + while ( it.hasNext() ) + { + Individual 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.setRoles( cloneRoles( individual.getRoles() ) ); + cloned.setProperties( clone( individual.getProperties() ) ); + + ret.add( cloned ); + } + + return ret; + } + + public static List cloneLicenses( List licenses ) + { + if ( licenses == null ) + { + return null; + } + + List ret = new ArrayList(); + + Iterator it = licenses.iterator(); + while ( it.hasNext() ) + { + License license = (License) it.next(); + 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 clonePlugins( List plugins ) + { + return cloneArtifactReferences( plugins ); + } + + public static List cloneReports( List reports ) + { + return cloneArtifactReferences( reports ); + } + + public static List cloneRepositories( List repositories ) + { + if ( repositories == null ) + { + return null; + } + + List ret = new ArrayList(); + + Iterator it = repositories.iterator(); + while ( it.hasNext() ) + { + ProjectRepository repository = (ProjectRepository) it.next(); + 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 cloneRoles( List roles ) + { + if ( roles == null ) + { + return null; + } + + List ret = new ArrayList(); + + Iterator it = roles.iterator(); + while ( it.hasNext() ) + { + String roleName = (String) it.next(); + ret.add( roleName ); + } + + return ret; + } +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactJavaDetailsKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactJavaDetailsKey.java new file mode 100644 index 000000000..59fbc6b11 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactJavaDetailsKey.java @@ -0,0 +1,46 @@ +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.AbstractArtifactKey; + +import java.io.Serializable; + +/** + * ArchivaArtifactJavaDetailsKey - unique classid-key for JPOX. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class ArchivaArtifactJavaDetailsKey + extends AbstractArtifactKey + implements Serializable +{ + + public ArchivaArtifactJavaDetailsKey() + { + } + + public ArchivaArtifactJavaDetailsKey( String key ) + { + super( key ); + } + +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactModelKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactModelKey.java new file mode 100644 index 000000000..4fdf974e2 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaArtifactModelKey.java @@ -0,0 +1,45 @@ +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.AbstractArtifactKey; + +import java.io.Serializable; + +/** + * ArchivaArtifactModelKey - unique classid-key for JPOX. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class ArchivaArtifactModelKey + extends AbstractArtifactKey + implements Serializable +{ + public ArchivaArtifactModelKey() + { + super(); + } + + public ArchivaArtifactModelKey( String key ) + { + super( key ); + } +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java new file mode 100644 index 000000000..cdda128cd --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaProjectModelKey.java @@ -0,0 +1,46 @@ +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. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class ArchivaProjectModelKey + extends AbstractVersionedKey + implements Serializable +{ + + public ArchivaProjectModelKey() + { + } + + public ArchivaProjectModelKey( String key ) + { + super( key ); + } + +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java new file mode 100644 index 000000000..d4274cba5 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java @@ -0,0 +1,46 @@ +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; + +/** + * ArchivaRepositoryMetadataKey - unique classid-key for JPOX. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class ArchivaRepositoryMetadataKey + extends AbstractProjectKey + implements Serializable +{ + + public ArchivaRepositoryMetadataKey() + { + } + + public ArchivaRepositoryMetadataKey( String key ) + { + super( key ); + } + +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArtifactReferenceKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArtifactReferenceKey.java new file mode 100644 index 000000000..41110b1b4 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArtifactReferenceKey.java @@ -0,0 +1,46 @@ +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.AbstractArtifactKey; + +import java.io.Serializable; + +/** + * ArtifactReferenceKey - unique classid-key for JPOX. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class ArtifactReferenceKey + extends AbstractArtifactKey + implements Serializable +{ + + public ArtifactReferenceKey() + { + } + + public ArtifactReferenceKey( String key ) + { + super( key ); + } + +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/DependencyKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/DependencyKey.java new file mode 100644 index 000000000..929f2f142 --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/DependencyKey.java @@ -0,0 +1,45 @@ +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.AbstractArtifactKey; + +import java.io.Serializable; + +/** + * DependencyKey - unique classid-key for JPOX. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class DependencyKey + extends AbstractArtifactKey + implements Serializable +{ + + public DependencyKey() + { + } + + public DependencyKey( String key ) + { + super( key ); + } +} diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/VersionedReferenceKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/VersionedReferenceKey.java new file mode 100644 index 000000000..094307c9e --- /dev/null +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/VersionedReferenceKey.java @@ -0,0 +1,47 @@ +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; + +/** + * VersionedReferenceKey - unique classid-key for JPOX. + * + * @author Joakim Erdfelt + * @version $Id$ + */ +public class VersionedReferenceKey + extends AbstractVersionedKey + implements Serializable +{ + + public VersionedReferenceKey() + { + + } + + public VersionedReferenceKey( String key ) + { + super( key ); + } + +} diff --git a/archiva-base/archiva-model/src/main/mdo/archiva-base.xml b/archiva-base/archiva-model/src/main/mdo/archiva-base.xml index 101fde635..06a07f732 100644 --- a/archiva-base/archiva-model/src/main/mdo/archiva-base.xml +++ b/archiva-base/archiva-model/src/main/mdo/archiva-base.xml @@ -58,18 +58,10 @@ - artifactHealth + repositoryProblems 1.0.0+ - ArchivaArtifactHealth - * - - - - repositoryMetadataHealth - 1.0.0+ - - ArchivaRepositoryMetadataHealth + RepositoryProblem * @@ -102,7 +94,7 @@ id - true + true 1.0.0+ String true @@ -112,7 +104,7 @@ name - false + false 1.0.0+ String true @@ -122,7 +114,7 @@ url - false + false 1.0.0+ String true @@ -132,7 +124,7 @@ creationSource - false + false 1.0.0+ String true @@ -143,7 +135,7 @@ layoutName - false + false 1.0.0+ String true @@ -155,7 +147,7 @@ releasePolicy - false + false 1.0.0+ boolean true @@ -166,7 +158,7 @@ snapshotPolicy - false + false 1.0.0+ boolean true @@ -177,109 +169,6 @@ - - RepositoryContent - 1.0.0+ - - Repository Content Identifier. - - - - groupId - true - 1.0.0+ - String - true - - The Group ID of the repository content. - - - - artifactId - true - 1.0.0+ - String - true - - The Artifact ID of the repository content. - - - - version - true - 1.0.0+ - String - false - - The version of the repository content. - - - - repositoryId - true - 1.0.0+ - true - String - - The repository associated with this content. - - - - - - 1.0.0+ - - - - - + jpox.table="ARTIFACT" + jpox.use-identifiers-as-primary-key="false" + jpox.identity-type="application" + jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactModelKey"> ArchivaArtifactModel 1.0.0+ @@ -302,32 +194,60 @@ Put Java specifics in the ArchivaArtifactJavaDetails object. Put .Net specifics in the ArchivaArtifactDotNetDetails object. --> - - contentKey - true + + groupId + true 1.0.0+ + String true - - RepositoryContent - 1 - - The content key for this artifact. + The Group ID of the repository content. - - classifier - false + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. + + + + version + true 1.0.0+ String false + + The version of the repository content. + + + + classifier + true + 1.0.0+ + String + true The classifier for this artifact. - + type - true + true 1.0.0+ String true @@ -335,9 +255,19 @@ The type of artifact. + + repositoryId + false + 1.0.0+ + false + String + + The repository associated with this content. + + checksumMD5 - false + false 1.0.0+ String false @@ -347,7 +277,7 @@ checksumSHA1 - false + false 1.0.0+ String false @@ -357,7 +287,7 @@ lastModified - false + false 1.0.0+ Date true @@ -367,7 +297,7 @@ size - false + false 1.0.0+ long true @@ -377,7 +307,7 @@ platform - false + false 1.0.0+ String true @@ -388,7 +318,7 @@ whenIndexed - false + false 1.0.0+ Date false @@ -398,7 +328,7 @@ origin - false + false 1.0.0+ String false @@ -409,29 +339,80 @@ + jpox.table="JAVA_ARTIFACT" + jpox.use-identifiers-as-primary-key="false" + jpox.identity-type="application" + jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactJavaDetailsKey"> ArchivaArtifactJavaDetails org.apache.maven.archiva.model.ArchivaArtifactPlatformDetails 1.0.0+ - - contentKey - true + + groupId + true 1.0.0+ + String true - - RepositoryContent - 1 - - The content key for this java artifact details. + The Group ID of the repository content. + + + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. + + + + version + true + 1.0.0+ + String + false + + The version of the repository content. + + + + classifier + true + 1.0.0+ + String + true + + The classifier for this artifact. + + + + type + true + 1.0.0+ + String + true + + The type of artifact. checksumBytecode - false + false 1.0.0+ String false @@ -442,7 +423,7 @@ jdk - false + false 1.0.0+ String false @@ -469,26 +450,40 @@ ArchivaRepositoryMetadata 1.0.0+ - - contentKey - true + + groupId + true 1.0.0+ + String true - - RepositoryContent - 1 - - The content key for this repository metadata. + The Group ID of the repository content. + + + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. releasedVersion - false + false 1.0.0+ false String @@ -498,7 +493,7 @@ availableVersions - false + false 1.0.0+ false @@ -511,7 +506,7 @@ lastModified - false + false 1.0.0+ Date true @@ -521,7 +516,7 @@ size - false + false 1.0.0+ long true @@ -531,7 +526,7 @@ whenIndexed - false + false 1.0.0+ Date false @@ -541,7 +536,7 @@ origin - false + false 1.0.0+ String false @@ -562,30 +557,56 @@ --> + jpox.table="PROJECT" + jpox.use-identifiers-as-primary-key="false" + jpox.identity-type="application" + jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaProjectModelKey"> ArchivaProjectModel 1.0.0+ - - contentKey - true + + groupId + true 1.0.0+ + String true - - RepositoryContent - 1 - - The content key for this artifact. + The Group ID of the repository content. + + + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. + + + + version + true + 1.0.0+ + String + false + + The version of the repository content. - parentContentKey - false + parentProject + false 1.0.0+ false - RepositoryContent + VersionedReference 1 @@ -594,7 +615,7 @@ packaging - false + false 1.0.0+ true String @@ -604,7 +625,7 @@ name - false + false 1.0.0+ false String @@ -614,7 +635,7 @@ description - false + false 1.0.0+ false String @@ -624,7 +645,7 @@ origin - false + false 1.0.0+ true String @@ -634,7 +655,7 @@ whenIndexed - false + false 1.0.0+ true Date @@ -644,7 +665,7 @@ url - false + false 1.0.0+ false String @@ -654,7 +675,7 @@ organization - false + false 1.0.0+ false @@ -663,7 +684,7 @@ licenses - false + false 1.0.0+ false @@ -719,6 +740,17 @@ * + + dependencyManagement + 1.0.0+ + + The list of dependency management settings. + + + Dependency + * + + repositories 1.0.0+ @@ -737,7 +769,7 @@ The list of plugins that this project uses. - RepositoryContent + ArtifactReference * @@ -748,12 +780,158 @@ The list of reports that this project uses. - RepositoryContent + ArtifactReference + * + + + + buildExtensions + 1.0.0+ + + The list of build extensions that this project uses. + + + ArtifactReference + * + + + + properties + 1.0.0+ + + Properties + + String * + + + VersionedReference + A reference to another Versioned Project + 1.0.0+ + + + groupId + true + 1.0.0+ + String + true + + The Group ID of the repository content. + + + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. + + + + version + true + 1.0.0+ + String + false + + The version of the repository content. + + + + + + + ArtifactReference + 1.0.0+ + + + groupId + true + 1.0.0+ + String + true + + The Group ID of the repository content. + + + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. + + + + version + true + 1.0.0+ + String + false + + The version of the repository content. + + + + classifier + true + 1.0.0+ + String + true + + The classifier for this artifact. + + + + type + true + 1.0.0+ + String + true + + The type of artifact. + + + + + Organization @@ -762,6 +940,7 @@ name + true 1.0.0+ String @@ -798,6 +977,7 @@ id + true 1.0.0+ int @@ -834,24 +1014,33 @@ 1.0.0+ + + url + true + 1.0.0+ + + String + system 1.0.0+ String - - url - 1.0.0+ - - String - CiManagement 1.0.0+ + + url + true + 1.0.0+ + + + String + system 1.0.0+ @@ -859,16 +1048,9 @@ continuum.]]> String - - url - 1.0.0+ - - - String - - + Individual Description of a person who has contributed to the project. @@ -877,15 +1059,16 @@ 1.0.0+ - name + email + true 1.0.0+ - + String - email + name 1.0.0+ - + String @@ -960,36 +1143,74 @@ + + jpox.table="DEPENDENCY" + jpox.use-identifiers-as-primary-key="false" + jpox.identity-type="application" + jpox.identity-class="org.apache.maven.archiva.model.jpox.DependencyKey"> Dependency 1.0.0+ - - contentKey - true + + groupId + true 1.0.0+ + String true - - RepositoryContent - 1 - - The content key for this dependency. + The Group ID of the repository content. - - url + + artifactId + true 1.0.0+ - String + true + + The Artifact ID of the repository content. + - - type + + version + true 1.0.0+ + String + false + + The version of the repository content. + + + + classifier + true + 1.0.0+ + String + true + jdk14 and jdk15. + ]]> + + + type + true + 1.0.0+ + String + true jar. 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 @@ -999,19 +1220,16 @@ New types can be defined by plugins that set extensions to true, so this is not a complete list. ]]> - String jar - classifier + url 1.0.0+ jdk14 and jdk15. + This url will be provided to the user if the jar file cannot be downloaded + from the central repository. ]]> String - false scope @@ -1196,13 +1414,58 @@ --> - HealthProblem + jpox.table="REPOSITORY_PROBLEMS"> + RepositoryProblem 1.0.0+ + + repositoryId + 1.0.0+ + true + String + + The repository associated with this path and problem. + + + + path + 1.0.0+ + String + true + + The path into the repository for the problem. + + + + groupId + 1.0.0+ + String + false + + The Group ID of the repository content with the problem. + + + + artifactId + 1.0.0+ + String + false + + The Artifact ID of the repository content with the problem. + + + + version + 1.0.0+ + String + false + + The version of the repository content with the problem. + + type - false + false 1.0.0+ true String @@ -1212,7 +1475,7 @@ origin - false + false 1.0.0+ true String @@ -1222,7 +1485,7 @@ message - false + false 1.0.0+ true String @@ -1232,72 +1495,6 @@ - - ArchivaArtifactHealth - 1.0.0+ - - - artifact - true - 1.0.0+ - true - - ArchivaArtifactModel - 1 - - - The Artifact to report on. - - - - problems - false - 1.0.0+ - false - - HealthProblem - * - - - The list of problems associated with this artifact. - - - - - - ArchivaRepositoryMetadataHealth - 1.0.0+ - - - repositoryMetadata - true - 1.0.0+ - true - - ArchivaRepositoryMetadata - 1 - - - The ArchivaRepositoryMetadata to report on. - - - - problems - false - 1.0.0+ - false - - HealthProblem - * - - - The list of problems associated with this repository metadata. - - - -