archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r525951 [1/5] - in /maven/archiva/branches/archiva-jpox-database-refactor: archiva-base/archiva-common/ archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/ archiva-base/archiva-consumers/archiva-database-consume...
Date Thu, 05 Apr 2007 20:11:30 GMT
Author: joakime
Date: Thu Apr  5 13:11:19 2007
New Revision: 525951

URL: http://svn.apache.org/viewvc?view=rev&rev=525951
Log:
Updating with changes surrounding model, and database schema, change

Added:
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/filters/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelBuilder.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpander.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300Reader.java
      - copied, changed from r525261, maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModel300Reader.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400Reader.java
      - copied, changed from r525261, maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModel400Reader.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/RepositoryProjectResolver.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/effective-poms/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/effective-poms/archiva-model-effective.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/AllTests.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelBuilderTest.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpanderTest.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/AllTests.java   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400ReaderTest.java
      - copied, changed from r525261, maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/ProjectModel400ReaderTest.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-applet/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-applet/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-applet/1.0-SNAPSHOT/archiva-applet-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-applet/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-applet/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-base/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-base/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-base/1.0-SNAPSHOT/archiva-base-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-cli/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-cli/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-cli/1.0-SNAPSHOT/archiva-cli-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-common/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-common/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-common/1.0-SNAPSHOT/archiva-common-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-configuration/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-configuration/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-configuration/1.0-SNAPSHOT/archiva-configuration-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-configuration/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-configuration/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-consumer-api/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-consumer-api/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-consumer-api/1.0-SNAPSHOT/archiva-consumer-api-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-consumers/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-consumers/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-consumers/1.0-SNAPSHOT/archiva-consumers-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-converter/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-converter/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-converter/1.0-SNAPSHOT/archiva-converter-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-converter/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-converter/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core-consumers/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core-consumers/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core-consumers/1.0-SNAPSHOT/archiva-core-consumers-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core/1.0-SNAPSHOT/archiva-core-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-core/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-discoverer/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-discoverer/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-discoverer/1.0-SNAPSHOT/archiva-discoverer-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-discoverer/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-discoverer/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-indexer/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-indexer/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-indexer/1.0-SNAPSHOT/archiva-indexer-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-indexer/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-indexer/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-model/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-model/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-model/1.0-SNAPSHOT/archiva-model-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-parent/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-parent/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-parent/1.0-SNAPSHOT/archiva-parent-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-application/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-application/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-application/1.0-SNAPSHOT/archiva-plexus-application-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-application/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-application/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-runtime/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-runtime/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-plexus-runtime/1.0-SNAPSHOT/archiva-plexus-runtime-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-proxy/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-proxy/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-proxy/1.0-SNAPSHOT/archiva-proxy-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-proxy/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-proxy/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-reports-standard/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-reports-standard/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-reports-standard/1.0-SNAPSHOT/archiva-reports-standard-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-reports-standard/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-reports-standard/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-repository-layer/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-repository-layer/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-repository-layer/1.0-SNAPSHOT/archiva-repository-layer-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-repository-layer/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-repository-layer/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-security/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-security/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-security/1.0-SNAPSHOT/archiva-security-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-security/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-security/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-web/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-web/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-webapp/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-webapp/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-webapp/1.0-SNAPSHOT/archiva-webapp-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-webapp/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-webapp/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-xml-tools/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-xml-tools/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva-xml-tools/1.0-SNAPSHOT/archiva-xml-tools-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/1.0-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/1.0-SNAPSHOT/archiva-1.0-20061126.005254-2.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/1.0-SNAPSHOT/archiva-1.0-SNAPSHOT-site.xml   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/1.0-SNAPSHOT/archiva-1.0-SNAPSHOT.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/1.0-maestro-1.1-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/archiva/archiva/1.0-maestro-1.2-SNAPSHOT/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4-site.xml   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4-site_en.xml   (with props)
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom.sha1
Removed:
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModel300Reader.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModel400Reader.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/ProjectModel400ReaderTest.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/CentralScannerTiming.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-consumer-api/
Modified:
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/pom.xml
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/BaseFileTest.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReaderTest.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/AllTests.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-xml-tools/src/main/java/org/apache/maven/archiva/xml/XMLReader.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/ArchivaDAO.java
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/pom.xml?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/pom.xml (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/pom.xml Thu Apr  5 13:11:19 2007
@@ -36,22 +36,12 @@
             joakime@apache.org
       -->
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-api</artifactId>
-    </dependency>
-    <!-- 
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-artifact-manager</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-    </dependency>
-      -->
-    <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-component-api</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/BaseFileTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/BaseFileTest.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/BaseFileTest.java (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/BaseFileTest.java Thu Apr  5 13:11:19 2007
@@ -19,8 +19,9 @@
  * under the License.
  */
 
+import org.apache.commons.lang.StringUtils;
+
 import junit.framework.TestCase;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml Thu Apr  5 13:11:19 2007
@@ -31,6 +31,10 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-digest</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.archiva</groupId>
       <artifactId>archiva-database</artifactId>
     </dependency>

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java Thu Apr  5 13:11:19 2007
@@ -28,9 +28,10 @@
 import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.model.ArchivaRepository;
-import org.apache.maven.archiva.model.RepositoryContent;
 import org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout;
 import org.apache.maven.archiva.repository.layout.LayoutException;
+import org.codehaus.plexus.digest.Digester;
+import org.codehaus.plexus.digest.DigesterException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.registry.Registry;
@@ -38,6 +39,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -50,13 +52,16 @@
  * @plexus.component role-hint="update-db-artifact"
  *                   instantiation-strategy="per-lookup"
  */
-public class ArtifactUpdateDatabaseConsumer extends AbstractMonitoredConsumer
+public class ArtifactUpdateDatabaseConsumer
+    extends AbstractMonitoredConsumer
     implements RepositoryContentConsumer, RegistryListener, Initializable
 {
     private static final String TYPE_NOT_ARTIFACT = "file-not-artifact";
 
     private static final String DB_ERROR = "db-error";
-    
+
+    private static final String CHECKSUM_CALCULATION = null;
+
     /**
      * @plexus.configuration default-value="update-db-artifact"
      */
@@ -66,7 +71,7 @@
      * @plexus.configuration default-value="Update the Artifact in the Database"
      */
     private String description;
-    
+
     /**
      * @plexus.requirement role-hint="jdo"
      */
@@ -82,6 +87,16 @@
      */
     private Map bidirectionalLayoutMap;
 
+    /**
+     * @plexus.requirement role-hint="sha1"
+     */
+    private Digester digestSha1;
+
+    /**
+     * @plexus.requirement role-hint="md5";
+     */
+    private Digester digestMd5;
+
     private ArchivaRepository repository;
 
     private File repositoryDir;
@@ -117,7 +132,8 @@
         return this.includes;
     }
 
-    public void beginScan( ArchivaRepository repository ) throws ConsumerException
+    public void beginScan( ArchivaRepository repository )
+        throws ConsumerException
     {
         if ( !repository.isManaged() )
         {
@@ -131,31 +147,53 @@
         if ( !bidirectionalLayoutMap.containsKey( layoutName ) )
         {
             throw new ConsumerException( "Unable to process repository with layout [" + layoutName
-                            + "] as there is no coresponding " + BidirectionalRepositoryLayout.class.getName()
-                            + " implementation available." );
+                + "] as there is no coresponding " + BidirectionalRepositoryLayout.class.getName()
+                + " implementation available." );
         }
 
         this.layout = (BidirectionalRepositoryLayout) bidirectionalLayoutMap.get( layoutName );
     }
 
-    public void processFile( String path ) throws ConsumerException
+    public void processFile( String path )
+        throws ConsumerException
     {
         try
         {
             ArchivaArtifact artifact = layout.toArtifact( path );
-            
-            RepositoryContent repoContent = artifact.getModel().getContentKey();
-            repoContent.setRepositoryId( this.repository.getId() );
-            
+
+            artifact.getModel().setRepositoryId( this.repository.getId() );
+
             // Calculate the hashcodes.
-            
-            
+            File artifactFile = new File( this.repositoryDir, path );
+            try
+            {
+                artifact.getModel().setChecksumMD5( digestMd5.calc( artifactFile ) );
+            }
+            catch ( DigesterException e )
+            {
+                triggerConsumerWarning( CHECKSUM_CALCULATION, "Unable to calculate the MD5 checksum: " + e.getMessage() );
+            }
+
+            try
+            {
+                artifact.getModel().setChecksumSHA1( digestSha1.calc( artifactFile ) );
+            }
+            catch ( DigesterException e )
+            {
+                triggerConsumerWarning( CHECKSUM_CALCULATION, "Unable to calculate the SHA1 checksum: "
+                    + e.getMessage() );
+            }
+
+            artifact.getModel().setLastModified( new Date( artifactFile.lastModified() ) );
+            artifact.getModel().setSize( artifactFile.length() );
+            artifact.getModel().setOrigin( "FileSystem" );
+
             dao.saveArtifact( artifact.getModel() );
         }
         catch ( LayoutException e )
         {
             triggerConsumerError( TYPE_NOT_ARTIFACT, "Path " + path + " cannot be converted to artifact: "
-                            + e.getMessage() );
+                + e.getMessage() );
         }
         catch ( ArchivaDatabaseException e )
         {
@@ -192,7 +230,8 @@
         }
     }
 
-    public void initialize() throws InitializationException
+    public void initialize()
+        throws InitializationException
     {
         propertyNameTriggers = new ArrayList();
         propertyNameTriggers.add( "repositoryScanning" );

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java Thu Apr  5 13:11:19 2007
@@ -71,7 +71,10 @@
         model.setGroupId( groupId );
         model.setArtifactId( artifactId );
         model.setVersion( version );
-        model.setRepositoryId( repository.getId() );
+        if ( repository != null )
+        {
+            model.setRepositoryId( repository.getId() );
+        }
         model.setClassifier( StringUtils.defaultString( classifier ) );
         model.setType( type );
 

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java Thu Apr  5 13:11:19 2007
@@ -45,7 +45,7 @@
         cloned.setGroupId( model.getGroupId() );
         cloned.setArtifactId( model.getArtifactId() );
         cloned.setVersion( model.getVersion() );
-        
+
         cloned.setParentProject( clone( model.getParentProject() ) );
 
         cloned.setName( model.getName() );
@@ -75,15 +75,15 @@
         {
             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;
     }
 
@@ -102,6 +102,30 @@
         return cloned;
     }
 
+    public static Dependency clone( Dependency dependency )
+    {
+        if ( dependency == null )
+        {
+            return null;
+        }
+
+        Dependency cloned = new Dependency();
+
+        cloned.setGroupId( dependency.getGroupId() );
+        cloned.setArtifactId( dependency.getArtifactId() );
+        cloned.setVersion( dependency.getVersion() );
+
+        cloned.setClassifier( dependency.getClassifier() );
+        cloned.setType( dependency.getType() );
+        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 )
@@ -175,13 +199,13 @@
         {
             return null;
         }
-        
+
         VersionedReference cloned = new VersionedReference();
-        
+
         cloned.setGroupId( versionedReference.getGroupId() );
         cloned.setArtifactId( versionedReference.getArtifactId() );
         cloned.setVersion( versionedReference.getVersion() );
-        
+
         return cloned;
     }
 
@@ -217,21 +241,13 @@
         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 );
+            Dependency cloned = clone( dep );
+
+            if ( cloned != null )
+            {
+                ret.add( cloned );
+            }
         }
 
         return ret;

Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java (added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java Thu Apr  5 13:11:19 2007
@@ -0,0 +1,60 @@
+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.PlexusTestCase;
+
+/**
+ * ArchivaModelClonerTest 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class ArchivaModelClonerTest
+    extends PlexusTestCase
+{
+    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() );
+    }
+}

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaModelClonerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml Thu Apr  5 13:11:19 2007
@@ -45,6 +45,11 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-expression-evaluator</artifactId>
+      <version>1.0-alpha-1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
     <dependency>

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java (original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java Thu Apr  5 13:11:19 2007
@@ -20,7 +20,6 @@
  */
 
 import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
-import org.apache.maven.archiva.model.RepositoryContent;
 import org.apache.maven.archiva.xml.XMLException;
 import org.apache.maven.archiva.xml.XMLReader;
 
@@ -49,13 +48,9 @@
             XMLReader xml = new XMLReader( "metadata", metadataFile );
 
             ArchivaRepositoryMetadata metadata = new ArchivaRepositoryMetadata();
-
-            RepositoryContent contentKey = new RepositoryContent();
-            contentKey.setGroupId( xml.getElementText( "//metadata/groupId" ) );
-            contentKey.setArtifactId( xml.getElementText( "//metadata/artifactId" ) );
             
-            metadata.setContentKey( contentKey );
-
+            metadata.setGroupId( xml.getElementText( "//metadata/groupId" ) );
+            metadata.setArtifactId( xml.getElementText( "//metadata/artifactId" ) );
             metadata.setLastModified( new Date( metadataFile.lastModified() ) );
             metadata.setSize( metadataFile.length() );
             metadata.setWhenIndexed( new Date() );

Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java (added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java Thu Apr  5 13:11:19 2007
@@ -0,0 +1,39 @@
+package org.apache.maven.archiva.repository.project;
+
+/*
+ * 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.ArchivaProjectModel;
+
+/**
+ * Generic Filtering interface for {@link ArchivaProjectModel} objects.  
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public interface ProjectModelFilter
+{
+    /**
+     * Filter a model and return the results of the filtering.
+     * 
+     * @param model the model to filter.
+     * @return a new model representing the filtered state of the model.
+     */
+    public ArchivaProjectModel filter( final ArchivaProjectModel model );
+}

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelFilter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java (added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java Thu Apr  5 13:11:19 2007
@@ -0,0 +1,661 @@
+package org.apache.maven.archiva.repository.project;
+
+/*
+ * 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 org.apache.maven.archiva.model.ArchivaModelCloner;
+import org.apache.maven.archiva.model.ArchivaProjectModel;
+import org.apache.maven.archiva.model.ArtifactReference;
+import org.apache.maven.archiva.model.CiManagement;
+import org.apache.maven.archiva.model.Dependency;
+import org.apache.maven.archiva.model.Exclusion;
+import org.apache.maven.archiva.model.Individual;
+import org.apache.maven.archiva.model.IssueManagement;
+import org.apache.maven.archiva.model.License;
+import org.apache.maven.archiva.model.Organization;
+import org.apache.maven.archiva.model.ProjectRepository;
+import org.apache.maven.archiva.model.Scm;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Map.Entry;
+
+/**
+ * ProjectModelMerge
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class ProjectModelMerge
+{
+    /**
+     * Merge the contents of a project with it's parent project.
+     * 
+     * @param mainProject the main project.
+     * @param parentProject the parent project to merge.
+     * @throws ProjectModelException if there was a problem merging the model.
+     */
+    public static ArchivaProjectModel merge( ArchivaProjectModel mainProject, ArchivaProjectModel parentProject )
+        throws ProjectModelException
+    {
+        System.out.println( "## Merging: " + mainProject + " with " + parentProject );
+        if ( mainProject == null )
+        {
+            throw new ProjectModelException( "Cannot copy a null main project." );
+        }
+
+        if ( parentProject == null )
+        {
+            throw new ProjectModelException( "Cannot copy to a null parent project." );
+        }
+
+        ArchivaProjectModel merged = new ArchivaProjectModel();
+
+        // Unmerged.
+        merged.setArtifactId( mainProject.getArtifactId() );
+        merged.setPackaging( StringUtils.defaultIfEmpty( mainProject.getPackaging(), "jar" ) );
+
+        // Merged
+        merged.setGroupId( merge( mainProject.getGroupId(), parentProject.getGroupId() ) );
+        merged.setVersion( merge( mainProject.getVersion(), parentProject.getVersion() ) );
+        merged.setName( merge( mainProject.getName(), parentProject.getName() ) );
+        merged.setUrl( merge( mainProject.getUrl(), parentProject.getUrl() ) );
+        merged.setDescription( merge( mainProject.getDescription(), parentProject.getDescription() ) );
+
+        merged.setOrigin( "merged" );
+
+        merged.setCiManagement( merge( mainProject.getCiManagement(), parentProject.getCiManagement() ) );
+        merged.setIndividuals( mergeIndividuals( mainProject.getIndividuals(), parentProject.getIndividuals() ) );
+        merged.setIssueManagement( merge( mainProject.getIssueManagement(), parentProject.getIssueManagement() ) );
+        merged.setLicenses( mergeLicenses( mainProject.getLicenses(), parentProject.getLicenses() ) );
+        merged.setOrganization( merge( mainProject.getOrganization(), parentProject.getOrganization() ) );
+        merged.setScm( merge( mainProject.getScm(), parentProject.getScm() ) );
+        merged.setRepositories( mergeRepositories( mainProject.getRepositories(), parentProject.getRepositories() ) );
+        merged.setDependencies( mergeDependencies( mainProject.getDependencies(), parentProject.getDependencies() ) );
+        merged.setDependencyManagement( mergeDependencyManagement( mainProject.getDependencyManagement(), parentProject
+            .getDependencyManagement() ) );
+        merged.setPlugins( mergePlugins( mainProject.getPlugins(), parentProject.getPlugins() ) );
+        merged.setReports( mergeReports( mainProject.getReports(), parentProject.getReports() ) );
+        merged.setProperties( merge( mainProject.getProperties(), parentProject.getProperties() ) );
+
+        return merged;
+    }
+
+    private static Map createArtifactReferenceMap( List artifactReferences )
+    {
+        Map ret = new HashMap();
+
+        Iterator it = artifactReferences.iterator();
+        while ( it.hasNext() )
+        {
+            ArtifactReference artifactReference = (ArtifactReference) it.next();
+            String key = toVersionlessArtifactKey( artifactReference );
+            ret.put( key, artifactReference );
+        }
+
+        return ret;
+    }
+
+    private static Map createDependencyMap( List dependencies )
+    {
+        Map ret = new HashMap();
+
+        Iterator it = dependencies.iterator();
+        while ( it.hasNext() )
+        {
+            Dependency dep = (Dependency) it.next();
+            String key = toVersionlessDependencyKey( dep );
+            ret.put( key, dep );
+        }
+
+        return ret;
+    }
+
+    private static Map createExclusionMap( List exclusions )
+    {
+        Map ret = new HashMap();
+
+        Iterator it = exclusions.iterator();
+        while ( it.hasNext() )
+        {
+            Exclusion exclusion = (Exclusion) it.next();
+            String key = exclusion.getGroupId() + ":" + exclusion.getArtifactId();
+            ret.put( key, exclusion );
+        }
+
+        return ret;
+    }
+
+    private static Map createLicensesMap( List licenses )
+    {
+        Map ret = new HashMap();
+
+        Iterator it = licenses.iterator();
+        while ( it.hasNext() )
+        {
+            License license = (License) it.next();
+            // TODO: Change to 'id' when LicenseTypeMapper is created.
+            String key = license.getName();
+            ret.put( key, license );
+        }
+
+        return ret;
+    }
+
+    private static Map createRepositoriesMap( List repositories )
+    {
+        Map ret = new HashMap();
+
+        Iterator it = repositories.iterator();
+        while ( it.hasNext() )
+        {
+            ProjectRepository repo = (ProjectRepository) it.next();
+            // Should this really be using repo.id ?
+            String key = repo.getUrl();
+            ret.put( key, repo );
+        }
+
+        return ret;
+    }
+
+    private static boolean empty( String val )
+    {
+        if ( val == null )
+        {
+            return true;
+        }
+
+        return ( val.trim().length() <= 0 );
+    }
+
+    private static ArtifactReference merge( ArtifactReference mainArtifactReference,
+                                            ArtifactReference parentArtifactReference )
+    {
+        if ( parentArtifactReference == null )
+        {
+            return mainArtifactReference;
+        }
+
+        if ( mainArtifactReference == null )
+        {
+            return ArchivaModelCloner.clone( parentArtifactReference );
+        }
+
+        ArtifactReference merged = new ArtifactReference();
+
+        // Unmerged.
+        merged.setGroupId( mainArtifactReference.getGroupId() );
+        merged.setArtifactId( mainArtifactReference.getArtifactId() );
+
+        // Merged.
+        merged.setVersion( merge( mainArtifactReference.getVersion(), parentArtifactReference.getVersion() ) );
+        merged.setClassifier( merge( mainArtifactReference.getClassifier(), parentArtifactReference.getClassifier() ) );
+        merged.setType( merge( mainArtifactReference.getType(), parentArtifactReference.getType() ) );
+
+        return merged;
+    }
+
+    private static CiManagement merge( CiManagement mainCim, CiManagement parentCim )
+    {
+        if ( parentCim == null )
+        {
+            return mainCim;
+        }
+
+        if ( mainCim == null )
+        {
+            return ArchivaModelCloner.clone( parentCim );
+        }
+
+        CiManagement merged = new CiManagement();
+
+        merged.setSystem( merge( mainCim.getSystem(), parentCim.getSystem() ) );
+        merged.setUrl( merge( mainCim.getUrl(), parentCim.getUrl() ) );
+
+        return merged;
+    }
+
+    private static Dependency merge( Dependency mainDep, Dependency parentDep )
+    {
+        if ( parentDep == null )
+        {
+            return mainDep;
+        }
+
+        if ( mainDep == null )
+        {
+            return ArchivaModelCloner.clone( parentDep );
+        }
+
+        Dependency merged = new Dependency();
+
+        // Unmerged.
+        merged.setGroupId( mainDep.getGroupId() );
+        merged.setArtifactId( mainDep.getArtifactId() );
+
+        // Merged.
+        merged.setVersion( merge( mainDep.getVersion(), parentDep.getVersion() ) );
+        merged.setClassifier( merge( mainDep.getClassifier(), parentDep.getClassifier() ) );
+        merged.setType( merge( mainDep.getType(), parentDep.getType() ) );
+        merged.setScope( merge( mainDep.getScope(), parentDep.getScope() ) );
+        if ( parentDep.isOptional() )
+        {
+            merged.setOptional( true );
+        }
+
+        merged.setSystemPath( merge( mainDep.getSystemPath(), parentDep.getSystemPath() ) );
+        merged.setUrl( merge( mainDep.getUrl(), parentDep.getUrl() ) );
+        merged.setExclusions( mergeExclusions( mainDep.getExclusions(), parentDep.getExclusions() ) );
+
+        return merged;
+    }
+
+    private static IssueManagement merge( IssueManagement mainIssueManagement, IssueManagement parentIssueManagement )
+    {
+        if ( parentIssueManagement == null )
+        {
+            return mainIssueManagement;
+        }
+
+        if ( mainIssueManagement == null )
+        {
+            return ArchivaModelCloner.clone( parentIssueManagement );
+        }
+
+        IssueManagement merged = new IssueManagement();
+
+        merged.setSystem( merge( mainIssueManagement.getSystem(), parentIssueManagement.getSystem() ) );
+        merged.setUrl( merge( mainIssueManagement.getUrl(), parentIssueManagement.getUrl() ) );
+
+        return merged;
+    }
+
+    private static Organization merge( Organization mainOrganization, Organization parentOrganization )
+    {
+        if ( parentOrganization == null )
+        {
+            return mainOrganization;
+        }
+
+        if ( mainOrganization == null )
+        {
+            return ArchivaModelCloner.clone( parentOrganization );
+        }
+
+        Organization merged = new Organization();
+
+        merged.setFavicon( merge( mainOrganization.getFavicon(), parentOrganization.getFavicon() ) );
+        merged.setName( merge( mainOrganization.getName(), parentOrganization.getName() ) );
+        merged.setUrl( merge( mainOrganization.getUrl(), parentOrganization.getUrl() ) );
+
+        return merged;
+    }
+
+    private static Properties merge( Properties mainProperties, Properties parentProperties )
+    {
+        if ( parentProperties == null )
+        {
+            return mainProperties;
+        }
+
+        if ( mainProperties == null )
+        {
+            return ArchivaModelCloner.clone( parentProperties );
+        }
+
+        Properties merged = new Properties();
+
+        Enumeration keys = parentProperties.propertyNames();
+        while ( keys.hasMoreElements() )
+        {
+            String key = (String) keys.nextElement();
+            merged.put( key, merge( mainProperties.getProperty( key ), parentProperties.getProperty( key ) ) );
+        }
+
+        return merged;
+    }
+
+    private static Scm merge( Scm mainScm, Scm parentScm )
+    {
+        if ( parentScm == null )
+        {
+            return mainScm;
+        }
+
+        if ( mainScm == null )
+        {
+            return ArchivaModelCloner.clone( parentScm );
+        }
+
+        Scm merged = new Scm();
+
+        merged.setConnection( merge( mainScm.getConnection(), parentScm.getConnection() ) );
+        merged.setDeveloperConnection( merge( mainScm.getDeveloperConnection(), parentScm.getDeveloperConnection() ) );
+        merged.setUrl( merge( mainScm.getUrl(), parentScm.getUrl() ) );
+
+        return merged;
+    }
+
+    private static String merge( String main, String parent )
+    {
+        if ( empty( main ) && !empty( parent ) )
+        {
+            return parent;
+        }
+
+        return main;
+    }
+
+    private static List mergeArtifactReferences( List mainArtifactReferences, List parentArtifactReferences )
+    {
+        if ( parentArtifactReferences == null )
+        {
+            return mainArtifactReferences;
+        }
+
+        if ( mainArtifactReferences == null )
+        {
+            return ArchivaModelCloner.cloneLicenses( parentArtifactReferences );
+        }
+
+        List merged = new ArrayList();
+
+        Map mainArtifactReferenceMap = createArtifactReferenceMap( mainArtifactReferences );
+        Map parentArtifactReferenceMap = createArtifactReferenceMap( parentArtifactReferences );
+
+        Iterator it = mainArtifactReferenceMap.entrySet().iterator();
+        while ( it.hasNext() )
+        {
+            Map.Entry entry = (Entry) it.next();
+            String key = (String) entry.getKey();
+            ArtifactReference mainArtifactReference = (ArtifactReference) entry.getValue();
+            ArtifactReference parentArtifactReference = (ArtifactReference) parentArtifactReferenceMap.get( key );
+
+            if ( parentArtifactReference == null )
+            {
+                merged.add( mainArtifactReference );
+            }
+            else
+            {
+                // Not merging. Local wins.
+                merged.add( merge( mainArtifactReference, parentArtifactReference ) );
+            }
+        }
+
+        return merged;
+    }
+
+    private static List mergeDependencies( List mainDependencies, List parentDependencies )
+    {
+        if ( parentDependencies == null )
+        {
+            return mainDependencies;
+        }
+
+        if ( mainDependencies == null )
+        {
+            return ArchivaModelCloner.cloneDependencies( parentDependencies );
+        }
+
+        List merged = ArchivaModelCloner.cloneDependencies( mainDependencies );
+
+        Map mainDepMap = createDependencyMap( mainDependencies );
+        Map parentDepMap = createDependencyMap( parentDependencies );
+
+        Iterator it = parentDepMap.entrySet().iterator();
+        while ( it.hasNext() )
+        {
+            Map.Entry entry = (Entry) it.next();
+            String key = (String) entry.getKey();
+            Dependency parentDep = (Dependency) entry.getValue();
+            Dependency mainDep = (Dependency) mainDepMap.get( key );
+
+            if ( parentDep == null )
+            {
+                merged.add( mainDep );
+            }
+            else
+            {
+                merged.add( merge( mainDep, parentDep ) );
+            }
+        }
+
+        return merged;
+    }
+
+    private static List mergeDependencyManagement( List mainDepMgmt, List parentDepMgmt )
+    {
+        if ( parentDepMgmt == null )
+        {
+            return mainDepMgmt;
+        }
+
+        if ( mainDepMgmt == null )
+        {
+            return ArchivaModelCloner.cloneDependencies( parentDepMgmt );
+        }
+
+        List merged = ArchivaModelCloner.cloneDependencies( mainDepMgmt );
+
+        Map mainDepMap = createDependencyMap( mainDepMgmt );
+        Map parentDepMap = createDependencyMap( parentDepMgmt );
+
+        Iterator it = parentDepMap.entrySet().iterator();
+        while ( it.hasNext() )
+        {
+            Map.Entry entry = (Entry) it.next();
+            String key = (String) entry.getKey();
+            Dependency parentDep = (Dependency) entry.getValue();
+            Dependency mainDep = (Dependency) mainDepMap.get( key );
+
+            if ( parentDep == null )
+            {
+                merged.add( mainDep );
+            }
+            else
+            {
+                merged.add( merge( mainDep, parentDep ) );
+            }
+        }
+
+        return merged;
+    }
+
+    public static List mergeExclusions( List mainExclusions, List parentExclusions )
+    {
+        if ( parentExclusions == null )
+        {
+            return mainExclusions;
+        }
+
+        if ( mainExclusions == null )
+        {
+            return ArchivaModelCloner.cloneExclusions( parentExclusions );
+        }
+
+        List merged = new ArrayList();
+
+        Map mainExclusionMap = createExclusionMap( mainExclusions );
+        Map parentExclusionMap = createExclusionMap( parentExclusions );
+
+        Iterator it = mainExclusionMap.entrySet().iterator();
+        while ( it.hasNext() )
+        {
+            Map.Entry entry = (Entry) it.next();
+            String key = (String) entry.getKey();
+            Exclusion mainExclusion = (Exclusion) entry.getValue();
+            Exclusion parentExclusion = (Exclusion) parentExclusionMap.get( key );
+
+            if ( parentExclusion == null )
+            {
+                merged.add( mainExclusion );
+            }
+            else
+            {
+                merged.add( parentExclusion );
+            }
+        }
+
+        return merged;
+    }
+
+    private static List mergeIndividuals( List mainIndividuals, List parentIndividuals )
+    {
+        if ( parentIndividuals == null )
+        {
+            return mainIndividuals;
+        }
+
+        if ( mainIndividuals == null )
+        {
+            return ArchivaModelCloner.cloneIndividuals( parentIndividuals );
+        }
+
+        List merged = ArchivaModelCloner.cloneIndividuals( mainIndividuals );
+
+        Iterator it = parentIndividuals.iterator();
+        while ( it.hasNext() )
+        {
+            Individual parentIndividual = (Individual) it.next();
+
+            if ( !mainIndividuals.contains( parentIndividual ) )
+            {
+                merged.add( parentIndividual );
+            }
+        }
+
+        return merged;
+    }
+
+    private static List mergeLicenses( List mainLicenses, List parentLicenses )
+    {
+        if ( parentLicenses == null )
+        {
+            return mainLicenses;
+        }
+
+        if ( mainLicenses == null )
+        {
+            return ArchivaModelCloner.cloneLicenses( parentLicenses );
+        }
+
+        List merged = new ArrayList();
+
+        Map mainLicensesMap = createLicensesMap( mainLicenses );
+        Map parentLicensesMap = createLicensesMap( parentLicenses );
+
+        Iterator it = mainLicensesMap.entrySet().iterator();
+        while ( it.hasNext() )
+        {
+            Map.Entry entry = (Entry) it.next();
+            String key = (String) entry.getKey();
+            License mainLicense = (License) entry.getValue();
+            License parentLicense = (License) parentLicensesMap.get( key );
+
+            if ( parentLicense == null )
+            {
+                merged.add( mainLicense );
+            }
+            else
+            {
+                // Not merging. Local wins.
+                merged.add( parentLicense );
+            }
+        }
+
+        return merged;
+    }
+
+    private static List mergePlugins( List mainPlugins, List parentPlugins )
+    {
+        return mergeArtifactReferences( mainPlugins, parentPlugins );
+    }
+
+    private static List mergeReports( List mainReports, List parentReports )
+    {
+        return mergeArtifactReferences( mainReports, parentReports );
+    }
+
+    private static List mergeRepositories( List mainRepositories, List parentRepositories )
+    {
+        if ( parentRepositories == null )
+        {
+            return mainRepositories;
+        }
+
+        if ( mainRepositories == null )
+        {
+            return ArchivaModelCloner.cloneLicenses( parentRepositories );
+        }
+
+        List merged = new ArrayList();
+
+        Map mainRepositoriesMap = createRepositoriesMap( mainRepositories );
+        Map parentRepositoriesMap = createRepositoriesMap( parentRepositories );
+
+        Iterator it = mainRepositoriesMap.entrySet().iterator();
+        while ( it.hasNext() )
+        {
+            Map.Entry entry = (Entry) it.next();
+            String key = (String) entry.getKey();
+            ProjectRepository mainProjectRepository = (ProjectRepository) entry.getValue();
+            ProjectRepository parentProjectRepository = (ProjectRepository) parentRepositoriesMap.get( key );
+
+            if ( parentProjectRepository == null )
+            {
+                merged.add( mainProjectRepository );
+            }
+            else
+            {
+                // Not merging. Local wins.
+                merged.add( parentProjectRepository );
+            }
+        }
+
+        return merged;
+    }
+
+    private static String toVersionlessArtifactKey( ArtifactReference artifactReference )
+    {
+        StringBuffer key = new StringBuffer();
+
+        key.append( artifactReference.getGroupId() ).append( ":" ).append( artifactReference.getArtifactId() );
+        key.append( StringUtils.defaultString( artifactReference.getClassifier() ) ).append( ":" );
+        key.append( artifactReference.getType() );
+
+        return key.toString();
+    }
+
+    private static String toVersionlessDependencyKey( Dependency dep )
+    {
+        StringBuffer key = new StringBuffer();
+
+        key.append( dep.getGroupId() ).append( ":" ).append( dep.getArtifactId() );
+        key.append( StringUtils.defaultString( dep.getClassifier() ) ).append( ":" );
+        key.append( dep.getType() );
+
+        return key.toString();
+    }
+}

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMerge.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java (added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java Thu Apr  5 13:11:19 2007
@@ -0,0 +1,40 @@
+package org.apache.maven.archiva.repository.project;
+
+/*
+ * 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.ArchivaProjectModel;
+
+/**
+ * ProjectModelMonitor 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public interface ProjectModelMonitor
+{
+    /**
+     * Report a problem encountered with a model.
+     * 
+     * @param model the model that caused the problem.
+     * @param type the type of problem.
+     * @param problem the problem description.
+     */
+    public void modelProblem( ArchivaProjectModel model, String type, String problem );
+}
\ No newline at end of file

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelMonitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java (added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java Thu Apr  5 13:11:19 2007
@@ -0,0 +1,42 @@
+package org.apache.maven.archiva.repository.project;
+
+/*
+ * 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.ArchivaProjectModel;
+import org.apache.maven.archiva.model.VersionedReference;
+
+/**
+ * Interface for ProjectModel resolution. 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public interface ProjectModelResolver
+{
+    /**
+     * Get the ProjectModel given a specific {@link RepositoryContent} key.
+     * 
+     * @param reference the reference to the other project. 
+     * @return the ArchivaProjectModel representing the provided {@link RepositoryContent} key.
+     * @throws ProjectModelException if the project model cannot be resolved.
+     */
+    public ArchivaProjectModel resolveProjectModel( VersionedReference reference )
+        throws ProjectModelException;
+}

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelResolver.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message