From 3bdf3b8e70a764edfb2b5b5e94fdcab3a652b033 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 20 Mar 2007 21:00:33 +0000 Subject: [PATCH] Furthor work against the model definition. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@520584 13f79535-47bb-0310-9956-ffa450edef68 --- archiva-model/pom.xml | 21 +- archiva-model/src/main/mdo/archiva-base.xml | 1271 +++++++++++++++++++ archiva-model/src/main/mdo/archiva.xml | 468 ------- 3 files changed, 1277 insertions(+), 483 deletions(-) create mode 100644 archiva-model/src/main/mdo/archiva-base.xml delete mode 100644 archiva-model/src/main/mdo/archiva.xml diff --git a/archiva-model/pom.xml b/archiva-model/pom.xml index 5bb0f6c16..313ece24d 100755 --- a/archiva-model/pom.xml +++ b/archiva-model/pom.xml @@ -65,30 +65,21 @@ org.codehaus.modello modello-maven-plugin 1.0-alpha-15-SNAPSHOT - - 1.0.0 - false - src/main/mdo/archiva.xml - - modello-java + archiva-base java + xsd + jpox-jdo-mapping jpox-metadata-class - - - - - jpox-jdo-mapping - - jpox-jdo-mapping - ${basedir}/target/classes/org/apache/maven/archiva/model/ + 1.0.0 + false + src/main/mdo/archiva-base.xml diff --git a/archiva-model/src/main/mdo/archiva-base.xml b/archiva-model/src/main/mdo/archiva-base.xml new file mode 100644 index 000000000..55f6d227c --- /dev/null +++ b/archiva-model/src/main/mdo/archiva-base.xml @@ -0,0 +1,1271 @@ + + + archiva-base-model + ArchivaBaseModel + 1.0.0 + Archiva Model + + + package + org.apache.maven.archiva.model + + + + + + ArchivaAll + 1.0.0+ + + This object is only used for the XML backup / restore features of Archiva. + This object is not serialized to the Database. + + + + repositories + 1.0.0+ + + ArchivaRepositoryModel + * + + + + artifacts + 1.0.0+ + + ArchivaArtifactModel + * + + + + repositoryMetadata + 1.0.0+ + + ArchivaRepositoryMetadata + * + + + + projects + 1.0.0+ + + ArchivaProjectModel + * + + + + artifactHealth + 1.0.0+ + + ArchivaArtifactHealth + * + + + + repositoryMetadataHealth + 1.0.0+ + + ArchivaRepositoryMetadataHealth + * + + + + repositoryContentStatistics + 1.0.0+ + + RepositoryContentStatistics + * + + + + + + + + + ArchivaRepositoryModel + 1.0.0+ + + + id + true + 1.0.0+ + String + true + + The unique ID for the repository. + + + + name + false + 1.0.0+ + String + true + + The Name of the repository. + + + + url + false + 1.0.0+ + String + true + + The URL of the repository. + + + + creationSource + false + 1.0.0+ + String + true + + The Source of this repository. + (Example: Configuration, POM) + + + + layoutName + false + 1.0.0+ + String + true + + The layout of the repository. + (Either 'default', or 'legacy') + + + + releasePolicy + false + 1.0.0+ + String + true + + The releases policy of the repository. + + + + snapshotPolicy + false + 1.0.0+ + String + true + + The snapshot policy of the repository. + + + + + + RepositoryContent + 1.0.0+ + + Repository Content Identifier. + + + + groupId + true + 1.0.0+ + String + true + + The Group ID of the repository content. + + + + artifactId + true + 1.0.0+ + String + true + + The Artifact ID of the repository content. + + + + version + true + 1.0.0+ + String + false + + The version of the repository content. + + + + repositoryId + true + 1.0.0+ + true + String + + The repository associated with this content. + + + + + + 1.0.0+ + + + + + + + + + + ArchivaArtifactModel + 1.0.0+ + + + contentKey + true + 1.0.0+ + true + + RepositoryContent + 1 + + + The content key for this artifact. + + + + classifier + false + 1.0.0+ + String + false + + The classifier for this artifact. + + + + type + true + 1.0.0+ + String + true + + The type of artifact. + + + + checksumMD5 + false + 1.0.0+ + String + false + + The MD5 checksum for the artifact file. + + + + checksumSHA1 + false + 1.0.0+ + String + false + + The SHA1 checksum for the artifact file. + + + + checksumBytecode + false + 1.0.0+ + String + false + + The SHA1 checksum for the bytecode in the artifact file. (Can be empty if + the artifact contains no bytecode) + + + + whenIndexed + false + 1.0.0+ + Date + false + + The timestamp when this artifact was indexed. + + + + origin + false + 1.0.0+ + String + false + + The origin of this artifact. (Filesystem, Proxy, Deploy) + + + + + + ArchivaRepositoryMetadata + 1.0.0+ + + + contentKey + true + 1.0.0+ + true + + RepositoryContent + 1 + + + The content key for this repository metadata. + + + + releasedVersion + false + 1.0.0+ + false + String + + The released version id. + + + + availableVersions + false + 1.0.0+ + false + + String + * + + + The list of available version ids. + + + + whenIndexed + false + 1.0.0+ + Date + false + + The timestamp when this artifact was indexed. + + + + lastUpdated + false + 1.0.0+ + Date + false + + the timestamp when this artifact was indexed. + + + + origin + false + 1.0.0+ + String + false + + The origin of this artifact. (Filesystem, Proxy, Deploy) + + + + + + + + + ArchivaProjectModel + 1.0.0+ + + + contentKey + true + 1.0.0+ + true + + RepositoryContent + 1 + + + The content key for this artifact. + + + + parentContentKey + false + 1.0.0+ + false + + RepositoryContent + 1 + + + The content key for a parent reference. + + + + packaging + false + 1.0.0+ + true + String + + The declared packaging for this project model. + + + + origin + false + 1.0.0+ + true + String + + The Origin of this Model. (Filesystem, Proxy, or Deploy) + + + + whenIndexed + false + 1.0.0+ + true + Date + + The timestamp when this model was indexed. + + + + url + false + 1.0.0+ + false + String + + The URL for the project's homepage. + + + + organization + false + 1.0.0+ + false + + Organization + + + + licenses + false + 1.0.0+ + false + + License + * + + + + issueManagement + 1.0.0+ + + + IssueManagement + + + + ciManagement + 1.0.0+ + + + CiManagement + + + + scm + 1.0.0+ + + + + Scm + + + + individuals + 1.0.0+ + + The list of individuals around this project. + + + Individual + * + + + + dependencies + 1.0.0+ + + + Dependency + * + + + + repositories + 1.0.0+ + + The list project repositories in use by this project. + + + ProjectRepository + * + + + + plugins + 1.0.0+ + + The list of plugins that this project uses. + + + RepositoryContent + * + + + + reports + 1.0.0+ + + The list of reports that this project uses. + + + RepositoryContent + * + + + + + + Organization + Specifies the organization that produces this project. + 1.0.0+ + + + name + 1.0.0+ + + String + + + url + 1.0.0+ + + String + + + favicon + 1.0.0+ + /images/org-logo.png) or an absolute URL + (e.g., http://my.corp/logo.png). This value is used + when generating the project documentation. + ]]> + String + + + + + License + + 1.0.0+ + + + id + 1.0.0+ + int + + The type of license. + + + + name + 1.0.0+ + + String + + + url + 1.0.0+ + + String + + + comments + + Addendum information pertaining to this license. + + 1.0.0+ + String + + + + + IssueManagement + + Information about the issue tracking (or bug tracking) system used to manage this project. + + 1.0.0+ + + + system + 1.0.0+ + + String + + + url + 1.0.0+ + + String + + + + + CiManagement + 1.0.0+ + + + system + 1.0.0+ + + continuum.]]> + String + + + url + 1.0.0+ + + + String + + + + + Individual + + Description of a person who has contributed to the project. + This includes contributors and commitors. + + 1.0.0+ + + + name + 1.0.0+ + + String + + + email + 1.0.0+ + + String + + + principal + 1.0.0+ + + The RedBack (plexus security) principal associated with this Invididual. + + String + + + commitor + 1.0.0+ + + The flag if this user is a developer and/or commitor. + + boolean + + + url + 1.0.0+ + + String + + + + organization + organisation + 1.0.0+ + + String + + + organizationUrl + organisationUrl + 1.0.0+ + + String + + + roles + 1.0.0+ + role element, the body of which is a + role name. This can also be used to describe the contribution. + ]]> + + String + * + + + + timezone + 1.0.0+ + + String + + + properties + 1.0.0+ + + Properties + + String + * + + + + + + Dependency + 1.0.0+ + + + contentKey + true + 1.0.0+ + true + + RepositoryContent + 1 + + + The content key for this dependency. + + + + url + 1.0.0+ + + String + + + type + 1.0.0+ + jar. While it usually represents the extension on + the filename of the dependency, that is not always the case. A type can be mapped to a different + extension and a classifier. + The type often correspongs to the packaging used, though this is also not always the case. + Some examples are jar, war, ejb-client and test-jar. + New types can be defined by plugins that set + extensions to true, so this is not a complete list. + ]]> + String + jar + + + classifier + 1.0.0+ + jdk14 and jdk15. + ]]> + String + false + + + scope + 1.0.0+ + compile, runtime, test, + system, and provided. Used to + calculate the various classpaths used for compilation, testing, and so on. It also assists in determining + which artifacts to include in a distribution of this project. For more information, see + the + dependency mechanism.]]> + + String + + + systemPath + 1.0.0+ + discouraged and may be replaced in later + versions. This specifies the path on the filesystem for this dependency. + Requires an absolute path for the value, not relative. + Use a property that gives the machine specific absolute path, + e.g. ${java.home}. + ]]> + String + + + exclusions + 1.0.0+ + + Lists a set of artifacts that should be excluded from this dependency's artifact list when it comes to + calculating transitive dependencies. + + + Exclusion + * + + + + optional + 1.0.0+ + + Indicates the dependency is optional for use of this library. While the version of the dependency will be + taken into account for dependency calculation if the library is used elsewhere, it will not be passed on + transitively. + + boolean + false + + + + + Exclusion + 1.0.0+ + + + groupId + 4.0.0 + + String + true + + + artifactId + 4.0.0 + + String + true + + + + + Scm + 1.0.0+ + + + connection + 1.0.0 + URL format + and list of supported SCMs. + This connection is read-only. + ]]> + String + + + developerConnection + 1.0.0 + connection, but for developers, i.e. this scm connection + will not be read only. + ]]> + String + + + url + 1.0.0 + + + String + + + + + ProjectRepository + 1.0.0+ + + + id + 4.0.0 + settings.xml file, for example. + ]]> + String + + + name + 4.0.0 + + String + + + url + 4.0.0 + protocol://hostname/path. + ]]> + String + + + layout + 4.0.0 + legacy or + default. + ]]> + String + default + + + plugins + 1.0.0+ + + Flag indicating if this repository is for plugin resolution. + + boolean + + + releases + 1.0.0+ + + Flag indicating if this repository has release versioned artifacts. + + boolean + + + snapshots + 1.0.0+ + + Flag indicating if this repository has snapshot versioned artifacts. + + boolean + + + + + + + + HealthProblem + 1.0.0+ + + + type + false + 1.0.0+ + true + String + + The type of health problem. + + + + origin + false + 1.0.0+ + true + String + + The origin of the health problem. + + + + message + false + 1.0.0+ + true + String + + The origin of the health problem. + + + + + + ArchivaArtifactHealth + 1.0.0+ + + + artifact + true + 1.0.0+ + true + + ArchivaArtifactModel + 1 + + + The Artifact to report on. + + + + problems + false + 1.0.0+ + false + + HealthProblem + * + + + The list of problems associated with this artifact. + + + + + + ArchivaRepositoryMetadataHealth + 1.0.0+ + + + repositoryMetadata + true + 1.0.0+ + true + + ArchivaRepositoryMetadata + 1 + + + The ArchivaRepositoryMetadata to report on. + + + + problems + false + 1.0.0+ + false + + HealthProblem + * + + + The list of problems associated with this repository metadata. + + + + + + + + + RepositoryContentStatistics + 1.0.0+ + + + repositoryId + 1.0.0+ + false + true + String + + The repository id the statistics belong to. + + + + whenGathered + 1.0.0+ + false + true + Date + + The timestamp on when this set of statistics was gathered. + + + + duration + 1.0.0+ + false + true + long + + The duration (in milliseconds) for the gathering of the statistics. + + + + totalFileCount + 1.0.0+ + false + true + long + + The total number of files in the repository. + + + + newFileCount + 1.0.0+ + false + true + long + + The number of new files discovered. + + + + + + 1.0.0+ + + private transient long startTimestamp; + + public void triggerStart() { + startTimestamp = System.currentTimeMillis(); + } + + public void triggerFinished() { + long finished = System.currentTimeMillis(); + setDuration( finished - startTimestamp ); + setWhenGathered( new java.util.Date( finished ) ); + } + + public void increaseFileCount() { + this.totalFileCount++; + } + + public void increaseNewFileCount() { + this.newFileCount++; + } + + + + + + diff --git a/archiva-model/src/main/mdo/archiva.xml b/archiva-model/src/main/mdo/archiva.xml deleted file mode 100644 index 6d11351a6..000000000 --- a/archiva-model/src/main/mdo/archiva.xml +++ /dev/null @@ -1,468 +0,0 @@ - - - archiva-model - ArchivaModel - 1.0.0 - Archiva Model - - - package - org.apache.maven.archiva.model - - - - - - ArchivaDatabase - 1.0.0+ - - - Repositories - 1.0.0+ - - ArchivaRepositoryModel - * - - - - - - ArchivaRepositoryModel - 1.0.0+ - - - id - true - 1.0.0+ - String - true - - The unique ID for the repository. - - - - name - false - 1.0.0+ - String - true - - The Name of the repository. - - - - url - false - 1.0.0+ - String - true - - The URL of the repository. - - - - creationSource - false - 1.0.0+ - String - true - - The Source of this repository. - (Example: Configuration, POM) - - - - layoutName - false - 1.0.0+ - String - true - - The layout of the repository. - (Either 'default', or 'legacy') - - - - releasePolicy - false - 1.0.0+ - String - true - - The releases policy of the repository. - - - - snapshotPolicy - false - 1.0.0+ - String - true - - The snapshot policy of the repository. - - - - - - RepositoryContent - 1.0.0+ - - Repository Content Identifier. - - - - groupId - true - 1.0.0+ - String - true - - The Group ID of the repository content. - - - - artifactId - true - 1.0.0+ - String - true - - The Artifact ID of the repository content. - - - - version - true - 1.0.0+ - String - false - - The version of the repository content. - - - - repositoryId - true - 1.0.0+ - true - String - - The repository associated with this content. - - - - - - 1.0.0+ - - public RepositoryContent( String groupId, String artifactId, String version ) - { - this.setGroupId( groupId ); - this.setArtifactId( artifactId ); - this.setVersion( version ); - } - - public RepositoryContent( String repositoryId, String groupId, String artifactId, String version ) - { - this.setRepositoryId( repositoryId ); - this.setGroupId( groupId ); - this.setArtifactId( artifactId ); - this.setVersion( version ); - } - - public RepositoryContent( ArchivaRepositoryModel repository, String groupId, String artifactId, String version ) - { - this.setRepositoryId( repository.getId() ); - this.setGroupId( groupId ); - this.setArtifactId( artifactId ); - this.setVersion( version ); - } - - - - - - ArchivaArtifactModel - 1.0.0+ - - - contentKey - true - 1.0.0+ - true - - RepositoryContent - 1 - - - The content key for this artifact. - - - - classifier - false - 1.0.0+ - String - false - - The classifier for this artifact. - - - - type - true - 1.0.0+ - String - true - - The type of artifact. - - - - - - ArchivaRepositoryMetadata - 1.0.0+ - - - contentKey - true - 1.0.0+ - true - - RepositoryContent - 1 - - - The content key for this repository metadata. - - - - releasedVersion - false - 1.0.0+ - false - String - - The released version id. - - - - availableVersions - false - 1.0.0+ - false - - String - * - - - The list of available version ids. - - - - - - HealthProblem - 1.0.0+ - - - type - false - 1.0.0+ - true - String - - The type of health problem. - - - - origin - false - 1.0.0+ - true - String - - The origin of the health problem. - - - - message - false - 1.0.0+ - true - String - - The origin of the health problem. - - - - - - ArchivaArtifactHealth - 1.0.0+ - - - artifact - true - 1.0.0+ - true - - ArchivaArtifactModel - 1 - - - The Artifact to report on. - - - - problems - false - 1.0.0+ - false - - HealthProblem - * - - - The list of problems associated with this artifact. - - - - - - ArchivaRepositoryMetadataHealth - 1.0.0+ - - - repositoryMetadata - true - 1.0.0+ - true - - ArchivaRepositoryMetadata - 1 - - - The ArchivaRepositoryMetadata to report on. - - - - problems - false - 1.0.0+ - false - - HealthProblem - * - - - The list of problems associated with this repository metadata. - - - - - - RepositoryContentStatistics - 1.0.0+ - - - repositoryId - 1.0.0+ - false - true - String - - The repository id the statistics belong to. - - - - whenGathered - 1.0.0+ - false - true - Date - - The timestamp on when this set of statistics was gathered. - - - - duration - 1.0.0+ - false - true - long - - The duration (in milliseconds) for the gathering of the statistics. - - - - totalFileCount - 1.0.0+ - false - true - long - - The total number of files in the repository. - - - - newFileCount - 1.0.0+ - false - true - long - - The number of new files discovered. - - - - - - 1.0.0+ - - private transient long startTimestamp; - - public void triggerStart() { - startTimestamp = System.currentTimeMillis(); - } - - public void triggerFinished() { - long finished = System.currentTimeMillis(); - setDuration( finished - startTimestamp ); - setWhenGathered( new java.util.Date( finished ) ); - } - - public void increaseFileCount() { - this.totalFileCount++; - } - - public void increaseNewFileCount() { - this.newFileCount++; - } - - - - - - -- 2.39.5