Removing source from deprecated module
diff --git a/jpox-modello-maven-plugin/pom.xml b/jpox-modello-maven-plugin/pom.xml
deleted file mode 100644
index 6a6f20a..0000000
--- a/jpox-modello-maven-plugin/pom.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugins</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>jpox-modello-maven-plugin</artifactId>
- <packaging>maven-plugin</packaging>
-
- <properties>
- <site.staging.base>${project.parent.basedir}/../site</site.staging.base>
- </properties>
-
- <name>Jpox Modello Maven Plugin</name>
-
- <url>${webUrl}/modello-plugins/${project.artifactId}</url>
-
- <scm>
- <url>${scmBrowseUrl};f=${project.artifactId}</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-annotations</artifactId>
- <version>3.2</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-maven-plugin</artifactId>
- <version>${modelloVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugin-jpox</artifactId>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>3.2</version>
- <configuration>
- <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
- </configuration>
- <executions>
- <execution>
- <id>mojo-descriptor</id>
- <goals>
- <goal>descriptor</goal>
- </goals>
- </execution>
- <execution>
- <id>help-goal</id>
- <goals>
- <goal>helpmojo</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>3.2</version>
- </plugin>
- </plugins>
- </reporting>
-
- <profiles>
- <profile>
- <id>run-its</id>
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-invoker-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <debug>true</debug>
- <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
- <pomIncludes>
- <pomInclude>*/pom.xml</pomInclude>
- </pomIncludes>
- <postBuildHookScript>verify</postBuildHookScript>
- <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
- <settingsFile>src/it/settings.xml</settingsFile>
- <goals>
- <goal>clean</goal>
- <goal>test-compile</goal>
- </goals>
- </configuration>
- <executions>
- <execution>
- <id>integration-test</id>
- <goals>
- <goal>install</goal>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/jpox-modello-maven-plugin/src/it/redback-model/pom.xml b/jpox-modello-maven-plugin/src/it/redback-model/pom.xml
deleted file mode 100644
index 98c4082..0000000
--- a/jpox-modello-maven-plugin/src/it/redback-model/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.archiva.redback.components.modello.jpox.plugin</groupId>
-
- <artifactId>redback-rbac-jdo-test</artifactId>
- <version>1.0-SNAPSHOT</version>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-maven-plugin</artifactId>
- <version>1.6</version>
- <configuration>
- <version>1.0.1</version>
- <packageWithVersion>false</packageWithVersion>
- <models>
- <model>src/main/mdo/rbac-jdo.mdo</model>
- </models>
- </configuration>
- <executions>
- <execution>
- <id>modello-java</id>
- <goals>
- <goal>java</goal>
- <goal>stax-reader</goal>
- <goal>stax-writer</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>jpox-modello-maven-plugin</artifactId>
- <version>@pom.version@</version>
- <configuration>
- <version>1.0.1</version>
- <packageWithVersion>false</packageWithVersion>
- <models>
- <model>src/main/mdo/rbac-jdo.mdo</model>
- </models>
- </configuration>
- <executions>
- <execution>
- <id>modello-jpox</id>
- <goals>
- <goal>jpox-metadata-class</goal>
- <goal>jpox-jdo-mapping</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo b/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo
deleted file mode 100644
index 06cf57e..0000000
--- a/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo
+++ /dev/null
@@ -1,324 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ~ 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.
- -->
-<model jpox.mapping-in-package="true"
- jpox.table-prefix="SECURITY_">
- <!-- TODO: there is no reason this model is JDO specific. Shouldn't it be the basis for the various providers? It would dramatically reduce the code in -memory, for example -->
- <id>rbac-jdo</id>
- <name>RbacJdoModel</name>
- <version>1.0.1</version>
- <defaults>
- <default>
- <key>package</key>
- <value>org.apache.archiva.redback.components.modello.jpox.plugin</value>
- </default>
- </defaults>
- <classes>
- <class rootElement="true"
- jpox.stashable="false">
- <name>RbacDatabase</name>
- <version>1.0.1+</version>
- <fields>
- <field jpox.column="RBAC_ROLES">
- <name>roles</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoRole</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>permissions</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoPermission</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>operations</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoOperation</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>resources</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoResource</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>userAssignments</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoUserAssignment</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class jpox.stashable="true"
- jpox.table="ROLES"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoRole</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>assignable</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this role is available to be assigned to a user
- </description>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field jpox.persistence-modifier="persistent"
- jpox.fetch-groups="role-child-detail"
- jpox.join-table="ROLE_CHILDROLE_MAP">
- <name>childRoleNames</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- java.init="field"
- jpox.dependent="false"
- java.generate-break="false"
- java.generate-create="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- <description>
- roles that will inherit the permissions of this role
- </description>
- </field>
- <field jpox.fetch-groups="role-child-detail"
- jpox.join-table="ROLE_PERMISSION_MAP">
- <name>permissions</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- xml.reference="true"
- jpox.join="true"
- jpox.dependent="false"
- java.init="field"
- java.generate-break="false"
- java.generate-create="false">
- <type>JdoPermission</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class jpox.stashable="true"
- jpox.table="PERMISSIONS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoPermission</name>
- <version>1.0.0+</version>
-
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field jpox.indexed="true"
- jpox.persistence-modifier="persistent"
- jpox.column="RBAC_OPERATION">
- <name>operation</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- xml.reference="true"
- jpox.dependent="false">
- <type>JdoOperation</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- <field jpox.indexed="true"
- jpox.persistence-modifier="persistent"
- jpox.column="RBAC_RESOURCE">
- <name>resource</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- xml.reference="true"
- jpox.dependent="false">
- <type>JdoResource</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class jpox.stashable="true"
- jpox.table="OPERATIONS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoOperation</name>
- <version>1.0.0+</version>
-
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field>
- <name>resourceRequired</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if the resource is required for authorization to be granted
- </description>
- </field>
- </fields>
- </class>
-
- <class jpox.stashable="true"
- jpox.table="RESOURCES"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoResource</name>
- <version>1.0.0+</version>
- <description>
- In RBAC terms, this is the entity which an operation is associated with that which permissions are based on.
- </description>
-
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>identifier</name>
- <version>1.0.0+</version>
- <type>String</type>
- <description>
- The string identifier for a resource.
- </description>
- <identifier>true</identifier>
- </field>
- <field>
- <name>pattern</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if the identifer is a pattern that is to be evaluated, for example x.* could match x.a or x.b and x.**
- could match x.foo
- </description>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- </fields>
- </class>
-
- <class jpox.stashable="true"
- jpox.table="USER_ASSIGNMENTS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoUserAssignment</name>
- <description>binding of a principal to a role</description>
-
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>principal</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field jpox.column="LAST_UPDATED">
- <name>timestamp</name>
- <version>1.0.0+</version>
- <type>Date</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field java.adder="false"
- jpox.persistence-modifier="persistent"
- jpox.indexed="false"
- jpox.join-table="USERASSIGNMENT_ROLENAMES">
- <name>roleNames</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- java.init="field"
- java.generate-break="false"
- java.generate-create="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
- </classes>
-</model>
diff --git a/jpox-modello-maven-plugin/src/it/redback-model/verify.groovy b/jpox-modello-maven-plugin/src/it/redback-model/verify.groovy
deleted file mode 100644
index 1ae3afa..0000000
--- a/jpox-modello-maven-plugin/src/it/redback-model/verify.groovy
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-File packageFile = new File( basedir, "target/generated-resources/modello/org/apache/archiva/redback/components/modello/jpox/plugin/package.jdo" );
-
-assert packageFile.exists()
-
-File jdoRoleSource= new File( basedir, "target/generated-sources/modello/org/apache/archiva/redback/components/modello/jpox/plugin/JdoRole.java");
-
-assert jdoRoleSource.exists()
\ No newline at end of file
diff --git a/jpox-modello-maven-plugin/src/it/settings.xml b/jpox-modello-maven-plugin/src/it/settings.xml
deleted file mode 100644
index 7ef55c6..0000000
--- a/jpox-modello-maven-plugin/src/it/settings.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-
-<settings>
- <profiles>
- <profile>
- <id>it-repo</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <repositories>
- <repository>
- <id>local.central</id>
- <url>@localRepositoryUrl@</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>local.central</id>
- <url>@localRepositoryUrl@</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
-</settings>
diff --git a/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxJdoMappingMojo.java b/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxJdoMappingMojo.java
deleted file mode 100644
index 4127b32..0000000
--- a/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxJdoMappingMojo.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.jpox;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.maven.AbstractModelloGeneratorMojo;
-
-import java.io.File;
-import java.util.Properties;
-
-/**
- * Creates a JDO mapping from the Modello model.
- *
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- */
-@Mojo( name = "jpox-jdo-mapping", defaultPhase = LifecyclePhase.GENERATE_RESOURCES )
-public class ModelloJPoxJdoMappingMojo
- extends AbstractModelloGeneratorMojo
-{
- /**
- * The output directory of the generated JDO mapping file.
- * <p/>
- * Please be aware of the <model jpox.mapping-in-package="true" > attribute present in
- * the model file itself.
- */
- @Parameter( defaultValue = "${basedir}/target/generated-resources/modello", required = true )
- private File outputDirectory;
-
- /**
- * Produce a mapping file suitable for replication. It will have an alternate extension of '.jdorepl' so it is not
- * picked up by default, and all value-strategy and objectid-class entries are removed from the mapping so that
- * the original identities can be used.
- */
- @Parameter( defaultValue = "false" )
- private boolean replicationParameters;
-
- protected String getGeneratorType()
- {
- return "jpox-jdo-mapping";
- }
-
- protected boolean producesCompilableResult()
- {
- return false;
- }
-
- protected boolean producesResources()
- {
- return true;
- }
-
- public File getOutputDirectory()
- {
- return outputDirectory;
- }
-
- public void setOutputDirectory( File outputDirectory )
- {
- this.outputDirectory = outputDirectory;
- }
-
- protected void customizeParameters( Properties parameters )
- {
- super.customizeParameters( parameters );
-
- if ( replicationParameters )
- {
- parameters.setProperty( ModelloParameterConstants.FILENAME, "package.jdorepl" );
-
- parameters.setProperty( "JPOX.override.value-strategy", "off" );
- parameters.setProperty( "JPOX.override.objectid-class", "" );
- }
- }
-}
\ No newline at end of file
diff --git a/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxMetadataClassMojo.java b/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxMetadataClassMojo.java
deleted file mode 100644
index ed80df6..0000000
--- a/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxMetadataClassMojo.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.jpox;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.codehaus.modello.maven.AbstractModelloGeneratorMojo;
-
-import java.io.File;
-
-/**
- * Creates a JDO store from the Modello model.
- *
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- */
-@Mojo( name = "jpox-metadata-class", defaultPhase = LifecyclePhase.GENERATE_SOURCES )
-public class ModelloJPoxMetadataClassMojo
- extends AbstractModelloGeneratorMojo
-{
- /**
- * The output directory of the generated JDO store.
- */
- @Parameter( defaultValue = "${basedir}/target/generated-sources/modello", required = true )
- private File outputDirectory;
-
- protected String getGeneratorType()
- {
- return "jpox-metadata-class";
- }
-
- public File getOutputDirectory()
- {
- return outputDirectory;
- }
-
- public void setOutputDirectory( File outputDirectory )
- {
- this.outputDirectory = outputDirectory;
- }
-}
diff --git a/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxStoreMojo.java b/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxStoreMojo.java
deleted file mode 100644
index f2ef314..0000000
--- a/jpox-modello-maven-plugin/src/main/java/org/apache/archiva/redback/components/modello/plugin/jpox/ModelloJPoxStoreMojo.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.jpox;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.codehaus.modello.maven.AbstractModelloGeneratorMojo;
-
-import java.io.File;
-
-/**
- * Creates a JDO store from the Modello model.
- *
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- */
-@Mojo( name = "jpox-store", defaultPhase = LifecyclePhase.GENERATE_SOURCES )
-public class ModelloJPoxStoreMojo
- extends AbstractModelloGeneratorMojo
-{
- /**
- * The output directory of the generated JDO store.
- *
- * @parameter expression="${basedir}/target/generated-sources/modello"
- * @required
- */
- private File outputDirectory;
-
- protected String getGeneratorType()
- {
- return "jpox-store";
- }
-
- public File getOutputDirectory()
- {
- return outputDirectory;
- }
-
- public void setOutputDirectory( File outputDirectory )
- {
- this.outputDirectory = outputDirectory;
- }
-}
diff --git a/modello-db-keywords/pom.xml b/modello-db-keywords/pom.xml
deleted file mode 100644
index e0b9316..0000000
--- a/modello-db-keywords/pom.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugins</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
- <artifactId>modello-db-keywords</artifactId>
- <name>Modello Database Keywords Library</name>
- <packaging>jar</packaging>
-
- <properties>
- <site.staging.base>${project.parent.basedir}/../site</site.staging.base>
- </properties>
-
- <url>${webUrl}/modello-plugins/${project.artifactId}</url>
-
- <scm>
- <url>${scmBrowseUrl};f=${project.artifactId}</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- <version>1.0-alpha-30</version>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <excludes combine.children="append">
- <exclude>src/main/resources/**</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-</project>
diff --git a/modello-db-keywords/src/main/java/org/apache/archiva/redback/components/modello/db/SQLReservedWords.java b/modello-db-keywords/src/main/java/org/apache/archiva/redback/components/modello/db/SQLReservedWords.java
deleted file mode 100644
index dcbbf00..0000000
--- a/modello-db-keywords/src/main/java/org/apache/archiva/redback/components/modello/db/SQLReservedWords.java
+++ /dev/null
@@ -1,250 +0,0 @@
-package org.apache.archiva.redback.components.modello.db;
-
-/*
- * 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.logging.AbstractLogEnabled;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * SQLReservedWords - utility object to test against SQL Keywords.
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @plexus.component role="org.apache.archiva.redback.components.modello.db.SQLReservedWords"
- */
-public class SQLReservedWords
- extends AbstractLogEnabled
- implements Initializable
-{
- private Map<String, List<KeywordSource>> keywords;
-
- /**
- * Tests the provided word to see if it is a keyword.
- *
- * @param word the word to test.
- * @return true if the provided word is a keyword.
- */
- public boolean isKeyword( String word )
- {
- if ( StringUtils.isEmpty( word ) )
- {
- // empty or null is not a keyword. ;-)
- return false;
- }
-
- String key = word.trim().toUpperCase();
- return keywords.containsKey( key );
- }
-
- /**
- * Obtain the list of {@link KeywordSource} objects that the specified (potential) keyword
- * (might) belong to.
- *
- * @param word the word to test.
- * @return the {@link List} of {@link KeywordSource} objects, or <code>null</code> if specified word is
- * not a reserved word.
- */
- public List<KeywordSource> getKeywordSourceList( String word )
- {
- if ( StringUtils.isEmpty( word ) )
- {
- // empty or null is not a keyword. ;-)
- return null;
- }
-
- String key = word.trim().toUpperCase();
- return this.keywords.get( key );
- }
-
- /**
- * Obtain the comma delimited string of keyword sources that the specified (potential) word
- * (might) belong to.
- *
- * @param word the wor to test.
- * @return the {@link String} of keyword source names seperated by commas, or <code>null</code> if word is
- * not a reserved word.
- */
- public String getKeywordSourceString( String word )
- {
- if ( StringUtils.isEmpty( word ) )
- {
- // empty or null is not a keyword. ;-)
- return null;
- }
-
- String key = word.trim().toUpperCase();
- List<KeywordSource> sources = this.keywords.get( key );
-
- if ( sources == null )
- {
- return null;
- }
-
- StringBuffer ret = new StringBuffer();
-
- for ( Iterator<KeywordSource> it = sources.iterator(); it.hasNext(); )
- {
- KeywordSource source = it.next();
- if ( ret.length() > 0 )
- {
- ret.append( ", " );
- }
- ret.append( source.getName() );
- }
-
- return ret.toString();
- }
-
- public void initialize()
- throws InitializationException
- {
- loadKeywords();
- }
-
- /**
- * Finds the list of keywords and loads them into the {@link #keywords} {@link Map}.
- */
- private void loadKeywords()
- {
- this.keywords = new HashMap<>();
-
- Properties props = new Properties();
-
- URL definitionsURL = this.getClass().getResource( "keywords.properties" );
-
- if ( definitionsURL == null )
- {
- getLogger().error( "Unable to load definition file: keywords.properties" );
- return;
- }
-
- try (InputStream is = definitionsURL.openStream())
- {
- props.load( is );
-
- String sources[] = StringUtils.split( props.getProperty( "keyword.sources" ), "," );
-
- for ( int i = 0; i < sources.length; i++ )
- {
- String source = sources[i];
- String sourceName = props.getProperty( "keyword.source." + source + ".name" );
- String sourceSeverity = props.getProperty( "keyword.source." + source + ".severity" );
-
- KeywordSource keywordSource = new KeywordSource( sourceName, sourceSeverity );
-
- loadKeywordSource( source + ".txt", keywordSource );
- }
- }
- catch ( IOException e )
- {
- getLogger().error( "Unable to load definitions file: " + "keywords.properties", e );
- return;
- }
- }
-
- private void loadKeywordSource( String resource, KeywordSource source )
- {
- URL keywordsURL = this.getClass().getResource( resource );
-
- if ( keywordsURL == null )
- {
- getLogger().error( "Unable to find keywords for \"" + resource + "\"" );
- return;
- }
-
- try (InputStream is = keywordsURL.openStream())
- {
- try (InputStreamReader isr = new InputStreamReader( is ))
- {
- try (BufferedReader reader = new BufferedReader( isr ))
- {
- String line = reader.readLine();
- while ( line != null )
- {
- line = line.trim();
- if ( line.length() > 0 )
- {
- addKeyword( line, source );
- }
- line = reader.readLine();
- }
- }
- }
- }
- catch ( IOException e )
- {
- getLogger().warn( "Unable to load keywords from " + keywordsURL.toExternalForm() + ": " + e.getMessage(),
- e );
- }
- }
-
- private void addKeyword( String keyword, KeywordSource source )
- {
- String key = keyword.trim().toUpperCase();
- List<KeywordSource> sources = this.keywords.get( key );
- if ( sources == null )
- {
- sources = new ArrayList<>();
- }
- sources.add( source );
- this.keywords.put( key, sources );
- }
-
- public class KeywordSource
- {
- private String name;
-
- private String severity;
-
- public KeywordSource( String name, String severity )
- {
- this.name = name;
- this.severity = severity;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getSeverity()
- {
- return severity;
- }
-
- public String toString()
- {
- return name;
- }
- }
-}
diff --git a/modello-db-keywords/src/main/resources/META-INF/plexus/components.xml b/modello-db-keywords/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 6ca8a17..0000000
--- a/modello-db-keywords/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<component-set>
- <components>
-
- <component>
- <role>org.apache.archiva.redback.components.modello.db.SQLReservedWords</role>
- <role-hint>default</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.db.SQLReservedWords</implementation>
- </component>
-
- </components>
-</component-set>
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/db2.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/db2.txt
deleted file mode 100644
index 71acbf2..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/db2.txt
+++ /dev/null
@@ -1,208 +0,0 @@
-ADD
-ALIAS
-ALL
-ALLOCATE
-ALLOW
-ALTER
-AND
-ANY
-AS
-AUTHORIZATION
-BEGIN
-BETWEEN
-BINARY
-BY
-CALL
-CALLED
-CASE
-CAST
-CCSID
-CHAR
-CHARACTER
-CHECK
-CLOSE
-COLLECTION
-COLUMN
-COMMENT
-COMMIT
-CONCAT
-CONDITION
-CONNECT
-CONNECTION
-CONSTRAINT
-CONTAINS
-CONTINUE
-COUNT
-COUNT_BIG
-CREATE
-CROSS
-CURRENT
-CURRENT_DATE
-CURRENT_PATH
-CURRENT_SERVER
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_TIMEZONE
-CURRENT_USER
-CURSOR
-DATABASE
-DAY
-DAYS
-DB2GENERAL
-DB2SQL
-DBINFO
-DECLARE
-DEFAULT
-DELETE
-DESCRIPTOR
-DETERMINISTIC
-DISALLOW
-DISCONNECT
-DISTINCT
-DO
-DOUBLE
-DROP
-DYNAMIC
-ELSE
-ELSEIF
-END
-END-EXEC
-ESCAPE
-EXCEPTION
-EXECUTE
-EXISTS
-EXIT
-EXTERNAL
-FENCED
-FETCH
-FILE
-FINAL
-FOR
-FOREIGN
-FREE
-FROM
-FUNCTION
-GENERAL
-GET
-GO
-GOTO
-GRANT
-GRAPHIC
-GROUP
-HANDLER
-HAVING
-HOUR
-HOURS
-IF
-IMMEDIATE
-IN
-INDEX
-INDICATOR
-INNER
-INOUT
-INSENSITIVE
-INSERT
-INTEGRITY
-INTO
-IS
-ISOLATION
-JAVA
-JOIN
-KEY
-LABEL
-LANGUAGE
-LEAVE
-LEFT
-LIKE
-LINKTYPE
-LOCK
-LONG
-LOOP
-MICROSECOND
-MICROSECONDS
-MINUTE
-MINUTES
-MODIFIES
-MONTH
-MONTHS
-NO
-NODENAME
-NODENUMBER
-NOT
-NULL
-OF
-ON
-OPEN
-OPTIMIZE
-OPTION
-OR
-ORDER
-OUT
-OUTER
-PACKAGE
-PARAMETER
-PARTITION
-PATH
-POSITION
-PREPARE
-PRIMARY
-PRIVILEGES
-PROCEDURE
-PROGRAM
-READ
-READS
-RECOVERY
-REFERENCES
-RELEASE
-RENAME
-REPEAT
-RESET
-RESULT
-RETURN
-RETURNS
-REVOKE
-ROLLBACK
-ROUTINE
-ROW
-ROWS
-RRN
-RUN
-SCHEMA
-SCRATCHPAD
-SECOND
-SECONDS
-SELECT
-SET
-SIMPLE
-SOME
-SOURCE
-SPECIFIC
-SQL
-STATIC
-SUBSTRING
-SYNONYM
-TABLE
-THEN
-TO
-TRANSACTION
-TRIM
-TYPE
-UNDO
-UNION
-UNIQUE
-UNTIL
-UPDATE
-USAGE
-USER
-USING
-VALUES
-VARIABLE
-VARIANT
-VIEW
-WHEN
-WHERE
-WHILE
-WITH
-WRITE
-YEAR
-YEARS
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/derby.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/derby.txt
deleted file mode 100644
index a47a439..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/derby.txt
+++ /dev/null
@@ -1,214 +0,0 @@
-ADD
-ALL
-ALLOCATE
-ALTER
-AND
-ANY
-ARE
-AS
-ASC
-ASSERTION
-AT
-AUTHORIZATION
-AVG
-BEGIN
-BETWEEN
-BIT
-BIT_LENGTH
-BOOLEAN
-BOTH
-BY
-CALL
-CASCADE
-CASCADED
-CASE
-CAST
-CHAR
-CHARACTER
-CHARACTER_LENGTH
-CHAR_LENGTH
-CHECK
-CLOSE
-COLLATE
-COLLATION
-COLUMN
-COMMIT
-CONNECT
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONTINUE
-CONVERT
-CORRESPONDING
-COUNT
-CREATE
-CROSS
-CURRENT
-CURRENT_DATE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFERRABLE
-DEFERRED
-DELETE
-DESC
-DESCRIBE
-DIAGNOSTICS
-DISCONNECT
-DISTINCT
-DOUBLE
-DROP
-ELSE
-END
-ENDEXEC
-ESCAPE
-EXCEPT
-EXCEPTION
-EXEC
-EXECUTE
-EXISTS
-EXPLAIN
-EXTERNAL
-EXTRACT
-FALSE
-FETCH
-FIRST
-FLOAT
-FOR
-FOREIGN
-FOUND
-FROM
-FULL
-FUNCTION
-GET
-GET_CURRENT_CONNECTION
-GLOBAL
-GO
-GOTO
-GRANT
-GROUP
-HAVING
-HOUR
-IDENTITY
-IMMEDIATE
-IN
-INDICATOR
-INITIALLY
-INNER
-INOUT
-INPUT
-INSENSITIVE
-INSERT
-INT
-INTEGER
-INTERSECT
-INTO
-IS
-ISOLATION
-JOIN
-KEY
-LAST
-LEADING
-LEFT
-LIKE
-LOCAL
-LONGINT
-LOWER
-LTRIM
-MATCH
-MAX
-MIN
-MINUTE
-NATIONAL
-NATURAL
-NCHAR
-NEXT
-NO
-NOT
-NULL
-NULLIF
-NUMERIC
-NVARCHAR
-OCTET_LENGTH
-OF
-ON
-ONLY
-OPEN
-OPTION
-OR
-ORDER
-OUT
-OUTER
-OUTPUT
-OVERLAPS
-PAD
-PARTIAL
-PREPARE
-PRESERVE
-PRIMARY
-PRIOR
-PRIVILEGES
-PROCEDURE
-PUBLIC
-READ
-REAL
-REFERENCES
-RELATIVE
-RESTRICT
-REVOKE
-RIGHT
-ROLLBACK
-ROWS
-RTRIM
-RUNTIMESTATISTICS
-SCHEMA
-SCROLL
-SECOND
-SELECT
-SESSION_USER
-SET
-SMALLINT
-SOME
-SPACE
-SQL
-SQLCODE
-SQLERROR
-SQLSTATE
-SUBSTR
-SUBSTRING
-SUM
-SYSTEM_USER
-TABLE
-TEMPORARY
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TINYINT
-TO
-TRAILING
-TRANSACTION
-TRANSLATE
-TRANSLATION
-TRIM
-TRUE
-UNION
-UNIQUE
-UNKNOWN
-UPDATE
-UPPER
-USER
-USING
-VALUES
-VARCHAR
-VARYING
-VIEW
-WHENEVER
-WHERE
-WITH
-WORK
-WRITE
-YEAR
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/hsqldb.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/hsqldb.txt
deleted file mode 100644
index 26133b5..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/hsqldb.txt
+++ /dev/null
@@ -1,316 +0,0 @@
-ACTION
-ADD
-ADMIN
-AFTER
-ALIAS
-ALL
-ALLOCATE
-ALTER
-ALWAYS
-AND
-ANY
-ARE
-ARRAY
-AS
-ASC
-ASENSITIVE
-ASYMMETRIC
-AT
-ATOMIC
-AUTHORIZATION
-AUTOCOMMIT
-AVG
-BEFORE
-BEGIN
-BETWEEN
-BIGINT
-BINARY
-BLOB
-BOOLEAN
-BOTH
-BY
-CACHED
-CALL
-CALLED
-CASCADE
-CASCADED
-CASE
-CASEWHEN
-CAST
-CHAR
-CHARACTER
-CHECK
-CHECKPOINT
-CLASS
-CLOB
-CLOSE
-COALESCE
-COLLATE
-COLUMN
-COMMIT
-COMPACT
-COMPRESSED
-CONCAT
-CONCAT
-CONDIITON
-CONNECT
-CONSTRAINT
-CONTINUE
-CONVERT
-CORRESPONDING
-COUNT
-CREATE
-CUBE
-CURRENT
-CURRENT_DATE
-CURRENT_DEFAULT_TRANSFORM_GROUP
-CURRENT_PATH
-CURRENT_ROLE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_TRANSFORM_GROUP_FOR_TYPE
-CURRENT_USER
-CURSOR
-CYCLE
-DATE
-DAY
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DEFRAG
-DELETE
-DEREF
-DESC
-DESCRIBE
-DETERMINISTIC
-DISCONNECT
-DISTINCT
-DO
-DOUBLE
-DROP
-DYNAMIC
-EACH
-ELEMENT
-ELSE
-ELSEIF
-END
-ESCAPE
-EXCEPT
-EXEC
-EXECUTE
-EXISTS
-EXIT
-EXPLAIN
-EXTERNAL
-EXTRACT
-FALSE
-FETCH
-FILTER
-FLOAT
-FOR
-FOREIGN
-FREE
-FROM
-FULL
-FUNCTION
-GENERATED
-GET
-GLOBAL
-GRANT
-GROUP
-GROUPING
-HANDLER
-HAVING
-HOLD
-HOUR
-IDENTITY
-IF
-IFNULL
-IGNORECASE
-IMMEDIATE
-IMMEDIATELY
-IN
-INCREMENT
-INDEX
-INDICATOR
-INNER
-INOUT
-INPUT
-INSENSITIVE
-INSERT
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-IS
-ITERATE
-JOIN
-KEY
-LANGUAGE
-LARGE
-LATERAL
-LEADING
-LEAVE
-LEFT
-LIKE
-LIMIT
-LOCAL
-LOCALTIME
-LOCALTIMESTAMP
-LOGSIZE
-LOOP
-MATCH
-MAX
-MAXROWS
-MEMBER
-MEMORY
-MERGE
-METHOD
-MIN
-MINUS
-MINUTE
-MODIFIES
-MODULE
-MONTH
-MULTISET
-NATIONAL
-NAUTRAL
-NCHAR
-NCLOB
-NEW
-NEXT
-NO
-NONE
-NOT
-NOW
-NOWAIT
-NULL
-NULLIF
-NUMERIC
-OF
-OLD
-ON
-ONLY
-OPEN
-OR
-ORDER
-OUT
-OUTER
-OUTPUT
-OVER
-OVERLAPS
-PARAMETER
-PARTITION
-PASSWORD
-PLAN
-POSITION
-PRECISION
-PREPARE
-PRIMARY
-PROCEDURE
-PROPERTY
-PUBLIC
-QUEUE
-RANGE
-READONLY
-READS
-REAL
-RECURSIVE
-REF
-REFERENCES
-REFERENCING
-REFERENTIAL_INTEGRITY
-RELEASE
-RENAME
-REPEAT
-RESIGNAL
-RESTART
-RESTRICT
-RESULT
-RETURN
-RETURNS
-REVOKE
-RIGHT
-ROLLBACK
-ROLLUP
-ROW
-ROWS
-SAVEPOINT
-SCOPE
-SCRIPT
-SCRIPTFORMAT
-SCROLL
-SEARCH
-SECOND
-SELECT
-SENSITIVE
-SEQUENCE
-SESSION_USER
-SET
-SHUTDOWN
-SIGNAL
-SIMILAR
-SMALLINT
-SOME
-SOURCE
-SPECIFIC
-SPECIFICTYPE
-SQL
-SQLEXCEPTION
-SQLSTATE
-SQLWARNING
-START
-STATIC
-SUBMULTISET
-SUBSTRING
-SUM
-SYMMETRIC
-SYSDATE
-SYSTEM
-SYSTEM_USER
-TABLE
-TABLESAMPLE
-TEMP
-TEXT
-THEN
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TO
-TODAY
-TOP
-TRAILING
-TRANSLATION
-TREAT
-TRIGGER
-TRIM
-TRUE
-UNDO
-UNION
-UNIQUE
-UNKNOWN
-UNNEST
-UNTIL
-UPDATE
-USER
-USING
-VALUE
-VALUES
-VARCHAR
-VARYING
-VIEW
-WHEN
-WHENEVER
-WHERE
-WHILE
-WINDOW
-WITH
-WITHIN
-WITHOUT
-WORK
-WRITE_DELAY
-YEAR
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/jdbc.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/jdbc.txt
deleted file mode 100644
index e241bfe..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/jdbc.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-ADD
-ALTER
-AND
-ASC
-BETWEEN
-BY
-CALL
-COMMIT
-COUNT
-CREATE
-DEFAULT_NULL
-DELETE
-DESC
-DISTINCT
-DROP
-END
-EXCEPTION
-FOR_UPDATE
-FROM
-GROUP
-IN
-INDEX
-INSERT
-INTO
-IS
-LIKE
-MAX
-MIN
-NOT
-NULL
-OR
-ORDER
-PRIMARY_KEY
-ROLLBACK
-ROWNUM
-SELECT
-SET
-SUBSTR
-SUM
-SYSDATE
-TABLE
-TO_CHAR
-TO_NUMBER
-UID
-UNION
-UPDATE
-UPPER
-USING
-VALUES
-WHERE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/keywords.properties b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/keywords.properties
deleted file mode 100644
index 9cee6dc..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/keywords.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-keyword.sources=sql92,sql99,sql2003,jdbc,derby,hsqldb,mysql,postgres,oracle,plsql,sqlserver,msaccess,db2,odbc
-keyword.source.sql92.name=SQL 92
-keyword.source.sql92.severity=ERROR
-keyword.source.sql99.name=SQL 99
-keyword.source.sql99.severity=ERROR
-keyword.source.sql2003.name=SQL 2003
-keyword.source.sql2003.severity=ERROR
-keyword.source.jdbc.name=JDBC
-keyword.source.jdbc.severity=ERROR
-keyword.source.derby.name=Derby Server
-keyword.source.derby.severity=WARNING
-keyword.source.hsqldb.name=HSQLDB
-keyword.source.hsqldb.severity=WARNING
-keyword.source.mysql.name=MySQL
-keyword.source.mysql.severity=WARNING
-keyword.source.postgres.name=PostgreSQL
-keyword.source.postgres.severity=WARNING
-keyword.source.oracle.name=Oracle
-keyword.source.oracle.severity=WARNING
-keyword.source.plsql.name=PL/SQL
-keyword.source.plsql.severity=WARNING
-keyword.source.sqlserver.name=Microsoft SQL Server
-keyword.source.sqlserver.severity=WARNING
-keyword.source.msaccess.name=Microsoft Access
-keyword.source.msaccess.severity=WARNING
-keyword.source.db2.name=IBM DB/2
-keyword.source.db2.severity=WARNING
-keyword.source.odbc.name=ODBC
-keyword.source.odbc.severity=WARNING
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/msaccess.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/msaccess.txt
deleted file mode 100644
index 2f07b7f..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/msaccess.txt
+++ /dev/null
@@ -1,253 +0,0 @@
-ABSOLUTE
-ADD
-ADMINDB
-ALL
-ALPHANUMERIC
-ALTER
-ALTER
-AND
-ANY
-ARE
-AS
-AS
-ASC
-ASSERTION
-AUTHORIZATION
-AUTOINCREMENT
-AVG
-BEGIN
-BETWEEN
-BINARY
-BIT
-BIT_LENGTH
-BOOLEAN
-BOTH
-BY
-BYTE
-CASCADE
-CATALOG
-CHAR
-CHARACTER
-CHARACTER_LENGTH
-CHAR_LENGTH
-CHECK
-CLOSE
-CLUSTERED
-COALESCE
-COLLATE
-COLLATION
-COLUMN
-COMMIT
-COMP
-COMPRESSION
-CONNECT
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONTAINER
-CONTAINS
-CONVERT
-COUNT
-COUNTER
-CREATE
-CURRENCY
-CURRENT_DATE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-DATABASE
-DATE
-DATETIME
-DAY
-DEC
-DECIMAL
-DECLARE
-DELETE
-DESC
-DISALLOW
-DISCONNECT
-DISTINCT
-DISTINCTROW
-DOMAIN
-DOUBLE
-DROP
-EQV
-EXCLUSIVECONNECT
-EXEC
-EXECUTE
-EXISTS
-EXTRACT
-FALSE
-FETCH
-FIRST
-FLOAT
-FLOAT4
-FLOAT8
-FOREIGN
-FROM
-GENERAL
-GRANT
-GROUP
-GUID
-HAVING
-HOUR
-IDENTITY
-IEEEDOUBLE
-IEEESINGLE
-IGNORE
-IMAGE
-IMP
-IN
-IN
-INDEX
-INDEXCREATEDB
-INNER
-INPUT
-INSENSITIVE
-INSERT
-INSERT
-INT
-INTEGER
-INTEGER1
-INTEGER2
-INTEGER4
-INTERVAL
-INTO
-INTO
-IS
-ISOLATION
-JOIN
-KEY
-LANGUAGE
-LAST
-LEFT
-LEVEL
-LIKE
-LOGICAL
-LOGICAL1
-LONG
-LONGBINARY
-LONGCHAR
-LONGTEXT
-LOWER
-MATCH
-MAX
-MEMO
-MIN
-MINUTE
-MOD
-MONEY
-MONTH
-NATIONAL
-NCHAR
-NONCLUSTERED
-NOT
-NTEXT
-NULL
-NUMBER
-NUMERIC
-NVARCHAR
-OCTET_LENGTH
-OLEOBJECT
-ON
-OPEN
-OPTION
-OR
-ORDER
-OUTER
-OUTPUT
-OWNERACCESS
-PAD
-PARAMETERS
-PARTIAL
-PASSWORD
-PERCENT
-PIVOT
-POSITION
-PRECISION
-PREPARE
-PRIMARY
-PRIVILEGES
-PROC
-PROCEDURE
-PUBLIC
-REAL
-REFERENCES
-RESTRICT
-REVOKE
-RIGHT
-ROLLBACK
-SCHEMA
-SECOND
-SELECT
-SELECTSCHEMA
-SELECTSECURITY
-SET
-SHORT
-SINGLE
-SIZE
-SMALLDATETIME
-SMALLINT
-SMALLMONEY
-SOME
-SPACE
-SQL
-SQLCODE
-SQLERROR
-SQLSTATE
-STDEV
-STDEVP
-STRING
-SUBSTRING
-SUM
-SYSNAME
-SYSTEM_USER
-TABLE
-TABLE
-TABLEID
-TEMPORARY
-TEXT
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TINYINT
-TO
-TOP
-TRAILING
-TRANSACTION
-TRANSFORM
-TRANSLATE
-TRANSLATION
-TRIM
-TRUE
-UNION
-UNIQUE
-UNIQUEIDENTIFIER
-UNKNOWN
-UPDATE
-UPDATEIDENTITY
-UPDATEOWNER
-UPDATESECURITY
-UPPER
-USAGE
-USER
-USING
-VALUE
-VALUES
-VAR
-VARBINARY
-VARCHAR
-VARP
-VARYING
-VIEW
-WHEN
-WHENEVER
-WHERE
-WITH
-WORK
-XOR
-YEAR
-YESNO
-ZONE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/mysql.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/mysql.txt
deleted file mode 100644
index 84d1adb..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/mysql.txt
+++ /dev/null
@@ -1,254 +0,0 @@
-ADD
-ALL
-ALTER
-ANALYZE
-AND
-AS
-ASC
-ASENSITIVE
-ASENSITIVE
-BEFORE
-BETWEEN
-BIGINT
-BINARY
-BLOB
-BOTH
-BY
-CALL
-CALL
-CASCADE
-CASE
-CHANGE
-CHAR
-CHARACTER
-CHECK
-COLLATE
-COLUMN
-CONDITION
-CONDITION
-CONSTRAINT
-CONTINUE
-CONTINUE
-CONVERT
-CREATE
-CROSS
-CURRENT_DATE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-CURSOR
-DATABASE
-DATABASES
-DAY_HOUR
-DAY_MICROSECOND
-DAY_MINUTE
-DAY_SECOND
-DEC
-DECIMAL
-DECLARE
-DECLARE
-DEFAULT
-DELAYED
-DELETE
-DESC
-DESCRIBE
-DETERMINISTIC
-DETERMINISTIC
-DISTINCT
-DISTINCTROW
-DIV
-DOUBLE
-DROP
-DUAL
-EACH
-EACH
-ELSE
-ELSEIF
-ELSEIF
-ENCLOSED
-ESCAPED
-EXISTS
-EXIT
-EXIT
-EXPLAIN
-FALSE
-FETCH
-FETCH
-FLOAT
-FLOAT4
-FLOAT8
-FOR
-FORCE
-FOREIGN
-FROM
-FULLTEXT
-GRANT
-GROUP
-HAVING
-HIGH_PRIORITY
-HOUR_MICROSECOND
-HOUR_MINUTE
-HOUR_SECOND
-IF
-IGNORE
-IN
-INDEX
-INFILE
-INNER
-INOUT
-INOUT
-INSENSITIVE
-INSENSITIVE
-INSERT
-INT
-INT1
-INT2
-INT3
-INT4
-INT8
-INTEGER
-INTERVAL
-INTO
-IS
-ITERATE
-ITERATE
-JOIN
-KEY
-KEYS
-KILL
-LEADING
-LEAVE
-LEAVE
-LEFT
-LIKE
-LIMIT
-LINES
-LOAD
-LOCALTIME
-LOCALTIMESTAMP
-LOCK
-LONG
-LONGBLOB
-LONGTEXT
-LOOP
-LOOP
-LOW_PRIORITY
-MATCH
-MEDIUMBLOB
-MEDIUMINT
-MEDIUMTEXT
-MIDDLEINT
-MINUTE_MICROSECOND
-MINUTE_SECOND
-MOD
-MODIFIES
-MODIFIES
-NATURAL
-NOT
-NO_WRITE_TO_BINLOG
-NULL
-NUMERIC
-ON
-OPTIMIZE
-OPTION
-OPTIONALLY
-OR
-ORDER
-OUT
-OUT
-OUTER
-OUTFILE
-PRECISION
-PRIMARY
-PROCEDURE
-PURGE
-RAID0
-READ
-READS
-READS
-REAL
-REFERENCES
-REGEXP
-RELEASE
-RELEASE
-RENAME
-REPEAT
-REPEAT
-REPLACE
-REQUIRE
-RESTRICT
-RETURN
-RETURN
-REVOKE
-RIGHT
-RLIKE
-SCHEMA
-SCHEMA
-SCHEMAS
-SCHEMAS
-SECOND_MICROSECOND
-SELECT
-SENSITIVE
-SENSITIVE
-SEPARATOR
-SET
-SHOW
-SMALLINT
-SONAME
-SPATIAL
-SPECIFIC
-SPECIFIC
-SQL
-SQL
-SQL_BIG_RESULT
-SQL_CALC_FOUND_ROWS
-SQLEXCEPTION
-SQLEXCEPTION
-SQL_SMALL_RESULT
-SQLSTATE
-SQLSTATE
-SQLWARNING
-SQLWARNING
-SSL
-STARTING
-STRAIGHT_JOIN
-TABLE
-TERMINATED
-THEN
-TINYBLOB
-TINYINT
-TINYTEXT
-TO
-TRAILING
-TRIGGER
-TRIGGER
-TRUE
-UNDO
-UNDO
-UNION
-UNIQUE
-UNLOCK
-UNSIGNED
-UPDATE
-USAGE
-USE
-USING
-UTC_DATE
-UTC_TIME
-UTC_TIMESTAMP
-VALUES
-VARBINARY
-VARCHAR
-VARCHARACTER
-VARYING
-WHEN
-WHERE
-WHILE
-WHILE
-WITH
-WRITE
-X509
-XOR
-YEAR_MONTH
-ZEROFILL
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/odbc.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/odbc.txt
deleted file mode 100644
index 95325f2..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/odbc.txt
+++ /dev/null
@@ -1,235 +0,0 @@
-ABSOLUTE
-ACTION
-ADA
-ADD
-ALL
-ALLOCATE
-ALTER
-AND
-ANY
-ARE
-AS
-ASC
-ASSERTION
-AT
-AUTHORIZATION
-AVG
-BEGIN
-BETWEEN
-BIT
-BIT_LENGTH
-BOTH
-BY
-CASCADE
-CASCADED
-CASE
-CAST
-CATALOG
-CHAR
-CHARACTER
-CHARACTER_LENGTH
-CHAR_LENGTH
-CHECK
-CLOSE
-COALESCE
-COLLATE
-COLLATION
-COLUMN
-COMMIT
-CONNECT
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONTINUE
-CONVERT
-CORRESPONDING
-COUNT
-CREATE
-CROSS
-CURRENT
-CURRENT_DATE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-DATE
-DAY
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DEFERRABLE
-DEFERRED
-DELETE
-DESC
-DESCRIBE
-DESCRIPTOR
-DIAGNOSTICS
-DISCONNECT
-DISTINCT
-DOMAIN
-DOUBLE
-DROP
-ELSE
-END
-END-EXEC
-ESCAPE
-EXCEPT
-EXCEPTION
-EXEC
-EXECUTE
-EXISTS
-EXTERNAL
-EXTRACT
-FALSE
-FETCH
-FIRST
-FLOAT
-FOR
-FOREIGN
-FORTRAN
-FOUND
-FROM
-FULL
-GET
-GLOBAL
-GO
-GOTO
-GRANT
-GROUP
-HAVING
-HOUR
-IDENTITY
-IMMEDIATE
-IN
-INCLUDE
-INDEX
-INDICATOR
-INITIALLY
-INNER
-INPUT
-INSENSITIVE
-INSERT
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-IS
-ISOLATION
-JOIN
-KEY
-LANGUAGE
-LAST
-LEADING
-LEFT
-LEVEL
-LIKE
-LOCAL
-LOWER
-MATCH
-MAX
-MIN
-MINUTE
-MODULE
-MONTH
-NAMES
-NATIONAL
-NATURAL
-NCHAR
-NEXT
-NO
-NONE
-NOT
-NULL
-NULLIF
-NUMERIC
-OCTET_LENGTH
-OF
-ON
-ONLY
-OPEN
-OPTION
-OR
-ORDER
-OUTER
-OUTPUT
-OVERLAPS
-PAD
-PARTIAL
-PASCAL
-POSITION
-PRECISION
-PREPARE
-PRESERVE
-PRIMARY
-PRIOR
-PRIVILEGES
-PROCEDURE
-PUBLIC
-READ
-REAL
-REFERENCES
-RELATIVE
-RESTRICT
-REVOKE
-RIGHT
-ROLLBACK
-ROWS
-SCHEMA
-SCROLL
-SECOND
-SECTION
-SELECT
-SESSION
-SESSION_USER
-SET
-SIZE
-SMALLINT
-SOME
-SPACE
-SQL
-SQLCA
-SQLCODE
-SQLERROR
-SQLSTATE
-SQLWARNING
-SUBSTRING
-SUM
-SYSTEM_USER
-TABLE
-TEMPORARY
-THEN
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TO
-TRAILING
-TRANSACTION
-TRANSLATE
-TRANSLATION
-TRIM
-TRUE
-UNION
-UNIQUE
-UNKNOWN
-UPDATE
-UPPER
-USAGE
-USER
-USING
-VALUE
-VALUES
-VARCHAR
-VARYING
-VIEW
-WHEN
-WHENEVER
-WHERE
-WITH
-WORK
-WRITE
-YEAR
-ZONE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/oracle.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/oracle.txt
deleted file mode 100644
index 87eeeee..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/oracle.txt
+++ /dev/null
@@ -1,283 +0,0 @@
-ACCESS
-ADD
-ADMIN
-AFTER
-ALL
-ALLOCATE
-ALTER
-ANALYZE
-AND
-ANY
-ARCHIVE
-ARCHIVELOG
-ARRAYLEN
-AS
-ASC
-AUDIT
-AUTHORIZATION
-AVG
-BACKUP
-BECOME
-BEFORE
-BEGIN
-BETWEEN
-BLOCK
-BODY
-BY
-CACHE
-CANCEL
-CASCADE
-CHANGE
-CHAR
-CHARACTER
-CHECK
-CHECKPOINT
-CLOSE
-CLUSTER
-COBOL
-COLUMN
-COMMENT
-COMMIT
-COMPILE
-COMPRESS
-CONNECT
-CONSTRAINT
-CONSTRAINTS
-CONTENTS
-CONTINUE
-CONTROLFILE
-COUNT
-CREATE
-CURRENT
-CURSOR
-CYCLE
-DATABASE
-DATAFILE
-DATE
-DBA
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DELETE
-DESC
-DISABLE
-DISMOUNT
-DISTINCT
-DOUBLE
-DROP
-DUMP
-EACH
-ELSE
-ENABLE
-END
-ESCAPE
-EVENTS
-EXCEPT
-EXCEPTIONS
-EXCLUSIVE
-EXEC
-EXECUTE
-EXISTS
-EXPLAIN
-EXTENT
-EXTERNALLY
-FETCH
-FILE
-FLOAT
-FLUSH
-FOR
-FORCE
-FOREIGN
-FORTRAN
-FOUND
-FREELIST
-FREELISTS
-FROM
-FUNCTION
-GO
-GOTO
-GRANT
-GROUP
-GROUPS
-HAVING
-IDENTIFIED
-IMMEDIATE
-IN
-INCLUDING
-INCREMENT
-INDEX
-INDICATOR
-INITIAL
-INITRANS
-INSERT
-INSTANCE
-INT
-INTEGER
-INTERSECT
-INTO
-IS
-KEY
-LANGUAGE
-LAYER
-LEVEL
-LIKE
-LINK
-LISTS
-LOCK
-LOGFILE
-LONG
-MANAGE
-MANUAL
-MAX
-MAXDATAFILES
-MAXEXTENTS
-MAXINSTANCES
-MAXLOGFILES
-MAXLOGHISTORY
-MAXLOGMEMBERS
-MAXTRANS
-MAXVALUE
-MIN
-MINEXTENTS
-MINUS
-MINVALUE
-MODE
-MODIFY
-MODULE
-MOUNT
-NEW
-NEXT
-NOARCHIVELOG
-NOAUDIT
-NOCACHE
-NOCOMPRESS
-NOCYCLE
-NOMAXVALUE
-NOMINVALUE
-NONE
-NOORDER
-NORESETLOGS
-NORMAL
-NOSORT
-NOT
-NOTFOUND
-NOWAIT
-NULL
-NUMBER
-NUMERIC
-OF
-OFF
-OFFLINE
-OLD
-ON
-ONLINE
-ONLY
-OPEN
-OPTIMAL
-OPTION
-OR
-ORDER
-OWN
-PACKAGE
-PARALLEL
-PCTFREE
-PCTINCREASE
-PCTUSED
-PLAN
-PLI
-PRECISION
-PRIMARY
-PRIOR
-PRIVATE
-PRIVILEGES
-PROCEDURE
-PROFILE
-PUBLIC
-QUOTA
-RAW
-READ
-REAL
-RECOVER
-REFERENCES
-REFERENCING
-RENAME
-RESETLOGS
-RESOURCE
-RESTRICTED
-REUSE
-REVOKE
-ROLE
-ROLES
-ROLLBACK
-ROW
-ROWID
-ROWLABEL
-ROWNUM
-ROWS
-SAVEPOINT
-SCHEMA
-SCN
-SECTION
-SEGMENT
-SELECT
-SEQUENCE
-SESSION
-SET
-SHARE
-SHARED
-SIZE
-SMALLINT
-SNAPSHOT
-SOME
-SORT
-SQL
-SQLBUF
-SQLCODE
-SQLERROR
-SQLSTATE
-START
-STATEMENT_ID
-STATISTICS
-STOP
-STORAGE
-SUCCESSFUL
-SUM
-SWITCH
-SYNONYM
-SYSDATE
-SYSTEM
-TABLE
-TABLES
-TABLESPACE
-TEMPORARY
-THEN
-THREAD
-TIME
-TO
-TRACING
-TRANSACTION
-TRIGGER
-TRIGGERS
-TRUNCATE
-UID
-UNDER
-UNION
-UNIQUE
-UNLIMITED
-UNTIL
-UPDATE
-USE
-USER
-USING
-VALIDATE
-VALUES
-VARCHAR
-VARCHAR2
-VIEW
-WHEN
-WHENEVER
-WHERE
-WITH
-WORK
-WRITE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/plsql.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/plsql.txt
deleted file mode 100644
index a8553db..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/plsql.txt
+++ /dev/null
@@ -1,186 +0,0 @@
-ABORT
-ACCEPT
-ACCESS
-ADD
-ALL
-ALTER
-AND
-ANY
-ARRAY
-ARRAYLEN
-AS
-ASC
-ASSERT
-ASSIGN
-AT
-AUTHORIZATION
-AVG
-BASE_TABLE
-BEGIN
-BETWEEN
-BINARY_INTEGER
-BODY
-BOOLEAN
-BY
-CASE
-CHAR
-CHAR_BASE
-CHECK
-CLOSE
-CLUSTER
-CLUSTERS
-COLAUTH
-COLUMNS
-COMMIT
-COMPRESS
-CONNECT
-CONSTANT
-COUNT
-CRASH
-CREATE
-CURRENT
-CURRVAL
-CURSOR
-DATA_BASE
-DATABASE
-DATE
-DBA
-DEBUGOFF
-DEBUGON
-DECIMAL
-DECLARE
-DEFAULT
-DEFINITION
-DELAY
-DELETE
-DELTA
-DESC
-DIGITS
-DISPOSE
-DISTINCT
-DO
-DROP
-ELSE
-ELSIF
-END
-ENTRY
-EXCEPTION
-EXCEPTION_INIT
-EXISTS
-EXIT
-FALSE
-FETCH
-FLOAT
-FOR
-FORM
-FROM
-FUNCTION
-GENERIC
-GOTO
-GRANT
-GROUP
-HAVING
-IDENTIFIED
-IF
-IN
-INDEX
-INDEXES
-INDICATOR
-INSERT
-INTEGER
-INTERSECT
-INTO
-IS
-LEVEL
-LIKE
-LIMITED
-LOOP
-MAX
-MIN
-MINUS
-MLSLABEL
-MOD
-MODE
-NATURAL
-NEW
-NEXTVAL
-NOCOMPRESS
-NOT
-NULL
-NUMBER
-NUMBER_BASE
-OF
-ON
-OPEN
-OPTION
-OR
-ORDER
-OTHERS
-OUT
-PACKAGE
-PARTITION
-PCTFREE
-POSITIVE
-PRAGMA
-PRIOR
-PRIVATE
-PROCEDURE
-PUBLIC
-RAISE
-RANGE
-REAL
-RECORD
-RELEASE
-REMR
-RENAME
-RESOURCE
-RETURN
-REVERSE
-REVOKE
-ROLLBACK
-ROWID
-ROWLABEL
-ROWNUM
-ROWTYPE
-RUN
-SAVEPOINT
-SCHEMA
-SELECT
-SEPARATE
-SET
-SIZE
-SMALLINT
-SPACE
-SQL
-SQLCODE
-SQLERRM
-START
-STATEMENT
-STDDEV
-SUBTYPE
-SUM
-TABAUTH
-TABLE
-TABLES
-TASK
-TERMINATE
-THEN
-TO
-TRUE
-TYPE
-UNION
-UNIQUE
-UPDATE
-USE
-VALUES
-VARCHAR
-VARCHAR2
-VARIANCE
-VIEW
-VIEWS
-WHEN
-WHERE
-WHILE
-WITH
-WORK
-XOR
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/postgres.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/postgres.txt
deleted file mode 100644
index fd571d2..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/postgres.txt
+++ /dev/null
@@ -1,334 +0,0 @@
-ABORT
-ABSOLUTE
-ACCESS
-ACTION
-ADD
-ADMIN
-AFTER
-AGGREGATE
-ALL
-ALSO
-ALTER
-ANALYSE
-ANALYZE
-AND
-ANY
-ARRAY
-AS
-ASC
-ASSERTION
-ASSIGNMENT
-ASYMMETRIC
-AT
-AUTHORIZATION
-BACKWARD
-BEFORE
-BEGIN
-BETWEEN
-BIGINT
-BINARY
-BIT
-BOOLEAN
-BOTH
-BY
-CACHE
-CALLED
-CASCADE
-CASE
-CAST
-CHAIN
-CHAR
-CHARACTER
-CHARACTERISTICS
-CHECK
-CHECKPOINT
-CLASS
-CLOSE
-CLUSTER
-COALESCE
-COLLATE
-COLUMN
-COMMENT
-COMMIT
-COMMITTED
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONVERSION
-CONVERT
-COPY
-CREATE
-CREATEDB
-CREATEROLE
-CREATEUSER
-CROSS
-CSV
-CURRENT_DATE
-CURRENT_ROLE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-CYCLE
-DATABASE
-DAY
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DEFAULTS
-DEFERRABLE
-DEFERRED
-DEFINER
-DELETE
-DELIMITER
-DELIMITERS
-DESC
-DISABLE
-DISTINCT
-DO
-DOMAIN
-DOUBLE
-DROP
-EACH
-ELSE
-ENABLE
-ENCODING
-ENCRYPTED
-END
-ESCAPE
-EXCEPT
-EXCLUDING
-EXCLUSIVE
-EXECUTE
-EXISTS
-EXPLAIN
-EXTERNAL
-EXTRACT
-FALSE
-FETCH
-FIRST
-FLOAT
-FOR
-FORCE
-FOREIGN
-FORWARD
-FREEZE
-FROM
-FULL
-FUNCTION
-GLOBAL
-GRANT
-GRANTED
-GREATEST
-GROUP
-HANDLER
-HAVING
-HEADER
-HOLD
-HOUR
-ILIKE
-IMMEDIATE
-IMMUTABLE
-IMPLICIT
-IN
-INCLUDING
-INCREMENT
-INDEX
-INHERIT
-INHERITS
-INITIALLY
-INNER
-INOUT
-INPUT
-INSENSITIVE
-INSERT
-INSTEAD
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-INVOKER
-IS
-ISNULL
-ISOLATION
-JOIN
-KEY
-LANCOMPILER
-LANGUAGE
-LARGE
-LAST
-LEADING
-LEAST
-LEFT
-LEVEL
-LIKE
-LIMIT
-LISTEN
-LOAD
-LOCAL
-LOCALTIME
-LOCALTIMESTAMP
-LOCATION
-LOCK
-LOGIN
-MATCH
-MAXVALUE
-MINUTE
-MINVALUE
-MODE
-MONTH
-MOVE
-NAMES
-NATIONAL
-NATURAL
-NCHAR
-NEW
-NEXT
-NO
-NOCREATEDB
-NOCREATEROLE
-NOCREATEUSER
-NOINHERIT
-NOLOGIN
-NONE
-NOSUPERUSER
-NOT
-NOTHING
-NOTIFY
-NOTNULL
-NOWAIT
-NULL
-NULLIF
-NUMERIC
-OBJECT
-OF
-OFF
-OFFSET
-OIDS
-OLD
-ON
-ONLY
-OPERATOR
-OPTION
-OR
-ORDER
-OUT
-OUTER
-OVERLAPS
-OVERLAY
-OWNER
-PARTIAL
-PASSWORD
-PLACING
-POSITION
-PRECISION
-PREPARE
-PREPARED
-PRESERVE
-PRIMARY
-PRIOR
-PRIVILEGES
-PROCEDURAL
-PROCEDURE
-QUOTE
-READ
-REAL
-RECHECK
-REFERENCES
-REINDEX
-RELATIVE
-RELEASE
-RENAME
-REPEATABLE
-REPLACE
-RESET
-RESTART
-RESTRICT
-RETURNS
-REVOKE
-RIGHT
-ROLE
-ROLLBACK
-ROW
-ROWS
-RULE
-SAVEPOINT
-SCHEMA
-SCROLL
-SECOND
-SECURITY
-SELECT
-SEQUENCE
-SERIALIZABLE
-SESSION
-SESSION_USER
-SET
-SETOF
-SHARE
-SHOW
-SIMILAR
-SIMPLE
-SMALLINT
-SOME
-STABLE
-START
-STATEMENT
-STATISTICS
-STDIN
-STDOUT
-STORAGE
-STRICT
-SUBSTRING
-SUPERUSER
-SYMMETRIC
-SYSID
-SYSTEM
-TABLE
-TABLESPACE
-TEMP
-TEMPLATE
-TEMPORARY
-THEN
-TIME
-TIMESTAMP
-TO
-TOAST
-TRAILING
-TRANSACTION
-TREAT
-TRIGGER
-TRIM
-TRUE
-TRUNCATE
-TRUSTED
-TYPE
-UNCOMMITTED
-UNENCRYPTED
-UNION
-UNIQUE
-UNKNOWN
-UNLISTEN
-UNTIL
-UPDATE
-USER
-USING
-VACUUM
-VALID
-VALIDATOR
-VALUES
-VARCHAR
-VARYING
-VERBOSE
-VIEW
-VOLATILE
-WHEN
-WHERE
-WITH
-WITHOUT
-WORK
-WRITE
-YEAR
-ZONE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql2003.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql2003.txt
deleted file mode 100644
index 99b5c86..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql2003.txt
+++ /dev/null
@@ -1,247 +0,0 @@
-ADD
-ALL
-ALLOCATE
-ALTER
-AND
-ANY
-ARE
-ARRAY
-AS
-ASENSITIVE
-ASYMMETRIC
-AT
-ATOMIC
-AUTHORIZATION
-BEGIN
-BETWEEN
-BIGINT
-BINARY
-BLOB
-BOOLEAN
-BOTH
-BY
-CALL
-CALLED
-CASCADED
-CASE
-CAST
-CHAR
-CHARACTER
-CHECK
-CLOB
-CLOSE
-COLLATE
-COLUMN
-COMMIT
-CONDITION
-CONNECT
-CONSTRAINT
-CONTINUE
-CORRESPONDING
-CREATE
-CROSS
-CUBE
-CURRENT
-CURRENT_DATE
-CURRENT_DEFAULT_TRANSFORM_GROUP
-CURRENT_PATH
-CURRENT_ROLE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_TRANSFORM_GROUP_FOR_TYPE
-CURRENT_USER
-CURSOR
-CYCLE
-DATE
-DAY
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DELETE
-DEREF
-DESCRIBE
-DETERMINISTIC
-DISCONNECT
-DISTINCT
-DO
-DOUBLE
-DROP
-DYNAMIC
-EACH
-ELEMENT
-ELSE
-ELSEIF
-END
-ESCAPE
-EXCEPT
-EXEC
-EXECUTE
-EXISTS
-EXIT
-EXTERNAL
-FALSE
-FETCH
-FILTER
-FLOAT
-FOR
-FOREIGN
-FREE
-FROM
-FULL
-FUNCTION
-GET
-GLOBAL
-GRANT
-GROUP
-GROUPING
-HANDLER
-HAVING
-HOLD
-HOUR
-IDENTITY
-IF
-IMMEDIATE
-IN
-INDICATOR
-INNER
-INOUT
-INPUT
-INSENSITIVE
-INSERT
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-IS
-ITERATE
-JOIN
-LANGUAGE
-LARGE
-LATERAL
-LEADING
-LEAVE
-LEFT
-LIKE
-LOCAL
-LOCALTIME
-LOCALTIMESTAMP
-LOOP
-MATCH
-MEMBER
-MERGE
-METHOD
-MINUTE
-MODIFIES
-MODULE
-MONTH
-MULTISET
-NATIONAL
-NATURAL
-NCHAR
-NCLOB
-NEW
-NO
-NONE
-NOT
-NULL
-NUMERIC
-OF
-OLD
-ON
-ONLY
-OPEN
-OR
-ORDER
-OUT
-OUTER
-OUTPUT
-OVER
-OVERLAPS
-PARAMETER
-PARTITION
-PRECISION
-PREPARE
-PRIMARY
-PROCEDURE
-RANGE
-READS
-REAL
-RECURSIVE
-REF
-REFERENCES
-REFERENCING
-RELEASE
-REPEAT
-RESIGNAL
-RESULT
-RETURN
-RETURNS
-REVOKE
-RIGHT
-ROLLBACK
-ROLLUP
-ROW
-ROWS
-SAVEPOINT
-SCOPE
-SCROLL
-SEARCH
-SECOND
-SELECT
-SENSITIVE
-SESSION_USER
-SET
-SIGNAL
-SIMILAR
-SMALLINT
-SOME
-SPECIFIC
-SPECIFICTYPE
-SQL
-SQLEXCEPTION
-SQLSTATE
-SQLWARNING
-START
-STATIC
-SUBMULTISET
-SYMMETRIC
-SYSTEM
-SYSTEM_USER
-TABLE
-TABLESAMPLE
-THEN
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TO
-TRAILING
-TRANSLATION
-TREAT
-TRIGGER
-TRUE
-UNDO
-UNION
-UNIQUE
-UNKNOWN
-UNNEST
-UNTIL
-UPDATE
-USER
-USING
-VALUE
-VALUES
-VARCHAR
-VARYING
-WHEN
-WHENEVER
-WHERE
-WHILE
-WINDOW
-WITH
-WITHIN
-WITHOUT
-YEAR
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql92.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql92.txt
deleted file mode 100644
index 8fdc14c..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql92.txt
+++ /dev/null
@@ -1,255 +0,0 @@
-ABSOLUTE
-ACTION
-ADD
-ALL
-ALLOCATE
-ALTER
-AND
-ANY
-ARE
-AS
-ASC
-ASSERTION
-AT
-AUTHORIZATION
-AVG
-BEGIN
-BETWEEN
-BIT
-BIT_LENGTH
-BOTH
-BY
-CALL
-CASCADE
-CASCADED
-CASE
-CAST
-CATALOG
-CHAR
-CHARACTER
-CHARACTER_LENGTH
-CHAR_LENGTH
-CHECK
-CLOSE
-COALESCE
-COLLATE
-COLLATION
-COLUMN
-COMMIT
-CONDITION
-CONNECT
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONTAINS
-CONTINUE
-CONVERT
-CORRESPONDING
-COUNT
-CREATE
-CROSS
-CURRENT
-CURRENT_DATE
-CURRENT_PATH
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-DATE
-DAY
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DEFERRABLE
-DEFERRED
-DELETE
-DESC
-DESCRIBE
-DESCRIPTOR
-DETERMINISTIC
-DIAGNOSTICS
-DISCONNECT
-DISTINCT
-DO
-DOMAIN
-DOUBLE
-DROP
-ELSE
-ELSEIF
-END
-ESCAPE
-EXCEPT
-EXCEPTION
-EXEC
-EXECUTE
-EXISTS
-EXIT
-EXTERNAL
-EXTRACT
-FALSE
-FETCH
-FIRST
-FLOAT
-FOR
-FOREIGN
-FOUND
-FROM
-FULL
-FUNCTION
-GET
-GLOBAL
-GO
-GOTO
-GRANT
-GROUP
-HANDLER
-HAVING
-HOUR
-IDENTITY
-IF
-IMMEDIATE
-IN
-INDICATOR
-INITIALLY
-INNER
-INOUT
-INPUT
-INSENSITIVE
-INSERT
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-IS
-ISOLATION
-JOIN
-KEY
-LANGUAGE
-LAST
-LEADING
-LEAVE
-LEFT
-LEVEL
-LIKE
-LOCAL
-LOOP
-LOWER
-MATCH
-MAX
-MIN
-MINUTE
-MODULE
-MONTH
-NAMES
-NATIONAL
-NATURAL
-NCHAR
-NEXT
-NO
-NOT
-NULL
-NULLIF
-NUMERIC
-OCTET_LENGTH
-OF
-ON
-ONLY
-OPEN
-OPTION
-OR
-ORDER
-OUT
-OUTER
-OUTPUT
-OVERLAPS
-PAD
-PARAMETER
-PARTIAL
-PATH
-POSITION
-PRECISION
-PREPARE
-PRESERVE
-PRIMARY
-PRIOR
-PRIVILEGES
-PROCEDURE
-PUBLIC
-READ
-REAL
-REFERENCES
-RELATIVE
-REPEAT
-RESIGNAL
-RESTRICT
-RETURN
-RETURNS
-REVOKE
-RIGHT
-ROLLBACK
-ROUTINE
-ROWS
-SCHEMA
-SCROLL
-SECOND
-SECTION
-SELECT
-SESSION
-SESSION_USER
-SET
-SIGNAL
-SIZE
-SMALLINT
-SOME
-SPACE
-SPECIFIC
-SQL
-SQLCODE
-SQLERROR
-SQLEXCEPTION
-SQLSTATE
-SQLWARNING
-SUBSTRING
-SUM
-SYSTEM_USER
-TABLE
-TEMPORARY
-THEN
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TO
-TRAILING
-TRANSACTION
-TRANSLATE
-TRANSLATION
-TRIM
-TRUE
-UNDO
-UNION
-UNIQUE
-UNKNOWN
-UNTIL
-UPDATE
-UPPER
-USAGE
-USER
-USING
-VALUE
-VALUES
-VARCHAR
-VARYING
-VIEW
-WHEN
-WHENEVER
-WHERE
-WHILE
-WITH
-WORK
-WRITE
-YEAR
-ZONE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql99.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql99.txt
deleted file mode 100644
index 762fc99..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sql99.txt
+++ /dev/null
@@ -1,308 +0,0 @@
-ABSOLUTE
-ACTION
-ADD
-AFTER
-ALL
-ALLOCATE
-ALTER
-AND
-ANY
-ARE
-ARRAY
-AS
-ASC
-ASENSITIVE
-ASSERTION
-ASYMMETRIC
-AT
-ATOMIC
-AUTHORIZATION
-BEFORE
-BEGIN
-BETWEEN
-BINARY
-BIT
-BLOB
-BOOLEAN
-BOTH
-BREADTH
-BY
-CALL
-CALLED
-CASCADE
-CASCADED
-CASE
-CAST
-CATALOG
-CHAR
-CHARACTER
-CHECK
-CLOB
-CLOSE
-COLLATE
-COLLATION
-COLUMN
-COMMIT
-CONDITION
-CONNECT
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONSTRUCTOR
-CONTINUE
-CORRESPONDING
-CREATE
-CROSS
-CUBE
-CURRENT
-CURRENT_DATE
-CURRENT_DEFAULT_TRANSFORM_GROUP
-CURRENT_PATH
-CURRENT_ROLE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_TRANSFORM_GROUP_FOR_TYPE
-CURRENT_USER
-CURSOR
-CYCLE
-DATA
-DATE
-DAY
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DEFERRABLE
-DEFERRED
-DELETE
-DEPTH
-DEREF
-DESC
-DESCRIBE
-DESCRIPTOR
-DETERMINISTIC
-DIAGNOSTICS
-DISCONNECT
-DISTINCT
-DO
-DOMAIN
-DOUBLE
-DROP
-DYNAMIC
-EACH
-ELSE
-ELSEIF
-END
-EQUALS
-ESCAPE
-EXCEPT
-EXCEPTION
-EXEC
-EXECUTE
-EXISTS
-EXIT
-EXTERNAL
-FALSE
-FETCH
-FILTER
-FIRST
-FLOAT
-FOR
-FOREIGN
-FOUND
-FREE
-FROM
-FULL
-FUNCTION
-GENERAL
-GET
-GLOBAL
-GO
-GOTO
-GRANT
-GROUP
-GROUPING
-HANDLER
-HAVING
-HOLD
-HOUR
-IDENTITY
-IF
-IMMEDIATE
-IN
-INDICATOR
-INITIALLY
-INNER
-INOUT
-INPUT
-INSENSITIVE
-INSERT
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-IS
-ISOLATION
-ITERATE
-JOIN
-KEY
-LANGUAGE
-LARGE
-LAST
-LATERAL
-LEADING
-LEAVE
-LEFT
-LEVEL
-LIKE
-LOCAL
-LOCALTIME
-LOCALTIMESTAMP
-LOCATOR
-LOOP
-MAP
-MATCH
-METHOD
-MINUTE
-MODIFIES
-MODULE
-MONTH
-NAMES
-NATIONAL
-NATURAL
-NCHAR
-NCLOB
-NEW
-NEXT
-NO
-NONE
-NOT
-NULL
-NUMERIC
-OBJECT
-OF
-OLD
-ON
-ONLY
-OPEN
-OPTION
-OR
-ORDER
-ORDINALITY
-OUT
-OUTER
-OUTPUT
-OVER
-OVERLAPS
-PAD
-PARAMETER
-PARTIAL
-PARTITION
-PATH
-PRECISION
-PREPARE
-PRESERVE
-PRIMARY
-PRIOR
-PRIVILEGES
-PROCEDURE
-PUBLIC
-RANGE
-READ
-READS
-REAL
-RECURSIVE
-REF
-REFERENCES
-REFERENCING
-RELATIVE
-RELEASE
-REPEAT
-RESIGNAL
-RESTRICT
-RESULT
-RETURN
-RETURNS
-REVOKE
-RIGHT
-ROLE
-ROLLBACK
-ROLLUP
-ROUTINE
-ROW
-ROWS
-SAVEPOINT
-SCHEMA
-SCOPE
-SCROLL
-SEARCH
-SECOND
-SECTION
-SELECT
-SENSITIVE
-SESSION
-SESSION_USER
-SET
-SETS
-SIGNAL
-SIMILAR
-SIZE
-SMALLINT
-SOME
-SPACE
-SPECIFIC
-SPECIFICTYPE
-SQL
-SQLEXCEPTION
-SQLSTATE
-SQLWARNING
-START
-STATE
-STATIC
-SYMMETRIC
-SYSTEM
-SYSTEM_USER
-TABLE
-TEMPORARY
-THEN
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TO
-TRAILING
-TRANSACTION
-TRANSLATION
-TREAT
-TRIGGER
-TRUE
-UNDER
-UNDO
-UNION
-UNIQUE
-UNKNOWN
-UNNEST
-UNTIL
-UPDATE
-USAGE
-USER
-USING
-VALUE
-VALUES
-VARCHAR
-VARYING
-VIEW
-WHEN
-WHENEVER
-WHERE
-WHILE
-WINDOW
-WITH
-WITHIN
-WITHOUT
-WORK
-WRITE
-YEAR
-ZONE
diff --git a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sqlserver.txt b/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sqlserver.txt
deleted file mode 100644
index c725fa1..0000000
--- a/modello-db-keywords/src/main/resources/org/apache/archiva/redback/components/modello/db/sqlserver.txt
+++ /dev/null
@@ -1,368 +0,0 @@
-ABSOLUTE
-ACTION
-ADD
-ADMIN
-AFTER
-AGGREGATE
-ALIAS
-ALL
-ALLOCATE
-ALTER
-AND
-ANY
-ARE
-ARRAY
-AS
-ASC
-ASSERTION
-AT
-AUTHORIZATION
-BACKUP
-BEFORE
-BEGIN
-BETWEEN
-BINARY
-BIT
-BLOB
-BOOLEAN
-BOTH
-BREADTH
-BREAK
-BROWSE
-BULK
-BY
-CALL
-CASCADE
-CASCADED
-CASE
-CAST
-CATALOG
-CHAR
-CHARACTER
-CHECK
-CHECKPOINT
-CLASS
-CLOB
-CLOSE
-CLUSTERED
-COALESCE
-COLLATE
-COLLATION
-COLUMN
-COMMIT
-COMPLETION
-COMPUTE
-CONNECT
-CONNECTION
-CONSTRAINT
-CONSTRAINTS
-CONSTRUCTOR
-CONTAINS
-CONTAINSTABLE
-CONTINUE
-CONVERT
-CORRESPONDING
-CREATE
-CROSS
-CUBE
-CURRENT
-CURRENT_DATE
-CURRENT_PATH
-CURRENT_ROLE
-CURRENT_TIME
-CURRENT_TIMESTAMP
-CURRENT_USER
-CURSOR
-CYCLE
-DATA
-DATABASE
-DATE
-DAY
-DBCC
-DEALLOCATE
-DEC
-DECIMAL
-DECLARE
-DEFAULT
-DEFERRABLE
-DEFERRED
-DELETE
-DENY
-DEPTH
-DEREF
-DESC
-DESCRIBE
-DESCRIPTOR
-DESTROY
-DESTRUCTOR
-DETERMINISTIC
-DIAGNOSTICS
-DICTIONARY
-DISCONNECT
-DISK
-DISTINCT
-DISTRIBUTED
-DOMAIN
-DOUBLE
-DROP
-DUMMY
-DUMP
-DYNAMIC
-EACH
-ELSE
-END
-END-EXEC
-EQUALS
-ERRLVL
-ESCAPE
-EVERY
-EXCEPT
-EXCEPTION
-EXEC
-EXECUTE
-EXISTS
-EXIT
-EXTERNAL
-FALSE
-FETCH
-FILE
-FILLFACTOR
-FIRST
-FLOAT
-FOR
-FOREIGN
-FOUND
-FREE
-FREETEXT
-FREETEXTTABLE
-FROM
-FULL
-FUNCTION
-GENERAL
-GET
-GLOBAL
-GO
-GOTO
-GRANT
-GROUP
-GROUPING
-HAVING
-HOLDLOCK
-HOST
-HOUR
-IDENTITY
-IDENTITYCOL
-IDENTITY_INSERT
-IF
-IGNORE
-IMMEDIATE
-IN
-INDEX
-INDICATOR
-INITIALIZE
-INITIALLY
-INNER
-INOUT
-INPUT
-INSERT
-INT
-INTEGER
-INTERSECT
-INTERVAL
-INTO
-IS
-ISOLATION
-ITERATE
-JOIN
-KEY
-KILL
-LANGUAGE
-LARGE
-LAST
-LATERAL
-LEADING
-LEFT
-LESS
-LEVEL
-LIKE
-LIMIT
-LINENO
-LOAD
-LOCAL
-LOCALTIME
-LOCALTIMESTAMP
-LOCATOR
-MAP
-MATCH
-MINUTE
-MODIFIES
-MODIFY
-MODULE
-MONTH
-NAMES
-NATIONAL
-NATURAL
-NCHAR
-NCLOB
-NEW
-NEXT
-NO
-NOCHECK
-NONCLUSTERED
-NONE
-NOT
-NULL
-NULLIF
-NUMERIC
-OBJECT
-OF
-OFF
-OFFSETS
-OLD
-ON
-ONLY
-OPEN
-OPENDATASOURCE
-OPENQUERY
-OPENROWSET
-OPENXML
-OPERATION
-OPTION
-OR
-ORDER
-ORDINALITY
-OUT
-OUTER
-OUTPUT
-OVER
-PAD
-PARAMETER
-PARAMETERS
-PARTIAL
-PATH
-PERCENT
-PLAN
-POSTFIX
-PRECISION
-PREFIX
-PREORDER
-PREPARE
-PRESERVE
-PRIMARY
-PRINT
-PRIOR
-PRIVILEGES
-PROC
-PROCEDURE
-PUBLIC
-RAISERROR
-READ
-READS
-READTEXT
-REAL
-RECONFIGURE
-RECURSIVE
-REF
-REFERENCES
-REFERENCING
-RELATIVE
-REPLICATION
-RESTORE
-RESTRICT
-RESULT
-RETURN
-RETURNS
-REVOKE
-RIGHT
-ROLE
-ROLLBACK
-ROLLUP
-ROUTINE
-ROW
-ROWCOUNT
-ROWGUIDCOL
-ROWS
-RULE
-SAVE
-SAVEPOINT
-SCHEMA
-SCOPE
-SCROLL
-SEARCH
-SECOND
-SECTION
-SELECT
-SEQUENCE
-SESSION
-SESSION_USER
-SET
-SETS
-SETUSER
-SHUTDOWN
-SIZE
-SMALLINT
-SOME
-SPACE
-SPECIFIC
-SPECIFICTYPE
-SQL
-SQLEXCEPTION
-SQLSTATE
-SQLWARNING
-START
-STATE
-STATEMENT
-STATIC
-STATISTICS
-STRUCTURE
-SYSTEM_USER
-TABLE
-TEMPORARY
-TERMINATE
-TEXTSIZE
-THAN
-THEN
-TIME
-TIMESTAMP
-TIMEZONE_HOUR
-TIMEZONE_MINUTE
-TO
-TOP
-TRAILING
-TRAN
-TRANSACTION
-TRANSLATION
-TREAT
-TRIGGER
-TRUE
-TRUNCATE
-TSEQUAL
-UNDER
-UNION
-UNIQUE
-UNKNOWN
-UNNEST
-UPDATE
-UPDATETEXT
-USAGE
-USE
-USER
-USING
-VALUE
-VALUES
-VARCHAR
-VARIABLE
-VARYING
-VIEW
-WAITFOR
-WHEN
-WHENEVER
-WHERE
-WHILE
-WITH
-WITHOUT
-WORK
-WRITE
-WRITETEXT
-YEAR
-ZONE
diff --git a/modello-db-keywords/src/site/site.xml b/modello-db-keywords/src/site/site.xml
deleted file mode 100644
index d945a8f..0000000
--- a/modello-db-keywords/src/site/site.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project>
- <bannerLeft>
- <name>Modello</name>
- </bannerLeft>
-
- <body>
-
- <menu ref="parent" />
-
- </body>
-
-</project>
diff --git a/modello-db-keywords/src/test/java/org/codehaus/modello/db/SQLReservedWordsTest.java b/modello-db-keywords/src/test/java/org/codehaus/modello/db/SQLReservedWordsTest.java
deleted file mode 100644
index 1e25421..0000000
--- a/modello-db-keywords/src/test/java/org/codehaus/modello/db/SQLReservedWordsTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.codehaus.modello.db;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.components.modello.db.SQLReservedWords;
-import org.codehaus.plexus.PlexusTestCase;
-
-import java.util.List;
-
-/**
- * SQLReservedWordsTest
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id: SQLReservedWordsTest.java 818 2007-03-12 17:14:57Z joakime $
- */
-public class SQLReservedWordsTest extends PlexusTestCase
-{
- private SQLReservedWords keywords;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- keywords = (SQLReservedWords) lookup( SQLReservedWords.class.getName(), "default" );
- }
-
- protected void tearDown() throws Exception
- {
- // No real point in doing this, as the object is essentially read-only.
- release( keywords );
- super.tearDown();
- }
-
- public void testTrueKeywords()
- {
- assertNotNull( keywords );
-
- // Normal Usage
- assertTrue( keywords.isKeyword( "SELECT" ) );
- assertTrue( keywords.isKeyword( "INSERT" ) );
- assertTrue( keywords.isKeyword( "TIMEZONE_HOUR" ) );
- assertTrue( keywords.isKeyword( "IF" ) );
- assertTrue( keywords.isKeyword( "IN" ) );
-
- // Bad formatted, but otherwise good keywords.
- assertTrue( keywords.isKeyword( "SQLEXCEPTION " ) );
- assertTrue( keywords.isKeyword( "LOOP\t" ) );
- assertTrue( keywords.isKeyword( "\n\nEXISTS" ) );
- assertTrue( keywords.isKeyword( " into " ) );
- assertTrue( keywords.isKeyword( "Match " ) );
- }
-
- public void testNotKeywords()
- {
- assertNotNull( keywords );
-
- assertFalse( keywords.isKeyword( "MAVEN" ) );
- assertFalse( keywords.isKeyword( "REPOSITORY" ) );
- assertFalse( keywords.isKeyword( "Artifact" ) );
- assertFalse( keywords.isKeyword( null ) );
- assertFalse( keywords.isKeyword( "" ) );
- assertFalse( keywords.isKeyword( " " ) );
- assertFalse( keywords.isKeyword( "filename" ) );
- assertFalse( keywords.isKeyword( "pathTo" ) );
- assertFalse( keywords.isKeyword( "modello" ) );
- assertFalse( keywords.isKeyword( "versions" ) );
- }
-
- public void testKeywordSourceList()
- {
- List sources;
-
- sources = keywords.getKeywordSourceList( "MAVEN" );
- assertNull( "Should be null.", sources );
-
- sources = keywords.getKeywordSourceList( "IF" );
- assertNotNull( "Should not be null.", sources );
- assertTrue( sources.size() > 5 );
- }
-
- public void testKeywordSourceString()
- {
- String actual = keywords.getKeywordSourceString( "MAVEN" );
- assertNull( "Should be null.", actual );
-
- actual = keywords.getKeywordSourceString( "ADD" );
- assertEquals( "SQL 92, SQL 99, SQL 2003, JDBC, Derby Server, HSQLDB, MySQL, PostgreSQL, Oracle, PL/SQL, " +
- "Microsoft SQL Server, Microsoft Access, IBM DB/2, ODBC", actual );
-
- actual = keywords.getKeywordSourceString( "MULTISET" );
- assertEquals( "SQL 2003, HSQLDB", actual );
- }
-}
diff --git a/modello-plugin-jpox/pom.xml b/modello-plugin-jpox/pom.xml
deleted file mode 100644
index eb5ca24..0000000
--- a/modello-plugin-jpox/pom.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugins</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>modello-plugin-jpox</artifactId>
- <name>Modello JPox Plugin</name>
- <packaging>jar</packaging>
-
- <properties>
- <site.staging.base>${project.parent.basedir}/../site</site.staging.base>
- </properties>
-
- <url>${webUrl}/modello-plugins/${project.artifactId}</url>
-
- <scm>
- <url>${scmBrowseUrl};f=${project.artifactId}</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugin-store</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-db-keywords</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-plugin-java</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.10.1.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>jpox</groupId>
- <artifactId>jpox-enhancer</artifactId>
- <version>1.1.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>jpox</groupId>
- <artifactId>jpox</artifactId>
- <version>1.1.1</version>
- <scope>test</scope>
- <exclusions>
- <!-- mkleint: seems not to be required and is hard to come by the binary -->
- <exclusion>
- <artifactId>jdbc-stdext</artifactId>
- <groupId>javax.sql</groupId>
- </exclusion>
- <exclusion>
- <groupId>javax.resource</groupId>
- <artifactId>connector</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>1.0-FCS</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>saxpath</groupId>
- <artifactId>saxpath</artifactId>
- <version>1.0-FCS</version>
- </dependency>
- <dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo2-api</artifactId>
- <version>2.3-20090302111651</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <excludes combine.children="append">
- <exclude>src/test/resources/*.dtd</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>copy-test-libs</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/test-libs</outputDirectory>
- <excludeTransitive>true</excludeTransitive>
- <stripVersion>true</stripVersion>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- </build>
-
-</project>
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGenerator.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGenerator.java
deleted file mode 100644
index 1a68e2d..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGenerator.java
+++ /dev/null
@@ -1,1336 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.components.modello.db.SQLReservedWords;
-import org.apache.archiva.redback.components.modello.db.SQLReservedWords.KeywordSource;
-import org.apache.archiva.redback.components.modello.jpox.metadata.JPoxAssociationMetadata;
-import org.apache.archiva.redback.components.modello.jpox.metadata.JPoxClassMetadata;
-import org.apache.archiva.redback.components.modello.jpox.metadata.JPoxFieldMetadata;
-import org.apache.archiva.redback.components.modello.jpox.metadata.JPoxModelMetadata;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreAssociationMetadata;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreFieldMetadata;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelAssociation;
-import org.codehaus.modello.model.ModelClass;
-import org.codehaus.modello.model.ModelField;
-import org.codehaus.modello.plugin.AbstractModelloGenerator;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxJdoMappingModelloGenerator.java 829 2007-03-22 14:32:42Z joakime $
- * @plexus.component role="org.codehaus.modello.plugin.ModelloGenerator"
- * role-hint="jpox-jdo-mapping"
- */
-public class JPoxJdoMappingModelloGenerator
- extends AbstractModelloGenerator
-{
- private static final char EOL = '\n';
-
- private static final String ERROR_LINE = "----------------------------------------------------------------";
-
- private final static Map<String, String> PRIMITIVE_IDENTITY_MAP;
-
- private final static List<String> IDENTITY_TYPES;
-
- private final static List<String> VALUE_STRATEGY_LIST;
-
- /**
- * @plexus.requirement
- */
- private SQLReservedWords sqlReservedWords;
-
- private String valueStrategyOverride;
-
- private String objectIdClassOverride;
-
- static
- {
- PRIMITIVE_IDENTITY_MAP = new HashMap<>();
-
- // TODO: These should be the fully qualified class names
- PRIMITIVE_IDENTITY_MAP.put( "short", "javax.jdo.identity.ShortIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "Short", "javax.jdo.identity.ShortIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "int", "javax.jdo.identity.IntIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "Integer", "javax.jdo.identity.IntIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "long", "javax.jdo.identity.LongIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "Long", "javax.jdo.identity.LongIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "String", "javax.jdo.identity.StringIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "char", "javax.jdo.identity.CharIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "Character", "javax.jdo.identity.CharIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "byte", "javax.jdo.identity.ByteIdentity" );
- PRIMITIVE_IDENTITY_MAP.put( "Byte", "javax.jdo.identity.ByteIdentity" );
-
- IDENTITY_TYPES = new ArrayList<>();
- IDENTITY_TYPES.add( "application" );
- IDENTITY_TYPES.add( "datastore" );
- IDENTITY_TYPES.add( "nondurable" );
-
- VALUE_STRATEGY_LIST = new ArrayList<>();
- //VALUE_STRATEGY_LIST.add( "off" ); -- this isn't really valid. It turns it on. We use it internally to set an explicit null
- VALUE_STRATEGY_LIST.add( "native" );
- VALUE_STRATEGY_LIST.add( "sequence" );
- VALUE_STRATEGY_LIST.add( "identity" );
- VALUE_STRATEGY_LIST.add( "increment" );
- VALUE_STRATEGY_LIST.add( "uuid-string" );
- VALUE_STRATEGY_LIST.add( "uuid-hex" );
- VALUE_STRATEGY_LIST.add( "datastore-uuid-hex" );
- VALUE_STRATEGY_LIST.add( "max" );
- VALUE_STRATEGY_LIST.add( "auid" );
- }
-
- protected void initialize( Model model, Properties parameters )
- throws ModelloException
- {
- super.initialize( model, parameters );
-
- valueStrategyOverride = parameters.getProperty( "JPOX.override.value-strategy" );
- objectIdClassOverride = parameters.getProperty( "JPOX.override.objectid-class" );
- }
-
- public void generate( Model model, Properties properties )
- throws ModelloException
- {
- initialize( model, properties );
-
- // ----------------------------------------------------------------------
- // Generate the JDO files
- // ----------------------------------------------------------------------
-
- try
- {
- String fileName = properties.getProperty( ModelloParameterConstants.FILENAME, "package.jdo" );
-
- JPoxModelMetadata metadata = (JPoxModelMetadata) model.getMetadata( JPoxModelMetadata.ID );
- File packageJdo = null;
-
- if ( metadata.isMappingInPackage() )
- {
- // Use package name.
- String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );
- String dir = StringUtils.replace( packageName, '.', '/' );
- File directory = new File( getOutputDirectory(), dir );
- packageJdo = new File( directory, fileName );
- }
- else
- {
- // Use the specified location.
- File directory = getOutputDirectory();
- packageJdo = new File( directory, fileName );
- }
-
- File parent = packageJdo.getParentFile();
-
- if ( !parent.exists() )
- {
- if ( !parent.mkdirs() )
- {
- throw new ModelloException(
- "Error while creating parent directories for the file " + "'" + packageJdo.getAbsolutePath()
- + "'."
- );
- }
- }
-
- generatePackageJdo( packageJdo, model );
- }
- catch ( IOException e )
- {
- throw new ModelloException( "Error while writing package.jdo.", e );
- }
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- private void generatePackageJdo( File file, Model model )
- throws IOException, ModelloException
- {
- try (FileOutputStream fileOutputStream = new FileOutputStream( file ))
- {
- try (OutputStreamWriter fileWriter = new OutputStreamWriter( fileOutputStream, "UTF-8" ))
- {
-
- try (PrintWriter printWriter = new PrintWriter( fileWriter ))
- {
-
- XMLWriter writer = new PrettyPrintXMLWriter( printWriter );
-
- Map<String, List<ModelClass>> classes = new HashMap<>();
-
- for ( Iterator<ModelClass> it = model.getClasses( getGeneratedVersion() ).iterator();
- it.hasNext(); )
- {
- ModelClass modelClass = it.next();
-
- JPoxClassMetadata jpoxMetadata =
- JPoxClassMetadata.class.cast( modelClass.getMetadata( JPoxClassMetadata.ID ) );
-
- if ( !jpoxMetadata.isEnabled() )
- {
- // Skip generation of those classes that are not enabled for the jpox plugin.
- continue;
- }
-
- String packageName = modelClass.getPackageName( isPackageWithVersion(), getGeneratedVersion() );
-
- List<ModelClass> list = classes.get( packageName );
-
- if ( list == null )
- {
- list = new ArrayList<>();
- }
-
- list.add( modelClass );
-
- classes.put( packageName, list );
- }
-
- printWriter.println( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" );
- printWriter.println();
- printWriter.println( "<!DOCTYPE jdo PUBLIC" );
- printWriter.println( " \"-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN\"" );
- printWriter.println( " \"http://java.sun.com/dtd/jdo_2_0.dtd\">" );
- printWriter.println();
-
- writer.startElement( "jdo" );
-
- for ( Map.Entry<String, List<ModelClass>> entry : classes.entrySet() )
- {
-
- List<ModelClass> list = entry.getValue();
-
- if ( list.size() == 0 )
- {
- continue;
- }
-
- String packageName = entry.getKey();
-
- writer.startElement( "package" );
-
- writer.addAttribute( "name", packageName );
-
- for ( ModelClass modelClass : list )
- {
- writeClass( writer, modelClass );
- }
-
- if ( packageName.equals(
- model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() ) ) )
- {
- writeModelloMetadataClass( writer );
- }
-
- writer.endElement(); // package
- }
-
- writer.endElement(); // jdo
-
- printWriter.println();
-
- }
- }
- }
- }
-
- private void writeClass( XMLWriter writer, ModelClass modelClass )
- throws ModelloException
- {
- JPoxClassMetadata jpoxMetadata = (JPoxClassMetadata) modelClass.getMetadata( JPoxClassMetadata.ID );
-
- if ( !jpoxMetadata.isEnabled() )
- {
- // Skip generation of those classes that are not enabled for the jpox plugin.
- return;
- }
-
- writer.startElement( "class" );
-
- writer.addAttribute( "name", modelClass.getName() );
-
- ModelClass persistenceCapableSuperclass = null;
-
- if ( modelClass.hasSuperClass() && modelClass.isInternalSuperClass() )
- {
- persistenceCapableSuperclass = getModel().getClass( modelClass.getSuperClass(), getGeneratedVersion() );
- }
-
- if ( persistenceCapableSuperclass != null )
- {
- String superPackageName =
- persistenceCapableSuperclass.getPackageName( isPackageWithVersion(), getGeneratedVersion() );
-
- writer.addAttribute( "persistence-capable-superclass",
- superPackageName + "." + persistenceCapableSuperclass.getName() );
- }
-
- writer.addAttribute( "detachable", String.valueOf( jpoxMetadata.isDetachable() ) );
-
- writer.addAttribute( "table", getTableName( modelClass, jpoxMetadata ) );
-
- // ----------------------------------------------------------------------
- // If this class has a primary key field mark make jpox manage the id
- // as a autoincrement variable
- // ----------------------------------------------------------------------
-
- List fields = Collections.unmodifiableList( modelClass.getFields( getGeneratedVersion() ) );
-
- // TODO: for now, assume that any primary key will be set in the super class
- // While it should be possible to have abstract super classes and have the
- // key defined in the sub class this is not implemented yet.
-
- boolean needInheritance = false;
-
- if ( persistenceCapableSuperclass == null )
- {
- if ( StringUtils.isNotEmpty( jpoxMetadata.getIdentityType() ) )
- {
- String identityType = jpoxMetadata.getIdentityType();
- if ( !IDENTITY_TYPES.contains( identityType ) )
- {
- throw new ModelloException(
- "The JDO mapping generator does not support the specified " + "class identity type '"
- + identityType + "'. " + "Supported types: " + IDENTITY_TYPES
- );
- }
- writer.addAttribute( "identity-type", identityType );
- }
- else if ( isInstantionApplicationType( modelClass ) )
- {
- writer.addAttribute( "identity-type", "application" );
- }
- }
- else
- {
- needInheritance = true;
- }
-
- if ( objectIdClassOverride != null )
- {
- if ( StringUtils.isNotEmpty( objectIdClassOverride ) )
- {
- writer.addAttribute( "objectid-class", jpoxMetadata.getIdentityClass() );
- }
- }
- else if ( StringUtils.isNotEmpty( jpoxMetadata.getIdentityClass() ) )
- {
- // Use user provided objectId class.
- writer.addAttribute( "objectid-class", jpoxMetadata.getIdentityClass() );
- }
- else
- {
- // Calculate the objectId class.
-
- List primaryKeys = getPrimaryKeyFields( modelClass );
-
- // TODO: write generation support for multi-primary-key support.
- // would likely need to write a java class that can supply an ObjectIdentity
- // to the jpox/jdo implementation.
- if ( primaryKeys.size() > 1 )
- {
- throw new ModelloException(
- "The JDO mapping generator does not yet support Object Identifier generation " + "for the "
- + primaryKeys.size() + " fields specified as <identifier> or "
- + "with jpox.primary-key=\"true\""
- );
- }
-
- if ( primaryKeys.size() == 1 )
- {
- ModelField modelField = (ModelField) primaryKeys.get( 0 );
- String objectIdClass = (String) PRIMITIVE_IDENTITY_MAP.get( modelField.getType() );
-
- if ( StringUtils.isNotEmpty( objectIdClass ) )
- {
- writer.addAttribute( "objectid-class", objectIdClass );
- }
- }
- }
-
- if ( needInheritance )
- {
- writer.startElement( "inheritance" );
-
- // TODO: The table strategy should be customizable
- // http://www.jpox.org/docs/1_1/inheritance.html - in particular
- // the strategy="subclass-table" and strategy="new-table" parts
-
- writer.addAttribute( "strategy", "new-table" );
-
- writer.endElement();
- }
-
- // ----------------------------------------------------------------------
- // Write all fields
- // ----------------------------------------------------------------------
-
- for ( Iterator it = fields.iterator(); it.hasNext(); )
- {
- ModelField modelField = (ModelField) it.next();
-
- writeModelField( writer, modelField );
- }
-
- // Write ignored fields.
- List ignoredFields = jpoxMetadata.getNotPersisted();
- if ( ignoredFields != null )
- {
- Iterator it = ignoredFields.iterator();
- while ( it.hasNext() )
- {
- String fieldName = (String) it.next();
- writer.startElement( "field" );
- writer.addAttribute( "name", fieldName );
- writer.addAttribute( "persistence-modifier", "none" );
- writer.endElement();
- }
- }
-
- // ----------------------------------------------------------------------
- // Write out the "detailed" fetch group. This group will by default
- // contain all fields in a object. The default fetch group will contain
- // all the primitives in a class as by JDO defaults.
- // ----------------------------------------------------------------------
-
- List detailedFields = new ArrayList();
-
- for ( Iterator it = fields.iterator(); it.hasNext(); )
- {
- ModelField field = (ModelField) it.next();
-
- if ( field.isPrimitive() )
- {
- continue;
- }
-
- if ( field instanceof ModelAssociation )
- {
- StoreAssociationMetadata storeMetadata = getAssociationMetadata( (ModelAssociation) field );
-
- if ( storeMetadata.isPart() != null && storeMetadata.isPart().booleanValue() )
- {
- continue;
- }
- }
-
- detailedFields.add( field );
- }
-
- // ----------------------------------------------------------------------
- // Write all fetch groups
- // ----------------------------------------------------------------------
-
- // Write defaut detail fetch group
- writeFetchGroup( writer, modelClass.getName() + "_detail", detailedFields, true );
-
- // Write user fetch groups
- Map fetchsMap = new HashMap();
-
- for ( Iterator it = fields.iterator(); it.hasNext(); )
- {
- ModelField field = (ModelField) it.next();
-
- JPoxFieldMetadata jpoxFieldMetadata = (JPoxFieldMetadata) field.getMetadata( JPoxFieldMetadata.ID );
-
- List names = jpoxFieldMetadata.getFetchGroupNames();
-
- if ( names != null )
- {
- for ( Iterator i = names.iterator(); i.hasNext(); )
- {
- String fetchGroupName = (String) i.next();
-
- List fetchList;
-
- if ( fetchsMap.get( fetchGroupName ) == null )
- {
- fetchList = new ArrayList();
- }
- else
- {
- fetchList = (List) fetchsMap.get( fetchGroupName );
- }
-
- fetchList.add( field );
-
- fetchsMap.put( fetchGroupName, fetchList );
- }
- }
- }
-
- for ( Iterator it = fetchsMap.keySet().iterator(); it.hasNext(); )
- {
- String fetchName = (String) it.next();
-
- writeFetchGroup( writer, fetchName, (List) fetchsMap.get( fetchName ), false );
- }
-
- writer.endElement(); // class
- }
-
- /**
- * Utility method to obtain the table name from the {@link ModelClass} or {@link JPoxClassMetadata} taking into
- * account the possibility of prefixes in use at the {@link JPoxModelMetadata} level.
- *
- * @param modelClass the model class to get the class.name from.
- * @param classMetadata the class metadata to get the class-metadata.table name from.
- * @return the table name (with possible prefix applied)
- * @throws ModelloException if there was a problem with the table name violating a sql reserved word.
- */
- private String getTableName( ModelClass modelClass, JPoxClassMetadata classMetadata )
- throws ModelloException
- {
- JPoxModelMetadata modelMetadata = (JPoxModelMetadata) modelClass.getModel().getMetadata( JPoxModelMetadata.ID );
-
- boolean hasPrefix = StringUtils.isNotEmpty( modelMetadata.getTablePrefix() );
- boolean hasAlternateName = StringUtils.isNotEmpty( classMetadata.getTable() );
-
- String prefix = "";
-
- if ( hasPrefix )
- {
- prefix = modelMetadata.getTablePrefix().trim();
- }
-
- String tableName = null;
-
- if ( hasAlternateName )
- {
- tableName = prefix + classMetadata.getTable();
- }
- else
- {
- tableName = prefix + modelClass.getName();
- }
-
- if ( sqlReservedWords.isKeyword( tableName ) )
- {
- StringBuffer emsg = new StringBuffer();
-
- /* ----------------------------------------------------------------
- * SQL Reserved Word Violation: 'ROLES'
- * Context: TABLE NAME
- */
- emsg.append( EOL ).append( ERROR_LINE ).append( EOL );
- emsg.append( " SQL Reserved Word Violation: " ).append( tableName ).append( EOL );
- emsg.append( " Context: TABLE NAME" ).append( EOL );
- emsg.append( " " ).append( EOL );
-
- /* In Model:
- * <model jpox.table-prefix="">
- * <class jpox.table="">
- * <name>JdoRole</name>
- * </class>
- * </model>
- */
- emsg.append( " In Model:" ).append( EOL );
- emsg.append( " <model" );
- if ( hasPrefix )
- {
- emsg.append( " jpox.table-prefix=\"" ).append( modelMetadata.getTablePrefix() ).append( "\"" );
- }
- emsg.append( ">" ).append( EOL );
- emsg.append( " <class" );
- if ( hasAlternateName )
- {
- emsg.append( " jpox.table=\"" ).append( classMetadata.getTable() ).append( "\"" );
- }
- emsg.append( ">" ).append( EOL );
- emsg.append( " <name>" ).append( modelClass.getName() ).append( "</name>" ).append( EOL );
- emsg.append( " </class>" ).append( EOL );
- emsg.append( " </model>" ).append( EOL );
- emsg.append( " " ).append( EOL );
-
- /* Violation Source(s): Oracle (WARNING)
- * SQL 99 (ERROR)
- *
- * Severity: ERROR - You must change this name for maximum
- * compatibility amoungst JDBC SQL Servers.
- *
- * Severity: WARNING - You are encouraged to change this name
- * for maximum compatibility amoungst JDBC SQL Servers.
- */
- boolean hasError = appendKeywordSourceViolations( tableName, emsg );
-
- /* Suggestions: 1) Use a different prefix in
- * <model jpox.table-prefix="DIFFERENT_">
- * 2) Use a different alternate table name using
- * <class jpox.table="DIFFERENT">
- * 3) Use a different class name in
- * <class>
- * <name>DIFFERENT</name>
- * </class>
- * ----------------------------------------------------------------
- */
- emsg.append( " Suggestions: 1) Use a different prefix in" ).append( EOL );
- emsg.append( " <model jpox.table-prefix=\"DIFFERENT_\">" ).append( EOL );
- emsg.append( " 2) Use a different alternate table name using" ).append( EOL );
- emsg.append( " <class jpox.table=\"DIFFERENT\">" ).append( EOL );
- emsg.append( " 3) Use a different class name in" ).append( EOL );
- emsg.append( " <class>" ).append( EOL );
- emsg.append( " <name>DIFFERENT</name>" ).append( EOL );
- emsg.append( " </class>" ).append( EOL );
-
- emsg.append( ERROR_LINE );
-
- // Determine possible exception.
- if ( hasError || modelMetadata.getReservedWordStrictness().equals( JPoxModelMetadata.WARNING ) )
- {
- throw new ModelloException( emsg.toString() );
- }
-
- // No exception. use it. But log it.
- getLogger().warn( emsg.toString() );
- }
-
- return tableName;
- }
-
- /**
- * Support method for the {@link #getTableName(ModelClass, JPoxClassMetadata)},
- * {@link #getColumnName(ModelField, JPoxFieldMetadata)}, and
- * {@link #getJoinTableName(ModelField, JPoxFieldMetadata)} reserved word tests.
- *
- * @param word the word in violation.
- * @param emsg the string buffer to append to.
- * @return if this word has any ERROR severity level violations.
- */
- private boolean appendKeywordSourceViolations( String word, StringBuffer emsg )
- {
- List sources = sqlReservedWords.getKeywordSourceList( word );
- boolean hasError = false;
- emsg.append( " Violation Source(s): " );
- for ( Iterator it = sources.iterator(); it.hasNext(); )
- {
- KeywordSource source = (KeywordSource) it.next();
- emsg.append( source.getName() ).append( " (" ).append( source.getSeverity() ).append( ")" );
- emsg.append( EOL );
-
- if ( source.getSeverity().equalsIgnoreCase( "ERROR" ) )
- {
- hasError = true;
- }
-
- if ( it.hasNext() )
- {
- emsg.append( " " );
- }
- }
- emsg.append( " " ).append( EOL );
-
- emsg.append( " Severity: " );
- if ( hasError )
- {
- emsg.append( "ERROR - You must change this name for the maximum" ).append( EOL );
- emsg.append( " compatibility amoungst JDBC SQL Servers." ).append( EOL );
- }
- else
- {
- emsg.append( "WARNING - You are encouraged to change this name" ).append( EOL );
- emsg.append( " for maximum compatibility amoungst JDBC SQL Servers." ).append( EOL );
- }
- emsg.append( " " ).append( EOL );
-
- return hasError;
- }
-
- private void writeModelloMetadataClass( XMLWriter writer )
- throws ModelloException
- {
- writer.startElement( "class" );
-
- writer.addAttribute( "name", getModel().getName() + "ModelloMetadata" );
-
- writer.addAttribute( "detachable", String.valueOf( true ) );
-
- writer.startElement( "field" );
-
- writer.addAttribute( "name", "modelVersion" );
- writer.addAttribute( "null-value", "default" );
-
- writer.startElement( "column" );
-
- writer.addAttribute( "default-value", getGeneratedVersion().toString() );
-
- writer.endElement(); // column
-
- writer.endElement(); // field
-
- writer.endElement(); // class
- }
-
- private void writeFetchGroup( XMLWriter writer, String fetchGroupName, List fields, boolean onlyIfIsStashPart )
- {
- if ( !fields.isEmpty() )
- {
- writer.startElement( "fetch-group" );
-
- writer.addAttribute( "name", fetchGroupName );
-
- for ( Iterator it = fields.iterator(); it.hasNext(); )
- {
- ModelField field = (ModelField) it.next();
-
- if ( onlyIfIsStashPart && ( field instanceof ModelAssociation ) )
- {
- StoreAssociationMetadata storeMetadata = getAssociationMetadata( (ModelAssociation) field );
-
- if ( storeMetadata.isPart() != null && storeMetadata.isPart().booleanValue() )
- {
- continue;
- }
- }
-
- writer.startElement( "field" );
-
- writer.addAttribute( "name", field.getName() );
-
- writer.endElement();
- }
-
- writer.endElement(); // fetch-group
- }
- }
-
- private void writeModelField( XMLWriter writer, ModelField modelField )
- throws ModelloException
- {
- writer.startElement( "field" );
-
- StoreFieldMetadata storeMetadata = (StoreFieldMetadata) modelField.getMetadata( StoreFieldMetadata.ID );
-
- JPoxFieldMetadata jpoxMetadata = (JPoxFieldMetadata) modelField.getMetadata( JPoxFieldMetadata.ID );
-
- writer.addAttribute( "name", modelField.getName() );
-
- if ( !storeMetadata.isStorable() )
- {
- writer.addAttribute( "persistence-modifier", "none" );
- }
- else if ( StringUtils.isNotEmpty( jpoxMetadata.getPersistenceModifier() ) )
- {
- writer.addAttribute( "persistence-modifier", jpoxMetadata.getPersistenceModifier() );
- }
-
- if ( modelField.isRequired() )
- {
- writer.addAttribute( "null-value", "exception" );
- }
- else if ( jpoxMetadata.getNullValue() != null )
- {
- writer.addAttribute( "null-value", jpoxMetadata.getNullValue() );
- }
-
- String columnName = getColumnName( modelField, jpoxMetadata );
-
- if ( StringUtils.isNotEmpty( jpoxMetadata.getJoinTableName() ) )
- {
- writer.addAttribute( "table", getJoinTableName( modelField, jpoxMetadata ) );
- }
-
- if ( jpoxMetadata.isPrimaryKey() )
- {
- writer.addAttribute( "primary-key", "true" );
-
- // value-strategy is only useful when you have a primary-key defined for the field.
- if ( StringUtils.isNotEmpty( valueStrategyOverride ) )
- {
- writeValueStrategy( valueStrategyOverride, writer );
- }
- else if ( StringUtils.isNotEmpty( jpoxMetadata.getValueStrategy() ) )
- {
- writeValueStrategy( jpoxMetadata.getValueStrategy(), writer );
- }
- }
-
- if ( StringUtils.isNotEmpty( jpoxMetadata.getIndexed() ) )
- {
- writer.addAttribute( "indexed", jpoxMetadata.getIndexed() );
- }
-
- if ( StringUtils.isNotEmpty( jpoxMetadata.getMappedBy() ) )
- {
- writer.addAttribute( "mapped-by", jpoxMetadata.getMappedBy() );
- }
-
- if ( modelField instanceof ModelAssociation )
- {
- writeAssociation( writer, (ModelAssociation) modelField );
- }
- else
- {
- if ( modelField.isPrimitiveArray() )
- {
- writer.startElement( "array" );
- writer.endElement();
- }
-
- // Work out potential <column> subelement
-
- // Store potential column properties.
- Properties columnProps = new Properties();
-
- if ( !StringUtils.equalsIgnoreCase( columnName, modelField.getName() ) )
- {
- columnProps.setProperty( "name", columnName );
- }
-
- if ( storeMetadata.getMaxSize() > 0 )
- {
- columnProps.setProperty( "length", String.valueOf( storeMetadata.getMaxSize() ) );
- }
-
- if ( StringUtils.equals( jpoxMetadata.getNullValue(), "default" ) )
- {
- columnProps.setProperty( "default-value", modelField.getDefaultValue() );
- }
-
- // Now write the column sub element (if it has properties)
- if ( !columnProps.isEmpty() )
- {
- writer.startElement( "column" );
-
- for ( Enumeration en = columnProps.propertyNames(); en.hasMoreElements(); )
- {
- String attributeName = (String) en.nextElement();
- String attributeValue = columnProps.getProperty( attributeName );
- writer.addAttribute( attributeName, attributeValue );
-
- }
- writer.endElement();
- }
-
- // Work out potential <unique> subelement.
- if ( jpoxMetadata.isUnique() )
- {
- writer.startElement( "unique" );
- writer.addAttribute( "name", columnName.toUpperCase() + "_UNIQUE_CONSTRAINT" );
- writer.endElement();
- }
-
- // Work out potential <foreign-key> subelement
- if ( jpoxMetadata.isForeignKey() )
- {
- writer.startElement( "foreign-key" );
- writer.addAttribute( "name", columnName.toUpperCase() + "_FK" );
-
- if ( StringUtils.isNotEmpty( jpoxMetadata.getForeignKeyDeferred() ) )
- {
- writer.addAttribute( "deferred", jpoxMetadata.getForeignKeyDeferred() );
- }
-
- if ( StringUtils.isNotEmpty( jpoxMetadata.getForeignKeyDeleteAction() ) )
- {
- writer.addAttribute( "delete-action", jpoxMetadata.getForeignKeyDeleteAction() );
- }
-
- if ( StringUtils.isNotEmpty( jpoxMetadata.getForeignKeyUpdateAction() ) )
- {
- writer.addAttribute( "update-action", jpoxMetadata.getForeignKeyUpdateAction() );
- }
- writer.endElement();
- }
- }
-
- writer.endElement(); // field
- }
-
- /**
- * Utility method to obtain the join table name from the {@link JPoxFieldMetadata} taking into
- * account the possibility of prefixes in use at the {@link JPoxModelMetadata} level.
- *
- * @param modelField the model field to get the field.name from.
- * @param fieldMetadata the field metadata to get the field-metadata.join-table name from.
- * @return the join table name (with possible prefix applied)
- * @throws ModelloException if there was a problem with the table name violating a sql reserved word.
- */
- private String getJoinTableName( ModelField modelField, JPoxFieldMetadata fieldMetadata )
- throws ModelloException
- {
- ModelClass modelClass = modelField.getModelClass();
- JPoxModelMetadata modelMetadata = (JPoxModelMetadata) modelClass.getModel().getMetadata( JPoxModelMetadata.ID );
-
- boolean hasPrefix = StringUtils.isNotEmpty( modelMetadata.getTablePrefix() );
-
- String prefix = "";
-
- if ( hasPrefix )
- {
- prefix = modelMetadata.getTablePrefix().trim();
- }
-
- String joinTableName = prefix + fieldMetadata.getJoinTableName();
- ;
-
- if ( sqlReservedWords.isKeyword( joinTableName ) )
- {
- StringBuffer emsg = new StringBuffer();
-
- /* ----------------------------------------------------------------
- * SQL Reserved Word Violation: 'ROLES'
- * Context: TABLE NAME
- */
- emsg.append( EOL ).append( ERROR_LINE ).append( EOL );
- emsg.append( " SQL Reserved Word Violation: " ).append( joinTableName ).append( EOL );
- emsg.append( " Context: JOIN TABLE NAME" ).append( EOL );
- emsg.append( " " ).append( EOL );
-
- /* In Model:
- * <model jpox.table-prefix="">
- * <class jpox.table="">
- * <name>JdoRole</name>
- * <fields>
- * <field jpox.join-table="Foo">
- * <name>Operation</name>
- * </field>
- * </fields>
- * </class>
- * </model>
- */
- emsg.append( " In Model:" ).append( EOL );
- emsg.append( " <model" );
- if ( hasPrefix )
- {
- emsg.append( " jpox.table-prefix=\"" ).append( modelMetadata.getTablePrefix() ).append( "\"" );
- }
- emsg.append( ">" ).append( EOL );
- emsg.append( " <class>" ).append( EOL );
- emsg.append( " <name>" ).append( modelClass.getName() ).append( "</name>" ).append( EOL );
- emsg.append( " <fields>" ).append( EOL );
- emsg.append( " <field jpox.join-table=\"" ).append( fieldMetadata.getJoinTableName() );
- emsg.append( "\">" ).append( EOL );
- emsg.append( " <name>" ).append( modelField.getName() ).append( "</name>" ).append( EOL );
- emsg.append( " <field>" ).append( EOL );
- emsg.append( " </fields>" ).append( EOL );
- emsg.append( " </class>" ).append( EOL );
- emsg.append( " </model>" ).append( EOL );
- emsg.append( " " ).append( EOL );
-
- /* Violation Source(s): Oracle (WARNING)
- * SQL 99 (ERROR)
- *
- * Severity: ERROR - You must change this name for maximum
- * compatibility amoungst JDBC SQL Servers.
- *
- * Severity: WARNING - You are encouraged to change this name
- * for maximum compatibility amoungst JDBC SQL Servers.
- */
- boolean hasError = appendKeywordSourceViolations( joinTableName, emsg );
-
- /* Suggestions: 1) Use a different table prefix in
- * <model jpox.table-prefix="DIFFERENT_">
- * 2) Use a different join table name using
- * <field jpox.join-table="DIFFERENT">
- * ----------------------------------------------------------------
- */
- emsg.append( " Suggestions: 1) Use a different table prefix in" ).append( EOL );
- emsg.append( " <model jpox.table-prefix=\"DIFFERENT_\">" ).append( EOL );
- emsg.append( " 2) Use a different join table name using" ).append( EOL );
- emsg.append( " <field jpox.join-table=\"DIFFERENT\">" ).append( EOL );
-
- emsg.append( ERROR_LINE );
-
- // Determine possible exception.
- if ( hasError || modelMetadata.getReservedWordStrictness().equals( JPoxModelMetadata.WARNING ) )
- {
- throw new ModelloException( emsg.toString() );
- }
-
- // No exception. use it. But log it.
- getLogger().warn( emsg.toString() );
- }
-
- return joinTableName;
- }
-
- /**
- * Utility method to obtain the column name from the {@link ModelField} or {@link JPoxFieldMetadata} taking into
- * account the possibility of prefixes in use at the {@link JPoxModelMetadata} or {@link JPoxClassMetadata} level.
- *
- * @param modelField the model field to get the field.name from.
- * @param fieldMetadata the field metadata to get the field-metadata.column name from.
- * @return the column name (with possible prefix applied)
- * @throws ModelloException if there was a problem with the column name violating a sql reserved word.
- */
- private String getColumnName( ModelField modelField, JPoxFieldMetadata fieldMetadata )
- throws ModelloException
- {
- boolean hasClassPrefix = false;
- boolean hasModelPrefix = false;
- boolean hasAlternateName = false;
-
- ModelClass modelClass = modelField.getModelClass();
- JPoxClassMetadata classMetadata = (JPoxClassMetadata) modelClass.getMetadata( JPoxClassMetadata.ID );
- JPoxModelMetadata modelMetadata = (JPoxModelMetadata) modelClass.getModel().getMetadata( JPoxModelMetadata.ID );
-
- String prefix = "";
-
- if ( StringUtils.isNotEmpty( modelMetadata.getColumnPrefix() ) )
- {
- prefix = modelMetadata.getColumnPrefix().trim();
- hasModelPrefix = true;
- }
-
- if ( StringUtils.isNotEmpty( classMetadata.getColumnPrefix() ) )
- {
- prefix = classMetadata.getColumnPrefix();
- hasClassPrefix = true;
- }
-
- String columnName = "";
-
- if ( StringUtils.isNotEmpty( fieldMetadata.getColumnName() ) )
- {
- columnName = prefix + fieldMetadata.getColumnName();
- hasAlternateName = true;
- }
- else
- {
- columnName = prefix + modelField.getName();
- }
-
- if ( sqlReservedWords.isKeyword( columnName ) )
- {
- StringBuffer emsg = new StringBuffer();
-
- /* ----------------------------------------------------------------
- * SQL Reserved Word Violation: 'ROLES'
- * Context: TABLE NAME
- */
- emsg.append( EOL ).append( ERROR_LINE ).append( EOL );
- emsg.append( " SQL Reserved Word Violation: " ).append( columnName ).append( EOL );
- emsg.append( " Context: COLUMN NAME" ).append( EOL );
- emsg.append( " " ).append( EOL );
-
- /* In Model:
- * <model jpox.column-prefix="">
- * <class jpox.column-prefix="">
- * <name>JdoRole</name>
- * <fields>
- * <field jpox.column="">
- * <name>operation</name>
- * </field>
- * </fields>
- * </class>
- * </model>
- */
- emsg.append( " In Model:" ).append( EOL );
- emsg.append( " <model" );
- if ( hasModelPrefix )
- {
- emsg.append( " jpox.column-prefix=\"" ).append( modelMetadata.getColumnPrefix() ).append( "\"" );
- }
- emsg.append( ">" ).append( EOL );
- emsg.append( " <class" );
- if ( hasClassPrefix )
- {
- emsg.append( " jpox.column-prefix=\"" ).append( classMetadata.getColumnPrefix() ).append( "\"" );
- }
- emsg.append( ">" ).append( EOL );
- emsg.append( " <name>" ).append( modelClass.getName() ).append( "</name>" ).append( EOL );
- emsg.append( " <fields>" ).append( EOL );
- emsg.append( " <field" );
- if ( hasAlternateName )
- {
- emsg.append( " jpox.column=\"" ).append( fieldMetadata.getColumnName() ).append( "\"" );
- }
- emsg.append( ">" ).append( EOL );
- emsg.append( " <name>" ).append( modelField.getName() ).append( "</name>" ).append( EOL );
- emsg.append( " <field>" ).append( EOL );
- emsg.append( " </fields>" ).append( EOL );
- emsg.append( " </class>" ).append( EOL );
- emsg.append( " </model>" ).append( EOL );
- emsg.append( " " ).append( EOL );
-
- /* Violation Source(s): Oracle (WARNING)
- * SQL 99 (ERROR)
- *
- * Severity: ERROR - You must change this name for maximum
- * compatibility amoungst JDBC SQL Servers.
- *
- * Severity: WARNING - You are encouraged to change this name
- * for maximum compatibility amoungst JDBC SQL Servers.
- */
- boolean hasError = appendKeywordSourceViolations( columnName, emsg );
-
- /* Suggestions: 1) Use a different model column prefix in
- * <model jpox.column-prefix="DIFFERENT_">
- * 2) Use a different class column prefix in
- * <class jpox.column-prefix="DIFFERENT_">
- * 3) Use a different alternate column name using
- * <field jpox.column="DIFFERENT">
- * 4) Use a different field name in
- * <class>
- * <name>Foo</name>
- * <fields>
- * <field>
- * <name>DIFFERENT</name>
- * </field>
- * </fields>
- * </class>
- * ----------------------------------------------------------------
- */
- emsg.append( " Suggestions: 1) Use a different model column prefix in" ).append( EOL );
- emsg.append( " <model jpox.column-prefix=\"DIFFERENT_\">" ).append( EOL );
- emsg.append( " 2) Use a different class column prefix in" ).append( EOL );
- emsg.append( " <class jpox.column-prefix=\"DIFFERENT_\">" ).append( EOL );
- emsg.append( " 3) Use a different alternate column name using" ).append( EOL );
- emsg.append( " <field jpox.column=\"DIFFERENT\">" ).append( EOL );
- emsg.append( " 4) Use a different field name in" ).append( EOL );
- emsg.append( " <class>" ).append( EOL );
- emsg.append( " <name>" ).append( modelClass.getName() ).append( "</name>" ).append(
- EOL );
- emsg.append( " <fields>" ).append( EOL );
- emsg.append( " <field>" ).append( EOL );
- emsg.append( " <name>DIFFERENT</name>" ).append( EOL );
- emsg.append( " <field>" ).append( EOL );
- emsg.append( " </fields>" ).append( EOL );
- emsg.append( " </class>" ).append( EOL );
-
- emsg.append( ERROR_LINE );
-
- // Determine possible exception.
- if ( hasError || modelMetadata.getReservedWordStrictness().equals( JPoxModelMetadata.WARNING ) )
- {
- throw new ModelloException( emsg.toString() );
- }
-
- // No exception. use it. But log it.
- getLogger().warn( emsg.toString() );
- }
-
- return columnName;
- }
-
- private static void writeValueStrategy( String valueStrategy, XMLWriter writer )
- throws ModelloException
- {
- if ( !"off".equals( valueStrategy ) )
- {
- if ( !VALUE_STRATEGY_LIST.contains( valueStrategy ) )
- {
- throw new ModelloException(
- "The JDO mapping generator does not support the specified " + "value-strategy '" + valueStrategy
- + "'. " + "Supported types: " + VALUE_STRATEGY_LIST
- );
- }
- writer.addAttribute( "value-strategy", valueStrategy );
- }
- }
-
- private void writeAssociation( XMLWriter writer, ModelAssociation association )
- {
- StoreAssociationMetadata am =
- (StoreAssociationMetadata) association.getAssociationMetadata( StoreAssociationMetadata.ID );
-
- JPoxAssociationMetadata jpoxMetadata =
- (JPoxAssociationMetadata) association.getAssociationMetadata( JPoxAssociationMetadata.ID );
-
- if ( am.isPart() != null )
- {
- // This gets added onto the <field> element
- writer.addAttribute( "default-fetch-group", am.isPart().toString() );
- }
-
- if ( association.getType().equals( "java.util.List" ) || association.getType().equals( "java.util.Set" ) )
- {
- // Start <collection> element
- writer.startElement( "collection" );
-
- if ( association.getTo().equals( "String" ) )
- {
- writer.addAttribute( "element-type", "java.lang.String" );
- }
- else
- {
- writer.addAttribute( "element-type", association.getTo() );
- }
-
- if ( jpoxMetadata.isDependent() )
- {
- writer.addAttribute( "dependent-element", "true" );
- }
- else
- {
- writer.addAttribute( "dependent-element", "false" );
- }
-
- // End <collection> element
- writer.endElement();
-
- if ( jpoxMetadata.isJoin() )
- {
- writer.startElement( "join" );
-
- writer.endElement();
- }
- }
- else if ( association.getType().equals( "java.util.Map" ) )
- {
- writer.startElement( "map" );
-
- writer.addAttribute( "key-type", am.getKeyType() );
-
- if ( association.getTo().equals( "String" ) )
- {
- writer.addAttribute( "value-type", "java.lang.String" );
- }
- else
- {
- writer.addAttribute( "value-type", association.getTo() );
- }
-
- if ( jpoxMetadata.isDependent() )
- {
- writer.addAttribute( "dependent-key", "true" );
-
- writer.addAttribute( "dependent-value", "true" );
- }
- else
- {
- writer.addAttribute( "dependent-key", "false" );
-
- writer.addAttribute( "dependent-value", "false" );
- }
-
- writer.endElement();
-
- if ( jpoxMetadata.isJoin() )
- {
- writer.startElement( "join" );
-
- writer.endElement();
- }
- }
- else if ( association.getType().equals( "java.util.Properties" ) )
- {
- writer.addAttribute( "embedded", "false" );
-
- writer.startElement( "map" );
-
- writer.addAttribute( "key-type", "java.lang.String" );
-
- writer.addAttribute( "value-type", "java.lang.String" );
-
- writer.addAttribute( "embedded-key", "true" );
-
- writer.addAttribute( "embedded-value", "true" );
-
- writer.addAttribute( "dependent-key", "true" );
-
- writer.addAttribute( "dependent-value", "true" );
-
- writer.endElement();
-
- if ( jpoxMetadata.isJoin() )
- {
- writer.startElement( "join" );
-
- writer.endElement();
- }
- }
- else
- // One association
- {
- if ( jpoxMetadata.isDependent() )
- {
- writer.addAttribute( "dependent", "true" );
- }
- }
- }
-
- private boolean isInstantionApplicationType( ModelClass modelClass )
- {
- List identifierFields = modelClass.getIdentifierFields( getGeneratedVersion() );
-
- return identifierFields.size() > 0;
- }
-
- private List getPrimaryKeyFields( ModelClass modelClass )
- throws ModelloException
- {
- List primaryKeys = new ArrayList();
- List fields = modelClass.getFields( getGeneratedVersion() );
- JPoxClassMetadata jpoxClassMetadata = (JPoxClassMetadata) modelClass.getMetadata( JPoxClassMetadata.ID );
-
- for ( Iterator it = fields.iterator(); it.hasNext(); )
- {
- ModelField modelField = (ModelField) it.next();
- JPoxFieldMetadata jpoxFieldMetadata = (JPoxFieldMetadata) modelField.getMetadata( JPoxFieldMetadata.ID );
-
- if ( jpoxClassMetadata.useIdentifiersAsPrimaryKey() )
- {
- if ( modelField.isIdentifier() )
- {
- assertSupportedIdentityPrimitive( modelField );
- primaryKeys.add( modelField );
- }
- }
- else
- {
- if ( jpoxFieldMetadata.isPrimaryKey() )
- {
- assertSupportedIdentityPrimitive( modelField );
- primaryKeys.add( modelField );
- }
- }
- }
-
- return primaryKeys;
- }
-
- private void assertSupportedIdentityPrimitive( ModelField modelField )
- throws ModelloException
- {
- if ( !PRIMITIVE_IDENTITY_MAP.containsKey( modelField.getType() ) )
- {
- throw new ModelloException(
- "The JDO mapping generator does not support the specified " + "field type '" + modelField.getType()
- + "'. " + "Supported types: " + PRIMITIVE_IDENTITY_MAP.keySet()
- );
- }
- }
-
- private StoreAssociationMetadata getAssociationMetadata( ModelAssociation association )
- {
- return (StoreAssociationMetadata) association.getAssociationMetadata( StoreAssociationMetadata.ID );
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxMetadataClassModelloGenerator.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxMetadataClassModelloGenerator.java
deleted file mode 100644
index 8a30932..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxMetadataClassModelloGenerator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.velocity.context.Context;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-import org.apache.archiva.redback.components.modello.plugin.store.AbstractVelocityModelloGenerator;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreClassMetadata;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreFieldMetadata;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxStoreModelloGenerator.java 699 2006-11-23 03:37:55Z brett $
- */
-public class JPoxMetadataClassModelloGenerator
- extends AbstractVelocityModelloGenerator
-{
- public void generate( Model model, Properties parameters )
- throws ModelloException
- {
- initialize( model, parameters );
-
- // Initialize the Velocity context
-
- Context context = makeStubVelocityContext( model, getGeneratedVersion() );
-
- context.put( "storeClassMetadataId", StoreClassMetadata.ID );
-
- context.put( "storeFieldMetadataId", StoreFieldMetadata.ID );
-
- // Generate a ModelloMetadata class for storing model information in the database
- String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );
-
- String className = model.getName() + "ModelloMetadata";
- writeClass( "org/apache/archiva/redback/components/modello/jpox/templates/ModelloMetadata.java.vm", getOutputDirectory(),
- packageName, className, context );
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxStoreModelloGenerator.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxStoreModelloGenerator.java
deleted file mode 100644
index 6f3f649..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/JPoxStoreModelloGenerator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.velocity.context.Context;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-import org.apache.archiva.redback.components.modello.plugin.store.AbstractVelocityModelloGenerator;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreClassMetadata;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreFieldMetadata;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxStoreModelloGenerator.java 713 2006-11-25 21:58:06Z jvanzyl $
- */
-public class JPoxStoreModelloGenerator
- extends AbstractVelocityModelloGenerator
-{
- public void generate( Model model, Properties parameters )
- throws ModelloException
- {
- initialize( model, parameters );
-
- // Initialize the Velocity context
-
- Context context = makeStubVelocityContext( model, getGeneratedVersion() );
-
- context.put( "storeClassMetadataId", StoreClassMetadata.ID );
-
- context.put( "storeFieldMetadataId", StoreFieldMetadata.ID );
-
- // Generate a ModelloMetadata class for storing model information in the database
- String packageName = model.getDefaultPackageName( isPackageWithVersion(), getGeneratedVersion() );
-
- // Generate the JPoxStore
- String className = model.getName() + "JPoxStore";
-
- writeClass( "org/apache/archiva/redback/components/modello/jpox/templates/JPoxStore.java.vm", getOutputDirectory(), packageName,
- className, context );
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxAssociationMetadata.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxAssociationMetadata.java
deleted file mode 100644
index f1a4815..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxAssociationMetadata.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox.metadata;
-
-/*
- * 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.modello.metadata.AssociationMetadata;
-
-/**
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: JPoxAssociationMetadata.java 765 2006-12-27 00:00:20Z aheritier $
- */
-public class JPoxAssociationMetadata
- implements AssociationMetadata
-{
- public static final String ID = JPoxAssociationMetadata.class.getName();
-
- private boolean dependent;
-
- private boolean join;
-
- public boolean isDependent()
- {
- return dependent;
- }
-
- public void setDependent( boolean dependent )
- {
- this.dependent = dependent;
- }
-
- public boolean isJoin()
- {
- return join;
- }
-
- public void setJoin( boolean join )
- {
- this.join = join;
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxClassMetadata.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxClassMetadata.java
deleted file mode 100644
index 472ac50..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxClassMetadata.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox.metadata;
-
-/*
- * 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.modello.metadata.ClassMetadata;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: JPoxClassMetadata.java 822 2007-03-13 22:30:38Z joakime $
- */
-public class JPoxClassMetadata
- implements ClassMetadata
-{
- public static final String ID = JPoxClassMetadata.class.getName();
-
- private boolean enabled;
-
- private boolean detachable;
-
- private String table;
-
- private String columnPrefix;
-
- private String identityType;
-
- private String identityClass;
-
- private boolean useIdentifiersAsPrimaryKey;
-
- private List notPersisted;
-
- public void setDetachable( boolean detachable )
- {
- this.detachable = detachable;
- }
-
- public boolean isDetachable()
- {
- return detachable;
- }
-
- public void setTable( String table )
- {
- this.table = table;
- }
-
- public String getTable()
- {
- return table;
- }
-
- public String getIdentityClass()
- {
- return identityClass;
- }
-
- public void setIdentityClass( String identityClass )
- {
- this.identityClass = identityClass;
- }
-
- public String getIdentityType()
- {
- return identityType;
- }
-
- public void setIdentityType( String identityType )
- {
- this.identityType = identityType;
- }
-
- public boolean useIdentifiersAsPrimaryKey()
- {
- return useIdentifiersAsPrimaryKey;
- }
-
- public void setUseIdentifiersAsPrimaryKey( boolean userIdentifiersAsIdentity )
- {
- this.useIdentifiersAsPrimaryKey = userIdentifiersAsIdentity;
- }
-
- public List getNotPersisted()
- {
- return notPersisted;
- }
-
- public void setNotPersisted( List notPersisted )
- {
- this.notPersisted = notPersisted;
- }
-
- public boolean isEnabled()
- {
- return enabled;
- }
-
- public void setEnabled( boolean persisted )
- {
- this.enabled = persisted;
- }
-
- public String getColumnPrefix()
- {
- return columnPrefix;
- }
-
- public void setColumnPrefix( String columnPrefix )
- {
- this.columnPrefix = columnPrefix;
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxFieldMetadata.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxFieldMetadata.java
deleted file mode 100644
index e4e22cd..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxFieldMetadata.java
+++ /dev/null
@@ -1,221 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox.metadata;
-
-/*
- * 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.modello.metadata.FieldMetadata;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: JPoxFieldMetadata.java 829 2007-03-22 14:32:42Z joakime $
- */
-public class JPoxFieldMetadata implements FieldMetadata
-{
- public static final String ID = JPoxFieldMetadata.class.getName();
-
- public static final String[] FOREIGN_KEY_ACTIONS = new String[] { "cascade", "restrict", "null", "default" };
-
- public static final String[] BOOLEANS = new String[] { "true", "false" };
-
- private List fetchGroupNames;
-
- private String mappedBy;
-
- private String nullValue;
-
- private String columnName;
-
- private boolean primaryKey;
-
- private String persistenceModifier;
-
- private String valueStrategy;
-
- private String joinTableName;
-
- private String indexed;
-
- private boolean unique;
-
- private boolean foreignKey;
-
- private String foreignKeyDeferred;
-
- private String foreignKeyDeleteAction;
-
- private String foreignKeyUpdateAction;
-
- public List getFetchGroupNames()
- {
- return fetchGroupNames;
- }
-
- public void setFetchGroupNames( List fetchGroupNames )
- {
- this.fetchGroupNames = fetchGroupNames;
- }
-
- public String getMappedBy()
- {
- return mappedBy;
- }
-
- public void setMappedBy( String mappedBy )
- {
- this.mappedBy = mappedBy;
- }
-
- public String getNullValue()
- {
- return nullValue;
- }
-
- public void setNullValue( String nullValue )
- {
- this.nullValue = nullValue;
- }
-
- public String getColumnName()
- {
- return columnName;
- }
-
- public void setColumnName( String columnName )
- {
- this.columnName = columnName;
- }
-
- public boolean isPrimaryKey()
- {
- return primaryKey;
- }
-
- public void setPrimaryKey( boolean primaryKey )
- {
- this.primaryKey = primaryKey;
- }
-
- public String getPersistenceModifier()
- {
- return persistenceModifier;
- }
-
- public void setPersistenceModifier( String persistenceModifier )
- {
- this.persistenceModifier = persistenceModifier;
- }
-
- public String getValueStrategy()
- {
- return valueStrategy;
- }
-
- public void setValueStrategy( String valueStrategy )
- {
- this.valueStrategy = valueStrategy;
- }
-
- public String getJoinTableName()
- {
- return joinTableName;
- }
-
- public void setJoinTableName( String joinTableName )
- {
- this.joinTableName = joinTableName;
- }
-
- public String getIndexed()
- {
- return indexed;
- }
-
- public void setIndexed( String indexed )
- {
- this.indexed = indexed;
- }
-
- public String getForeignKeyDeferred()
- {
- return foreignKeyDeferred;
- }
-
- public void setForeignKeyDeferred( String foreignKeyDeferred )
- {
- this.foreignKeyDeferred = foreignKeyDeferred;
-
- if ( StringUtils.isNotEmpty( this.foreignKeyDeferred ) )
- {
- this.foreignKey = true;
- }
- }
-
- public String getForeignKeyDeleteAction()
- {
- return foreignKeyDeleteAction;
- }
-
- public void setForeignKeyDeleteAction( String foreignKeyDeleteAction )
- {
- this.foreignKeyDeleteAction = foreignKeyDeleteAction;
-
- if ( StringUtils.isNotEmpty( this.foreignKeyDeleteAction ) )
- {
- this.foreignKey = true;
- }
- }
-
- public String getForeignKeyUpdateAction()
- {
- return foreignKeyUpdateAction;
- }
-
- public void setForeignKeyUpdateAction( String foreignKeyUpdateAction )
- {
- this.foreignKeyUpdateAction = foreignKeyUpdateAction;
-
- if ( StringUtils.isNotEmpty( this.foreignKeyUpdateAction ) )
- {
- this.foreignKey = true;
- }
- }
-
- public boolean isUnique()
- {
- return unique;
- }
-
- public void setUnique( boolean unique )
- {
- this.unique = unique;
- }
-
- public boolean isForeignKey()
- {
- return foreignKey;
- }
-
- public void setForeignKey( boolean foreignKey )
- {
- this.foreignKey = foreignKey;
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxMetadataPlugin.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxMetadataPlugin.java
deleted file mode 100644
index 6e7a173..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxMetadataPlugin.java
+++ /dev/null
@@ -1,391 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox.metadata;
-
-/*
- * 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.modello.ModelloException;
-import org.codehaus.modello.metadata.AbstractMetadataPlugin;
-import org.codehaus.modello.metadata.AssociationMetadata;
-import org.codehaus.modello.metadata.ClassMetadata;
-import org.codehaus.modello.metadata.FieldMetadata;
-import org.codehaus.modello.metadata.InterfaceMetadata;
-import org.codehaus.modello.metadata.ModelMetadata;
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelAssociation;
-import org.codehaus.modello.model.ModelClass;
-import org.codehaus.modello.model.ModelField;
-import org.codehaus.modello.model.ModelInterface;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: JPoxMetadataPlugin.java 829 2007-03-22 14:32:42Z joakime $
- */
-public class JPoxMetadataPlugin extends AbstractMetadataPlugin
-{
- public static final String ENABLED = "jpox.enabled";
-
- public static final String DEPENDENT = "jpox.dependent";
-
- public static final String DETACHABLE = "jpox.detachable";
-
- public static final String FETCH_GROUPS = "jpox.fetch-groups";
-
- public static final String NOT_PERSISTED_FIELDS = "jpox.not-persisted-fields";
-
- public static final String JOIN = "jpox.join";
-
- public static final String MAPPED_BY = "jpox.mapped-by";
-
- public static final String NULL_VALUE = "jpox.null-value";
-
- public static final String TABLE = "jpox.table";
-
- public static final String TABLE_PREFIX = "jpox.table-prefix";
-
- public static final String COLUMN = "jpox.column";
-
- public static final String COLUMN_PREFIX = "jpox.column-prefix";
-
- public static final String RESERVED_WORD_STRICTNESS = "jpox.reserved-word-strictness";
-
- public static final String MAPPING_IN_PACKAGE = "jpox.mapping-in-package";
-
- public static final String JOIN_TABLE = "jpox.join-table";
-
- public static final String INDEXED = "jpox.indexed";
-
- public static final String PRIMARY_KEY = "jpox.primary-key";
-
- public static final String UNIQUE = "jpox.unique";
-
- public static final String FOREIGN_KEY_DEFERRED = "jpox.foreign-key-deferred";
-
- public static final String FOREIGN_KEY_DELETE_ACTION = "jpox.foreign-key-delete-action";
-
- public static final String FOREIGN_KEY_UPDATE_ACTION = "jpox.foreign-key-update-action";
-
- public static final String VALUE_STRATEGY = "jpox.value-strategy";
-
- public static final String PERSISTENCE_MODIFIER = "jpox.persistence-modifier";
-
- public static final String IDENTITY_TYPE = "jpox.identity-type";
-
- public static final String IDENTITY_CLASS = "jpox.identity-class";
-
- public static final String USE_IDENTIFIERS = "jpox.use-identifiers-as-primary-key";
-
- // ----------------------------------------------------------------------
- // Map to Metadata
- // ----------------------------------------------------------------------
-
- public ModelMetadata getModelMetadata( Model model, Map data )
- {
- JPoxModelMetadata metadata = new JPoxModelMetadata();
-
- String columnPrefix = (String) data.get( COLUMN_PREFIX );
-
- if ( StringUtils.isNotEmpty( columnPrefix ) )
- {
- metadata.setColumnPrefix( columnPrefix );
- }
-
- String tablePrefix = (String) data.get( TABLE_PREFIX );
-
- if ( StringUtils.isNotEmpty( tablePrefix ) )
- {
- metadata.setTablePrefix( tablePrefix );
- }
-
- metadata.setMappingInPackage( getBoolean( data, MAPPING_IN_PACKAGE, false ) );
-
- String reservedWordStrictness = (String) data.get( RESERVED_WORD_STRICTNESS );
-
- // Set default.
- metadata.setReservedWordStrictness( JPoxModelMetadata.WARNING );
-
- // Set based on provided.
- if ( StringUtils.isNotEmpty( reservedWordStrictness ) )
- {
- if ( JPoxModelMetadata.ERROR.equalsIgnoreCase( reservedWordStrictness ) )
- {
- metadata.setReservedWordStrictness( JPoxModelMetadata.ERROR );
- }
- else if ( JPoxModelMetadata.WARNING.equalsIgnoreCase( reservedWordStrictness ) )
- {
- metadata.setReservedWordStrictness( JPoxModelMetadata.WARNING );
- }
- else
- {
- getLogger().warn(
- "Unknown reserved word strictness value: '" + reservedWordStrictness + "'. "
- + "Only '" + JPoxModelMetadata.ERROR + "' and '"
- + JPoxModelMetadata.WARNING
- + "' are acceptable inputs. Defaulting to 'warning'." );
- }
- }
-
- return metadata;
- }
-
- public InterfaceMetadata getInterfaceMetadata( ModelInterface modelInterface, Map<String, String> stringStringMap )
- throws ModelloException
- {
- // TODO to implemens ?
- return null;
- }
-
- public ClassMetadata getClassMetadata( ModelClass clazz, Map data ) throws ModelloException
- {
- JPoxClassMetadata metadata = new JPoxClassMetadata();
-
- metadata.setEnabled( getBoolean( data, ENABLED, true ) );
- metadata.setDetachable( getBoolean( data, DETACHABLE, true ) );
-
- String notPersistedFields = (String) data.get( NOT_PERSISTED_FIELDS );
-
- if ( !StringUtils.isEmpty( notPersistedFields ) )
- {
- List ignoredFields = Arrays.asList( StringUtils.split( notPersistedFields ) );
-
- metadata.setNotPersisted( ignoredFields );
- }
-
- String table = (String) data.get( TABLE );
-
- if ( !StringUtils.isEmpty( table ) )
- {
- metadata.setTable( table );
- }
-
- String columnPrefix = (String) data.get( COLUMN_PREFIX );
-
- if ( !StringUtils.isEmpty( columnPrefix ) )
- {
- metadata.setColumnPrefix( columnPrefix );
- }
-
- String identityType = (String) data.get( IDENTITY_TYPE );
-
- if ( StringUtils.isNotEmpty( identityType ) )
- {
- metadata.setIdentityType( identityType );
- }
-
- String identityClass = (String) data.get( IDENTITY_CLASS );
-
- if ( StringUtils.isNotEmpty( identityClass ) )
- {
- metadata.setIdentityClass( identityClass );
- }
-
- metadata.setUseIdentifiersAsPrimaryKey( getBoolean( data, USE_IDENTIFIERS, true ) );
-
- return metadata;
- }
-
- public FieldMetadata getFieldMetadata( ModelField field, Map data ) throws ModelloException
- {
- JPoxFieldMetadata metadata = new JPoxFieldMetadata();
-
- JPoxClassMetadata classMetadata = (JPoxClassMetadata) field.getModelClass().getMetadata( JPoxClassMetadata.ID );
-
- boolean useIdentifiersAsPrimaryKey = classMetadata.useIdentifiersAsPrimaryKey();
-
- metadata.setPrimaryKey( getBoolean( data, PRIMARY_KEY, ( field.isIdentifier() && useIdentifiersAsPrimaryKey ) ) );
-
- // Backwards Compatibility Syntax.
- String fetchGroupNames = (String) data.get( "jpox.fetchGroupNames" );
-
- if ( fetchGroupNames != null )
- {
- getLogger().warn(
- "You are using the <field jpox.fetchGroupNames=\"\"> attribute syntax. "
- + "It has been deprecated in favor of the <field jpox.fetch-groups=\"\"> syntax instead." );
- }
- else
- {
- // Correct Syntax.
- fetchGroupNames = (String) data.get( FETCH_GROUPS );
- }
-
- if ( !StringUtils.isEmpty( fetchGroupNames ) )
- {
- List fetchGroups = Arrays.asList( StringUtils.split( fetchGroupNames ) );
-
- metadata.setFetchGroupNames( fetchGroups );
- }
-
- // Backwards Compatibility Syntax.
- String mappedBy = (String) data.get( "jpox.mappedBy" );
-
- if ( mappedBy != null )
- {
- getLogger().warn(
- "You are using the <field jpox.mappedBy=\"\"> attribute syntax. "
- + "It has been deprecated in favor of the <field jpox.mapped-by=\"\"> syntax instead." );
- }
- else
- {
- // Correct Syntax.
- mappedBy = (String) data.get( MAPPED_BY );
- }
-
- if ( !StringUtils.isEmpty( mappedBy ) )
- {
- metadata.setMappedBy( mappedBy );
- }
-
- // Backwards Compatibility Syntax.
- String nullValue = (String) data.get( "jpox.nullValue" );
-
- if ( nullValue != null )
- {
- getLogger().warn(
- "You are using the <field jpox.nullValue=\"\"> attribute syntax. "
- + "It has been deprecated in favor of the <field jpox.null-value=\"\"> syntax instead." );
- }
- else
- {
- // Correct Syntax.
- nullValue = (String) data.get( NULL_VALUE );
- }
-
- if ( !StringUtils.isEmpty( nullValue ) )
- {
- metadata.setNullValue( nullValue );
- }
-
- String column = (String) data.get( COLUMN );
-
- if ( StringUtils.isNotEmpty( column ) )
- {
- metadata.setColumnName( column );
- }
-
- String joinTable = (String) data.get( JOIN_TABLE );
-
- if ( StringUtils.isNotEmpty( joinTable ) )
- {
- metadata.setJoinTableName( joinTable );
- }
-
- String indexed = (String) data.get( INDEXED );
-
- if ( StringUtils.isNotEmpty( indexed ) )
- {
- metadata.setIndexed( indexed );
- }
-
- String persistenceModifier = (String) data.get( PERSISTENCE_MODIFIER );
-
- if ( StringUtils.isNotEmpty( persistenceModifier ) )
- {
- metadata.setPersistenceModifier( persistenceModifier );
- }
-
- // According to http://www.jpox.org/docs/1_1/identity_generation.html the default value for
- // this should be 'native', however this is untrue in jpox-1.1.1
- metadata.setValueStrategy( "native" );
-
- if ( StringUtils.isNotEmpty( (String) data.get( VALUE_STRATEGY ) ) )
- {
- String valueStrategy = (String) data.get( VALUE_STRATEGY );
-
- if ( StringUtils.equals( valueStrategy, "off" ) )
- {
- metadata.setValueStrategy( null );
- }
- else
- {
- metadata.setValueStrategy( valueStrategy );
- }
- }
-
- metadata.setUnique( getBoolean( data, UNIQUE, false ) );
- metadata.setForeignKey( getBoolean( data, FOREIGN_KEY_DEFERRED, false ) );
- metadata.setForeignKeyDeferred( getEnumString( data, FOREIGN_KEY_DEFERRED, JPoxFieldMetadata.BOOLEANS, null ) );
- metadata.setForeignKeyDeleteAction( getEnumString( data, FOREIGN_KEY_DELETE_ACTION,
- JPoxFieldMetadata.FOREIGN_KEY_ACTIONS, null ) );
- metadata.setForeignKeyUpdateAction( getEnumString( data, FOREIGN_KEY_UPDATE_ACTION,
- JPoxFieldMetadata.FOREIGN_KEY_ACTIONS, null ) );
-
- return metadata;
- }
-
- public AssociationMetadata getAssociationMetadata( ModelAssociation association, Map data ) throws ModelloException
- {
- JPoxAssociationMetadata metadata = new JPoxAssociationMetadata();
-
- metadata.setDependent( getBoolean( data, DEPENDENT, true ) );
-
- metadata.setJoin( getBoolean( data, JOIN, true ) );
-
- return metadata;
- }
-
- protected String getString( Map data, String key, String defaultValue )
- {
- String value = (String) data.get( key );
-
- if ( StringUtils.isEmpty( value ) )
- {
- return defaultValue;
- }
-
- return value;
- }
-
- protected String getEnumString( Map data, String key, String[] legalValues, String defaultValue )
- throws ModelloException
- {
- String value = (String) data.get( key );
-
- if ( StringUtils.isEmpty( value ) )
- {
- return defaultValue;
- }
-
- for ( int i = 0; i < legalValues.length; i++ )
- {
- String enumString = legalValues[i];
- if ( StringUtils.equals( enumString, value ) )
- {
- return value;
- }
- }
-
- String emsg = "Unknown " + key + " value: '" + value + "'. " + "(Allowed values: " + legalValues + ")";
- throw new ModelloException( emsg );
- }
-
- // ----------------------------------------------------------------------
- // Metadata to Map
- // ----------------------------------------------------------------------
-
- public Map getFieldMap( ModelField field, FieldMetadata metadata )
- {
- return Collections.EMPTY_MAP;
- }
-}
diff --git a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxModelMetadata.java b/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxModelMetadata.java
deleted file mode 100644
index 5ca5e4d..0000000
--- a/modello-plugin-jpox/src/main/java/org/apache/archiva/redback/components/modello/jpox/metadata/JPoxModelMetadata.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox.metadata;
-
-/*
- * 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.modello.metadata.ModelMetadata;
-
-/**
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: JPoxModelMetadata.java 827 2007-03-21 19:31:37Z joakime $
- */
-public class JPoxModelMetadata implements ModelMetadata
-{
- public static final String ID = JPoxModelMetadata.class.getName();
-
- public static final String ERROR = "error";
-
- public static final String WARNING = "warning";
-
- private String columnPrefix;
-
- private String tablePrefix;
-
- private String reservedWordStrictness;
-
- private boolean mappingInPackage = false;
-
- public String getColumnPrefix()
- {
- return columnPrefix;
- }
-
- public void setColumnPrefix( String columnPrefix )
- {
- this.columnPrefix = columnPrefix;
- }
-
- public String getTablePrefix()
- {
- return tablePrefix;
- }
-
- public void setTablePrefix( String tablePrefix )
- {
- this.tablePrefix = tablePrefix;
- }
-
- public String getReservedWordStrictness()
- {
- return reservedWordStrictness;
- }
-
- public void setReservedWordStrictness( String reservedWordStrictness )
- {
- this.reservedWordStrictness = reservedWordStrictness;
- }
-
- public boolean isMappingInPackage()
- {
- return mappingInPackage;
- }
-
- public void setMappingInPackage( boolean mappingInPackage )
- {
- this.mappingInPackage = mappingInPackage;
- }
-}
diff --git a/modello-plugin-jpox/src/main/resources/META-INF/plexus/components.xml b/modello-plugin-jpox/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 022be99..0000000
--- a/modello-plugin-jpox/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<component-set>
- <components>
-
- <component>
- <role>org.codehaus.modello.plugin.ModelloGenerator</role>
- <role-hint>jpox-store</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.jpox.JPoxStoreModelloGenerator</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- </requirement>
- </requirements>
- </component>
-
- <component>
- <role>org.codehaus.modello.plugin.ModelloGenerator</role>
- <role-hint>jpox-jdo-mapping</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.jpox.JPoxJdoMappingModelloGenerator</implementation>
- <requirements>
- <requirement>
- <role>org.apache.archiva.redback.components.modello.db.SQLReservedWords</role>
- </requirement>
- </requirements>
- </component>
-
- <component>
- <role>org.codehaus.modello.plugin.ModelloGenerator</role>
- <role-hint>jpox-metadata-class</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.jpox.JPoxMetadataClassModelloGenerator</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- </requirement>
- </requirements>
- </component>
-
- <component>
- <role>org.codehaus.modello.metadata.MetadataPlugin</role>
- <role-hint>jpox</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.jpox.metadata.JPoxMetadataPlugin</implementation>
- </component>
-
- </components>
-</component-set>
diff --git a/modello-plugin-jpox/src/main/resources/org/apache/archiva/redback/components/modello/jpox/templates/JPoxStore.java.vm b/modello-plugin-jpox/src/main/resources/org/apache/archiva/redback/components/modello/jpox/templates/JPoxStore.java.vm
deleted file mode 100644
index cfc6f5a..0000000
--- a/modello-plugin-jpox/src/main/resources/org/apache/archiva/redback/components/modello/jpox/templates/JPoxStore.java.vm
+++ /dev/null
@@ -1,488 +0,0 @@
-package ${package};
-
-##
-## Copyright 2001-2005 The Apache Software Foundation.
-##
-## Licensed under the Apache License, Version 2.0 (the "License");
-## you may not use this file except in compliance with the License.
-## You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-##
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import javax.jdo.Extent;
-import javax.jdo.FetchPlan;
-import javax.jdo.Query;
-import javax.jdo.PersistenceManager;
-import javax.jdo.PersistenceManagerFactory;
-import javax.jdo.JDOUserException;
-import javax.jdo.Transaction;
-
-// Model class imports
-#foreach ( $class in $classes )
-#if ( $class.getMetadata( $storeClassMetadataId ).storable && ${class.packageName} != ${package} )
-import ${class.packageName}.${class.name};
-#end
-#end
-
-/**
- * Generated JPox storage mechanism for ${model.name}.
- *
- * @author Mr Modello
- */
-public class ${model.name}JPoxStore
-{
-#foreach ( $class in $classes )
-#if ( $class.getMetadata( $storeClassMetadataId ).storable )
- public final static String ${class.name}_DETAIL_FETCH_GROUP = "${class.name}_detail";
-#end
-#end
- private static ThreadLocal threadState = new ThreadLocal();
-
- private PersistenceManagerFactory pmf;
-
- public ${model.name}JPoxStore( PersistenceManagerFactory pmf )
- {
- this.pmf = pmf;
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- public static class ThreadState
- {
- private PersistenceManager pm;
-
- private Transaction tx;
-
- private int depth;
-
- public PersistenceManager getPersistenceManager()
- {
- return pm;
- }
-
- public Transaction getTransaction()
- {
- return tx;
- }
-
- public int getDepth()
- {
- return depth;
- }
- }
-
- // ----------------------------------------------------------------------
- // Transaction Management Methods
- // ----------------------------------------------------------------------
-
- public ThreadState getThreadState()
- {
- return (ThreadState) threadState.get();
- }
-
- public PersistenceManager begin()
- {
- ThreadState state = (ThreadState) threadState.get();
-
- if ( state == null )
- {
- state = new ThreadState();
-
- state.pm = pmf.getPersistenceManager();
-
- state.tx = state.pm.currentTransaction();
-
- state.tx.begin();
-
- threadState.set( state );
-
- return state.pm;
- }
- else
- {
- state.depth++;
-
- return state.pm;
- }
- }
-
- public void commit()
- {
- ThreadState state = (ThreadState) threadState.get();
-
- if ( state == null )
- {
- throw new IllegalStateException( "commit() must only be called after begin()." );
- }
-
- if ( state.depth > 0 )
- {
- state.depth--;
-
- return;
- }
-
- threadState.set( null );
-
- try
- {
- state.tx.commit();
- }
- finally
- {
- if ( state.tx.isActive() )
- {
- state.tx.rollback();
- }
-
- closePersistenceManager( state.pm );
- }
- }
-
- public void rollback()
- {
- ThreadState state = (ThreadState) threadState.get();
-
- if ( state == null )
- {
- // The tx is not active because it has already been committed or rolled back
-
- return;
- }
-
- threadState.set( null );
-
- try
- {
- if ( state.tx.isActive() )
- {
- state.tx.rollback();
- }
- }
- finally
- {
- closePersistenceManager( state.pm );
- }
- }
-
-#foreach ( $class in $classes )
-#if ( $class.getMetadata( $storeClassMetadataId ).storable )
- // ----------------------------------------------------------------------
- // ${class.name} CRUD
- // ----------------------------------------------------------------------
-
- public Object add${class.name}( $class.name o )
- {
- try
- {
- PersistenceManager pm = begin();
-
- pm.makePersistent( o );
-
- Object id = pm.getObjectId( o );
-
- commit();
-
- return id;
- }
- finally
- {
- rollback();
- }
- }
-
-#if ( $class.getIdentifierFields( $version ).size() > 0 )
- public Object store${class.name}( $class.name o )
- {
- try
- {
- PersistenceManager pm = begin();
-
- pm.makePersistent( o );
-
- Object id = pm.getObjectId( o );
-
- commit();
-
- return id;
- }
- finally
- {
- rollback();
- }
- }
-#end
-
- public void delete${class.name}( String id )
- {
- try
- {
- PersistenceManager pm = begin();
-
- Query query = pm.newQuery( ${class.name}.class );
-
- query.setIgnoreCache( true );
-
- // TODO: Use all known identifier fields in this filter
- query.setFilter( "this.id == \"" + id + "\"" );
-
- Collection result = (Collection) query.execute();
-
- if ( result.isEmpty() )
- {
- throw new RuntimeException( "No such object of type \"${class.name}\" with id: \"" + id + "\"." );
- }
-
- pm.deletePersistentAll( result );
-
- commit();
- }
- finally
- {
- rollback();
- }
- }
-
-#if ( $class.getIdentifierFields( $version ).size() == 1 )
- public ${class.name} get${class.name}( String id, boolean detach )
- throws Exception
- {
- try
- {
- PersistenceManager pm = begin();
-
- pm.getFetchPlan().setGroup( FetchPlan.DEFAULT );
-
- pm.getFetchPlan().addGroup( "${class.name}_detail" );
-
- Query query = pm.newQuery( ${class.name}.class );
-
- query.setIgnoreCache( true );
-
- #foreach ( $idField in $class.getIdentifierFields( $version ) )
- query.setFilter( "this.${idField.name} == \"" + id + "\"" );
- #end
-
- Collection result = (Collection) query.execute();
-
- if ( result.isEmpty() )
- {
- throw new RuntimeException( "No such object of type \"${class.name}\" with id: \"" + id + "\"." );
- }
-
- ${class.name} object = (${class.name}) result.iterator().next();
-
- if ( detach )
- {
- object = (${class.name}) pm.detachCopy( object );
- }
-
- commit();
-
- return object;
- }
- finally
- {
- rollback();
- }
- }
-#end
-
- public ${class.name} get${class.name}ByJdoId( Object id, boolean detach )
- {
- try
- {
- PersistenceManager pm = begin();
-
- pm.getFetchPlan().setGroup( FetchPlan.DEFAULT );
-
- pm.getFetchPlan().addGroup( "${class.name}_detail" );
-
- ${class.name} object = (${class.name}) pm.getObjectById( id, true );
-
- if ( detach )
- {
- object = (${class.name}) pm.detachCopy( object );
- }
-
- commit();
-
- return object;
- }
- finally
- {
- rollback();
- }
- }
-
- public Collection get${class.name}Collection( boolean detach, String filter, String ordering )
- {
- try
- {
- PersistenceManager pm = begin();
-
- Extent extent = pm.getExtent( ${class.name}.class, true );
-
- Query query = pm.newQuery( extent );
-
- if ( ordering != null )
- {
- query.setOrdering( ordering );
- }
-
- if ( filter != null )
- {
- query.setFilter( filter );
- }
-
- Collection result = ((Collection) query.execute() );
-
- Collection collection;
-
- // TODO: Why did was this done with a iterator and not makeTransientAll()? -- trygve
- // I would guess I had to do it this way to make sure JPOX fetched all fields
- // so this should probably go away now if detach works like expected.
- // Also; why refresh()?
- if ( detach )
- {
- collection = new ArrayList();
-
- for ( Iterator it = result.iterator(); it.hasNext(); )
- {
- Object object = it.next();
-
- pm.refresh( object );
-
- object = pm.detachCopy( object );
-
- collection.add( object );
- }
- }
- else
- {
- collection = result;
- }
-
- commit();
-
- return collection;
- }
- finally
- {
- rollback();
- }
- }
-#end
-
-#end
-
- public ${model.name}ModelloMetadata get${model.name}ModelloMetadata( boolean detach )
- {
- try
- {
- PersistenceManager pm = begin();
-
- pm.getFetchPlan().setGroup( FetchPlan.DEFAULT );
-
- Query query = pm.newQuery( ${model.name}ModelloMetadata.class );
-
- query.setIgnoreCache( true );
-
- Collection result = (Collection) query.execute();
-
- if ( result.isEmpty() )
- {
- return null;
- }
-
- ${model.name}ModelloMetadata object = (${model.name}ModelloMetadata) result.iterator().next();
-
- if ( detach )
- {
- object = (${model.name}ModelloMetadata) pm.detachCopy( object );
- }
-
- commit();
-
- return object;
- }
- finally
- {
- rollback();
- }
- }
-
- public void store${model.name}ModelloMetadata( ${model.name}ModelloMetadata o )
- {
- try
- {
- PersistenceManager pm = begin();
-
- pm.makePersistent( o );
-
- commit();
- }
- finally
- {
- rollback();
- }
- }
-
- public void eraseModelFromDatabase()
- {
- try
- {
- PersistenceManager pm = begin();
-
- Query query = pm.newQuery( ${model.name}ModelloMetadata.class );
-
- query.setIgnoreCache( true );
-
- query.deletePersistentAll();
-
- #foreach ($class in $classes)
- query = pm.newQuery( ${class.name}.class );
-
- query.setIgnoreCache( true );
-
- query.deletePersistentAll();
- #end
-
-
- commit();
- }
- finally
- {
- rollback();
- }
- }
-
- // ----------------------------------------------------------------------
- // Utility Methods
- // ----------------------------------------------------------------------
-
- private void closePersistenceManager( PersistenceManager pm )
- {
- try
- {
- pm.close();
- }
- catch( JDOUserException ex )
- {
- ex.printStackTrace();
- }
- }
-}
diff --git a/modello-plugin-jpox/src/main/resources/org/apache/archiva/redback/components/modello/jpox/templates/ModelloMetadata.java.vm b/modello-plugin-jpox/src/main/resources/org/apache/archiva/redback/components/modello/jpox/templates/ModelloMetadata.java.vm
deleted file mode 100644
index 796c1d0..0000000
--- a/modello-plugin-jpox/src/main/resources/org/apache/archiva/redback/components/modello/jpox/templates/ModelloMetadata.java.vm
+++ /dev/null
@@ -1,44 +0,0 @@
-package ${package};
-
-##
-## Copyright 2001-2005 The Apache Software Foundation.
-##
-## Licensed 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.
-##
-
-// Model class imports
-#foreach ( $class in $classes )
-#if ( $class.getMetadata( $storeClassMetadataId ).isStorable() && ${class.packageName} != ${package} )
-import ${class.packageName}.${class.name};
-#end
-#end
-
-/**
- * Generated ModelloMetadata class for ${model.name}.
- *
- * @author Mr Modello
- */
-public class ${model.name}ModelloMetadata
-{
- private String modelVersion;
-
- public String getModelVersion()
- {
- return modelVersion;
- }
-
- public void setModelVersion( String modelVersion )
- {
- this.modelVersion = modelVersion;
- }
-}
diff --git a/modello-plugin-jpox/src/site/apt/index.apt b/modello-plugin-jpox/src/site/apt/index.apt
deleted file mode 100644
index 5f4cdcd..0000000
--- a/modello-plugin-jpox/src/site/apt/index.apt
+++ /dev/null
@@ -1,45 +0,0 @@
- -----
- Modello JPOX Plugin
- -----
- Joakim Erdfelt
- -----
- 14 March 2007
- -----
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Welcome to Modello JPOX Plugin
-
- The Modello JPOX Plugin is responsibile for providing various modello model transformations useful for the JPOX/JDO developer.
-
- * jpox-jdo-mapping: Produces a package.jdo file describing the model.
-
- * jpox-store: Produces a java source file that provides a basic DAO / Store for the objects within the model.
-
- * jpox-metadata-class: Produces a java source file that can supply the basic model version object suitable for tracking the model version vs table schema version.
-
- We welcome developers to the modello community who are interested in contributing. If you'd like to discuss modello, subscribe and post to
- {{{mail-lists.html} the development mailing list}}, <<<dev@modello.codehaus.org>>>.
-
- If you'd like to obtain the code, you can get it from Subversion. See {{{source-repository.html} SCM details}} for more information.
-
- Bugs, issues and new ideas should be reported in the issue tracker - see {{{issue-tracking.html} this page}}.
-
diff --git a/modello-plugin-jpox/src/site/site.xml b/modello-plugin-jpox/src/site/site.xml
deleted file mode 100644
index 11d5a5f..0000000
--- a/modello-plugin-jpox/src/site/site.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project name="Modello JPOX Plugin">
- <bannerLeft>
- <name>Modello</name>
- </bannerLeft>
-
- <body>
-
- <menu ref="parent" />
-
- <menu name="Maven 2.0">
- <item name="Introduction" href="index.html"/>
- <item name="Model Syntax" href="jpox-model-syntax.html"/>
- </menu>
-
- <menu ref="reports"/>
-
- </body>
-</project>
diff --git a/modello-plugin-jpox/src/site/xdoc/jpox-model-syntax.xml b/modello-plugin-jpox/src/site/xdoc/jpox-model-syntax.xml
deleted file mode 100644
index 1eb31c4..0000000
--- a/modello-plugin-jpox/src/site/xdoc/jpox-model-syntax.xml
+++ /dev/null
@@ -1,352 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<document>
- <properties>
- <author email="joakime@codehaus.org">Joakim Erdfelt</author>
- <title>jpox-jdo-mapping model syntax</title>
- </properties>
-
- <head>
- <style type="text/css">
- pre.model-xml {
- background-color: #f3f3ff;
- border: 1px dashed #aaaaff;
- padding: 15px;
- }
-
- pre.model-xml a {
- font-style: normal;
- color: #000088;
- }
-
- pre.model-xml a em {
- color: #7777ff;
- }
- </style>
- </head>
-
- <body>
- <section name="Modello JPOX Model Syntax">
-<pre class="model-xml">
-<model <a href="#model-reserved-word-strictness">jpox.reserved-word-strictness="<em>(enum)</em>"</a>
- <a href="#model-table-prefix">jpox.table-prefix="<em>(String)</em>"</a>
- <a href="#model-column-prefix">jpox.column-prefix="<em>(String)</em>"</a>>
- <name>ExampleModel</name>
- <classes>
- <class <a href="#class-enabled">jpox.enabled="<em>(boolean)</em>"</a>
- <a href="#class-detachable">jpox.detachable="<em>(boolean)</em>"</a>
- <a href="#class-not-persisted-fields">jpox.not-persisted-fields="<em>(List)</em>"</a>
- <a href="#class-table">jpox.table="<em>(String)</em>"</a>
- <a href="#class-column-prefix">jpox.column-prefix="<em>(String)</em>"</a>
- <a href="#class-identity-type">jpox.identity-type="<em>(enum)</em>"</a>
- <a href="#class-identity-class">jpox.identity-class="<em>(String)</em>"</a>
- <a href="#class-use-identifiers-as-primary-key">jpox.use-identifiers-as-primary-key="<em>(boolean)</em>"</a>>
- <name>SimpleClass</name>
- <fields>
- <field <a href="#field-fetch-groups">jpox.fetch-groups="<em>(List)</em>"</a>
- <a href="#field-mapped-by">jpox.mapped-by="<em>(String)</em>"</a>
- <a href="#field-null-value">jpox.null-value="<em>(String)</em>"</a>
- <a href="#field-column">jpox.column="<em>(String)</em>"</a>
- <a href="#field-join-table">jpox.join-table="<em>(String)</em>"</a>
- <a href="#field-indexed">jpox.indexed="<em>(enum)</em>"</a>
- <a href="#field-persistence-modifier">jpox.persistence-modifier="<em>(enum)</em>"</a>
- <a href="#field-value-strategy">jpox.value-strategy="<em>(enum)</em>"</a>>
- <name>simple</name>
- <type>String</type>
- <required>true</required>
- </field>
- <field>
- <name>associative</name>
- <required>false</required>
- <association <a href="#association-dependent">jpox.dependent="<em>(boolean)</em>"</a>
- <a href="#association-join">jpox.join="<em>(boolean)</em>"</a>>
- <type>AnotherClass</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
- </classes>
-</model>
-</pre>
-
- <table>
- <tr>
- <th>Context</th>
- <th>Attribute</th>
- <th>Values</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>Model</td>
- <td><a name="model-reserved-word-strictness">jpox.reserved-word-strictness</a></td>
- <td>"warning" or "error" (default: warning)</td>
- <td>
- <p>
- This allows you to set the level of strictness on the reserved
- word violations within the TABLE / COLUMN / JOIN-TABLE names.
- </p>
- <p>
- A setting of "error" will only throw an exception if a reserved
- word violation severity level of ERROR is encountered.
- </p>
- <p>
- An attempt to use a reserved word found within the core SQL92 /
- SQL99 / or SQL2003 set of reserved words are considered an ERROR.
- Use of a reserved word found within a vendor specific SQL
- implementation is considered a WARNING.
- </p>
- <p>
- You are encouraged to fix all reserved word violations to make
- your code as portable across multiple SQL implementations as
- possible.
- </p>
- </td>
- </tr>
- <tr>
- <td>Model</td>
- <td><a name="model-table-prefix">jpox.table-prefix</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Model</td>
- <td><a name="model-column-prefix">jpox.column-prefix</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-enabled">jpox.enabled</a></td>
- <td>
- true or false.
- <br/>(Default: true)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-detachable">jpox.detachable</a></td>
- <td>
- true or false
- <br/>(Default: true)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-not-persisted-fields">jpox.not-persisted-fields</a></td>
- <td>
- List of fields that are not persisted (seperated by spaces)
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-table">jpox.table</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-column-prefix">jpox.column-prefix</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-identity-type">jpox.identity-type</a></td>
- <td>
- "application", "datastore", or "nondurable"
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-identity-class">jpox.identity-class</a></td>
- <td>
- Any non-empty String.
- Refers to a Java Class name in the same package as
- the model.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Class</td>
- <td><a name="class-use-identifiers-as-primary-key">jpox.use-identifiers-as-primary-key</a></td>
- <td>
- true or false
- <br/>(Default: true)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-fetch-groups">jpox.fetch-groups</a></td>
- <td>
- List of fetch-group names (seperated by space).
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-mapped-by">jpox.mapped-by</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-null-value">jpox.null-value</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-column">jpox.column</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-join-table">jpox.join-table</a></td>
- <td>
- Any non-empty String.
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-indexed">jpox.indexed</a></td>
- <td>
- 'true', 'false', or 'unique'
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-persistence-modifier">jpox.persistence-modifier</a></td>
- <td>
- 'persistent', 'transactiona', or 'none'
- <br/>(No Default)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Field</td>
- <td><a name="field-value-strategy">jpox.value-strategy</a></td>
- <td>
- 'off', 'native', 'sequence', 'identity', 'increment', 'uuid-string',
- 'uuid-hex', 'datastore-uuid-hex', 'max', or 'auid'
- <br/>(Default: 'native')
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Association</td>
- <td><a name="association-dependent">jpox.dependent</a></td>
- <td>
- true or false
- <br/>(Default: true)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- <tr>
- <td>Association</td>
- <td><a name="association-join">jpox.join</a></td>
- <td>
- true or false
- <br/>(Default: true)
- </td>
- <td>
- <!-- TODO: Description -->
- </td>
- </tr>
- </table>
-
- </section>
- </body>
-</document>
-
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/AbstractJpoxGeneratorTestCase.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/AbstractJpoxGeneratorTestCase.java
deleted file mode 100644
index 5c222d8..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/AbstractJpoxGeneratorTestCase.java
+++ /dev/null
@@ -1,373 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.AbstractModelloGeneratorTest;
-import org.codehaus.modello.AbstractModelloJavaGeneratorTest;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.plexus.compiler.CompilerException;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.cli.CommandLineException;
-import org.codehaus.plexus.util.cli.CommandLineUtils;
-import org.codehaus.plexus.util.cli.Commandline;
-import org.dom4j.Attribute;
-import org.dom4j.Branch;
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.XPath;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
-import junit.framework.AssertionFailedError;
-
-public abstract class AbstractJpoxGeneratorTestCase
- extends AbstractModelloJavaGeneratorTest
-{
- protected ModelloCore modello;
-
- protected AbstractJpoxGeneratorTestCase( String name )
- {
- super( name );
- }
-
- protected void setUp()
- throws Exception
- {
- super.setUp();
-
- modello = (ModelloCore) container.lookup( ModelloCore.ROLE );
- }
-
- protected void verifyModel( Model model, String className )
- throws IOException, ModelloException, CompilerException, CommandLineException
- {
- verifyModel( model, className, null );
- }
-
- protected void verifyModel( Model model, String className, String[] versions )
- throws IOException, ModelloException, CompilerException, CommandLineException
- {
- File generatedSources = new File( getTestPath( "target/" + getName() + "/sources" ) );
-
- File classes = new File( getTestPath( "target/" + getName() + "/classes" ) );
-
- FileUtils.deleteDirectory( generatedSources );
-
- FileUtils.deleteDirectory( classes );
-
- generatedSources.mkdirs();
-
- classes.mkdirs();
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, generatedSources.getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.toString( false ) );
-
- modello.generate( model, "java", parameters );
-
- modello.generate( model, "jpox-store", parameters );
-
- modello.generate( model, "jpox-metadata-class", parameters );
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, classes.getAbsolutePath() );
- modello.generate( model, "jpox-jdo-mapping", parameters );
-
- if ( versions != null && versions.length > 0 )
- {
- parameters.setProperty( ModelloParameterConstants.ALL_VERSIONS, StringUtils.join( versions, "," ) );
-
- for ( int i = 0; i < versions.length; i++ )
- {
- parameters.setProperty( ModelloParameterConstants.VERSION, versions[i] );
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY,
- generatedSources.getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.toString( true ) );
-
- modello.generate( model, "java", parameters );
-
- modello.generate( model, "jpox-store", parameters );
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, classes.getAbsolutePath() );
- modello.generate( model, "jpox-jdo-mapping", parameters );
- }
- }
-
- addDependency( "org.codehaus.modello", "modello-core" );
-
- addDependency( "jpox", "jpox" );
- addDependency( "javax.jdo", "jdo2-api" );
- addDependency( "org.apache.derby", "derby" );
- addDependency( "log4j", "log4j" );
-
- compileGeneratedSources( true );
-
- enhance( classes );
-
- //verifyCompiledGeneratedSources( className, getName() );
- }
-
- private void enhance( File classes )
- throws CommandLineException, ModelloException, IOException
- {
- Properties loggingProperties = new Properties();
- loggingProperties.setProperty( "log4j.appender.root", "org.apache.log4j.ConsoleAppender" );
- loggingProperties.setProperty( "log4j.appender.root.layout", "org.apache.log4j.PatternLayout" );
- loggingProperties.setProperty( "log4j.appender.root.layout.ConversionPattern", "%-5p [%c] - %m%n" );
- loggingProperties.setProperty( "log4j.category.JPOX", "INFO, root" );
- File logFile = new File( classes, "log4j.properties" );
- loggingProperties.store( new FileOutputStream( logFile ), "logging" );
-
- Commandline cl = new Commandline();
-
- cl.setExecutable( "java" );
-
- StringBuffer cpBuffer = new StringBuffer();
-
- cpBuffer.append( classes.getAbsolutePath() );
-
- for ( Iterator it = getClassPathElements().iterator(); it.hasNext(); )
- {
- cpBuffer.append( File.pathSeparator );
-
- cpBuffer.append( it.next() );
- }
-
- File enhancerJar = getDependencyFile( "jpox", "jpox-enhancer" );
- cpBuffer.append( File.pathSeparator + enhancerJar.getAbsolutePath() );
- File bcelJar = getDependencyFile( "org.apache.bcel", "bcel" );
- cpBuffer.append( File.pathSeparator + bcelJar.getAbsolutePath() );
-
- cl.createArgument().setValue( "-cp" );
-
- cl.createArgument().setValue( cpBuffer.toString() );
-
- cl.createArgument().setValue( "-Dlog4j.configuration=" + logFile.toURL() );
-
- cl.createArgument().setValue( "org.jpox.enhancer.JPOXEnhancer" );
-
- cl.createArgument().setValue( "-v" );
-
- for ( Iterator i = FileUtils.getFiles( classes, "**/*.jdo", null ).iterator(); i.hasNext(); )
- {
- cl.createArgument().setFile( (File) i.next() );
- }
-
- CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();
-
- CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
-
- System.out.println( cl );
- int exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr );
-
- String stream = stderr.getOutput();
-
- if ( stream.trim().length() > 0 )
- {
- System.err.println( stderr.getOutput() );
- }
-
- stream = stdout.getOutput();
-
- if ( stream.trim().length() > 0 )
- {
- System.out.println( stdout.getOutput() );
- }
-
- if ( exitCode != 0 )
- {
- throw new ModelloException( "The JPox enhancer tool exited with a non-null exit code." );
- }
- }
-
- protected void assertAttributeEquals( Document doc, String xpathToNode, String attributeKey, String expectedValue )
- {
- if ( expectedValue == null )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using a null expected value." );
- }
-
- Attribute attribute = findAttribute( doc, xpathToNode, attributeKey );
-
- if ( attribute == null )
- {
- throw new AssertionFailedError( "Element at '" + xpathToNode + "' is missing the '" + attributeKey
- + "' attribute." );
- }
-
- assertEquals( "Attribute value for '" + xpathToNode + "'", expectedValue, attribute.getValue() );
- }
-
- protected void assertElementExists( Document doc, String xpathToNode )
- {
- findElement( doc, xpathToNode );
- }
-
- protected void assertElementNotExists( Document doc, String xpathToNode )
- {
- if ( StringUtils.isEmpty( xpathToNode ) )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using an empty xpath." );
- }
-
- if ( doc == null )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using a null document." );
- }
-
- XPath xpath = doc.createXPath( xpathToNode );
-
- Node node = xpath.selectSingleNode( doc );
-
- if ( node != null )
- {
- throw new AssertionFailedError( "Element at '" + xpathToNode + "' should not exist." );
- }
-
- // In case node returns something other than an element.
- }
-
- private Element findElement( Document doc, String xpathToNode )
- {
- if ( StringUtils.isEmpty( xpathToNode ) )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using an empty xpath." );
- }
-
- if ( doc == null )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using a null document." );
- }
-
- XPath xpath = doc.createXPath( xpathToNode );
-
- Node node = xpath.selectSingleNode( doc );
-
- if ( node == null )
- {
- throw new AssertionFailedError( "Expected Node at '" + xpathToNode + "', but was not found." );
- }
-
- if ( node.getNodeType() != Node.ELEMENT_NODE )
- {
- throw new AssertionFailedError( "Node at '" + xpathToNode + "' is not an xml element." );
- }
-
- return (Element) node;
- }
-
- private Attribute findAttribute( Document doc, String xpathToNode, String attributeKey ) throws AssertionFailedError
- {
- if ( StringUtils.isEmpty( attributeKey ) )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using an empty attribute key." );
- }
-
- Element elem = findElement( doc, xpathToNode );
-
- Attribute attribute = elem.attribute( attributeKey );
- return attribute;
- }
-
- protected void assertAttributeMissing( Document doc, String xpathToNode, String attributeKey )
- {
- Attribute attribute = findAttribute( doc, xpathToNode, attributeKey );
-
- if ( attribute != null )
- {
- throw new AssertionFailedError( "Node at '" + xpathToNode + "' should not have the attribute named '"
- + attributeKey + "'." );
- }
- }
-
- protected void assertNoTextNodes( Document doc, String xpathToParentNode, boolean recursive )
- {
- if ( StringUtils.isEmpty( xpathToParentNode ) )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using an empty xpath." );
- }
-
- if ( doc == null )
- {
- throw new AssertionFailedError( "Unable to assert an attribute using a null document." );
- }
-
- XPath xpath = doc.createXPath( xpathToParentNode );
-
- List nodes = xpath.selectNodes( doc );
-
- if ( ( nodes == null ) || nodes.isEmpty() )
- {
- throw new AssertionFailedError( "Expected Node(s) at '" + xpathToParentNode + "', but was not found." );
- }
-
- Iterator it = nodes.iterator();
- while ( it.hasNext() )
- {
- Node node = (Node) it.next();
-
- assertNoTextNode( "No Text should exist in '" + xpathToParentNode + "'", node, recursive );
- }
- }
-
- private boolean assertNoTextNode( String message, Node node, boolean recursive )
- {
- if ( node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE )
- {
- // Double check that it isn't just whitespace.
- String text = StringUtils.trim( node.getText() );
-
- if ( StringUtils.isNotEmpty( text ) )
- {
- throw new AssertionFailedError( message + " found <" + text + ">" );
- }
- }
-
- if ( recursive )
- {
- if ( node instanceof Branch )
- {
- Iterator it = ( (Branch) node ).nodeIterator();
- while ( it.hasNext() )
- {
- Node child = (Node) it.next();
- assertNoTextNode( message, child, recursive );
- }
- }
- }
-
- return false;
- }
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGeneratorPrefixedTest.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGeneratorPrefixedTest.java
deleted file mode 100644
index e8b862d..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGeneratorPrefixedTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.dom4j.Document;
-import org.dom4j.io.SAXReader;
-
-import java.io.File;
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxJdoMappingModelloGeneratorPrefixedTest.java 840 2007-07-17 18:50:39Z hboutemy $
- */
-public class JPoxJdoMappingModelloGeneratorPrefixedTest extends AbstractJpoxGeneratorTestCase
-{
- public JPoxJdoMappingModelloGeneratorPrefixedTest()
- {
- super( "jpox-jdo-mapping" );
- }
-
- public void testInvocationWithPrefixes() throws Exception
- {
- ModelloCore core = (ModelloCore) lookup( ModelloCore.ROLE );
-
- Model model = core.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/test-with-prefixes.mdo" ) ) );
-
- // ----------------------------------------------------------------------
- // Generate the code
- // ----------------------------------------------------------------------
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, getOutputDirectory().getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.FALSE.toString() );
-
- core.generate( model, "jpox-jdo-mapping", parameters );
-
- // ----------------------------------------------------------------------
- // Assert
- // ----------------------------------------------------------------------
-
- assertGeneratedFileExists( "package.jdo" );
-
- SAXReader reader = new SAXReader();
- reader.setEntityResolver( new JdoEntityResolver() );
- Document jdoDocument = reader.read( new File( getOutputDirectory() + "/package.jdo" ) );
-
- assertNotNull( jdoDocument );
-
- // Tree should consist of only elements with attributes. NO TEXT.
- assertNoTextNodes( jdoDocument, "//jdo", true );
-
- assertAttributeEquals( jdoDocument,
- "//class[@name='RbacJdoModelModelloMetadata']/field[@name='modelVersion']/column",
- "default-value", "1.0.0" );
-
- assertAttributeEquals( jdoDocument, "//class[@name='JdoResource']/field[@name='modelEncoding']", "persistence-modifier",
- "none" );
-
- // -----------------------------------------------------------------------
- // Association Tests.
-
- // mdo/association/jpox.dependent-element == false (only on association with "*" multiplicity (default type)
- assertAttributeEquals( jdoDocument, "//class[@name='JdoRole']/field[@name='permissions']/collection",
- "dependent-element", "false" );
-
- // mdo/association (default type) with "1" multiplicity.
- assertElementNotExists( jdoDocument, "//class[@name='JdoPermission']/field[@name='operation']/collection" );
-
- // -----------------------------------------------------------------------
- // Fetch Group Tests
- assertAttributeMissing( jdoDocument, "//class[@name='JdoRole']/field[@name='assignable']", "default-fetch-group" );
- assertAttributeEquals( jdoDocument, "//class[@name='JdoRole']/field[@name='childRoleNames']",
- "default-fetch-group", "true" );
-
- // -----------------------------------------------------------------------
- // Alternate Table and Column Names Tests.
- assertAttributeEquals( jdoDocument, "//class[@name='JdoPermission']", "table", "SECURITY_PERMISSIONS" );
- assertAttributeEquals( jdoDocument, "//class[@name='JdoOperation']/field[@name='name']/column", "name", "OPERATION_NAME" );
- assertAttributeEquals( jdoDocument, "//class[@name='JdoRole']/field[@name='permissions']", "table", "SECURITY_ROLE_PERMISSION_MAP" );
- }
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGeneratorTest.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGeneratorTest.java
deleted file mode 100644
index 95bf616..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxJdoMappingModelloGeneratorTest.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.dom4j.Document;
-import org.dom4j.io.SAXReader;
-
-import java.io.File;
-import java.util.Properties;
-
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxJdoMappingModelloGeneratorTest.java 840 2007-07-17 18:50:39Z hboutemy $
- */
-public class JPoxJdoMappingModelloGeneratorTest
- extends AbstractJpoxGeneratorTestCase
-{
- public JPoxJdoMappingModelloGeneratorTest()
- {
- super( "jpox-jdo-mapping" );
- }
-
- public void testSimpleInvocation()
- throws Exception
- {
- ModelloCore core = (ModelloCore) lookup( ModelloCore.ROLE );
-
- Model model =
- core.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/mergere-tissue.mdo" ) ) );
-
- // ----------------------------------------------------------------------
- // Generate the code
- // ----------------------------------------------------------------------
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, getOutputDirectory().getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.FALSE.toString() );
-
- core.generate( model, "jpox-jdo-mapping", parameters );
-
- // ----------------------------------------------------------------------
- // Assert
- // ----------------------------------------------------------------------
-
- assertTrue( new File( getOutputDirectory(), "package.jdo" ).exists() );
-
- //assertGeneratedFileExists( "package.jdo" );
-
- SAXReader reader = new SAXReader();
- reader.setEntityResolver( new JdoEntityResolver() );
- Document jdoDocument = reader.read( new File( getOutputDirectory() + "/package.jdo" ) );
-
- assertNotNull( jdoDocument );
-
- // Tree should consist of only elements with attributes. NO TEXT.
- assertNoTextNodes( jdoDocument, "//jdo", true );
-
- assertAttributeEquals( jdoDocument, "//class[@name='TissueModelloMetadata']/field[@name='modelVersion']/column",
- "default-value", "1.0.0" );
-
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='summary']", "persistence-modifier",
- "none" );
-
- // -----------------------------------------------------------------------
- // Association Tests.
-
- // mdo/association/jpox.dependent-element == false (only on association with "*" multiplicity (default type)
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='friends']/collection",
- "dependent-element", "false" );
-
- // mdo/association (default type) with "1" multiplicity.
- assertElementNotExists( jdoDocument, "//class[@name='Issue']/field[@name='assignee']/collection" );
-
- // mdo/association (map) with "*" multiplicity.
- assertElementExists( jdoDocument, "//class[@name='Issue']/field[@name='configuration']/map" );
-
- // -----------------------------------------------------------------------
- // Fetch Group Tests
- assertAttributeMissing( jdoDocument, "//class[@name='Issue']/field[@name='reporter']", "default-fetch-group" );
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='configuration']",
- "default-fetch-group", "true" );
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='assignee']", "default-fetch-group",
- "false" );
-
- // -----------------------------------------------------------------------
- // Value Strategy Tests
- // defaulted
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='id']", "value-strategy",
- "native" );
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='accountId']", "value-strategy",
- "native" );
- // intentionally unset
- assertAttributeMissing( jdoDocument, "//class[@name='User']/field[@name='id']", "value-strategy" );
-
- // -----------------------------------------------------------------------
- // Superclass Tests
- assertAttributeEquals( jdoDocument, "//class[@name='User']", "persistence-capable-superclass",
- "org.mergere.user.AbstractUser" );
-
- // -----------------------------------------------------------------------
- // Primary Key Tests
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='accountId']", "primary-key", "true" );
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='summary']", "primary-key", "false" );
-
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='id']", "primary-key",
- "true" );
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='username']", "primary-key",
- "false" );
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='fullName']", "primary-key",
- "false" );
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='email']", "primary-key",
- "false" );
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='locked']", "primary-key",
- "false" );
- assertAttributeEquals( jdoDocument, "//class[@name='ComplexIdentity']/field[@name='lastLoginDate']",
- "primary-key", "false" );
-
- // -----------------------------------------------------------------------
- // Alternate Table and Column Names Tests.
- assertAttributeEquals( jdoDocument, "//class[@name='DifferentTable']", "table", "MyTable" );
- assertAttributeEquals( jdoDocument, "//class[@name='Issue']/field[@name='accountId']/column", "name", "id" );
- }
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxMetadataClassModelloGeneratorTest.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxMetadataClassModelloGeneratorTest.java
deleted file mode 100644
index 2cca24d..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxMetadataClassModelloGeneratorTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.AbstractModelloGeneratorTest;
-import org.codehaus.modello.AbstractModelloJavaGeneratorTest;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.plexus.util.ReaderFactory;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxStoreModelloGeneratorTest.java 699 2006-11-23 03:37:55Z brett $
- */
-public class JPoxMetadataClassModelloGeneratorTest
- extends AbstractModelloJavaGeneratorTest
-{
- public JPoxMetadataClassModelloGeneratorTest()
- {
- super( "jpox-metadata-class" );
- }
-
- public void testSimpleInvocation()
- throws Exception
- {
- ModelloCore core = (ModelloCore) lookup( ModelloCore.ROLE );
-
- Model model = core.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/mergere-tissue.mdo" ) ) );
-
- // ----------------------------------------------------------------------
- // Generate the code
- // ----------------------------------------------------------------------
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, getOutputDirectory().getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.FALSE.toString() );
-
- core.generate( model, "jpox-metadata-class", parameters );
-
- // ----------------------------------------------------------------------
- // Assert
- // ----------------------------------------------------------------------
-
- assertGeneratedFileExists( "org/mergere/tissue/TissueModelloMetadata.java" );
- }
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxStoreModelloGeneratorTest.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxStoreModelloGeneratorTest.java
deleted file mode 100644
index a2930d2..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JPoxStoreModelloGeneratorTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.AbstractModelloGeneratorTest;
-import org.codehaus.modello.AbstractModelloJavaGeneratorTest;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.plexus.util.ReaderFactory;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JPoxStoreModelloGeneratorTest.java 840 2007-07-17 18:50:39Z hboutemy $
- */
-public class JPoxStoreModelloGeneratorTest
- extends AbstractModelloJavaGeneratorTest
-{
- public JPoxStoreModelloGeneratorTest()
- {
- super( "jpox-store" );
- }
-
- public void testSimpleInvocation()
- throws Exception
- {
- ModelloCore core = (ModelloCore) lookup( ModelloCore.ROLE );
-
- Model model = core.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/mergere-tissue.mdo" ) ) );
-
- // ----------------------------------------------------------------------
- // Generate the code
- // ----------------------------------------------------------------------
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, getOutputDirectory().getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.FALSE.toString() );
-
- core.generate( model, "jpox-store", parameters );
-
- // ----------------------------------------------------------------------
- // Assert
- // ----------------------------------------------------------------------
-
- assertGeneratedFileExists( "org/mergere/tissue/TissueJPoxStore.java" );
- }
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JdoEntityResolver.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JdoEntityResolver.java
deleted file mode 100644
index 434f622..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JdoEntityResolver.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * JdoEntityResolver
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id: JdoEntityResolver.java 614 2006-09-06 14:26:11Z joakime $
- */
-public class JdoEntityResolver
- implements EntityResolver
-{
- private static final Map PUBLICID_TO_RESOURCE_MAP;
-
- static
- {
- PUBLICID_TO_RESOURCE_MAP = new HashMap();
-
- PUBLICID_TO_RESOURCE_MAP.put( "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN",
- "/jdo_1_0.dtd" );
- PUBLICID_TO_RESOURCE_MAP.put( "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN",
- "/jdo_2_0.dtd" );
- }
-
- public InputSource resolveEntity( String publicId, String systemId )
- throws SAXException, IOException
- {
- if ( PUBLICID_TO_RESOURCE_MAP.containsKey( publicId ) )
- {
- URL url = this.getClass().getResource( (String) PUBLICID_TO_RESOURCE_MAP.get( publicId ) );
- return new InputSource( url.openStream() );
- }
-
- return null;
- }
-
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JpoxDeleteModelTest.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JpoxDeleteModelTest.java
deleted file mode 100644
index a5be4cd..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JpoxDeleteModelTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelClass;
-import org.codehaus.modello.model.Version;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.util.ReaderFactory;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: StaxGeneratorTest.java 675 2006-11-16 10:58:59Z brett $
- */
-public class JpoxDeleteModelTest
- extends AbstractJpoxGeneratorTestCase
-{
- public JpoxDeleteModelTest()
- throws ComponentLookupException
- {
- super( "jpox-delete-model" );
- }
-
- public void testJpoxReaderVersionInField()
- throws Throwable
- {
- if ( true )
- {
- return;
- }
-
- Model model = modello.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/test.mdo" ) ) );
-
- List classesList = model.getClasses( new Version( "1.0.0" ) );
-
- assertEquals( 5, classesList.size() );
-
- ModelClass clazz = (ModelClass) classesList.get( 0 );
-
- assertEquals( "JdoRole", clazz.getName() );
-
- verifyModel( model, "org.codehaus.modello.plugin.jpox.JpoxVerifierDeleteModel" );
- }
-
-}
diff --git a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JpoxVersionTest.java b/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JpoxVersionTest.java
deleted file mode 100644
index cfe6031..0000000
--- a/modello-plugin-jpox/src/test/java/org/apache/archiva/redback/components/modello/jpox/JpoxVersionTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.apache.archiva.redback.components.modello.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelClass;
-import org.codehaus.modello.model.Version;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.util.ReaderFactory;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
- * @version $Id: StaxGeneratorTest.java 675 2006-11-16 10:58:59Z brett $
- */
-public class JpoxVersionTest
- extends AbstractJpoxGeneratorTestCase
-{
- public JpoxVersionTest()
- throws ComponentLookupException
- {
- super( "jpox-version" );
- }
-
- public void testJpoxReaderVersionInField()
- throws Throwable
- {
-
- if ( true )
- {
- return;
- }
-
- Model model =
- modello.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/test.mdo" ) ) );
-
- List classesList = model.getClasses( new Version( "1.0.0" ) );
-
- assertEquals( 5, classesList.size() );
-
- ModelClass clazz = (ModelClass) classesList.get( 0 );
-
- assertEquals( "JdoRole", clazz.getName() );
-
- verifyModel( model, "org.codehaus.modello.plugin.jpox.JpoxVerifierVersion" );
- }
-
-}
diff --git a/modello-plugin-jpox/src/test/resources/jdo_1_0.dtd b/modello-plugin-jpox/src/test/resources/jdo_1_0.dtd
deleted file mode 100644
index a89b16d..0000000
--- a/modello-plugin-jpox/src/test/resources/jdo_1_0.dtd
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
-Copyright (c) 2002 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, U.S.A.
-All rights reserved.
-
-This is the DTD defining the Java Data Objects 1.0 metadata.
-
-The metadata must declare all persistence-capable classes. If any
-field declarations are not provided in the metadata, then field
-metadata is defaulted for the missing field declarations.
-Therefore, the JDO implementation is able to determine based on the
-metadata whether a class is persistence-capable or not.
-Any class not known to be persistence-capable by the JDO
-specification (for example, java.lang.Integer) and not explicitly
-named in the metadata is not persistence-capable.
-
-The metadata associated with each persistence capable class must
-be contained within a file, and its format is as defined in the DTD.
-If the metadata is for only one class, then its file name should be
-<class-name>.jdo. If the metadata is for a package, then its file name
-should be <package-name>.jdo. For portability, files should be
-available via resources loaded by the same class loader as the class.
-These rules apply both to enhancement and to runtime.
-
-The metadata is used both at enhancement time and at runtime.
-Information required at enhancement time is a subset of the information
-needed at runtime.
-
- Use is subject to license terms.
--->
-
-<!NOTATION JDO.1_0 PUBLIC
- "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN">
-<!--
-This is the XML DTD for the JDO 1.0 Metadata.
-All JDO 1.0 metadata descriptors must include a DOCTYPE
-of the following form:
-
- <!DOCTYPE jdo
- PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN"
- "http://java.sun.com/dtd/jdo_1_0.dtd">
-
--->
-
-<!ELEMENT jdo ((package)+, (extension)*)>
-
-<!ELEMENT package ((class)+, (extension)*)>
-<!ATTLIST package name CDATA #REQUIRED>
-
-<!ELEMENT class (field|extension)*>
-<!ATTLIST class name CDATA #REQUIRED>
-<!ATTLIST class identity-type (application|datastore|nondurable) #IMPLIED>
-<!ATTLIST class objectid-class CDATA #IMPLIED>
-<!ATTLIST class requires-extent (true|false) 'true'>
-<!ATTLIST class persistence-capable-superclass CDATA #IMPLIED>
-
-<!ELEMENT field ((collection|map|array)?, (extension)*)?>
-<!ATTLIST field name CDATA #REQUIRED>
-<!ATTLIST field persistence-modifier (persistent|transactional|none) #IMPLIED>
-<!ATTLIST field primary-key (true|false) 'false'>
-<!ATTLIST field null-value (exception|default|none) 'none'>
-<!ATTLIST field default-fetch-group (true|false) #IMPLIED>
-<!ATTLIST field embedded (true|false) #IMPLIED>
-
-<!ELEMENT collection (extension)*>
-<!ATTLIST collection element-type CDATA #IMPLIED>
-<!ATTLIST collection embedded-element (true|false) #IMPLIED>
-
-<!ELEMENT map (extension)*>
-<!ATTLIST map key-type CDATA #IMPLIED>
-<!ATTLIST map embedded-key (true|false) #IMPLIED>
-<!ATTLIST map value-type CDATA #IMPLIED>
-<!ATTLIST map embedded-value (true|false) #IMPLIED>
-
-<!ELEMENT array (extension)*>
-<!ATTLIST array embedded-element (true|false) #IMPLIED>
-
-<!ELEMENT extension (extension)*>
-<!ATTLIST extension vendor-name CDATA #REQUIRED>
-<!ATTLIST extension key CDATA #IMPLIED>
-<!ATTLIST extension value CDATA #IMPLIED>
-
diff --git a/modello-plugin-jpox/src/test/resources/jdo_2_0.dtd b/modello-plugin-jpox/src/test/resources/jdo_2_0.dtd
deleted file mode 100644
index 9bd811a..0000000
--- a/modello-plugin-jpox/src/test/resources/jdo_2_0.dtd
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- The DOCTYPE should be as follows for metadata documents.
-<!DOCTYPE jdo
- PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
- "http://java.sun.com/dtd/jdo_2_0.dtd">
--->
-<!ELEMENT jdo (extension*, (package|query)+, extension*)>
-<!ATTLIST jdo catalog CDATA #IMPLIED>
-<!ATTLIST jdo schema CDATA #IMPLIED>
-
-<!ELEMENT package (extension*, (interface|class|sequence)+, extension*)>
-<!ATTLIST package name CDATA ''>
-<!ATTLIST package catalog CDATA #IMPLIED>
-<!ATTLIST package schema CDATA #IMPLIED>
-
-<!ELEMENT interface (extension*, datastore-identity?, primary-key?, inheritance?, version?, join*, foreign-key*, index*, unique*, property*, query*, fetch-group*, extension*)>
-<!ATTLIST interface name CDATA #REQUIRED>
-<!ATTLIST interface table CDATA #IMPLIED>
-<!ATTLIST interface identity-type (datastore|application|nondurable) #IMPLIED>
-<!ATTLIST interface objectid-class CDATA #IMPLIED>
-<!ATTLIST interface requires-extent (true|false) 'true'>
-<!ATTLIST interface detachable (true|false) 'false'>
-<!ATTLIST interface embedded-only (true|false) #IMPLIED>
-<!ATTLIST interface catalog CDATA #IMPLIED>
-<!ATTLIST interface schema CDATA #IMPLIED>
-
-<!ELEMENT property (extension*, (array|collection|map)?, join?, embedded?, element?, key?, value?, order?, column*, foreign-key?, index?, unique?, extension*)>
-<!ATTLIST property name CDATA #REQUIRED>
-<!ATTLIST property persistence-modifier (persistent|transactional|none) #IMPLIED>
-<!ATTLIST property default-fetch-group (true|false) #IMPLIED>
-<!ATTLIST property load-fetch-group CDATA #IMPLIED>
-<!ATTLIST property null-value (default|exception|none) 'none'>
-<!ATTLIST property dependent (true|false) #IMPLIED>
-<!ATTLIST property embedded (true|false) #IMPLIED>
-<!ATTLIST property primary-key (true|false) 'false'>
-<!ATTLIST property value-strategy CDATA #IMPLIED>
-<!ATTLIST property sequence CDATA #IMPLIED>
-<!ATTLIST property serialized (true|false) #IMPLIED>
-<!ATTLIST property field-type CDATA #IMPLIED>
-<!ATTLIST property table CDATA #IMPLIED>
-<!ATTLIST property column CDATA #IMPLIED>
-<!ATTLIST property delete-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST property indexed (true|false|unique) #IMPLIED>
-<!ATTLIST property unique (true|false) #IMPLIED>
-<!ATTLIST property mapped-by CDATA #IMPLIED>
-<!ATTLIST property recursion-depth CDATA #IMPLIED>
-<!ATTLIST property field-name CDATA #IMPLIED>
-
-<!ELEMENT class (extension*, implements*, datastore-identity?, primary-key?, inheritance?, version?, join*, foreign-key*, index*, unique*, column*, field*, property*, query*, fetch-group*, extension*)>
-<!ATTLIST class name CDATA #REQUIRED>
-<!ATTLIST class identity-type (application|datastore|nondurable) #IMPLIED>
-<!ATTLIST class objectid-class CDATA #IMPLIED>
-<!ATTLIST class table CDATA #IMPLIED>
-<!ATTLIST class requires-extent (true|false) 'true'>
-<!ATTLIST class persistence-capable-superclass CDATA #IMPLIED>
-<!ATTLIST class detachable (true|false) 'false'>
-<!ATTLIST class embedded-only (true|false) #IMPLIED>
-<!ATTLIST class persistence-modifier (persistence-capable|persistence-aware|non-persistent) #IMPLIED>
-<!ATTLIST class catalog CDATA #IMPLIED>
-<!ATTLIST class schema CDATA #IMPLIED>
-
-<!ELEMENT primary-key (extension*, column*, extension*)>
-<!ATTLIST primary-key name CDATA #IMPLIED>
-<!ATTLIST primary-key column CDATA #IMPLIED>
-
-<!ELEMENT join (extension*, primary-key?, column*, foreign-key?, index?, unique?, extension*)>
-<!ATTLIST join table CDATA #IMPLIED>
-<!ATTLIST join column CDATA #IMPLIED>
-<!ATTLIST join outer (true|false) 'false'>
-<!ATTLIST join delete-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST join indexed (true|false|unique) #IMPLIED>
-<!ATTLIST join unique (true|false) #IMPLIED>
-
-<!ELEMENT version (extension*, column*, index?, extension*)>
-<!ATTLIST version strategy CDATA #IMPLIED>
-<!ATTLIST version column CDATA #IMPLIED>
-<!ATTLIST version indexed (true|false|unique) #IMPLIED>
-
-<!ELEMENT datastore-identity (extension*, column*, extension*)>
-<!ATTLIST datastore-identity column CDATA #IMPLIED>
-<!ATTLIST datastore-identity strategy CDATA 'native'>
-<!ATTLIST datastore-identity sequence CDATA #IMPLIED>
-
-<!ELEMENT implements (extension*, property*, extension*)>
-<!ATTLIST implements name CDATA #REQUIRED>
-
-<!ELEMENT inheritance (extension*, join?, discriminator?, extension*)>
-<!ATTLIST inheritance strategy CDATA #IMPLIED>
-
-<!ELEMENT discriminator (extension*, column*, index?, extension*)>
-<!ATTLIST discriminator column CDATA #IMPLIED>
-<!ATTLIST discriminator value CDATA #IMPLIED>
-<!ATTLIST discriminator strategy CDATA #IMPLIED>
-<!ATTLIST discriminator indexed (true|false|unique) #IMPLIED>
-
-<!ELEMENT column (extension*)>
-<!ATTLIST column name CDATA #IMPLIED>
-<!ATTLIST column target CDATA #IMPLIED>
-<!ATTLIST column target-field CDATA #IMPLIED>
-<!ATTLIST column jdbc-type CDATA #IMPLIED>
-<!ATTLIST column sql-type CDATA #IMPLIED>
-<!ATTLIST column length CDATA #IMPLIED>
-<!ATTLIST column precision CDATA #IMPLIED>
-<!ATTLIST column scale CDATA #IMPLIED>
-<!ATTLIST column allows-null (true|false) #IMPLIED>
-<!ATTLIST column default-value CDATA #IMPLIED>
-<!ATTLIST column insert-value CDATA #IMPLIED>
-
-<!ELEMENT field (extension*, (array|collection|map)?, join?, embedded?, element?, key?, value?, order?, column*, foreign-key?, index?, unique?, extension*)>
-<!ATTLIST field name CDATA #REQUIRED>
-<!ATTLIST field persistence-modifier (persistent|transactional|none) #IMPLIED>
-<!ATTLIST field field-type CDATA #IMPLIED>
-<!ATTLIST field table CDATA #IMPLIED>
-<!ATTLIST field column CDATA #IMPLIED>
-<!ATTLIST field primary-key (true|false) 'false'>
-<!ATTLIST field null-value (exception|default|none) 'none'>
-<!ATTLIST field default-fetch-group (true|false) #IMPLIED>
-<!ATTLIST field embedded (true|false) #IMPLIED>
-<!ATTLIST field serialized (true|false) #IMPLIED>
-<!ATTLIST field dependent (true|false) #IMPLIED>
-<!ATTLIST field value-strategy CDATA #IMPLIED>
-<!ATTLIST field delete-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST field indexed (true|false|unique) #IMPLIED>
-<!ATTLIST field unique (true|false) #IMPLIED>
-<!ATTLIST field sequence CDATA #IMPLIED>
-<!ATTLIST field load-fetch-group CDATA #IMPLIED>
-<!ATTLIST field recursion-depth CDATA #IMPLIED>
-<!ATTLIST field mapped-by CDATA #IMPLIED>
-
-<!ELEMENT foreign-key (extension*, (column* | field* | property*), extension*)>
-<!ATTLIST foreign-key table CDATA #IMPLIED>
-<!ATTLIST foreign-key deferred (true|false) #IMPLIED>
-<!ATTLIST foreign-key delete-action (restrict|cascade|null|default|none) 'restrict'>
-<!ATTLIST foreign-key update-action (restrict|cascade|null|default|none) 'restrict'>
-<!ATTLIST foreign-key unique (true|false) #IMPLIED>
-<!ATTLIST foreign-key name CDATA #IMPLIED>
-
-<!ELEMENT collection (extension*)>
-<!ATTLIST collection element-type CDATA #IMPLIED>
-<!ATTLIST collection embedded-element (true|false) #IMPLIED>
-<!ATTLIST collection dependent-element (true|false) #IMPLIED>
-<!ATTLIST collection serialized-element (true|false) #IMPLIED>
-
-<!ELEMENT map (extension)*>
-<!ATTLIST map key-type CDATA #IMPLIED>
-<!ATTLIST map embedded-key (true|false) #IMPLIED>
-<!ATTLIST map dependent-key (true|false) #IMPLIED>
-<!ATTLIST map serialized-key (true|false) #IMPLIED>
-<!ATTLIST map value-type CDATA #IMPLIED>
-<!ATTLIST map embedded-value (true|false) #IMPLIED>
-<!ATTLIST map dependent-value (true|false) #IMPLIED>
-<!ATTLIST map serialized-value (true|false) #IMPLIED>
-
-<!ELEMENT key (extension*, embedded?, column*, foreign-key?, index?, unique?, extension*)>
-<!ATTLIST key column CDATA #IMPLIED>
-<!ATTLIST key table CDATA #IMPLIED>
-<!ATTLIST key delete-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST key update-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST key indexed (true|false|unique) #IMPLIED>
-<!ATTLIST key unique (true|false) #IMPLIED>
-<!ATTLIST key mapped-by CDATA #IMPLIED>
-
-<!ELEMENT value (extension*, embedded?, column*, foreign-key?, index?, unique?, extension*)>
-<!ATTLIST value column CDATA #IMPLIED>
-<!ATTLIST value table CDATA #IMPLIED>
-<!ATTLIST value delete-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST value update-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST value indexed (true|false|unique) #IMPLIED>
-<!ATTLIST value unique (true|false) #IMPLIED>
-<!ATTLIST value mapped-by CDATA #IMPLIED>
-
-<!ELEMENT array (extension*)>
-<!ATTLIST array element-type CDATA #IMPLIED>
-<!ATTLIST array embedded-element (true|false) #IMPLIED>
-<!ATTLIST array dependent-element (true|false) #IMPLIED>
-<!ATTLIST array serialized-element (true|false) #IMPLIED>
-
-<!ELEMENT element (extension*, embedded?, column*, foreign-key?, index?, unique?, extension*)>
-<!ATTLIST element column CDATA #IMPLIED>
-<!ATTLIST element table CDATA #IMPLIED>
-<!ATTLIST element delete-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST element update-action (restrict|cascade|null|default|none) #IMPLIED>
-<!ATTLIST element indexed (true|false|unique) #IMPLIED>
-<!ATTLIST element unique (true|false) #IMPLIED>
-<!ATTLIST element mapped-by CDATA #IMPLIED>
-
-<!ELEMENT order (extension*, column*, index?, extension*)>
-<!ATTLIST order column CDATA #IMPLIED>
-<!ATTLIST order mapped-by CDATA #IMPLIED>
-
-<!ELEMENT fetch-group (extension*, (fetch-group|field|property)*, extension*)>
-<!ATTLIST fetch-group name CDATA #REQUIRED>
-<!ATTLIST fetch-group post-load (true|false) #IMPLIED>
-
-<!ELEMENT embedded (extension*, (field|property)*, extension*)>
-<!ATTLIST embedded owner-field CDATA #IMPLIED>
-<!ATTLIST embedded null-indicator-column CDATA #IMPLIED>
-<!ATTLIST embedded null-indicator-value CDATA #IMPLIED>
-
-<!ELEMENT sequence (extension*)>
-<!ATTLIST sequence name CDATA #REQUIRED>
-<!ATTLIST sequence datastore-sequence CDATA #IMPLIED>
-<!ATTLIST sequence factory-class CDATA #IMPLIED>
-<!ATTLIST sequence strategy (nontransactional|contiguous|noncontiguous) #REQUIRED>
-
-<!ELEMENT index (extension*, (column* | field* | property*), extension*)>
-<!ATTLIST index name CDATA #IMPLIED>
-<!ATTLIST index table CDATA #IMPLIED>
-<!ATTLIST index unique (true|false) 'false'>
-
-<!ELEMENT query (#PCDATA|extension)*>
-<!ATTLIST query name CDATA #REQUIRED>
-<!ATTLIST query language CDATA #IMPLIED>
-<!ATTLIST query unmodifiable (true|false) 'false'>
-<!ATTLIST query unique (true|false) #IMPLIED>
-<!ATTLIST query result-class CDATA #IMPLIED>
-
-<!ELEMENT unique (extension*, (column* | field* | property*), extension*)>
-<!ATTLIST unique name CDATA #IMPLIED>
-<!ATTLIST unique table CDATA #IMPLIED>
-<!ATTLIST unique deferred (true|false) 'false'>
-
-<!ELEMENT extension ANY>
-<!ATTLIST extension vendor-name CDATA #REQUIRED>
-<!ATTLIST extension key CDATA #IMPLIED>
-<!ATTLIST extension value CDATA #IMPLIED>
-
diff --git a/modello-plugin-jpox/src/test/resources/mergere-tissue.mdo b/modello-plugin-jpox/src/test/resources/mergere-tissue.mdo
deleted file mode 100644
index 5d4644a..0000000
--- a/modello-plugin-jpox/src/test/resources/mergere-tissue.mdo
+++ /dev/null
@@ -1,257 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<model>
- <id>tissue</id>
- <name>Tissue</name>
- <description>Tissue's entity model.></description>
- <defaults>
- <default>
- <key>package</key>
- <value>org.mergere.tissue</value>
- </default>
- </defaults>
- <classes>
- <class stash.storable="true">
- <name>Issue</name>
- <version>1.0.0</version>
- <fields>
- <field jpox.column="id">
- <name>accountId</name>
- <required>true</required>
- <version>1.0.0</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <!-- This field should get persistence-modifier="none" -->
- <field stash.storable="false">
- <name>summary</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>assignee</name>
- <version>1.0.0</version>
- <!-- this should set default-fetch-group=false -->
- <association stash.part="false" java.generate-create="false" java.generate-break="false">
- <type>User</type>
- </association>
- </field>
- <field>
- <name>friends</name>
- <version>1.0.0</version>
- <association jpox.dependent="false" java.generate-create="false" java.generate-break="false">
- <type>User</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>reporter</name>
- <version>1.0.0</version>
- <!-- this should not set default-fetch-group at all -->
- <association java.generate-create="false" java.generate-break="false">
- <type>User</type>
- </association>
- </field>
- <field>
- <name>status</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>project</name>
- <version>1.0.0</version>
- <association>
- <type>Project</type>
- </association>
- </field>
- <field>
- <name>configuration</name>
- <version>1.0.0</version>
- <type>Map</type>
- <!-- this should set default-fetch-group=true -->
- <association stash.part="true" stash.keyType="java.lang.Integer">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>configuration2</name>
- <version>1.0.0</version>
- <type>Map</type>
- <!-- this should not set default-fetch-group=true -->
- <association stash.keyType="java.lang.String">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <!--
- |
- |
- |
- -->
- <class stash.storable="true">
- <name>Project</name>
- <version>1.0.0</version>
- <fields>
- <field stash.maxSize="10">
- <name>id</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>name</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>url</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>lead</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>issues</name>
- <version>1.0.0</version>
- <type>List</type>
- <association>
- <type>Issue</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
- <class java.abstract="true">
- <name>AbstractUser</name>
- <packageName>org.mergere.user</packageName>
- <version>1.0.0</version>
- <fields>
- <field>
- <name>abstractField</name>
- <version>1.0.0</version>
- <type>int</type>
- </field>
- </fields>
- </class>
- <!-- This class has a non-storable and abstract super class -->
- <class stash.storable="true" jpox.table="MUser">
- <name>User</name>
- <packageName>org.mergere.user</packageName>
- <version>1.0.0</version>
- <superClass>AbstractUser</superClass>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>id</name>
- <version>1.0.0</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>name</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>issues</name>
- <version>1.0.0</version>
- <type>Set</type>
- <!-- this should *not* set default-fetch-group=true -->
- <association java.generate-break="false" java.generate-create="false">
- <type>Issue</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
- <class>
- <name>AdminUser</name>
- <packageName>org.mergere.user.admin</packageName>
- <version>1.0.0</version>
- <superClass>User</superClass>
- </class>
- <!-- This class has a storable super class -->
- <class stash.storable="true">
- <name>NormalUser</name>
- <packageName>org.mergere.user</packageName>
- <version>1.0.0</version>
- <superClass>User</superClass>
- <fields>
- <field>
- <name>normalUserField</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- </fields>
- </class>
- <class jpox.use-identifiers-as-primary-key="false">
- <name>ComplexIdentity</name>
- <packageName>org.codehaus.complex</packageName>
- <version>1.0.0</version>
- <fields>
- <field jpox.primary-key="true">
- <name>id</name>
- <version>1.0.0</version>
- <type>int</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>username</name>
- <version>1.0.0</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>fullName</name>
- <version>1.0.0</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>email</name>
- <version>1.0.0</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>locked</name>
- <version>1.0.0</version>
- <type>boolean</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>lastLoginDate</name>
- <version>1.0.0</version>
- <type>Date</type>
- </field>
- </fields>
- </class>
- <class jpox.table="MyTable">
- <name>DifferentTable</name>
- <packageName>org.mergere.user</packageName>
- <version>1.0.0</version>
- </class>
- </classes>
-</model>
diff --git a/modello-plugin-jpox/src/test/resources/test-with-prefixes.mdo b/modello-plugin-jpox/src/test/resources/test-with-prefixes.mdo
deleted file mode 100644
index 06efdc9..0000000
--- a/modello-plugin-jpox/src/test/resources/test-with-prefixes.mdo
+++ /dev/null
@@ -1,289 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<model jpox.table-prefix="SECURITY_" jpox.reserved-word-strictness="error">
- <id>rbac-jdo</id>
- <name>RbacJdoModel</name>
- <version>1.0.1</version>
- <defaults>
- <default>
- <key>package</key>
- <value>org.codehaus.plexus.security.authorization.rbac.jdo</value>
- </default>
- </defaults>
- <classes>
- <class rootElement="true"
- stash.storable="false">
- <name>RbacDatabase</name>
- <version>1.0.1+</version>
- <fields>
- <field>
- <name>roles</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoRole</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>userAssignments</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoUserAssignment</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="ROLES"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoRole</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>assignable</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this role is available to be assigned to a user
- </description>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field jpox.persistence-modifier="persistent"
- jpox.fetchGroupNames="role-child-detail"
- jpox.join-table="ROLE_CHILDROLE_MAP">
- <name>childRoleNames</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- java.init="field"
- jpox.dependent="false"
- java.generate-break="false"
- java.generate-create="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- <description>
- roles that will inherit the permissions of this role
- </description>
- </field>
- <field jpox.fetchGroupNames="role-child-detail"
- jpox.join-table="ROLE_PERMISSION_MAP">
- <name>permissions</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- jpox.dependent="false"
- java.init="field"
- java.generate-break="false"
- java.generate-create="false">
- <type>JdoPermission</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="PERMISSIONS"
- jpox.not-persisted-fields="modelEncoding"
- jpox.column-prefix="PERMISSION_">
- <name>JdoPermission</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field jpox.indexed="true">
- <name>operation</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.dependent="false">
- <type>JdoOperation</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- <field jpox.indexed="true">
- <name>resource</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.dependent="false">
- <type>JdoResource</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="OPERATIONS"
- jpox.column-prefix="OPERATION_"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoOperation</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off" jpox.column="NAME">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field>
- <name>resourceRequired</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if the resource is required for authorization to be granted
- </description>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="RESOURCES"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoResource</name>
- <version>1.0.0+</version>
- <description>
- In RBAC terms, this is the entity which an operation is associated with that which permissions are based on.
- </description>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>identifier</name>
- <version>1.0.0+</version>
- <type>String</type>
- <description>
- The string identifier for an operation.
- </description>
- <identifier>true</identifier>
- </field>
- <field>
- <name>pattern</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if the identifer is a pattern that is to be evaluated, for example x.* could match x.a or x.b and x.**
- could match x.foo
- </description>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="USER_ASSIGNMENTS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoUserAssignment</name>
- <description>binding of a principal to a role</description>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>principal</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field jpox.column="CREATED_ON">
- <name>timestamp</name>
- <version>1.0.0+</version>
- <type>Date</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field java.adder="false"
- jpox.persistence-modifier="persistent"
- jpox.indexed="true"
- jpox.join-table="USERASSIGNMENT_ROLENAMES">
- <name>roleNames</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- java.init="field"
- java.generate-break="false"
- java.generate-create="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
- </classes>
-</model>
diff --git a/modello-plugin-jpox/src/test/resources/test.mdo b/modello-plugin-jpox/src/test/resources/test.mdo
deleted file mode 100644
index 71191c0..0000000
--- a/modello-plugin-jpox/src/test/resources/test.mdo
+++ /dev/null
@@ -1,291 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<model>
- <id>rbac-jdo</id>
- <name>RbacJdoModel</name>
- <version>1.0.1</version>
- <defaults>
- <default>
- <key>package</key>
- <value>org.codehaus.plexus.security.authorization.rbac.jdo</value>
- </default>
- </defaults>
- <classes>
- <class rootElement="true"
- stash.storable="false">
- <name>RbacDatabase</name>
- <version>1.0.1+</version>
- <fields>
- <field>
- <name>roles</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoRole</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>userAssignments</name>
- <version>1.0.1+</version>
- <association>
- <type>JdoUserAssignment</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="SECURITY_ROLES"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoRole</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>assignable</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this role is available to be assigned to a user
- </description>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field jpox.persistence-modifier="persistent"
- jpox.fetchGroupNames="role-child-detail"
- jpox.join-table="ROLE_CHILDROLE_MAP">
- <name>childRoleNames</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- java.init="field"
- jpox.dependent="false"
- java.generate-break="false"
- java.generate-create="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- <description>
- roles that will inherit the permissions of this role
- </description>
- </field>
- <field jpox.fetchGroupNames="role-child-detail"
- jpox.join-table="ROLE_PERMISSION_MAP">
- <name>permissions</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- jpox.dependent="false"
- java.init="field"
- java.generate-break="false"
- java.generate-create="false">
- <type>JdoPermission</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="PERMISSIONS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoPermission</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field jpox.indexed="true"
- jpox.column="SECURITY_OPERATIONS">
- <name>operation</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.dependent="false">
- <type>JdoOperation</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- <field jpox.indexed="true"
- jpox.column="SECURITY_RESOURCES">
- <name>resource</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.dependent="false">
- <type>JdoResource</type>
- <multiplicity>1</multiplicity>
- </association>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="OPERATIONS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoOperation</name>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field>
- <name>resourceRequired</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if the resource is required for authorization to be granted
- </description>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="RESOURCES"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoResource</name>
- <version>1.0.0+</version>
- <description>
- In RBAC terms, this is the entity which an operation is associated with that which permissions are based on.
- </description>
- <fields>
- <field jpox.primary-key="true" jpox.value-strategy="off">
- <name>identifier</name>
- <version>1.0.0+</version>
- <type>String</type>
- <description>
- The string identifier for an operation.
- </description>
- <identifier>true</identifier>
- </field>
- <field>
- <name>pattern</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if the identifer is a pattern that is to be evaluated, for example x.* could match x.a or x.b and x.**
- could match x.foo
- </description>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- </fields>
- </class>
-
- <class stash.storable="true"
- jpox.table="USER_ASSIGNMENTS"
- jpox.not-persisted-fields="modelEncoding">
- <name>JdoUserAssignment</name>
- <description>binding of a principal to a role</description>
- <version>1.0.0+</version>
- <fields>
- <field jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.foreign-key-delete-action="cascade">
- <name>principal</name>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field jpox.column="LAST_UPDATED">
- <name>timestamp</name>
- <version>1.0.0+</version>
- <type>Date</type>
- </field>
- <field>
- <name>permanent</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <description>
- true if this object is permanent.
- </description>
- </field>
- <field java.adder="false"
- jpox.persistence-modifier="persistent"
- jpox.indexed="true"
- jpox.join-table="USERASSIGNMENT_ROLENAMES">
- <name>roleNames</name>
- <version>1.0.0+</version>
- <association stash.part="true"
- jpox.join="true"
- java.init="field"
- java.generate-break="false"
- java.generate-create="false">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- </fields>
- </class>
- </classes>
-</model>
diff --git a/modello-plugin-jpox/src/test/verifiers/jpox-delete-model/JpoxVerifierDeleteModel.java b/modello-plugin-jpox/src/test/verifiers/jpox-delete-model/JpoxVerifierDeleteModel.java
deleted file mode 100644
index 0a8812e..0000000
--- a/modello-plugin-jpox/src/test/verifiers/jpox-delete-model/JpoxVerifierDeleteModel.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.codehaus.modello.plugin.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-import java.util.Properties;
-import javax.jdo.JDOHelper;
-import javax.jdo.PersistenceManagerFactory;
-
-import junit.framework.Assert;
-import org.apache.log4j.*;
-import org.codehaus.modello.verifier.Verifier;
-import org.codehaus.plexus.security.authorization.rbac.jdo.*;
-
-/**
- * @version $Id: Xpp3Verifier.java 675 2006-11-16 10:58:59Z brett $
- */
-public class JpoxVerifierDeleteModel
- extends Verifier
-{
- public void verify()
- throws Exception
- {
- Properties properties = new Properties();
- properties.setProperty( "javax.jdo.PersistenceManagerFactoryClass", "org.jpox.PersistenceManagerFactoryImpl" );
- properties.setProperty( "javax.jdo.option.ConnectionDriverName", "org.apache.derby.jdbc.EmbeddedDriver" );
- properties.setProperty( "javax.jdo.option.ConnectionURL", "jdbc:derby:target/jpox-delete-model/database;create=true" );
- properties.setProperty( "javax.jdo.option.ConnectionUserName", "sa" );
- properties.setProperty( "javax.jdo.option.ConnectionPassword", "" );
- properties.setProperty( "org.jpox.autoCreateSchema", "true" );
- properties.setProperty( "org.jpox.validateTables", "false" );
- properties.setProperty( "org.jpox.validateColumns", "false" );
- properties.setProperty( "org.jpox.validateConstraints", "false" );
-
- PropertyConfigurator.configure( getClass().getResource( "/log4j.properties" ) );
- // Logger.getLogger( "JPOX" ).setLevel( Level.DEBUG );
-
- PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( properties );
-
- RbacJdoModelJPoxStore store = new RbacJdoModelJPoxStore( pmf );
-
- createDatabase( store );
-
- // Check the permissions, etc. are retrieved
- JdoRole role = store.getJdoRole( "name", true );
- Assert.assertNotNull( role );
- Assert.assertEquals( 3, role.getPermissions().size() );
- Assert.assertEquals( "pDesc1", ( (JdoPermission) role.getPermissions().get( 0 ) ).getDescription() );
- Assert.assertEquals( "pDesc2", ( (JdoPermission) role.getPermissions().get( 1 ) ).getDescription() );
- Assert.assertEquals( "pDesc3", ( (JdoPermission) role.getPermissions().get( 2 ) ).getDescription() );
-
- // These aren't detached. Something to monitor when using the class - careful use of fetch groups is required
- // Assert.assertEquals( "oDesc1", ( (JdoPermission) role.getPermissions().get( 0 ) ).getOperation().getDescription() );
- // Assert.assertEquals( "rId1", ( (JdoPermission) role.getPermissions().get( 0 ) ).getResource().getIdentifier() );
-
- // Check the totals
- Assert.assertEquals( 3, store.getJdoRoleCollection( true, null, null ).size() );
- Assert.assertEquals( 3, store.getJdoPermissionCollection( true, null, null ).size() );
- Assert.assertEquals( 2, store.getJdoOperationCollection( true, null, null ).size() );
- Assert.assertEquals( 2, store.getJdoResourceCollection( true, null, null ).size() );
- Assert.assertEquals( 3, store.getJdoUserAssignmentCollection( true, null, null ).size() );
-
- RbacJdoModelModelloMetadata metadata = store.getRbacJdoModelModelloMetadata( true );
- Assert.assertEquals( "1.0.0", metadata.getModelVersion() );
-
- store.eraseModelFromDatabase();
-
- // Check it is all gone
- Assert.assertEquals( 0, store.getJdoRoleCollection( true, null, null ).size() );
- Assert.assertEquals( 0, store.getJdoPermissionCollection( true, null, null ).size() );
- Assert.assertEquals( 0, store.getJdoOperationCollection( true, null, null ).size() );
- Assert.assertEquals( 0, store.getJdoResourceCollection( true, null, null ).size() );
- Assert.assertEquals( 0, store.getJdoUserAssignmentCollection( true, null, null ).size() );
-
- metadata = store.getRbacJdoModelModelloMetadata( true );
- Assert.assertNull( metadata );
- }
-
- private void createDatabase( RbacJdoModelJPoxStore store )
- {
- JdoOperation operation1 = new JdoOperation();
- operation1.setName( "oName1" );
- operation1.setDescription( "oDesc1" );
- operation1 = store.getJdoOperationByJdoId( store.addJdoOperation( operation1 ), true );
-
- JdoOperation operation2 = new JdoOperation();
- operation2.setName( "oName2" );
- operation2.setDescription( "oDesc2" );
- operation2 = store.getJdoOperationByJdoId( store.addJdoOperation( operation2 ), true );
-
- JdoResource resource1 = new JdoResource();
- resource1.setIdentifier( "rId1" );
- resource1 = store.getJdoResourceByJdoId( store.addJdoResource( resource1 ), true );
-
- JdoResource resource2 = new JdoResource();
- resource2.setIdentifier( "rId2" );
- resource2 = store.getJdoResourceByJdoId( store.addJdoResource( resource2 ), true );
-
- JdoPermission permission1 = new JdoPermission();
- permission1.setName( "pName1" );
- permission1.setDescription( "pDesc1" );
- permission1.setOperation( operation1 );
- permission1.setResource( resource1 );
- permission1 = store.getJdoPermissionByJdoId( store.addJdoPermission( permission1 ), true );
-
- JdoPermission permission2 = new JdoPermission();
- permission2.setName( "pName2" );
- permission2.setDescription( "pDesc2" );
- permission2.setOperation( operation1 );
- permission2.setResource( resource2 );
- permission2 = store.getJdoPermissionByJdoId( store.addJdoPermission( permission2 ), true );
-
- JdoPermission permission3 = new JdoPermission();
- permission3.setName( "pName3" );
- permission3.setDescription( "pDesc3" );
- permission3.setOperation( operation2 );
- permission3.setResource( resource1 );
- permission3 = store.getJdoPermissionByJdoId( store.addJdoPermission( permission3 ), true );
-
- JdoRole childRole1 = new JdoRole();
- childRole1.setName( "role1" );
- childRole1.setDescription( "description1" );
- childRole1.addPermission( permission1 );
- store.addJdoRole( childRole1 );
-
- JdoRole childRole2 = new JdoRole();
- childRole2.setName( "role2" );
- childRole2.setDescription( "description2" );
- childRole2.addPermission( permission1 );
- childRole2.addPermission( permission3 );
- store.addJdoRole( childRole2 );
-
- JdoRole role = new JdoRole();
- role.setName( "name" );
- role.setDescription( "description" );
- role.addChildRoleName( "role1" );
- role.addChildRoleName( "role2" );
- role.addPermission( permission1 );
- role.addPermission( permission2 );
- role.addPermission( permission3 );
- store.addJdoRole( role );
-
- JdoUserAssignment userAssignment1 = new JdoUserAssignment();
- userAssignment1.setPrincipal( "principal1" );
- userAssignment1.setTimestamp( new Date() );
- userAssignment1.getRoleNames().add( "role1" );
- store.addJdoUserAssignment( userAssignment1 );
-
- JdoUserAssignment userAssignment2 = new JdoUserAssignment();
- userAssignment2.setPrincipal( "principal2" );
- userAssignment2.setTimestamp( new Date() );
- userAssignment2.getRoleNames().add( "name" );
- store.addJdoUserAssignment( userAssignment2 );
-
- JdoUserAssignment userAssignment3 = new JdoUserAssignment();
- userAssignment3.setPrincipal( "principal3" );
- userAssignment3.setTimestamp( new Date() );
- userAssignment3.getRoleNames().add( "role1" );
- userAssignment3.getRoleNames().add( "role2" );
- store.addJdoUserAssignment( userAssignment3 );
-
- RbacJdoModelModelloMetadata metadata = new RbacJdoModelModelloMetadata();
- metadata.setModelVersion( "1.0.0" );
- store.storeRbacJdoModelModelloMetadata( metadata );
- }
-}
diff --git a/modello-plugin-jpox/src/test/verifiers/jpox-version/JpoxVerifierVersion.java b/modello-plugin-jpox/src/test/verifiers/jpox-version/JpoxVerifierVersion.java
deleted file mode 100644
index 1769f75..0000000
--- a/modello-plugin-jpox/src/test/verifiers/jpox-version/JpoxVerifierVersion.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.codehaus.modello.plugin.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Properties;
-import javax.jdo.JDOHelper;
-import javax.jdo.PersistenceManagerFactory;
-
-import junit.framework.Assert;
-import org.apache.log4j.*;
-import org.codehaus.modello.verifier.Verifier;
-import org.codehaus.plexus.security.authorization.rbac.jdo.RbacJdoModelModelloMetadata;
-import org.codehaus.plexus.security.authorization.rbac.jdo.RbacJdoModelJPoxStore;
-
-/**
- * @version $Id: Xpp3Verifier.java 675 2006-11-16 10:58:59Z brett $
- */
-public class JpoxVerifierVersion
- extends Verifier
-{
- public void verify()
- throws Exception
- {
- Properties properties = new Properties();
- properties.setProperty( "javax.jdo.PersistenceManagerFactoryClass", "org.jpox.PersistenceManagerFactoryImpl" );
- properties.setProperty( "javax.jdo.option.ConnectionDriverName", "org.apache.derby.jdbc.EmbeddedDriver" );
- properties.setProperty( "javax.jdo.option.ConnectionURL", "jdbc:derby:target/jpox-version/database;create=true" );
- properties.setProperty( "javax.jdo.option.ConnectionUserName", "sa" );
- properties.setProperty( "javax.jdo.option.ConnectionPassword", "" );
- properties.setProperty( "org.jpox.autoCreateSchema", "true" );
- properties.setProperty( "org.jpox.validateTables", "false" );
- properties.setProperty( "org.jpox.validateColumns", "false" );
- properties.setProperty( "org.jpox.validateConstraints", "false" );
-
- PropertyConfigurator.configure( getClass().getResource( "/log4j.properties" ) );
- // Logger.getLogger( "JPOX" ).setLevel( Level.DEBUG );
-
- PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( properties );
-
- RbacJdoModelJPoxStore store = new RbacJdoModelJPoxStore( pmf );
-
- RbacJdoModelModelloMetadata metadata = store.getRbacJdoModelModelloMetadata( true );
-
- Assert.assertNull( metadata );
-
- metadata = new RbacJdoModelModelloMetadata();
- metadata.setModelVersion( "1.0.0" );
- store.storeRbacJdoModelModelloMetadata( metadata );
-
- metadata = store.getRbacJdoModelModelloMetadata( true );
- Assert.assertEquals( "1.0.0", metadata.getModelVersion() );
- }
-}
diff --git a/modello-plugin-redback-registry/pom.xml b/modello-plugin-redback-registry/pom.xml
deleted file mode 100644
index db85cd0..0000000
--- a/modello-plugin-redback-registry/pom.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugins</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>modello-plugin-redback-registry</artifactId>
- <name>Redback Registry Reader/Writer</name>
- <properties>
- <site.staging.base>${project.parent.basedir}/../site</site.staging.base>
- </properties>
- <url>${webUrl}/modello-plugins/${project.artifactId}</url>
-
- <scm>
- <url>${scmBrowseUrl};f=${project.artifactId}</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugin-store</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-plugin-java</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components.registry</groupId>
- <artifactId>spring-registry-api</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components.registry</groupId>
- <artifactId>spring-registry-commons</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- <version>1.0-alpha-33</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- <version>1.0-alpha-33</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-api</artifactId>
- <version>2.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-javac</artifactId>
- <version>2.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- dependencies needed by AbstractRegistryGeneratorTestCase -->
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>${slf4jVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- <version>${commons-configuration.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>1.0.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>2.9.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <registryVersion>${project.version}</registryVersion>
- <slf4jVersion>${slf4jVersion}</slf4jVersion>
- <springVersion>${springVersion}</springVersion>
- </systemPropertyVariables>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- <executions>
- <execution>
- <id>copy-test-libs</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/test-libs</outputDirectory>
- <excludeTransitive>false</excludeTransitive>
- <stripVersion>true</stripVersion>
- <includeScope>test</includeScope>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGenerator.java b/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGenerator.java
deleted file mode 100644
index 8205943..0000000
--- a/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGenerator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.components.modello.plugin.store.AbstractVelocityModelloGenerator;
-import org.apache.velocity.context.Context;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-
-import java.util.Properties;
-
-public abstract class AbstractRegistryGenerator
- extends AbstractVelocityModelloGenerator
-{
- protected void generate( Model model, Properties parameters, String outputType )
- throws ModelloException
- {
- initialize( model, parameters );
-
- // Initialize the Velocity context
-
- String packageName;
- if ( isPackageWithVersion() )
- {
- packageName = model.getDefaultPackageName( true, getGeneratedVersion() );
- }
- else
- {
- packageName = model.getDefaultPackageName( false, null );
- }
-
- packageName += ".io.registry";
-
- Context context = makeStubVelocityContext( model, getGeneratedVersion(), packageName );
-
-
- // Generate the reader
- String className = model.getName() + outputType;
-
- writeClass( getClass().getPackage().getName().replaceAll( "\\.", "/" ) + "/" + outputType + ".java.vm",
- getOutputDirectory(), packageName, className, context );
- }
-}
diff --git a/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/RegistryReaderGenerator.java b/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/RegistryReaderGenerator.java
deleted file mode 100644
index e6974fd..0000000
--- a/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/RegistryReaderGenerator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * 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.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
- */
-public class RegistryReaderGenerator
- extends AbstractRegistryGenerator
-{
- public void generate( Model model, Properties parameters )
- throws ModelloException
- {
- generate( model, parameters, "RegistryReader" );
- }
-}
diff --git a/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/RegistryWriterGenerator.java b/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/RegistryWriterGenerator.java
deleted file mode 100644
index d051370..0000000
--- a/modello-plugin-redback-registry/src/main/java/org/apache/archiva/redback/components/registry/modello/RegistryWriterGenerator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * 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.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
- */
-public class RegistryWriterGenerator
- extends AbstractRegistryGenerator
-{
- public void generate( Model model, Properties parameters )
- throws ModelloException
- {
- generate( model, parameters, "RegistryWriter" );
- }
-}
diff --git a/modello-plugin-redback-registry/src/main/resources/META-INF/plexus/components.xml b/modello-plugin-redback-registry/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 50c8615..0000000
--- a/modello-plugin-redback-registry/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ~ 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.
- -->
-
-<component-set>
- <components>
- <component>
- <role>org.codehaus.modello.plugin.ModelloGenerator</role>
- <role-hint>registry-reader</role-hint>
- <implementation>org.apache.archiva.redback.components.registry.modello.RegistryReaderGenerator</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- </requirement>
- </requirements>
- </component>
- <component>
- <role>org.codehaus.modello.plugin.ModelloGenerator</role>
- <role-hint>registry-writer</role-hint>
- <implementation>org.apache.archiva.redback.components.registry.modello.RegistryWriterGenerator</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- </requirement>
- </requirements>
- </component>
- </components>
-</component-set>
diff --git a/modello-plugin-redback-registry/src/main/resources/org/apache/archiva/redback/components/registry/modello/RegistryReader.java.vm b/modello-plugin-redback-registry/src/main/resources/org/apache/archiva/redback/components/registry/modello/RegistryReader.java.vm
deleted file mode 100644
index 9bfd6e6..0000000
--- a/modello-plugin-redback-registry/src/main/resources/org/apache/archiva/redback/components/registry/modello/RegistryReader.java.vm
+++ /dev/null
@@ -1,141 +0,0 @@
-#*
- * 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.
- *#
-package ${package};
-
-import org.apache.archiva.redback.components.registry.Registry;
-
-// Util imports
-import java.util.*;
-
-// Model class imports
-#foreach ( $class in $classes )
-#if ( ${class.packageName} != ${package} )
-import ${class.packageName}.${class.name};
-#end
-#end
-
-## TODO! make it possible to change property name via metadata
-## TODO! handle other types
-
-#macro ( handlePrimitive $localVar $registryVar $name $type $getter )
-#if ( $type == "boolean" )
- $type $localVar = ${registryVar}.getBoolean( prefix + "${name}", $getter );
-#elseif ( $type == "char" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "double" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "float" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "int" )
- $type $localVar = ${registryVar}.getInt( prefix + "${name}", $getter );
-#elseif ( $type == "long" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "short" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "String" )
- //$type $localVar = ${registryVar}.getString( prefix + "${name}", $getter );
-
- List<String> ${localVar}List = registry.getList( prefix + "${name}" );
- String ${name} = $getter;
- if (${localVar}List != null && !${localVar}List.isEmpty() )
- {
- StringBuilder sb = new StringBuilder( );
- for (int i = 0,size = ${localVar}List.size();i<size;i++)
- {
- sb.append( ${localVar}List.get( i ) );
- if (i<size - 1)
- {
- sb.append( ',' );
- }
- }
- ${name} = sb.toString();
- }
-
-#elseif ( $type == "Boolean" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "Date" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "DOM" )
- $javaTool.fail( "Type not yet handled: $type" )
-#else
- $javaTool.fail( "Unknown type: $type" )
-#end
-#end
-
-#macro ( fillCollection $uncapFieldName $to )
-#set ( $singularFieldName = $javaTool.singular($uncapFieldName) )
-#if ( $model.hasClass( $to, $version ) )
-## TODO! make it possible to have unwrapped lists via metadata
- List ${uncapFieldName}Subsets = registry.getSubsetList( prefix + "${uncapFieldName}.${singularFieldName}" );
- for ( Iterator i = ${uncapFieldName}Subsets.iterator(); i.hasNext(); )
- {
- $to v = read${to}( "", (Registry) i.next() );
- ${uncapFieldName}.add( v );
- }
-#else
- ${uncapFieldName}.addAll( registry.getList( prefix + "${uncapFieldName}.${singularFieldName}" ) );
-#end
-#end
-
-/**
- * Generate Redback Registry input mechanism for model '${model.name}'.
- */
-public class ${model.name}RegistryReader
-{
- public ${model.name} read( Registry registry )
- {
-#set ( $root = $model.getClass( $model.getRoot( $version ), $version ) )
- return read${root.name}( "", registry );
- }
-
-#foreach ( $class in $classes )
- private ${class.name} read${class.name}( String prefix, Registry registry )
- {
- ${class.name} value = new ${class.name}();
-
-#foreach ( $field in $class.getAllFields( $version, true ) )
-## TODO: handle aliases
-## TODO: handle required (and optional for those that cry when the registry item is not found)
-#set ( $uncapFieldName = $javaTool.uncapitalise($field.name) )
-#if ( $field.primitive )
-#handlePrimitive( $uncapFieldName "registry" $field.name $field.type "value.${javaTool.makeGetter( $field )}()" )
-#else
-#set ( $assoc = $field )
-#if ( $assoc.multiplicity == "1" )
- $assoc.to $uncapFieldName = read${assoc.to}( prefix + "${uncapFieldName}.", registry );
-#else
-#if ( $assoc.type == "java.util.List" || $assoc.type == "java.util.Set" )
- $assoc.type $uncapFieldName = $assoc.defaultValue;
-#fillCollection( $uncapFieldName $assoc.to )
-#elseif ( $assoc.type == "java.util.Map" || $assoc.type == "java.util.Properties" )
-## TODO! make it possible to have exploded maps in xml via metadata
- $assoc.type $uncapFieldName = registry.getProperties( prefix + "${uncapFieldName}" );
-#else
- $javaTool.fail( "Unknown collection type: $assoc.type" )
-#end
-#end
-#end
- value.${javaTool.makeSetter( $field )}( $uncapFieldName );
-#end
-
- return value;
- }
-
-#end
-}
diff --git a/modello-plugin-redback-registry/src/main/resources/org/apache/archiva/redback/components/registry/modello/RegistryWriter.java.vm b/modello-plugin-redback-registry/src/main/resources/org/apache/archiva/redback/components/registry/modello/RegistryWriter.java.vm
deleted file mode 100644
index f3abc55..0000000
--- a/modello-plugin-redback-registry/src/main/resources/org/apache/archiva/redback/components/registry/modello/RegistryWriter.java.vm
+++ /dev/null
@@ -1,161 +0,0 @@
-#*
- * 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.
- *#
-package ${package};
-
-import org.apache.archiva.redback.components.registry.Registry;
-
-// Util imports
-import java.util.*;
-
-// Model class imports
-#foreach ( $class in $classes )
-#if ( ${class.packageName} != ${package} )
-import ${class.packageName}.${class.name};
-#end
-#end
-
-## TODO! make it possible to change property name via metadata
-## TODO! handle other types
-
-#macro ( writePrimitive $type $value $name )
-#if ( $type == "boolean" )
- registry.setBoolean( prefix + $name, $value );
-#elseif ( $type == "char" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "double" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "float" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "int" )
- registry.setInt( prefix + $name, $value );
-#elseif ( $type == "long" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "short" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "String" )
- registry.setString( prefix + $name, $value );
-#elseif ( $type == "Boolean" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "Date" )
- $javaTool.fail( "Type not yet handled: $type" )
-#elseif ( $type == "DOM" )
- $javaTool.fail( "Type not yet handled: $type" )
-#else
- $javaTool.fail( "Unknown type: $type" )
-#end
-#end
-
-#macro ( writeValueChecker $type $value $field )
-#if ( $type == "double" || $type == "float" || $type == "int" || $type == "long" || $type == "short" )
-$value != $field.defaultValue
-#elseif ( $type == "boolean" )
-
-#elseif ( $type == "char" )
-$value != '$field.defaultValue'
-#elseif ( $type == "java.util.List" || $type == "java.util.Set" || $type == "java.util.Map" || $type == "java.util.Properties" )
-$value != null && ${value}.size() > 0
-#elseif ( $type == "String" && $field.defaultValue )
-$value != null && !${value}.equals( "$field.defaultValue" )
-#elseif ( $type == "Date" && $field.defaultValue )
-$value != null && !${value}.equals( "$field.defaultValue" )
-#else
-$value != null
-#end
-#end
-
-/**
- * Generate Plexus Registry output mechanism for model '${model.name}'.
- */
-public class ${model.name}RegistryWriter
-{
- public void write( ${model.name} model, Registry registry )
- {
-#set ( $root = $model.getClass( $model.getRoot( $version ), $version ) )
- write${root.name}( "", model, registry );
- }
-
-#foreach ( $class in $classes )
- private void write${class.name}( String prefix, ${class.name} value, Registry registry )
- {
- if ( value != null )
- {
-#foreach ( $field in $class.getAllFields( $version, true ) )
-#set ( $uncapFieldName = $javaTool.uncapitalise($field.name) )
-#set ( $value = "value.${javaTool.makeGetter( $field )}()" )
-#if ( $field.primitive )
- #if ($field.type != "boolean")
- if ( #writeValueChecker( $field.type $value $field ) )
- {
- #end
- String $uncapFieldName = "$uncapFieldName";
-#writePrimitive( $field.type $value $uncapFieldName )
- #if ($field.type != "boolean")
- }
- #end
-#else
-#set ( $assoc = $field )
-#if ( $assoc.multiplicity == "1" )
- if ( #writeValueChecker( $field.type $value $field ) )
- {
- write${assoc.to}( prefix + "${uncapFieldName}.", $value, registry );
- }
-#else
- if ( #writeValueChecker( $assoc.type $value $field ) )
- {
-#if ( $assoc.type == "java.util.List" || $assoc.type == "java.util.Set" )
-## TODO! make it possible to have unwrapped lists via metadata
- registry.removeSubset( prefix + "${uncapFieldName}" );
-
- int count = 0;
- for ( Iterator iter = ${value}.iterator(); iter.hasNext(); count++ )
- {
-#set ( $singularFieldName = $javaTool.singular($uncapFieldName) )
- String name = "${uncapFieldName}.${singularFieldName}(" + count + ")";
-#if ( $model.hasClass( $assoc.to, $version ) )
- $assoc.to o = ( $assoc.to ) iter.next();
- write${assoc.to}( prefix + name + ".", o, registry );
-#else
- $assoc.to $singularFieldName = ( $assoc.to ) iter.next();
- #writePrimitive( $assoc.to $singularFieldName "name" )
-#end
- }
-#elseif ( $assoc.type == "java.util.Map" || $assoc.type == "java.util.Properties" )
-## TODO! make it possible to have exploded maps in xml via metadata
-## TODO! make it possible to have unwrapped lists via metadata
- registry.removeSubset( prefix + "${uncapFieldName}" );
-
- for ( Iterator iter = ${value}.keySet().iterator(); iter.hasNext(); )
- {
- String key = (String) iter.next();
- String v = (String) ${value}.get( key );
-
- registry.setString( prefix + "${uncapFieldName}." + key, v );
- }
-#else
- $javaTool.fail( "Unknown collection type: $assoc.type" )
-#end
- }
-#end
-#end
-#end
- }
- }
-
-#end
-}
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java b/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java
deleted file mode 100644
index 0fcdb54..0000000
--- a/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/AbstractRegistryGeneratorTestCase.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * 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.modello.AbstractModelloJavaGeneratorTest;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelValidationException;
-import org.codehaus.plexus.compiler.CompilerConfiguration;
-import org.codehaus.plexus.compiler.CompilerException;
-import org.codehaus.plexus.compiler.CompilerMessage;
-import org.codehaus.plexus.compiler.javac.JavacCompiler;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.ReaderFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-public abstract class AbstractRegistryGeneratorTestCase
- extends AbstractModelloJavaGeneratorTest
-{
- public AbstractRegistryGeneratorTestCase( String name )
- {
- super( name );
- }
-
-
-
- protected void prepareTest( String outputType )
- throws ComponentLookupException, ModelloException, ModelValidationException, IOException, CompilerException
- {
- ModelloCore modello = (ModelloCore) container.lookup( ModelloCore.ROLE );
-
- Model model = modello.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/model.mdo" ) ) );
-
- File generatedSources = getTestFile( "target/" + outputType + "/sources" );
-
- File classes = getOutputDirectory();
-
- FileUtils.deleteDirectory( generatedSources );
-
- FileUtils.deleteDirectory( classes );
-
- generatedSources.mkdirs();
-
- classes.mkdirs();
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, generatedSources.getAbsolutePath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.toString( false ) );
-
- modello.generate( model, "java", parameters );
-
- modello.generate( model, outputType, parameters );
-
- String registryVersion = System.getProperty( "registryVersion" );
-
- addDependency( "org.codehaus.modello", "modello-core" );//, getModelloVersion() );
- addDependency( "org.apache.archiva.redback.components.registry", "spring-registry-api" );//, registryVersion );
- addDependency( "org.apache.archiva.redback.components.registry",
- "spring-registry-commons" );//, registryVersion );
- addDependency( "org.codehaus.plexus", "plexus-container-default" );//, "1.0-alpha-33" );
- addDependency( "commons-collections", "commons-collections" );//, "3.1" );
- addDependency( "commons-configuration", "commons-configuration" );//, "1.8" );
- addDependency( "commons-lang", "commons-lang" );//, "2.6" );
- addDependency( "commons-logging", "commons-logging-api" );//, "1.0.4" );
- addDependency( "org.springframework", "spring-context" );//, System.getProperty( "springVersion" ) );
- addDependency( "org.codehaus.plexus", "plexus-interpolation" );//, "1.14" );
- addDependency( "org.slf4j", "slf4j-api" );//, System.getProperty( "slf4jVersion" ) );
- addDependency( "org.slf4j", "slf4j-simple" );//, System.getProperty( "slf4jVersion" ) );
-
- if ( "1.5".compareTo( System.getProperty( "java.specification.version" ) ) <= 0 )
- {
- // causes a conflict with JDK 1.4 => add this dependency only with JDK 1.5+
- addDependency( "xerces", "xercesImpl" );//, "2.9.1" );
- }
-
- compile( generatedSources, classes );
- }
-
- protected void compile( File generatedSources, File destinationDirectory )
- throws IOException, CompilerException
- {
-
- addDependency( "junit", "junit" );//, "3.8.1" );
-
- addDependency( "org.codehaus.plexus", "plexus-utils" );//, "1.4.5" );
-
- addDependency( "org.codehaus.modello", "modello-test" );//, getModelloVersion() );
-
- List<String> classPathElements = new ArrayList<>( getClasspath().size() + 2 );
-
- classPathElements.add( getTestPath( "target/classes" ) );
-
- classPathElements.add( getTestPath( "target/test-classes" ) );
-
- for ( int i = 0; i < getClasspath().size(); i++ )
- {
- classPathElements.add( getClasspath().get( i ).getAbsolutePath() );
- }
-
- org.codehaus.plexus.compiler.Compiler compiler = new JavacCompiler();
-
- CompilerConfiguration configuration = new CompilerConfiguration();
- configuration.setClasspathEntries( classPathElements );
- configuration.setSourceLocations(
- Arrays.asList( getTestPath( "src/test/verifiers/" + getName() ), generatedSources.getAbsolutePath() ) );
- configuration.setOutputLocation( getOutputClasses().getAbsolutePath() );// destinationDirectory.getAbsolutePath() );
- configuration.setDebug( true );
- configuration.setSourceVersion( "1.5" );
- configuration.setTargetVersion( "1.5" );
-
- List<CompilerMessage> messages = compiler.performCompile( configuration ).getCompilerMessages();
-
- int error = 0;
-
- for ( CompilerMessage message : messages )
- {
- System.out.println( message.getFile() + "[" + message.getStartLine() + "," + message.getStartColumn() +
- "]: " + message.getMessage() );
- if ( message.getKind() == CompilerMessage.Kind.ERROR )
- {
- error++;
- }
- }
-
- assertEquals( "There was compilation errors.:" + messages, 0, error );
- }
-}
diff --git a/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/RegistryReaderGeneratorTest.java b/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/RegistryReaderGeneratorTest.java
deleted file mode 100644
index 07fb8b6..0000000
--- a/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/RegistryReaderGeneratorTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * 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.
- */
-
-/**
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
- */
-public class RegistryReaderGeneratorTest
- extends AbstractRegistryGeneratorTestCase
-{
- public RegistryReaderGeneratorTest()
- {
- super( "registry-reader" );
- }
-
- public void testRegistryReader()
- throws Throwable
- {
- prepareTest( "registry-reader" );
-
- verifyCompiledGeneratedSources( "org.apache.archiva.redback.components.registry.modello.RegistryReaderVerifier" );//, "registry-reader" );
- }
-}
diff --git a/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/RegistryWriterGeneratorTest.java b/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/RegistryWriterGeneratorTest.java
deleted file mode 100644
index 3326e70..0000000
--- a/modello-plugin-redback-registry/src/test/java/org/apache/archiva/redback/components/registry/modello/RegistryWriterGeneratorTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * 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.
- */
-
-/**
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
- */
-public class RegistryWriterGeneratorTest
- extends AbstractRegistryGeneratorTestCase
-{
- public RegistryWriterGeneratorTest()
- {
- super( "registry-writer" );
- }
-
- public void testRegistryWriter()
- throws Throwable
- {
- prepareTest( "registry-writer" );
-
- verifyCompiledGeneratedSources( "org.apache.archiva.redback.components.registry.modello.RegistryWriterVerifier" );//, "registry-writer" );
- }
-}
diff --git a/modello-plugin-redback-registry/src/test/resources/model.mdo b/modello-plugin-redback-registry/src/test/resources/model.mdo
deleted file mode 100644
index 9c12768..0000000
--- a/modello-plugin-redback-registry/src/test/resources/model.mdo
+++ /dev/null
@@ -1,155 +0,0 @@
-<!--
- ~ 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.
- -->
-
-<model>
- <id>model</id>
- <name>Model</name>
- <defaults>
- <default>
- <key>package</key>
- <value>org.apache.archiva.redback.components.registry.modello.test.model</value>
- </default>
- </defaults>
- <classes>
- <class rootElement="true">
- <name>Model</name>
- <version>1.0.0+</version>
- <fields>
- <field>
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>repository</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- <field>
- <name>numeric</name>
- <version>1.0.0+</version>
- <type>int</type>
- </field>
- <field>
- <name>defString</name>
- <version>1.0.0+</version>
- <type>String</type>
- <defaultValue>def</defaultValue>
- </field>
- <field>
- <name>defNumeric</name>
- <version>1.0.0+</version>
- <type>int</type>
- <defaultValue>8080</defaultValue>
- </field>
- <field>
- <name>defBoolean</name>
- <version>1.0.0+</version>
- <type>boolean</type>
- <defaultValue>true</defaultValue>
- </field>
- <field>
- <name>reference</name>
- <version>1.0.0+</version>
- <association>
- <type>Reference</type>
- </association>
- </field>
- <field>
- <name>missingReference</name>
- <version>1.0.0+</version>
- <association>
- <type>Reference</type>
- </association>
- </field>
- <field>
- <name>emptyReference</name>
- <version>1.0.0+</version>
- <association>
- <type>EmptyReference</type>
- </association>
- </field>
- <field>
- <name>listReferences</name>
- <version>1.0.0+</version>
- <association>
- <type>Reference</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>setReferences</name>
- <version>1.0.0+</version>
- <type>Set</type>
- <association>
- <type>Reference</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>stringReferences</name>
- <version>1.0.0+</version>
- <association>
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>map</name>
- <version>1.0.0+</version>
- <type>Map</type>
- <association>
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>properties</name>
- <version>1.0.0+</version>
- <type>Properties</type>
- <association>
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
- <name>baseDn</name>
- <description>The LDAP base dn.</description>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- </fields>
- </class>
- <class>
- <name>Reference</name>
- <version>1.0.0+</version>
- <fields>
- <field>
- <name>name</name>
- <version>1.0.0+</version>
- <type>String</type>
- </field>
- </fields>
- </class>
- <class>
- <name>EmptyReference</name>
- <version>1.0.0+</version>
- </class>
- </classes>
-</model>
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/RegistryReaderVerifier.java b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/RegistryReaderVerifier.java
deleted file mode 100644
index 11ad084..0000000
--- a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/RegistryReaderVerifier.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry;
-import org.apache.archiva.redback.components.registry.modello.test.model.Model;
-import org.apache.archiva.redback.components.registry.modello.test.model.Reference;
-import org.apache.archiva.redback.components.registry.modello.test.model.io.registry.ModelRegistryReader;
-import org.codehaus.modello.verifier.Verifier;
-import org.apache.archiva.redback.components.registry.Registry;
-
-import junit.framework.Assert;
-
-import java.io.File;
-import java.lang.AssertionError;
-import java.lang.System;
-import java.util.*;
-
-
-/**
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
- */
-public class RegistryReaderVerifier
- extends Verifier
-{
- public void verify()
- throws Exception
- {
- Registry registry = new CommonsConfigurationRegistry();
- registry.initialize();
- registry.addConfigurationFromFile( new File( "src/test/verifiers/registry-reader/test.properties" ) );
- registry.addConfigurationFromFile( new File( "src/test/verifiers/registry-reader/test.xml" ) );
-
- ModelRegistryReader modelReader = new ModelRegistryReader();
-
- Model model = modelReader.read( registry );
-
- Assert.assertEquals( "Name", model.getName() );
- Assert.assertEquals( System.getProperty( "user.home" ) + "/.m2/repository", model.getRepository() );
- Assert.assertEquals( 1, model.getNumeric() );
- Assert.assertEquals( "RefName", model.getReference().getName() );
- Assert.assertNull( model.getMissingReference().getName() );
- Assert.assertNotNull( model.getEmptyReference() );
- Assert.assertEquals( "ListName1", ((Reference)model.getListReferences().get( 0 )).getName() );
- Assert.assertEquals( "ListName2", ((Reference)model.getListReferences().get( 1 )).getName() );
- Assert.assertEquals( "ListName3", ((Reference)model.getListReferences().get( 2 )).getName() );
- Set set = model.getSetReferences();
- List names = new ArrayList( set.size() );
- for ( Iterator i = set.iterator(); i.hasNext(); )
- {
- Reference ref = (Reference) i.next();
- names.add( ((Reference)ref).getName() );
- }
- Collections.sort( names );
- Assert.assertEquals( Arrays.asList( new String[] { "SetName1", "SetName2" } ), names );
- Assert.assertEquals( Arrays.asList( new String[] { "S1", "S2", "S3", "S4", "S5" } ), model.getStringReferences() );
-
- Map map = model.getMap();
- Assert.assertEquals( 3, map.size() );
- Assert.assertEquals( "value1", map.get( "property" ) );
- Assert.assertEquals( "value2", map.get( "property2" ) );
- Assert.assertEquals( "value3", map.get( "something.else" ) );
-
- Properties properties = model.getProperties();
- Assert.assertEquals( 3, properties.size() );
- Assert.assertEquals( "value1", properties.getProperty( "property" ) );
- Assert.assertEquals( "value2", properties.getProperty( "property2" ) );
- Assert.assertEquals( "value3", properties.getProperty( "something.else" ) );
-
- // test defaults
- Assert.assertEquals( "def", model.getDefString() );
- Assert.assertEquals( 8080, model.getDefNumeric() );
- Assert.assertEquals( true, model.isDefBoolean() );
-
- System.out.println("baseDn:" + model.getBaseDn());
-
- Assert.assertEquals( "ou=People,dc=archiva,dc=apache,dc=org", model.getBaseDn() );
- }
-}
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.properties b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.properties
deleted file mode 100644
index 56b84dc..0000000
--- a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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.
-
-name=Name
-repository=${user.home}/.m2/repository
-numeric=1
-reference.name=RefName
-stringReferences.stringReference=S1, S2, S3, S4, S5
-map.property=value1
-map.property2=value2
-map.something.else=value3
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.xml b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.xml
deleted file mode 100644
index 914aac7..0000000
--- a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
- ~ 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.
- -->
-
-<configuration>
- <listReferences>
- <listReference>
- <name>ListName1</name>
- </listReference>
- <listReference>
- <name>ListName2</name>
- </listReference>
- <listReference>
- <name>ListName3</name>
- </listReference>
- </listReferences>
- <setReferences>
- <setReference>
- <name>SetName1</name>
- </setReference>
- <setReference>
- <name>SetName2</name>
- </setReference>
- </setReferences>
- <properties>
- <property>value1</property>
- <property2>value2</property2>
- <something>
- <else>value3</else>
- </something>
- </properties>
- <baseDn>ou=People</baseDn>
- <baseDn>dc=archiva</baseDn>
- <baseDn>dc=apache</baseDn>
- <baseDn>dc=org</baseDn>
-</configuration>
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java b/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
deleted file mode 100644
index 0d9c249..0000000
--- a/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.apache.archiva.redback.components.registry.modello;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry;
-import org.apache.archiva.redback.components.registry.modello.test.model.Model;
-import org.apache.archiva.redback.components.registry.modello.test.model.Reference;
-import org.apache.archiva.redback.components.registry.modello.test.model.EmptyReference;
-import org.apache.archiva.redback.components.registry.modello.test.model.io.registry.ModelRegistryWriter;
-import org.codehaus.modello.verifier.Verifier;
-import org.apache.archiva.redback.components.registry.Registry;
-
-import junit.framework.Assert;
-
-import java.lang.AssertionError;
-import java.util.*;
-
-/**
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
- */
-public class RegistryWriterVerifier
- extends Verifier
-{
- private static Reference createReference( String name )
- {
- Reference reference = new Reference();
- reference.setName( name );
- return reference;
- }
-
- public void verify()
- throws Exception
- {
- Registry registry = new CommonsConfigurationRegistry();
- registry.initialize();
-
- Model model = new Model();
- model.setName( "name" );
- model.setNumeric( 9 );
- model.setReference( createReference( "ref-name" ) );
- model.setEmptyReference( new EmptyReference() );
- model.setListReferences( new ArrayList( Arrays.asList( new Reference[] {
- createReference( "list-name1" ),
- createReference( "list-name2" ),
- createReference( "list-name3" )
- })));
- model.setSetReferences( new HashSet( Arrays.asList( new Reference[] {
- createReference( "set-name1" ),
- createReference( "set-name2" ),
- })));
- model.setStringReferences( Arrays.asList( new String[] { "S1", "S2", "S3", "S4", "S5" } ) );
-
- Map map = new HashMap();
- map.put( "property", "value1" );
- map.put( "property2", "value2" );
- map.put( "something.else", "value3" );
- model.setMap( map );
-
- Properties properties = new Properties();
- properties.setProperty( "property", "value1" );
- properties.setProperty( "property2", "value2" );
- properties.setProperty( "something.else", "value3" );
- model.setProperties( properties );
-
- ModelRegistryWriter modelWriter = new ModelRegistryWriter();
-
- modelWriter.write( model, registry );
-
- Assert.assertEquals( "name", registry.getString( "name" ) );
- Assert.assertEquals( 9, registry.getInt( "numeric" ) );
- Assert.assertEquals( "ref-name", registry.getString( "reference.name" ) );
- Assert.assertNull( registry.getString( "missingReference" ) );
- Assert.assertNull( registry.getString( "missingReference.name" ) );
- Assert.assertNull( registry.getString( "emptyReference" ) );
- Assert.assertNull( registry.getString( "emptyReference.name" ) );
- Assert.assertEquals( "list-name1", registry.getString( "listReferences.listReference(0).name" ) );
- Assert.assertEquals( "list-name2", registry.getString( "listReferences.listReference(1).name" ) );
- Assert.assertEquals( "list-name3", registry.getString( "listReferences.listReference(2).name" ) );
- List names = new ArrayList( 2 );
- names.add( registry.getString( "setReferences.setReference(0).name" ) );
- names.add( registry.getString( "setReferences.setReference(1).name" ) );
- Collections.sort( names );
- Assert.assertEquals( Arrays.asList( new String[] { "set-name1", "set-name2" } ), names );
- Assert.assertEquals( Arrays.asList( new String[] { "S1", "S2", "S3", "S4", "S5" } ),
- registry.getList( "stringReferences.stringReference" ) );
-
- map = registry.getProperties( "map" );
- Assert.assertEquals( 3, map.size() );
- Assert.assertEquals( "value1", map.get( "property" ) );
- Assert.assertEquals( "value2", map.get( "property2" ) );
- Assert.assertEquals( "value3", map.get( "something.else" ) );
-
- properties = registry.getProperties( "properties" );
- Assert.assertEquals( 3, properties.size() );
- Assert.assertEquals( "value1", properties.getProperty( "property" ) );
- Assert.assertEquals( "value2", properties.getProperty( "property2" ) );
- Assert.assertEquals( "value3", properties.getProperty( "something.else" ) );
-
- // test defaults
- Assert.assertNull( registry.getString( "defString" ) );
-
- try
- {
- registry.getInt( "defNumeric" );
- Assert.fail();
- }
- catch ( NoSuchElementException e )
- {
- // expected
- }
-
-
- Assert.assertTrue( registry.getBoolean( "defBoolean" ) );
-
-
- // test removing an element from a list [MODELLO-84]
- model.getListReferences().remove( 0 );
- modelWriter.write( model, registry );
- Assert.assertEquals( "list-name2", registry.getString( "listReferences.listReference(0).name" ) );
- Assert.assertEquals( "list-name3", registry.getString( "listReferences.listReference(1).name" ) );
- Assert.assertNull( registry.getString( "listReferences.listReference(2).name" ) );
-
- // test removing an element from a map
- model.getMap().remove( "property2" );
- modelWriter.write( model, registry );
- map = registry.getProperties( "map" );
- Assert.assertEquals( 2, map.size() );
- Assert.assertEquals( "value1", map.get( "property" ) );
- Assert.assertNull( "value2", map.get( "property2" ) );
- Assert.assertEquals( "value3", map.get( "something.else" ) );
- }
-}
diff --git a/modello-plugin-store/pom.xml b/modello-plugin-store/pom.xml
deleted file mode 100644
index 6ceabf4..0000000
--- a/modello-plugin-store/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugins</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>modello-plugin-store</artifactId>
- <name>Modello Store Plugin</name>
- <packaging>jar</packaging>
- <properties>
- <site.staging.base>${project.parent.basedir}/../site</site.staging.base>
- </properties>
-
- <scm>
- <url>${scmBrowseUrl};f=${project.artifactId}</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-velocity</artifactId>
- <version>1.1.4</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-</project>
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/AbstractVelocityModelloGenerator.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/AbstractVelocityModelloGenerator.java
deleted file mode 100644
index 00443e2..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/AbstractVelocityModelloGenerator.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store;
-
-/*
- * 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.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.context.Context;
-import org.apache.velocity.exception.ParseErrorException;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelClass;
-import org.codehaus.modello.model.Version;
-import org.codehaus.modello.plugin.AbstractModelloGenerator;
-import org.apache.archiva.redback.components.modello.plugin.store.tool.JavaTool;
-import org.codehaus.plexus.util.WriterFactory;
-import org.codehaus.plexus.velocity.VelocityComponent;
-
-import java.io.File;
-import java.util.HashMap;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: AbstractVelocityModelloGenerator.java 901 2008-05-26 21:25:01Z hboutemy $
- */
-public abstract class AbstractVelocityModelloGenerator
- extends AbstractModelloGenerator
-{
- /**
- * @requirement
- */
- private VelocityComponent velocity;
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- protected static Context makeStubVelocityContext( Model model, Version version )
- {
- String packageName = getGeneratedPackage( model, version );
-
- return makeStubVelocityContext( model, version, packageName );
- }
-
- private static String getGeneratedPackage( Model model, Version version )
- {
- return model.getDefaultPackageName( false, version );
- }
-
- protected static Context makeStubVelocityContext( Model model, Version version, String packageName )
- {
- List classes = model.getClasses( version );
-
- Map classFields = new HashMap();
-
- for ( Iterator it = classes.iterator(); it.hasNext(); )
- {
- ModelClass modelClass = (ModelClass) it.next();
-
- List fields = modelClass.getFields( version );
-
- classFields.put( modelClass.getName(), fields );
- }
-
- Context context = new VelocityContext();
-
- context.put( "version", version );
-
- context.put( "model", model );
-
- context.put( "classes", classes );
-
- context.put( "classFields", classFields );
-
- context.put( "javaTool", new JavaTool() );
-
- context.put( "package", packageName );
-
- return context;
- }
-
- protected void writeClass( String templateName, File basedir, String packageName, String className,
- Context context )
- throws ModelloException
- {
- File packageFile = new File( getOutputDirectory(), packageName.replace( '.', File.separatorChar ) );
-
- File file = new File( packageFile, className + ".java" );
-
- writeTemplate( templateName, file, context );
- }
-
- protected void writeTemplate( String templateName, File file, Context context )
- throws ModelloException
- {
- Template template = getTemplate( templateName );
-
- if ( template == null )
- {
- ClassLoader old = Thread.currentThread().getContextClassLoader();
-
- try
- {
- Thread.currentThread().setContextClassLoader( this.getClass().getClassLoader() );
-
- template = getTemplate( templateName );
- }
- finally
- {
- Thread.currentThread().setContextClassLoader( old );
- }
- }
-
- if ( template == null )
- {
- throw new ModelloException( "Could not find the template '" + templateName + "'." );
- }
-
- if ( !file.getParentFile().exists() )
- {
- if ( !file.getParentFile().mkdirs() )
- {
- throw new ModelloException(
- "Error while creating parent directories for '" + file.getAbsolutePath() + "'." );
- }
- }
-
- try
- {
- try (Writer writer = getEncoding() == null ? WriterFactory.newPlatformWriter( file )
- : WriterFactory.newWriter( file, getEncoding() ))
- {
-
- template.merge( context, writer );
- }
-
- }
- catch ( Exception e )
- {
- throw new ModelloException( "Error while generating code.", e );
- }
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- private Template getTemplate( String name )
- throws ModelloException
- {
- try
- {
- return velocity.getEngine().getTemplate( name );
- }
- catch ( ResourceNotFoundException e )
- {
- return null;
- }
- catch ( ParseErrorException e )
- {
- throw new ModelloException( "Could not parse the template '" + name + "'.", e );
- }
- catch ( Exception e )
- {
- throw new ModelloException( "Error while loading template '" + name + "'.", e );
- }
- }
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/StoreModelloGenerator.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/StoreModelloGenerator.java
deleted file mode 100644
index dc64c10..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/StoreModelloGenerator.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store;
-
-/*
- * 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.velocity.VelocityContext;
-import org.apache.velocity.context.Context;
-import org.codehaus.modello.ModelloException;
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.plugin.AbstractModelloGenerator;
-import org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreClassMetadata;
-import org.codehaus.plexus.util.WriterFactory;
-import org.codehaus.plexus.velocity.VelocityComponent;
-
-import java.io.File;
-import java.io.Writer;
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: StoreModelloGenerator.java 895 2008-05-24 22:31:50Z hboutemy $
- */
-public class StoreModelloGenerator
- extends AbstractModelloGenerator
-{
- /** @requirement */
- private VelocityComponent velocity;
-
- public void generate( Model model, Properties properties )
- throws ModelloException
- {
- initialize( model, properties );
-
-
- // ----------------------------------------------------------------------
- // Initialize the Velocity context
- // ----------------------------------------------------------------------
-
- Context context = new VelocityContext();
-
- context.put( "version", getGeneratedVersion() );
-
- context.put( "package", model.getDefaultPackageName( false, getGeneratedVersion() ) );
-
- context.put( "metadataId", StoreClassMetadata.ID );
-
- context.put( "model", model );
-
- // ----------------------------------------------------------------------
- // Generate the code
- // ----------------------------------------------------------------------
-
- String packageName = model.getDefaultPackageName( false, getGeneratedVersion() );
-
- File packageFile = new File( getOutputDirectory(), packageName.replace( '.', File.separatorChar ) );
-
- File interfaceFile = new File( packageFile, model.getName() + "Store.java" );
-
- File exceptionFile = new File( packageFile, model.getName() + "StoreException.java" );
-
- if ( !interfaceFile.getParentFile().exists() )
- {
- if ( !interfaceFile.getParentFile().mkdirs() )
- {
- throw new ModelloException( "Error while creating parent directories for '" + interfaceFile.getAbsolutePath() + "'." );
- }
- }
-
- String interfaceTemplate = "org/apache/archiva/redback/components/modello/plugin/store/templates/Store.vm";
-
- String exceptionTemplate =
- "org/apache/archiva/redback/components/modello/plugin/store/templates/StoreException.vm";
-
- writeTemplate( interfaceTemplate, interfaceFile, context );
-
- writeTemplate( exceptionTemplate, exceptionFile, context );
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- private void writeTemplate( String template, File file, Context context )
- throws ModelloException
- {
- try
- {
- try (Writer writer = getEncoding() == null ? WriterFactory.newPlatformWriter( file )
- : WriterFactory.newWriter( file, getEncoding() ))
-
- {
- velocity.getEngine().mergeTemplate( template, context, writer );
-
- writer.flush();
-
- }
- }
- catch ( Exception e )
- {
- throw new ModelloException( "Error while generating code.", e );
- }
- }
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreAssociationMetadata.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreAssociationMetadata.java
deleted file mode 100644
index eec4dc9..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreAssociationMetadata.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store.metadata;
-
-/*
- * 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.modello.metadata.AssociationMetadata;
-
-/**
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: StoreAssociationMetadata.java 378 2005-06-19 21:04:43Z trygvis $
- */
-public class StoreAssociationMetadata
- implements AssociationMetadata
-{
- public static final String ID = StoreAssociationMetadata.class.getName();
-
- private boolean storable;
-
- private Boolean part;
-
- private String keyType;
-
- public void setStorable( boolean storable )
- {
- this.storable = storable;
- }
-
- public boolean isStorable()
- {
- return storable;
- }
-
- public Boolean isPart()
- {
- return part;
- }
-
- public void setPart( Boolean part )
- {
- this.part = part;
- }
-
- public String getKeyType()
- {
- return keyType;
- }
-
- public void setKeyType( String keyType )
- {
- this.keyType = keyType;
- }
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreClassMetadata.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreClassMetadata.java
deleted file mode 100644
index c5f4383..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreClassMetadata.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store.metadata;
-
-/*
- * 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.modello.metadata.ClassMetadata;
-
-/**
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: StoreClassMetadata.java 240 2005-02-24 21:00:54Z trygvis $
- */
-public class StoreClassMetadata
- implements ClassMetadata
-{
- public static final String ID = StoreClassMetadata.class.getName();
-
- private boolean storable;
-
- public void setStorable( boolean storable )
- {
- this.storable = storable;
- }
-
- public boolean isStorable()
- {
- return storable;
- }
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreFieldMetadata.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreFieldMetadata.java
deleted file mode 100644
index e8677df..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreFieldMetadata.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store.metadata;
-
-/*
- * 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.modello.metadata.FieldMetadata;
-
-/**
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: StoreFieldMetadata.java 243 2005-02-28 13:51:51Z trygvis $
- */
-public class StoreFieldMetadata
- implements FieldMetadata
-{
- public static final String ID = StoreFieldMetadata.class.getName();
-
- private boolean storable;
-
- private int maxSize;
-
- public void setStorable( boolean storable )
- {
- this.storable = storable;
- }
-
- public boolean isStorable()
- {
- return storable;
- }
-
- public int getMaxSize()
- {
- return maxSize;
- }
-
- public void setMaxSize( int maxSize )
- {
- this.maxSize = maxSize;
- }
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreMetadataPlugin.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreMetadataPlugin.java
deleted file mode 100644
index 9caa320..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreMetadataPlugin.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store.metadata;
-
-/*
- * 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.modello.ModelloException;
-import org.codehaus.modello.metadata.AbstractMetadataPlugin;
-import org.codehaus.modello.metadata.AssociationMetadata;
-import org.codehaus.modello.metadata.ClassMetadata;
-import org.codehaus.modello.metadata.FieldMetadata;
-import org.codehaus.modello.metadata.InterfaceMetadata;
-import org.codehaus.modello.metadata.ModelMetadata;
-import org.codehaus.modello.model.Model;
-import org.codehaus.modello.model.ModelAssociation;
-import org.codehaus.modello.model.ModelClass;
-import org.codehaus.modello.model.ModelField;
-import org.codehaus.modello.model.ModelInterface;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.util.Collections;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: StoreMetadataPlugin.java 796 2007-02-09 00:10:59Z brett $
- */
-public class StoreMetadataPlugin
- extends AbstractMetadataPlugin
-{
- public final static String PART = "stash.part";
-
- public final static String KEY_TYPE = "stash.keyType";
-
- // ----------------------------------------------------------------------
- // Map to Metadata
- // ----------------------------------------------------------------------
-
- public ModelMetadata getModelMetadata( Model model, Map data )
- {
- return new StoreModelMetadata();
- }
-
- public InterfaceMetadata getInterfaceMetadata( ModelInterface modelInterface, Map<String, String> stringStringMap )
- throws ModelloException
- {
- // TODO implements ?
- return null;
- }
-
- public ClassMetadata getClassMetadata( ModelClass clazz, Map data )
- throws ModelloException
- {
- StoreClassMetadata metadata = new StoreClassMetadata();
-
- String storable = (String) data.get( "stash.storable" );
-
- if ( storable != null && storable.equals( "true" ) )
- {
-// JavaClassMetadata jcm = (JavaClassMetadata) clazz.getMetadata( JavaClassMetadata.ID );
-//
-// if ( jcm.isAbstract() )
-// {
-// throw new ModelloException( "A storable class can't be abstract. " +
-// "Class name '" + clazz.getName() + "'." );
-// }
-//
- metadata.setStorable( true );
- }
-
- return metadata;
- }
-
- public FieldMetadata getFieldMetadata( ModelField field, Map data )
- throws ModelloException
- {
- StoreFieldMetadata metadata = new StoreFieldMetadata();
-
- // ----------------------------------------------------------------------
- // Fields are per default storable as the fields can't be persisted
- // unless the class itself is storable.
- // ----------------------------------------------------------------------
-
- metadata.setStorable( getBoolean( data, "stash.storable", true ) );
-
- String maxSize = (String) data.get( "stash.maxSize" );
-
- if ( !StringUtils.isEmpty( maxSize ) )
- {
- if ( !field.getType().equals( "String" ) )
- {
- throw new ModelloException( "When specifying max size on a field the type must be String. " +
- "Class: '" + field.getModelClass().getName() + "', " +
- "field : '" + field.getName() + "'." );
- }
-
- try
- {
- metadata.setMaxSize( Integer.parseInt( maxSize ) );
- }
- catch ( NumberFormatException e )
- {
- throw new ModelloException( "Max size on a field the type must be String. " +
- "Class: '" + field.getModelClass().getName() + "', " +
- "field : '" + field.getName() + "'." );
- }
- }
-
- return metadata;
- }
-
- public AssociationMetadata getAssociationMetadata( ModelAssociation association, Map data )
- throws ModelloException
- {
- StoreAssociationMetadata metadata = new StoreAssociationMetadata();
-
- // ----------------------------------------------------------------------
- // Associations are per default storable as the fields can't be persisted
- // unless the class itself is storable.
- // ----------------------------------------------------------------------
-
- metadata.setStorable( getBoolean( data, "stash.storable", true ) );
-
- if ( data.containsKey( PART ) )
- {
- metadata.setPart( Boolean.valueOf( (String) data.get( PART ) ) );
- }
-
- String keyType = (String) data.get( KEY_TYPE );
-
- if ( association.getType() != null && association.getType().equals( "Map" ) )
- {
- if ( StringUtils.isEmpty( keyType ) )
- {
- keyType = "String";
- }
-
- // TODO: assert the key type
-
- metadata.setKeyType( keyType );
- }
-
- return metadata;
- }
-
- // ----------------------------------------------------------------------
- // Metadata to Map
- // ----------------------------------------------------------------------
-
- public Map getFieldMap( ModelField field, FieldMetadata metadata )
- {
- return Collections.EMPTY_MAP;
- }
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreModelMetadata.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreModelMetadata.java
deleted file mode 100644
index 99f354e..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/metadata/StoreModelMetadata.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store.metadata;
-
-/*
- * 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.modello.metadata.ModelMetadata;
-
-/**
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: StoreModelMetadata.java 215 2005-02-11 02:16:49Z trygvis $
- */
-public class StoreModelMetadata
- implements ModelMetadata
-{
-}
diff --git a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/tool/JavaTool.java b/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/tool/JavaTool.java
deleted file mode 100644
index 7cb3ef2..0000000
--- a/modello-plugin-store/src/main/java/org/apache/archiva/redback/components/modello/plugin/store/tool/JavaTool.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store.tool;
-
-/*
- * 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.modello.model.ModelField;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: JavaTool.java 803 2007-02-09 11:12:55Z brett $
- */
-public class JavaTool
-{
- public String makeGetter( ModelField field )
- {
- if ( field.getType().equals( "boolean" ) )
- {
- return "is" + field.getName().substring( 0, 1 ).toUpperCase() + field.getName().substring( 1 );
- }
-
- return "get" + field.getName().substring( 0, 1 ).toUpperCase() + field.getName().substring( 1 );
- }
-
- public String makeSetter( ModelField field )
- {
- return "set" + field.getName().substring( 0, 1 ).toUpperCase() + field.getName().substring( 1 );
- }
-
- public void fail( String message )
- throws Exception
- {
- throw new Exception( message );
- }
-
- public String uncapitalise( String s )
- {
- return StringUtils.uncapitalise( s );
- }
-
- public String capitalise( String s )
- {
- return StringUtils.capitalise( s );
- }
-
- public String singular( String name )
- {
- if ( name.endsWith( "ies" ) )
- {
- return name.substring( 0, name.length() - 3 ) + "y";
- }
- else if ( name.endsWith( "es" ) && name.endsWith( "ches" ) )
- {
- return name.substring( 0, name.length() - 2 );
- }
- else if ( name.endsWith( "s" ) )
- {
- return name.substring( 0, name.length() - 1 );
- }
-
- return name;
- }
-}
diff --git a/modello-plugin-store/src/main/resources/META-INF/plexus/components.xml b/modello-plugin-store/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index bba7690..0000000
--- a/modello-plugin-store/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<component-set>
- <components>
-
- <component>
- <role>org.codehaus.modello.plugin.ModelloGenerator</role>
- <role-hint>store</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.plugin.store.StoreModelloGenerator</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- </requirement>
- </requirements>
- </component>
-
- <component>
- <role>org.codehaus.modello.metadata.MetadataPlugin</role>
- <role-hint>store</role-hint>
- <implementation>org.apache.archiva.redback.components.modello.plugin.store.metadata.StoreMetadataPlugin</implementation>
- </component>
-
- </components>
-</component-set>
diff --git a/modello-plugin-store/src/main/resources/org/apache/archiva/redback/components/modello/plugin/store/templates/Store.vm b/modello-plugin-store/src/main/resources/org/apache/archiva/redback/components/modello/plugin/store/templates/Store.vm
deleted file mode 100644
index 17cb6a9..0000000
--- a/modello-plugin-store/src/main/resources/org/apache/archiva/redback/components/modello/plugin/store/templates/Store.vm
+++ /dev/null
@@ -1,43 +0,0 @@
-package ${package};
-
-##
-## Copyright 2001-2005 The Apache Software Foundation.
-##
-## Licensed 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.
-##
-
-/**
- * Generated storage mechanism for the $model.name model.
- *
- * @author Mr Modello
- */
-public interface ${model.name}Store
-{
-#foreach ( $class in $model.allClasses )
- // ----------------------------------------------------------------------
- // $class.name storage methods
- // ----------------------------------------------------------------------
-
-#if ( $class.getMetadata( $metadataId ).isStorable() )
- public void add${class.name}( $class.name entity )
- throws ${model.name}StoreException;
-
- public void delete${class.name}( String id )
- throws ${model.name}StoreException;
-
- public void update${class.name}( String id, $class.name entity )
- throws ${model.name}StoreException;
-#end
-
-#end
-}
diff --git a/modello-plugin-store/src/main/resources/org/apache/archiva/redback/components/modello/plugin/store/templates/StoreException.vm b/modello-plugin-store/src/main/resources/org/apache/archiva/redback/components/modello/plugin/store/templates/StoreException.vm
deleted file mode 100644
index da4fbdb..0000000
--- a/modello-plugin-store/src/main/resources/org/apache/archiva/redback/components/modello/plugin/store/templates/StoreException.vm
+++ /dev/null
@@ -1,36 +0,0 @@
-package ${package};
-
-##
-## Copyright 2001-2005 The Apache Software Foundation.
-##
-## Licensed 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.
-##
-
-/**
- * Generated exception for the store for the $model.name model.
- *
- * @author Mr Modello
- */
-public class ${model.name}Exception
- extends Exception
-{
- public ${model.name}Exception( String message )
- {
- super( message );
- }
-
- public ${model.name}Exception( String message, Throwable cause )
- {
- super( message, cause );
- }
-}
diff --git a/modello-plugin-store/src/test/java/org/apache/archiva/redback/components/modello/plugin/store/StoreModelloGeneratorTest.java b/modello-plugin-store/src/test/java/org/apache/archiva/redback/components/modello/plugin/store/StoreModelloGeneratorTest.java
deleted file mode 100644
index c2c0c41..0000000
--- a/modello-plugin-store/src/test/java/org/apache/archiva/redback/components/modello/plugin/store/StoreModelloGeneratorTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.apache.archiva.redback.components.modello.plugin.store;
-
-/*
- * 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.modello.AbstractModelloGeneratorTest;
-import org.codehaus.modello.ModelloParameterConstants;
-import org.codehaus.modello.core.ModelloCore;
-import org.codehaus.modello.model.Model;
-import org.codehaus.plexus.util.ReaderFactory;
-
-import java.util.Properties;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id: StoreModelloGeneratorTest.java 840 2007-07-17 18:50:39Z hboutemy $
- */
-public class StoreModelloGeneratorTest
- extends AbstractModelloGeneratorTest
-{
- public StoreModelloGeneratorTest()
- {
- super( "store" );
- }
-
- public void testSimpleInvocation()
- throws Exception
- {
- ModelloCore core = (ModelloCore) lookup( ModelloCore.ROLE );
-
- Model model = core.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/mergere-tissue.mdo" ) ) );
-
- Properties parameters = new Properties();
-
- parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, getOutputDirectory().getPath() );
-
- parameters.setProperty( ModelloParameterConstants.VERSION, "4.0.0" );
-
- parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.toString( false ) );
-
- core.generate( model, "store", parameters );
- }
-}
diff --git a/modello-plugin-store/src/test/resources/mergere-tissue.mdo b/modello-plugin-store/src/test/resources/mergere-tissue.mdo
deleted file mode 100644
index 2d54cf5..0000000
--- a/modello-plugin-store/src/test/resources/mergere-tissue.mdo
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<model>
- <id>tissue</id>
- <name>Tissue</name>
- <description>Tissue's entity model.></description>
- <defaults>
- <default>
- <key>package</key>
- <value>org.mergere.tissue</value>
- </default>
- </defaults>
- <classes>
- <class stash.storable="true">
- <name>Issue</name>
- <version>1.0.0</version>
- <fields>
- <field>
- <name>id</name>
- <required>true</required>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>summary</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>assignee</name>
- <version>1.0.0</version>
- <association>
- <type>User</type>
- </association>
- </field>
- <field>
- <name>reporter</name>
- <version>1.0.0</version>
- <association>
- <type>User</type>
- </association>
- </field>
- <field>
- <name>status</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>project</name>
- <version>1.0.0</version>
- <association>
- <type>Project</type>
- </association>
- </field>
- </fields>
- </class>
- <class stash.storable="true">
- <name>Project</name>
- <version>1.0.0</version>
- <fields>
- <field>
- <name>id</name>
- <version>1.0.0</version>
- <description><![CDATA[
- ]]></description>
- <type>String</type>
- </field>
- <field>
- <name>name</name>
- <version>1.0.0</version>
- <description><![CDATA[
- ]]></description>
- <type>String</type>
- </field>
- <field>
- <name>url</name>
- <version>1.0.0</version>
- <description><![CDATA[
- ]]></description>
- <type>String</type>
- </field>
- <field>
- <name>lead</name>
- <version>1.0.0</version>
- <description><![CDATA[
- ]]></description>
- <type>String</type>
- </field>
- </fields>
- </class>
- <!--
- |
- |
- |
- -->
- <class stash.storable="true">
- <name>User</name>
- <version>1.0.0</version>
- <fields>
- <field>
- <name>id</name>
- <version>1.0.0</version>
- <description><![CDATA[
- ]]></description>
- <type>String</type>
- </field>
- <field>
- <name>name</name>
- <version>1.0.0</version>
- <description><![CDATA[
- ]]></description>
- <type>String</type>
- </field>
- </fields>
- </class>
- </classes>
-</model>
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 7c82ac7..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.archiva.redback.components</groupId>
- <artifactId>redback-components</artifactId>
- <version>2.5-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugins</artifactId>
- <version>1.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Modello Plugins</name>
-
- <properties>
- <scmBrowseUrl>https://gitbox.apache.org/repos/asf?a=tree;p=archiva-redback-components-modello-plugins.git</scmBrowseUrl>
- <modelloVersion>1.7</modelloVersion>
- <site.staging.base>${project.basedir}/../site</site.staging.base>
- </properties>
- <scm>
- <connection>scm:git:http://gitbox.apache.org/repos/asf/archiva-redback-components-modello-plugins.git</connection>
- <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/archiva-redback-components-modello-plugins.git</developerConnection>
- <url>${scmBrowseUrl}</url>
- </scm>
-
-
- <url>${webUrl}/${project.artifactId}</url>
-
- <description>Modello extensions used by Archiva and Continuum.</description>
-
- <modules>
- <module>modello-db-keywords</module>
- <module>modello-plugin-store</module>
- <module>modello-plugin-jpox</module>
- <module>modello-plugin-redback-registry</module>
- <module>jpox-modello-maven-plugin</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-core</artifactId>
- <version>${modelloVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-test</artifactId>
- <version>${modelloVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-plugin-java</artifactId>
- <version>${modelloVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugin-store</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components.modello</groupId>
- <artifactId>modello-plugin-jpox</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <reportSets>
- <reportSet>
- <id>aggregate</id>
- <inherited>false</inherited>
- <reports>
- <report>aggregate</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
-
-
-</project>
diff --git a/src/site/site.xml b/src/site/site.xml
deleted file mode 100644
index def4824..0000000
--- a/src/site/site.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project name="Modello Plugins Component" >
-
- <publishDate format="yyyy-MM-dd" position="none" />
-
- <body>
- <menu ref="modules" />
- <menu ref="reports" />
- <menu ref="ASF" />
- <breadcrumbs>
- <item name="Redback Components" href="../index.html" />
- <item name="Modello Plugins" href="index.html" />
- </breadcrumbs>
- </body>
-</project>