</Arg>
</New>
- <!-- Archiva database -->
- <New id="archiva" class="org.mortbay.jetty.plus.naming.Resource">
- <Arg>jdbc/archiva</Arg>
- <Arg>
- <New class="org.apache.commons.dbcp.BasicDataSource">
- <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDataSource</Set>
- <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
- <Set name="username">sa</Set>
- <Call name="addConnectionProperty">
- <Arg>create</Arg>
- <Arg>true</Arg>
- </Call>
- </New>
- </Arg>
- </New>
-
- <New id="archivaShutdown" class="org.mortbay.jetty.plus.naming.Resource">
- <Arg>jdbc/archivaShutdown</Arg>
- <Arg>
- <New class="org.apache.commons.dbcp.BasicDataSource">
- <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDataSource</Set>
- <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
- <Set name="username">sa</Set>
- <Call name="addConnectionProperty">
- <Arg>shutdown</Arg>
- <Arg>true</Arg>
- </Call>
- </New>
- </Arg>
- </New>
-
<!-- Users / Security Database -->
<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
</goals>
</execution>
<execution>
- <id>archiva-jpox-registry-reader</id>
+ <id>archiva-registry-reader</id>
<goals>
<goal>generate</goal>
</goals>
</configuration>
</execution>
<execution>
- <id>archiva-jpox-registry-writer</id>
+ <id>archiva-registry-writer</id>
<goals>
<goal>generate</goal>
</goals>
+++ /dev/null
-<?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.
- -->
-
-<component-set>
- <components>
-
- <!-- JdoAccess -->
- <component>
- <role>org.apache.maven.archiva.database.jdo.JdoAccess</role>
- <role-hint>archiva</role-hint>
- <implementation>org.apache.maven.archiva.database.jdo.JdoAccess</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- </requirement>
- </requirements>
- </component>
-
- <!-- JDO Factory -->
- <component>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- <implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation>
- <configuration>
- <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
- <driverName>org.hsqldb.jdbcDriver</driverName>
- <userName>sa</userName>
- <password></password>
- <url>jdbc:hsqldb:mem:testdb</url>
- <otherProperties>
- <property>
- <name>javax.jdo.PersistenceManagerFactoryClass</name>
- <value>org.jpox.PersistenceManagerFactoryImpl</value>
- </property>
- </otherProperties>
- </configuration>
- </component>
-
- </components>
-</component-set>
+++ /dev/null
-<?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.
- -->
-
-<component-set>
- <components>
-
- <!-- JdoAccess -->
- <component>
- <role>org.apache.maven.archiva.database.jdo.JdoAccess</role>
- <role-hint>archiva</role-hint>
- <implementation>org.apache.maven.archiva.database.jdo.JdoAccess</implementation>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- </requirement>
- </requirements>
- </component>
-
- <!-- JDO Factory -->
- <component>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- <implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation>
- <configuration>
- <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
- <driverName>org.hsqldb.jdbcDriver</driverName>
- <userName>sa</userName>
- <password></password>
- <url>jdbc:hsqldb:mem:testdb</url>
- <otherProperties>
- <property>
- <name>javax.jdo.PersistenceManagerFactoryClass</name>
- <value>org.jpox.PersistenceManagerFactoryImpl</value>
- </property>
- </otherProperties>
- </configuration>
- </component>
-
- </components>
-</component-set>
</requirement>
</requirements>
</component>
-
-
- <component>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- <implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation>
-
- <configuration>
- <!-- Database Configuration -->
- <driverName>org.hsqldb.jdbcDriver</driverName>
- <url>jdbc:hsqldb:mem:TESTDB</url>
- <userName>sa</userName>
- <password></password>
-
- <!-- JPOX and JDO configuration -->
- <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
- <otherProperties>
- <property>
- <name>javax.jdo.PersistenceManagerFactoryClass</name>
- <value>org.jpox.PersistenceManagerFactoryImpl</value>
- </property>
- <property>
- <name>org.jpox.autoCreateSchema</name>
- <value>true</value>
- </property>
- <property>
- <name>org.jpox.validateTables</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateConstraints</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateColumns</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.autoStartMechanism</name>
- <value>None</value>
- </property>
- <property>
- <name>org.jpox.transactionIsolation</name>
- <value>READ_UNCOMMITTED</value>
- </property>
- <property>
- <name>org.jpox.poid.transactionIsolation</name>
- <value>READ_UNCOMMITTED</value>
- </property>
- <property>
- <name>org.jpox.rdbms.dateTimezone</name>
- <value>JDK_DEFAULT_TIMEZONE</value>
- </property>
- </otherProperties>
- </configuration>
- </component>
</components>
</component-set>
<artifactId>plexus-spring</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo2-api</artifactId>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<goal>xsd</goal>
</goals>
</execution>
- <execution>
- <id>archiva-jpox-jdo-mapping</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <generatorId>jpox-jdo-mapping</generatorId>
- </configuration>
- </execution>
- <execution>
- <id>archiva-jpox-metadata-class</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <generatorId>jpox-metadata-class</generatorId>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jpox-maven-plugin</artifactId>
- <version>1.1.7</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.2.1.6</version>
- </dependency>
- </dependencies>
- <executions>
- <!-- TODO: put this into a profile
- <execution>
- <id>create-ddl</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>schema-create</goal>
- </goals>
- <configuration>
- <outputFile>${basedir}/target/classes/org/apache/maven/archiva/model/schema.ddl</outputFile>
- <toolProperties>
- <property>
- <name>javax.jdo.option.ConnectionDriverName</name>
- <value>org.apache.derby.jdbc.EmbeddedDriver</value>
- </property>
- <property>
- <name>javax.jdo.option.ConnectionURL</name>
- <value>jdbc:derby:target/jdo-schema-create;create=true</value>
- </property>
- <property>
- <name>javax.jdo.option.ConnectionUserName</name>
- <value>sa</value>
- </property>
- <property>
- <name>javax.jdo.option.ConnectionPassword</name>
- <value></value>
- </property>
- <property>
- <name>log4j.configuration</name>
- <value>${basedir}/src/test/resources/log4j.xml</value>
- </property>
- <property>
- <name>org.jpox.autoCreateTables</name>
- <value>true</value>
- </property>
- </toolProperties>
- </configuration>
- </execution>
- -->
- <execution>
- <id>enhance</id>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- stupid hack because jpox/modello is not supported anymore and it has bugs
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy file="${project.build.directory}/generated-sources/modello/org/apache/maven/archiva/model/package.jdo" todir="${project.build.outputDirectory}/org/apache/maven/archiva/model/" />
- </tasks>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
+++ /dev/null
-package org.apache.maven.archiva.model;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.Serializable;
-
-import org.apache.commons.lang.StringUtils;
-
-/**
- * <p>
- * AbstractArtifactKey - a artifact reference to a versioned project.
- * This refers to all artifacts of a specific version of a project.
- * This type of reference is typically used by {@link ArchivaProjectModel} objects.
- * </p>
- *
- * <p>
- * If you don't require things like "Version" or "Type", consider the other keys below.
- * </p>
- *
- * <table border="1" cellpadding="3">
- * <tr>
- * <th>Key Type</th>
- * <th>Group ID</th>
- * <th>Artifact ID</th>
- * <th>Version</th>
- * <th>Classifier</th>
- * <th>Type</th>
- * </tr>
- * <tr>
- * <td>{@link AbstractVersionedKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td> </td>
- * <td> </td>
- * </tr>
- * <tr>
- * <td>{@link AbstractArtifactKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * </tr>
- * </table>
- *
- * <p>
- * NOTE: This is a jpox required compound key handler class.
- * </p>
- *
- * @version $Id$
- */
-public class AbstractArtifactKey
- implements CompoundKey, Serializable
-{
- private static final long serialVersionUID = 1084250769223555422L;
-
- /**
- * The Group ID. (JPOX Requires this remain public)
- */
- public String groupId = "";
-
- /**
- * The Artifact ID. (JPOX Requires this remain public)
- */
- public String artifactId = "";
-
- /**
- * The Version. (JPOX Requires this remain public)
- */
- public String version = "";
-
- /**
- * The Classifier. (JPOX Requires this remain public)
- */
- public String classifier = "";
-
- /**
- * The Type. (JPOX Requires this remain public)
- */
- public String type = "";
-
- /**
- * The Repository Id (JPOX Requires this remain public)
- */
- public String repositoryId = "";
-
- /**
- * Default Constructor. Required by JPOX.
- */
- public AbstractArtifactKey()
- {
- /* do nothing */
- }
-
- /**
- * Key Based Constructor. Required by JPOX.
- *
- * @param key the String representing this object's values.
- */
- public AbstractArtifactKey( String key )
- {
- String parts[] = StringUtils.splitPreserveAllTokens( key, ":" );
- groupId = parts[0];
- artifactId = parts[1];
- version = parts[2];
- classifier = parts[3];
- type = parts[4];
- repositoryId = parts[5];
- }
-
- /**
- * Get the String representation of this object. - Required by JPOX.
- */
- @Override
- public String toString()
- {
- return StringUtils.join( new String[] { groupId, artifactId, version, classifier, type, repositoryId }, ':' );
- }
-
- /**
- * Get the hashcode for this object's values - Required by JPOX.
- */
- @Override
- public int hashCode()
- {
- final int PRIME = 31;
- int result = super.hashCode();
- result = PRIME * result + ( ( groupId == null ) ? 0 : groupId.hashCode() );
- result = PRIME * result + ( ( artifactId == null ) ? 0 : artifactId.hashCode() );
- result = PRIME * result + ( ( version == null ) ? 0 : version.hashCode() );
- result = PRIME * result + ( ( classifier == null ) ? 0 : classifier.hashCode() );
- result = PRIME * result + ( ( type == null ) ? 0 : type.hashCode() );
- result = PRIME * result + ( ( repositoryId == null ) ? 0 : repositoryId.hashCode() );
- return result;
- }
-
- /**
- * Get the equals for this object's values - Required by JPOX.
- */
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
-
- if ( !super.equals( obj ) )
- {
- return false;
- }
-
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
-
- final AbstractArtifactKey other = (AbstractArtifactKey) obj;
-
- if ( groupId == null )
- {
- if ( other.groupId != null )
- {
- return false;
- }
- }
- else if ( !groupId.equals( other.groupId ) )
- {
- return false;
- }
-
- if ( artifactId == null )
- {
- if ( other.artifactId != null )
- {
- return false;
- }
- }
- else if ( !artifactId.equals( other.artifactId ) )
- {
- return false;
- }
-
- if ( version == null )
- {
- if ( other.version != null )
- {
- return false;
- }
- }
- else if ( !version.equals( other.version ) )
- {
- return false;
- }
-
- if ( classifier == null )
- {
- if ( other.classifier != null )
- {
- return false;
- }
- }
- else if ( !classifier.equals( other.classifier ) )
- {
- return false;
- }
-
- if ( type == null )
- {
- if ( other.type != null )
- {
- return false;
- }
- }
- else if ( !type.equals( other.type ) )
- {
- return false;
- }
-
- if ( repositoryId == null )
- {
- if ( other.repositoryId != null )
- {
- return false;
- }
- }
- else if ( !repositoryId.equals( other.repositoryId ) )
- {
- return false;
- }
-
- return true;
- }
-
- public void setGroupId( String groupId )
- {
- if ( StringUtils.isBlank( groupId ) )
- {
- throw new IllegalArgumentException( "A blank Group ID is not allowed." );
- }
-
- this.groupId = groupId;
- }
-
- public void setArtifactId( String artifactId )
- {
- if ( StringUtils.isBlank( artifactId ) )
- {
- throw new IllegalArgumentException( "A blank Artifact ID is not allowed." );
- }
-
- this.artifactId = artifactId;
- }
-
- public void setVersion( String version )
- {
- if ( StringUtils.isBlank( artifactId ) )
- {
- throw new IllegalArgumentException( "A blank version is not allowed." );
- }
-
- this.version = version;
- }
-
- public void setClassifier( String classifier )
- {
- this.classifier = "";
-
- if ( StringUtils.isNotBlank( classifier ) )
- {
- this.classifier = classifier;
- }
- }
-
- public void setType( String type )
- {
- this.type = "";
-
- if ( StringUtils.isNotBlank( type ) )
- {
- this.type = type;
- }
- }
-
- public void setRepositoryId( String repositoryId )
- {
- this.repositoryId = "";
-
- if ( StringUtils.isNotBlank(repositoryId) )
- {
- this.repositoryId = repositoryId;
- }
- }
-}
+++ /dev/null
-package org.apache.maven.archiva.model;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.Serializable;
-
-import org.apache.commons.lang.StringUtils;
-
-/**
- * <p>
- * AbstractVersionedKey - a versioned reference to a Project.
- * This refers to all artifacts of a specific version of a project.
- * This type of reference is typically used by {@link ArchivaProjectModel} objects.
- * </p>
- *
- * <p>
- * If you require things like "Version" or "Type", consider the other keys below.
- * </p>
- *
- * <table border="1" cellpadding="3">
- * <tr>
- * <th>Key Type</th>
- * <th>Group ID</th>
- * <th>Artifact ID</th>
- * <th>Version</th>
- * <th>Classifier</th>
- * <th>Type</th>
- * </tr>
- * <tr>
- * <td>{@link AbstractVersionedKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td> </td>
- * <td> </td>
- * </tr>
- * <tr>
- * <td>{@link AbstractArtifactKey}</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * <td align="center">Yes</td>
- * </tr>
- * </table>
- *
- * <p>
- * NOTE: This is a jpox required compound key handler class.
- * </p>
- *
- * @version $Id$
- */
-public class AbstractVersionedKey
- implements CompoundKey, Serializable
-{
- private static final long serialVersionUID = -5389698374243146150L;
-
- /**
- * The Group ID. (JPOX Requires this remain public)
- */
- public String groupId = "";
-
- /**
- * The Artifact ID. (JPOX Requires this remain public)
- */
- public String artifactId = "";
-
- /**
- * The Version. (JPOX Requires this remain public)
- */
- public String version = "";
-
- /**
- * Default Constructor. Required by JPOX.
- */
- public AbstractVersionedKey()
- {
- /* do nothing */
- }
-
- /**
- * Key Based Constructor. Required by JPOX.
- *
- * @param key the String representing this object's values.
- */
- public AbstractVersionedKey( String key )
- {
- String parts[] = StringUtils.splitPreserveAllTokens( key, ":" );
- groupId = parts[0];
- artifactId = parts[1];
- version = parts[2];
- }
-
- /**
- * Get the String representation of this object. - Required by JPOX.
- */
- public String toString()
- {
- return StringUtils.join( new String[] { groupId, artifactId, version }, ':' );
- }
-
- /**
- * Get the hashcode for this object's values - Required by JPOX.
- */
- public int hashCode()
- {
- final int PRIME = 31;
- int result = super.hashCode();
- result = PRIME * result + ( ( groupId == null ) ? 0 : groupId.hashCode() );
- result = PRIME * result + ( ( artifactId == null ) ? 0 : artifactId.hashCode() );
- result = PRIME * result + ( ( version == null ) ? 0 : version.hashCode() );
- return result;
- }
-
- /**
- * Get the equals for this object's values - Required by JPOX.
- */
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
-
- if ( !super.equals( obj ) )
- {
- return false;
- }
-
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
-
- final AbstractVersionedKey other = (AbstractVersionedKey) obj;
-
- if ( groupId == null )
- {
- if ( other.groupId != null )
- {
- return false;
- }
- }
- else if ( !groupId.equals( other.groupId ) )
- {
- return false;
- }
-
- if ( artifactId == null )
- {
- if ( other.artifactId != null )
- {
- return false;
- }
- }
- else if ( !artifactId.equals( other.artifactId ) )
- {
- return false;
- }
-
- if ( version == null )
- {
- if ( other.version != null )
- {
- return false;
- }
- }
- else if ( !version.equals( other.version ) )
- {
- return false;
- }
-
- return true;
- }
-}
+++ /dev/null
-package org.apache.maven.archiva.model.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.archiva.model.AbstractArtifactKey;
-
-import java.io.Serializable;
-
-/**
- * ArchivaArtifactModelKey - unique classid-key for JPOX.
- *
- * @version $Id$
- */
-public class ArchivaArtifactModelKey
- extends AbstractArtifactKey
- implements Serializable
-{
- private static final long serialVersionUID = -6381910527697704289L;
-
- public ArchivaArtifactModelKey()
- {
- super();
- }
-
- public ArchivaArtifactModelKey( String key )
- {
- super( key );
- }
-}
+++ /dev/null
-package org.apache.maven.archiva.model.jpox;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.archiva.model.AbstractVersionedKey;
-
-import java.io.Serializable;
-
-/**
- * ArchivaRepositoryMetadataKey - unique classid-key for JPOX.
- *
- * @version $Id$
- */
-public class ArchivaRepositoryMetadataKey
- extends AbstractVersionedKey
- implements Serializable
-{
- private static final long serialVersionUID = -7288079965200698253L;
-
- public ArchivaRepositoryMetadataKey()
- {
- }
-
- public ArchivaRepositoryMetadataKey( String key )
- {
- super( key );
- }
-
-}
<?xml version="1.0" ?>
-<model jpox.mapping-in-package="true"
- jpox.table-prefix="ARCHIVA_"
- xsd.namespace="http://archiva.apache.org/model/1.2.0"
+<model xsd.namespace="http://archiva.apache.org/model/1.2.0"
xsd.target-namespace="http://archiva.apache.org/model/1.2.0">
<id>archiva-base-model</id>
<name>ArchivaBaseModel</name>
</defaults>
<classes>
- <class stash.storable="false"
- rootElement="true"
- jpox.enabled="false">
+ <class rootElement="true">
<name>ArchivaAll</name>
<version>1.0.0+</version>
<description>
-->
- <class stash.storable="true"
- jpox.table="ARTIFACT"
- jpox.use-identifiers-as-primary-key="false"
- jpox.identity-type="application"
- jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactModelKey">
+ <class>
<name>ArchivaArtifactModel</name>
<version>1.0.0+</version>
<fields>
The ArchivaArtifact object should contain no platform specifics!!
-->
- <field stash.maxSize="250"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>groupId</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The Group ID of the repository content.
</description>
</field>
- <field stash.maxSize="80"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>artifactId</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The Artifact ID of the repository content.
</description>
</field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>version</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The version of the repository content.
</description>
</field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>classifier</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The classifier for this artifact.
</description>
</field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent"
- jpox.column="FILE_TYPE">
+ <field>
<name>type</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The type of artifact.
</description>
</field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>repositoryId</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The repository associated with this content.
</description>
</field>
- <field jpox.column="SNAPSHOT_VERSION">
+ <field>
<name>snapshot</name>
<identifier>false</identifier>
<version>1.0.0+</version>
</description>
<defaultValue>false</defaultValue>
</field>
- <field stash.maxSize="35">
+ <field>
<name>checksumMD5</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The MD5 checksum for the artifact file.
</description>
</field>
- <field stash.maxSize="45">
+ <field>
<name>checksumSHA1</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The Last Modified Timestamp of this artifact.
</description>
</field>
- <field jpox.column="FILE_SIZE">
+ <field>
<name>size</name>
<identifier>false</identifier>
<version>1.0.0+</version>
-->
- <class stash.storable="true"
- jpox.use-identifiers-as-primary-key="false"
- jpox.identity-type="application"
- jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaRepositoryMetadataKey"
- jpox.table="REPOSITORY_METADATA">
+ <class>
<name>ArchivaRepositoryMetadata</name>
<version>1.0.0+</version>
<fields>
- <field stash.maxSize="250"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>groupId</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The Group ID of the metadata.
</description>
</field>
- <field stash.maxSize="80"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>artifactId</name>
<identifier>true</identifier>
<version>1.0.0+</version>
The Artifact ID of the metadata.
</description>
</field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
+ <field>
<name>version</name>
<identifier>true</identifier>
<version>1.0.0+</version>
<description>
The snapshot version id.
</description>
- <association stash.part="true"
- jpox.join="false">
+ <association>
<type>SnapshotVersion</type>
<multiplicity>1</multiplicity>
</association>
<description>
The available plugins.
</description>
- <association stash.part="true"
- jpox.join="false">
+ <association>
<type>Plugin</type>
<multiplicity>*</multiplicity>
</association>
The Last Modified Timestamp of this file.
</description>
</field>
- <field jpox.column="FILE_SIZE">
+ <field>
<name>fileSize</name>
<identifier>false</identifier>
<version>1.0.0+</version>
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.table="REPOSITORY_METADATA_SNAPSHOTS">
+ <class>
<name>SnapshotVersion</name>
<description>The Snapshot Version</description>
<version>1.0.0+</version>
<fields>
- <field stash.maxSize="20"
- jpox.column="VERSION_TIMESTAMP">
+ <field>
<name>timestamp</name>
<type>String</type>
<identifier>false</identifier>
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.table="REPOSITORY_METADATA_PLUGINS">
+ <class>
<name>Plugin</name>
<description>The Plugin</description>
<version>1.0.0+</version>
<fields>
- <field stash.maxSize="20"
- jpox.column="PLUGIN_PREFIX">
+ <field>
<name>prefix</name>
<type>String</type>
<identifier>false</identifier>
The prefix for a plugin
</description>
</field>
- <field
- jpox.column="PLUGIN_ARTIFACT_ID">
+ <field>
<name>artifactId</name>
<type>String</type>
<identifier>true</identifier>
The artifactId for a plugin
</description>
</field>
- <field jpox.column="PLUGIN_NAME">
+ <field>
<name>name</name>
<type>String</type>
<identifier>false</identifier>
|_| \_\___|_| \___|_| \___|_| |_|\___\___||___/
-->
- <class stash.storable="true"
- jpox.table="PROJECT_REFERENCE">
+ <class>
<name>ProjectReference</name>
<description>A reference to another (unversioned) Project</description>
<version>1.0.0+</version>
<fields>
- <field stash.maxSize="250"
- null-value="default">
+ <field null-value="default">
<name>groupId</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The Group ID of the project reference.
</description>
</field>
- <field stash.maxSize="80"
- null-value="default">
+ <field null-value="default">
<name>artifactId</name>
<identifier>false</identifier>
<version>1.0.0+</version>
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.table="VERSIONED_REFERENCE">
+ <class>
<name>VersionedReference</name>
<description>A reference to another Versioned Project</description>
<version>1.0.0+</version>
<fields>
- <field stash.maxSize="250"
- null-value="default">
+ <field null-value="default">
<name>groupId</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The Group ID of the repository content.
</description>
</field>
- <field stash.maxSize="80"
- null-value="default">
+ <field null-value="default">
<name>artifactId</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The Artifact ID of the repository content.
</description>
</field>
- <field stash.maxSize="50"
- null-value="default">
+ <field null-value="default">
<name>version</name>
<identifier>false</identifier>
<version>1.0.0+</version>
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.table="ARTIFACT_REFERENCE">
+ <class>
<name>ArtifactReference</name>
<version>1.0.0+</version>
<fields>
- <field stash.maxSize="250"
- null-value="default">
+ <field null-value="default">
<name>groupId</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The Group ID of the repository content.
</description>
</field>
- <field stash.maxSize="80"
- null-value="default">
+ <field null-value="default">
<name>artifactId</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The Artifact ID of the repository content.
</description>
</field>
- <field stash.maxSize="50"
- null-value="default">
+ <field null-value="default">
<name>version</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The version of the repository content.
</description>
</field>
- <field stash.maxSize="50"
- null-value="default">
+ <field null-value="default">
<name>classifier</name>
<identifier>false</identifier>
<version>1.0.0+</version>
The classifier for this artifact.
</description>
</field>
- <field stash.maxSize="50"
- null-value="default"
- jpox.column="FILE_TYPE">
+ <field null-value="default">
<name>type</name>
<identifier>false</identifier>
<version>1.0.0+</version>
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:target/database/users;create=true"
/>
-
- <Resource name="jdbc/archiva" auth="Container" type="javax.sql.DataSource"
- username="sa"
- password=""
- driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
- url="jdbc:derby:target/database/archiva;create=true" />
</Context>
</Arg>
</New>
- <!-- Archiva database -->
- <New id="archiva" class="org.mortbay.jetty.plus.naming.Resource">
- <Arg><Ref id="wac"/></Arg>
- <Arg>jdbc/archiva</Arg>
- <Arg>
- <New class="org.apache.derby.jdbc.EmbeddedDataSource">
- <Set name="DatabaseName">../databases/archiva</Set>
- <Set name="user">sa</Set>
- <Set name="createDatabase">create</Set>
- </New>
- </Arg>
- </New>
-
- <New id="archivaShutdown" class="org.mortbay.jetty.plus.naming.Resource">
- <Arg><Ref id="wac"/></Arg>
- <Arg>jdbc/archivaShutdown</Arg>
- <Arg>
- <New class="org.apache.derby.jdbc.EmbeddedDataSource">
- <Set name="DatabaseName">../databases/archiva</Set>
- <Set name="user">sa</Set>
- <Set name="shutdownDatabase">shutdown</Set>
- </New>
- </Arg>
- </New>
-
<!-- Users / Security Database -->
<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
<Arg><Ref id="wac"/></Arg>
</configuration>
</component>
- <component>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- <implementation>org.codehaus.plexus.jdo.DataSourceConfigurableJdoFactory</implementation>
- <configuration>
-
- <connectionFactoryName>java:comp/env/jdbc/archiva</connectionFactoryName>
- <shutdownConnectionFactoryName>java:comp/env/jdbc/archivaShutdown</shutdownConnectionFactoryName>
-
- <!-- JPOX and JDO configuration -->
- <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
- <otherProperties>
- <property>
- <name>org.jpox.autoCreateSchema</name>
- <value>true</value>
- </property>
- <property>
- <name>org.jpox.autoCreateColumns</name>
- <value>true</value>
- </property>
- <property>
- <name>org.jpox.validateTables</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateConstraints</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateColumns</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.autoStartMechanism</name>
- <value>None</value>
- </property>
- <property>
- <name>org.jpox.transactionIsolation</name>
- <value>READ_COMMITTED</value>
- </property>
- <property>
- <name>org.jpox.poid.transactionIsolation</name>
- <value>READ_COMMITTED</value>
- </property>
- <property>
- <name>org.jpox.rdbms.dateTimezone</name>
- <value>JDK_DEFAULT_TIMEZONE</value>
- </property>
- <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
- <property>
- <name>org.jpox.identifier.case</name>
- <value>PreserveCase</value>
- </property>
- -->
- </otherProperties>
- </configuration>
- </component>
-
<component>
<role>org.codehaus.plexus.jdo.JdoFactory</role>
<role-hint>users</role-hint>
<level value="error"/>
</logger>
+ <!-- retained for Redback -->
<logger name="JPOX">
<level value="warn"/>
</logger>
<constructor-arg ref="archivaConfiguration"/>
<constructor-arg ref="repositoryContentConsumers"/>
<constructor-arg ref="repositoryContentFactory"/>
- <constructor-arg ref="artifactDAO#jdo"/>
+ <constructor-arg ref="metadataRepository"/>
<constructor-arg ref="archivaTaskScheduler#repository"/>
<constructor-arg>
<bean class="org.apache.maven.archiva.repository.events.RepositoryListenerFactoryBean" />
</requirement>
</requirements>
</component>
- <component>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- <implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation>
-
- <configuration>
- <!-- Database Configuration -->
- <driverName>org.hsqldb.jdbcDriver</driverName>
- <url>jdbc:hsqldb:mem:TESTDB</url>
- <userName>sa</userName>
- <password></password>
-
- <!-- JPOX and JDO configuration -->
- <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
- <otherProperties>
- <property>
- <name>javax.jdo.PersistenceManagerFactoryClass</name>
- <value>org.jpox.PersistenceManagerFactoryImpl</value>
- </property>
- <property>
- <name>org.jpox.autoCreateSchema</name>
- <value>true</value>
- </property>
- <property>
- <name>org.jpox.validateTables</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateConstraints</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateColumns</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.autoStartMechanism</name>
- <value>None</value>
- </property>
- <property>
- <name>org.jpox.transactionIsolation</name>
- <value>READ_UNCOMMITTED</value>
- </property>
- <property>
- <name>org.jpox.poid.transactionIsolation</name>
- <value>READ_UNCOMMITTED</value>
- </property>
- <property>
- <name>org.jpox.rdbms.dateTimezone</name>
- <value>JDK_DEFAULT_TIMEZONE</value>
- </property>
- </otherProperties>
- </configuration>
- </component>
</components>
</plexus>
</requirement>
</requirements>
</component>
- <component>
- <role>org.codehaus.plexus.jdo.JdoFactory</role>
- <role-hint>archiva</role-hint>
- <implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation>
-
- <configuration>
- <!-- Database Configuration -->
- <driverName>org.hsqldb.jdbcDriver</driverName>
- <url>jdbc:hsqldb:mem:TESTDB</url>
- <userName>sa</userName>
- <password></password>
-
- <!-- JPOX and JDO configuration -->
- <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
- <otherProperties>
- <property>
- <name>javax.jdo.PersistenceManagerFactoryClass</name>
- <value>org.jpox.PersistenceManagerFactoryImpl</value>
- </property>
- <property>
- <name>org.jpox.autoCreateSchema</name>
- <value>true</value>
- </property>
- <property>
- <name>org.jpox.validateTables</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateConstraints</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.validateColumns</name>
- <value>false</value>
- </property>
- <property>
- <name>org.jpox.autoStartMechanism</name>
- <value>None</value>
- </property>
- <property>
- <name>org.jpox.transactionIsolation</name>
- <value>READ_UNCOMMITTED</value>
- </property>
- <property>
- <name>org.jpox.poid.transactionIsolation</name>
- <value>READ_UNCOMMITTED</value>
- </property>
- <property>
- <name>org.jpox.rdbms.dateTimezone</name>
- <value>JDK_DEFAULT_TIMEZONE</value>
- </property>
- </otherProperties>
- </configuration>
- </component>
</components>
</plexus>
<artifactId>modello-plugin-plexus-registry</artifactId>
<version>1.0-alpha-21</version>
</dependency>
- <dependency>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-plugin-jpox</artifactId>
- <version>1.0-alpha-21</version>
- </dependency>
</dependencies>
</plugin>
<plugin>
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo2-api</artifactId>
- <version>2.0</version>
- </dependency>
<dependency>
<groupId>jpox</groupId>
<artifactId>jpox</artifactId>
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-jdo2</artifactId>
- <version>1.0-alpha-8</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-quartz</artifactId>