summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorJames William Dumay <jdumay@apache.org>2009-02-12 06:47:36 +0000
committerJames William Dumay <jdumay@apache.org>2009-02-12 06:47:36 +0000
commit77481fb93c9cef2b1da5b6891bf18f27554a2707 (patch)
tree33b5d6ef090b6a37ec7809dfe17ef22b4336bf96 /archiva-modules/archiva-base
parent48fc7e2f6f92cfb9898679d44aaf8836019f662c (diff)
downloadarchiva-77481fb93c9cef2b1da5b6891bf18f27554a2707.tar.gz
archiva-77481fb93c9cef2b1da5b6891bf18f27554a2707.zip
MRM-1084 - Upgrade modello maven plugin to 1.0 to support Java 5 generics
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@743630 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/pom.xml25
-rwxr-xr-xarchiva-modules/archiva-base/archiva-model/pom.xml47
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml30
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataMerge.java1
5 files changed, 64 insertions, 45 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml
index 2999766b9..51c1b54fc 100644
--- a/archiva-modules/archiva-base/archiva-configuration/pom.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/pom.xml
@@ -64,19 +64,36 @@
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
- <version>1.0-alpha-15</version>
<executions>
<execution>
<goals>
<goal>java</goal>
- <goal>registry-reader</goal>
- <goal>registry-writer</goal>
</goals>
</execution>
+ <execution>
+ <id>archiva-jpox-registry-reader</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <generatorId>registry-reader</generatorId>
+ </configuration>
+ </execution>
+ <execution>
+ <id>archiva-jpox-registry-writer</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <generatorId>registry-writer</generatorId>
+ </configuration>
+ </execution>
</executions>
<configuration>
<version>1.2.0</version>
- <model>src/main/mdo/configuration.mdo</model>
+ <models>
+ <model>src/main/mdo/configuration.mdo</model>
+ </models>
</configuration>
</plugin>
<plugin>
diff --git a/archiva-modules/archiva-base/archiva-model/pom.xml b/archiva-modules/archiva-base/archiva-model/pom.xml
index fae3ca346..e6f34f00f 100755
--- a/archiva-modules/archiva-base/archiva-model/pom.xml
+++ b/archiva-modules/archiva-base/archiva-model/pom.xml
@@ -59,11 +59,12 @@
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
- <version>1.0-alpha-17</version>
<configuration>
<version>1.0.0</version>
<packageWithVersion>false</packageWithVersion>
- <model>src/main/mdo/archiva-base.xml</model>
+ <models>
+ <model>src/main/mdo/archiva-base.xml</model>
+ </models>
</configuration>
<executions>
<execution>
@@ -71,14 +72,26 @@
<goals>
<goal>java</goal>
<goal>xsd</goal>
- <goal>jpox-jdo-mapping</goal>
- <goal>jpox-metadata-class</goal>
- <!--
- <goal>xpp3-writer</goal>
- <goal>xpp3-reader</goal>
- -->
</goals>
</execution>
+ <execution>
+ <id>archiva-jpox-jdo-mapping</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <generatorId>jpox-jdo-mapping</generatorId>
+ </configuration>
+ </execution>
+ <execution>
+ <id>archiva-jpox-metadata-class</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <generatorId>jpox-metadata-class</generatorId>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -139,6 +152,24 @@
</execution>
</executions>
</plugin>
+ <!-- stupid hack because jpox/modello is not supported anymore and it has bugs -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy file="${project.build.directory}/generated-sources/modello/org/apache/maven/archiva/model/package.jdo" todir="${project.build.outputDirectory}/org/apache/maven/archiva/model/" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml b/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
index 19884d5ec..2ef7fc625 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
+++ b/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
@@ -96,8 +96,7 @@
-->
<!--
<class stash.storable="true"
- jpox.table="REPOSITORIES"
- jpox.not-persisted-fields="modelEncoding">
+ jpox.table="REPOSITORIES">
<name>ArchivaRepositoryModel</name>
<version>1.0.0+</version>
<fields>
@@ -219,7 +218,6 @@
<class stash.storable="true"
jpox.table="ARTIFACT"
- jpox.not-persisted-fields="modelEncoding"
jpox.use-identifiers-as-primary-key="false"
jpox.identity-type="application"
jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactModelKey">
@@ -440,7 +438,6 @@
</class>
<class stash.storable="true"
jpox.table="JAVA_ARTIFACT"
- jpox.not-persisted-fields="modelEncoding"
jpox.use-identifiers-as-primary-key="false"
jpox.identity-type="application"
jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactJavaDetailsKey">
@@ -586,7 +583,6 @@
<class stash.storable="true"
jpox.use-identifiers-as-primary-key="false"
- jpox.not-persisted-fields="modelEncoding"
jpox.identity-type="application"
jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaRepositoryMetadataKey"
jpox.table="REPOSITORY_METADATA">
@@ -772,7 +768,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="REPOSITORY_METADATA_SNAPSHOTS">
<name>SnapshotVersion</name>
<description>The Snapshot Version</description>
@@ -807,7 +802,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="REPOSITORY_METADATA_PLUGINS">
<name>Plugin</name>
<description>The Plugin</description>
@@ -855,7 +849,6 @@
-->
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="PROJECT_REFERENCE">
<name>ProjectReference</name>
<description>A reference to another (unversioned) Project</description>
@@ -919,7 +912,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="VERSIONED_REFERENCE">
<name>VersionedReference</name>
<description>A reference to another Versioned Project</description>
@@ -995,7 +987,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="ARTIFACT_REFERENCE">
<name>ArtifactReference</name>
<version>1.0.0+</version>
@@ -1215,7 +1206,6 @@
<class stash.storable="true"
jpox.table="PROJECT"
- jpox.not-persisted-fields="modelEncoding"
jpox.use-identifiers-as-primary-key="false"
jpox.identity-type="application"
jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaProjectModelKey">
@@ -1532,7 +1522,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="MAILING_LISTS">
<name>MailingList</name>
<description>A Mailing List</description>
@@ -1590,7 +1579,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="ORGANIZATION">
<name>Organization</name>
<description>Specifies the organization that produces this project.</description>
@@ -1634,7 +1622,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="LICENSES">
<name>License</name>
<description><![CDATA[
@@ -1685,7 +1672,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="ISSUE_MANAGEMENT">
<name>IssueManagement</name>
<description>
@@ -1717,7 +1703,7 @@
</codeSegments>
</class>
- <class jpox.not-persisted-fields="modelEncoding">
+ <class>
<name>CiManagement</name>
<version>1.0.0+</version>
<fields>
@@ -1748,8 +1734,7 @@
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding">
+ <class stash.storable="true">
<name>Individual</name>
<description>
Description of a person who has contributed to the project.
@@ -1853,7 +1838,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="DEPENDENCY">
<name>Dependency</name>
<version>1.0.0+</version>
@@ -2043,7 +2027,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="EXCLUSIONS">
<name>Exclusion</name>
<version>1.0.0+</version>
@@ -2074,7 +2057,6 @@
</class>
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="SCM">
<name>Scm</name>
<version>1.0.0+</version>
@@ -2119,9 +2101,7 @@
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
- jpox.table="PROJECT_REPOSITORIES">
+ <class stash.storable="true" jpox.table="PROJECT_REPOSITORIES">
<name>ProjectRepository</name>
<version>1.0.0+</version>
<fields>
@@ -2204,7 +2184,6 @@
-->
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="REPOSITORY_PROBLEMS">
<name>RepositoryProblem</name>
<version>1.0.0+</version>
@@ -2307,7 +2286,6 @@
-->
<class stash.storable="true"
- jpox.not-persisted-fields="modelEncoding"
jpox.table="REPOSITORY_STATS">
<name>RepositoryContentStatistics</name>
<version>1.0.0+</version>
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
index 84ce3e130..70e2ab540 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
@@ -1112,7 +1112,6 @@ public class MetadataTransferTest
m.getPlugins().add( p );
}
- m.setModelEncoding( null );
RepositoryMetadataWriter.write( m, expectedMetadataXml );
// Compare the file to the actual contents.
@@ -1148,7 +1147,6 @@ public class MetadataTransferTest
m.getAvailableVersions().addAll( Arrays.asList( expectedVersions ) );
}
- m.setModelEncoding( null );
RepositoryMetadataWriter.write( m, expectedMetadataXml );
// Compare the file to the actual contents.
@@ -1176,7 +1174,6 @@ public class MetadataTransferTest
m.setGroupId( metadata.getGroupId() );
m.setArtifactId( metadata.getArtifactId() );
m.setVersion( metadata.getVersion() );
- m.setModelEncoding( null );
RepositoryMetadataWriter.write( m, expectedMetadataXml );
// Compare the file to the actual contents.
@@ -1254,7 +1251,6 @@ public class MetadataTransferTest
m.setLastUpdated( expectedDate + expectedTime );
- m.setModelEncoding( null );
RepositoryMetadataWriter.write( m, expectedMetadataXml );
// Compare the file to the actual contents.
@@ -1290,7 +1286,6 @@ public class MetadataTransferTest
m.getAvailableVersions().addAll( Arrays.asList( expectedProxyVersions ) );
}
- m.setModelEncoding( null );
RepositoryMetadataWriter.write( m, expectedMetadataXml );
// Compare the file to the actual contents.
@@ -1320,7 +1315,6 @@ public class MetadataTransferTest
m.setGroupId( metadata.getGroupId() );
m.setArtifactId( metadata.getArtifactId() );
m.setVersion( metadata.getVersion() );
- m.setModelEncoding( null );
RepositoryMetadataWriter.write( m, expectedMetadataXml );
// Compare the file to the actual contents.
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataMerge.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataMerge.java
index e19dc8fd0..47d4fadd3 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataMerge.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataMerge.java
@@ -219,7 +219,6 @@ public class RepositoryMetadataMerge
{
Plugin clonedPlugin = new Plugin();
clonedPlugin.setArtifactId(plugin.getArtifactId());
- clonedPlugin.setModelEncoding(plugin.getModelEncoding());
clonedPlugin.setName(plugin.getName());
clonedPlugin.setPrefix(plugin.getPrefix());
result.add(plugin);