diff options
author | Ashlee Young <ashlee@onosfw.com> | 2015-10-23 10:00:02 -0700 |
---|---|---|
committer | Ashlee Young <ashlee@onosfw.com> | 2015-10-23 10:00:02 -0700 |
commit | 753a6c60f47f3ac4f270005b65e9d6481de8eb68 (patch) | |
tree | 3d0a1ae3b4d994550f6614b417b991eee3eb8911 /framework/src/maven/apache-maven-3.3.3/maven-repository-metadata | |
parent | c62d20eb3b4620c06d833be06f50b2600d96dd42 (diff) |
Adding maven and ant source trees
Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445
Signed-off-by: Ashlee Young <ashlee@onosfw.com>
Diffstat (limited to 'framework/src/maven/apache-maven-3.3.3/maven-repository-metadata')
4 files changed, 522 insertions, 0 deletions
diff --git a/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/pom.xml b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/pom.xml new file mode 100644 index 00000000..e9181539 --- /dev/null +++ b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/pom.xml @@ -0,0 +1,63 @@ +<?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.maven</groupId> + <artifactId>maven</artifactId> + <version>3.3.3</version> + </parent> + + <artifactId>maven-repository-metadata</artifactId> + + <name>Maven Repository Metadata Model</name> + <description>Per-directory local and remote repository metadata.</description> + + <scm><!-- remove when git scm url format can accept artifact-id at the end, as automatically inherited --> + <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection> + <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection> + <tag>maven-3.3.3</tag> + </scm> + + <dependencies> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.modello</groupId> + <artifactId>modello-maven-plugin</artifactId> + <configuration> + <version>1.1.0</version> + <models> + <model>src/main/mdo/metadata.mdo</model> + </models> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/main/mdo/metadata.mdo b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/main/mdo/metadata.mdo new file mode 100644 index 00000000..97920027 --- /dev/null +++ b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/main/mdo/metadata.mdo @@ -0,0 +1,371 @@ +<!-- +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 xmlns="http://modello.codehaus.org/MODELLO/1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.4.0 http://modello.codehaus.org/xsd/modello-1.4.0.xsd" + xsd.namespace="http://maven.apache.org/METADATA/${version}" + xml.schemaLocation="http://maven.apache.org/xsd/metadata-${version}.xsd"> + <id>repository-metadata</id> + <name>Metadata</name> + <description><![CDATA[ + <p>Per-directory repository metadata, for directories representing un-versioned artifact, snapshot artifact + or a group containing Maven plugins.</p> + <p>Notice that most metadata content has a meaning when the directory represents + an artifact (<code>groupId</code>, <code>artifactId</code>, <code>versioning</code>), but + <code>plugins</code> is used when the directory represents a group.</p>]]> + </description> + <defaults> + <default> + <key>package</key> + <value>org.apache.maven.artifact.repository.metadata</value> + </default> + </defaults> + <classes> + <class rootElement="true" java.clone="deep"> + <name>Metadata</name> + <version>1.0.0+</version> + <fields> + <field xml.attribute="true"> + <name>modelVersion</name> + <version>1.1.0+</version> + <type>String</type> + <description>The version of the underlying metadata model.</description> + </field> + <field> + <name>groupId</name> + <version>1.0.0+</version> + <type>String</type> + <description>The groupId that this directory represents, if any.</description> + </field> + <field> + <name>artifactId</name> + <version>1.0.0+</version> + <type>String</type> + <description>The artifactId that this directory represents, if any.</description> + </field> + <field> + <name>version</name> + <version>1.0.0+</version> + <type>String</type> + <description>The version that this directory represents, if any. It is used for artifact snapshots only.</description> + </field> + <field> + <name>versioning</name> + <version>1.0.0+</version> + <association> + <type>Versioning</type> + </association> + <description>Versioning information for the artifact.</description> + </field> + <field xdoc.separator="blank"> + <name>plugins</name> + <version>1.0.0+</version> + <description>The set of plugin mappings for the group represented by this directory</description> + <association> + <type>Plugin</type> + <multiplicity>*</multiplicity> + </association> + </field> + </fields> + <codeSegments> + <codeSegment> + <version>1.0.0+</version> + <code><![CDATA[ + public boolean merge( Metadata sourceMetadata ) + { + boolean changed = false; + + for ( Plugin plugin : sourceMetadata.getPlugins() ) + { + boolean found = false; + + for ( Plugin preExisting : getPlugins() ) + { + if ( preExisting.getPrefix().equals( plugin.getPrefix() ) ) + { + found = true; + break; + } + } + + if ( !found ) + { + Plugin mappedPlugin = new Plugin(); + + mappedPlugin.setArtifactId( plugin.getArtifactId() ); + + mappedPlugin.setPrefix( plugin.getPrefix() ); + + mappedPlugin.setName( plugin.getName() ); + + addPlugin( mappedPlugin ); + + changed = true; + } + } + + Versioning versioning = sourceMetadata.getVersioning(); + if ( versioning != null ) + { + Versioning v = getVersioning(); + if ( v == null ) + { + v = new Versioning(); + setVersioning( v ); + changed = true; + } + + for ( String version : versioning.getVersions() ) + { + if ( !v.getVersions().contains( version ) ) + { + changed = true; + v.getVersions().add( version ); + } + } + + if ( "null".equals( versioning.getLastUpdated() ) ) + { + versioning.setLastUpdated( null ); + } + + if ( "null".equals( v.getLastUpdated() ) ) + { + v.setLastUpdated( null ); + } + + if ( versioning.getLastUpdated() == null || versioning.getLastUpdated().length() == 0 ) + { + // this should only be for historical reasons - we assume local is newer + versioning.setLastUpdated( v.getLastUpdated() ); + } + + if ( v.getLastUpdated() == null || v.getLastUpdated().length() == 0 + || versioning.getLastUpdated().compareTo( v.getLastUpdated() ) >= 0 ) + { + changed = true; + v.setLastUpdated( versioning.getLastUpdated() ); + + if ( versioning.getRelease() != null ) + { + changed = true; + v.setRelease( versioning.getRelease() ); + } + if ( versioning.getLatest() != null ) + { + changed = true; + v.setLatest( versioning.getLatest() ); + } + + Snapshot s = v.getSnapshot(); + Snapshot snapshot = versioning.getSnapshot(); + if ( snapshot != null ) + { + if ( s == null ) + { + s = new Snapshot(); + v.setSnapshot( s ); + changed = true; + } + + // overwrite + if ( s.getTimestamp() == null ? snapshot.getTimestamp() != null + : !s.getTimestamp().equals( snapshot.getTimestamp() ) ) + { + s.setTimestamp( snapshot.getTimestamp() ); + changed = true; + } + if ( s.getBuildNumber() != snapshot.getBuildNumber() ) + { + s.setBuildNumber( snapshot.getBuildNumber() ); + changed = true; + } + if ( s.isLocalCopy() != snapshot.isLocalCopy() ) + { + s.setLocalCopy( snapshot.isLocalCopy() ); + changed = true; + } + } + } + } + return changed; + } + ]]></code> + </codeSegment> + </codeSegments> + </class> + <class java.clone="deep"> + <name>Versioning</name> + <version>1.0.0+</version> + <description>Versioning information for an artifact (un-versioned or snapshot)</description> + <fields> + <field> + <name>latest</name> + <version>1.0.0+</version> + <type>String</type> + <description>What the latest version in the directory is, including snapshots</description> + </field> + <field> + <name>release</name> + <version>1.0.0+</version> + <type>String</type> + <description>What the latest version in the directory is, of the releases only</description> + </field> + <field> + <name>snapshot</name> + <version>1.0.0+</version> + <association> + <type>Snapshot</type> + </association> + <description>The current snapshot data in use for this version (artifact snapshots only)</description> + </field> + <field> + <name>versions</name> + <version>1.0.0+</version> + <description>Versions available of the artifact (both releases and snapshots)</description> + <association> + <type>String</type> + <multiplicity>*</multiplicity> + </association> + </field> + <field> + <name>lastUpdated</name> + <version>1.0.0+</version> + <type>String</type> + <description>When the metadata was last updated</description> + </field> + <field> + <name>snapshotVersions</name> + <version>1.1.0+</version> + <description>Information for each sub-artifact available in this artifact snapshot.</description> + <association> + <type>SnapshotVersion</type> + <multiplicity>*</multiplicity> + </association> + </field> + </fields> + <codeSegments> + <codeSegment> + <version>1.0.0+</version> + <code><![CDATA[ + public void updateTimestamp() + { + setLastUpdatedTimestamp( new java.util.Date() ); + } + + public void setLastUpdatedTimestamp( java.util.Date date ) + { + java.util.TimeZone timezone = java.util.TimeZone.getTimeZone( "UTC" ); + java.text.DateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss" ); + fmt.setTimeZone( timezone ); + setLastUpdated( fmt.format( date ) ); + } + ]]></code> + </codeSegment> + </codeSegments> + </class> + <class java.clone="deep"> + <name>Snapshot</name> + <version>1.0.0+</version> + <description>Snapshot data for the current artifact version</description> + <fields> + <field> + <name>timestamp</name> + <version>1.0.0+</version> + <description>The time it was deployed</description> + <type>String</type> + </field> + <field> + <name>buildNumber</name> + <version>1.0.0+</version> + <description>The incremental build number</description> + <type>int</type> + </field> + <field> + <name>localCopy</name> + <version>1.0.0+</version> + <description>Whether to use a local copy instead (with filename that includes the base version)</description> + <type>boolean</type> + <defaultValue>false</defaultValue> + </field> + </fields> + </class> + <class java.clone="deep"> + <name>SnapshotVersion</name> + <version>1.1.0+</version> + <description>Versioning information for a sub-artifact of the current snapshot artifact.</description> + <fields> + <field> + <name>classifier</name> + <version>1.1.0+</version> + <type>String</type> + <description>The classifier of the sub-artifact.</description> + <defaultValue></defaultValue> + </field> + <field> + <name>extension</name> + <version>1.1.0+</version> + <type>String</type> + <description>The file extension of thesub-artifact.</description> + </field> + <field xml.tagName="value"> + <name>version</name> + <version>1.1.0+</version> + <type>String</type> + <description>The resolved snapshot version of the sub-artifact.</description> + </field> + <field> + <name>updated</name> + <version>1.1.0+</version> + <type>String</type> + <description>The timestamp when this version information was last updated. The timestamp is expressed using UTC in the format yyyyMMddHHmmss.</description> + </field> + </fields> + </class> + <class java.clone="deep"> + <name>Plugin</name> + <version>1.0.0+</version> + <description>Mapping information for a single plugin within this group</description> + <comment>NOTE: plugin version is _NOT_ included here, since it is resolved using a separate algorithm in plugins' artifact.</comment> + <fields> + <field> + <name>name</name> + <type>String</type> + <required>true</required> + <version>1.0.0+</version> + <description>Display name for the plugin.</description> + </field> + <field> + <name>prefix</name> + <type>String</type> + <required>true</required> + <version>1.0.0+</version> + <description>The plugin invocation prefix (i.e. eclipse for eclipse:eclipse)</description> + </field> + <field> + <name>artifactId</name> + <type>String</type> + <required>true</required> + <version>1.0.0+</version> + <description>The plugin artifactId</description> + </field> + </fields> + </class> + </classes> +</model> diff --git a/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/site/apt/index.apt b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/site/apt/index.apt new file mode 100644 index 00000000..194fc0df --- /dev/null +++ b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/site/apt/index.apt @@ -0,0 +1,52 @@ +~~ 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. + + ----- + Introduction + ----- + Hervé Boutemy + ----- + 2009-04-26 + ----- + +Maven Repository Metadata Model + + This is strictly the model for Maven Repository Metadata, so really just plain objects. + + Maven Repository Metadata is available in directories representing: + + [[1]] an un-versioned artifact: it gives informations about available versions of the artifact, + + [[2]] a snapshot artifact: it gives precise information on the snapshot, + + [[3]] a group containing Maven plugins artifacts: it gives informations on plugins available in this group. + + [] + + The metadata file name is: + + * <<<maven-metadata.xml>>> in a remote repository, + + * <<<maven-metadata-\<repo-id>.xml>>> in a local repository, for metatada from a repository with <<<repo-id>>> identifier. + + [] + + The following are generated from this model: + + * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser, to read and write <<<maven-metadata(-*).xml>>> files + + * A {{{./repository-metadata.html}Descriptor Reference}} diff --git a/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/site/site.xml b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/site/site.xml new file mode 100644 index 00000000..0471f895 --- /dev/null +++ b/framework/src/maven/apache-maven-3.3.3/maven-repository-metadata/src/site/site.xml @@ -0,0 +1,36 @@ +<?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/DECORATION/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd"> + <body> + <menu name="Overview"> + <item name="Introduction" href="index.html"/> + <item name="JavaDocs" href="apidocs/index.html"/> + <!--item name="Source Xref" href="xref/index.html"/--> + <!--item name="FAQ" href="faq.html"/--> + </menu> + + <menu ref="parent"/> + <menu ref="reports"/> + </body> +</project>
\ No newline at end of file |