+++ /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;
-
-/**
- * ArchivaArtifactJavaDetailsKey - unique classid-key for JPOX.
- *
- * @version $Id$
- */
-public class ArchivaArtifactJavaDetailsKey
- extends AbstractArtifactKey
- implements Serializable
-{
- private static final long serialVersionUID = -2565748477203220905L;
-
- public ArchivaArtifactJavaDetailsKey()
- {
- }
-
- public ArchivaArtifactJavaDetailsKey( String key )
- {
- super( key );
- }
-
-}
+++ /dev/null
-package org.apache.maven.archiva.model.platform;
-
-/*
- * 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.ArchivaArtifact;
-import org.apache.maven.archiva.model.ArchivaArtifactJavaDetails;
-
-/**
- * Utility methods for working with java platform specific ArchivaArtifacts.
- *
- * @version $Id$
- */
-public class JavaArtifactHelper
-{
- public static ArchivaArtifactJavaDetails getJavaDetails( ArchivaArtifact artifact )
- {
- ArchivaArtifactJavaDetails javaDetails = (ArchivaArtifactJavaDetails) artifact.getPlatformDetails();
- if ( javaDetails == null )
- {
- javaDetails = new ArchivaArtifactJavaDetails();
- artifact.setPlatformDetails( javaDetails );
- }
-
- return javaDetails;
- }
-}
NOTE TO ARCHIVA DEVELOPERS....
The ArchivaArtifact object should contain no platform specifics!!
- Put Java specifics in the ArchivaArtifactJavaDetails object.
- Put .Net specifics in the ArchivaArtifactDotNetDetails object.
-->
<field stash.maxSize="250"
jpox.primary-key="true"
</codeSegment>
</codeSegments>
</class>
- <class stash.storable="true"
- jpox.table="JAVA_ARTIFACT"
- jpox.use-identifiers-as-primary-key="false"
- jpox.identity-type="application"
- jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactJavaDetailsKey">
- <name>ArchivaArtifactJavaDetails</name>
- <interfaces>
- <interface>org.apache.maven.archiva.model.ArchivaArtifactPlatformDetails</interface>
- </interfaces>
- <version>1.0.0+</version>
- <fields>
- <field stash.maxSize="250"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
- <name>groupId</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- 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">
- <name>artifactId</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- 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">
- <name>version</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The version of the repository content.
- </description>
- </field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
- <name>classifier</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- 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">
- <name>type</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>true</required>
- <description>
- The type of artifact.
- </description>
- </field>
- <field stash.maxSize="50"
- jpox.primary-key="true"
- jpox.value-strategy="off"
- jpox.persistence-modifier="persistent">
- <name>repositoryId</name>
- <identifier>true</identifier>
- <version>1.0.0+</version>
- <required>true</required>
- <type>String</type>
- <description>
- The repository associated with this content.
- </description>
- </field>
- <field>
- <name>checksumBytecode</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>false</required>
- <description>
- The SHA1 checksum for the bytecode in the artifact file. (Can be empty if
- the artifact contains no bytecode)
- </description>
- </field>
- <field>
- <name>jdk</name>
- <identifier>false</identifier>
- <version>1.0.0+</version>
- <type>String</type>
- <required>false</required>
- <description>
- The JDK revision of the bytecode. (Can be empty if the artifact contains no bytecode)
- </description>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- private static final long serialVersionUID = -4774236779581844880L;
- ]]></code>
- </codeSegment>
- <codeSegment>
- <version>1.0.0+</version>
- <code><![CDATA[
- /**
- * Identify this implementation as a set of java details.
- *
- * @return the Java platform string
- */
- public String getPlatform()
- {
- return "java";
- }
- ]]></code>
- </codeSegment>
- </codeSegments>
- </class>
<!-- _______________________________________________________________
__ __ _ _ _