diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88ed307 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/xmvn-2.1.1.tar.xz diff --git a/.rh-maven33-xmvn.metadata b/.rh-maven33-xmvn.metadata new file mode 100644 index 0000000..3f86bcd --- /dev/null +++ b/.rh-maven33-xmvn.metadata @@ -0,0 +1 @@ +b8b5cb2f117874023045a310af7e9952b69cce5c SOURCES/xmvn-2.1.1.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Disable-doclint-in-javadoc-aggregate-MOJO-executions.patch b/SOURCES/0001-Disable-doclint-in-javadoc-aggregate-MOJO-executions.patch new file mode 100644 index 0000000..19b0817 --- /dev/null +++ b/SOURCES/0001-Disable-doclint-in-javadoc-aggregate-MOJO-executions.patch @@ -0,0 +1,73 @@ +From b9dc38741887a8daea1f894741c2070c58901752 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Thu, 16 Apr 2015 10:18:25 +0200 +Subject: [PATCH 1/4] Disable doclint in javadoc:aggregate MOJO executions + +Java 8 detection code assumes that toolchains are not in use -- the +same JDK version is used to run XMvn and generate javadocs. +--- + .../aether/XMvnMojoExecutionListener.java | 34 +++++++++++++++++++++- + 1 file changed, 33 insertions(+), 1 deletion(-) + +diff --git a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java +index a9cac0e..e6b3e36 100644 +--- a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java ++++ b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java +@@ -33,6 +33,8 @@ import org.apache.maven.plugin.Mojo; + import org.apache.maven.plugin.MojoExecution; + import org.apache.maven.plugin.MojoExecutionException; + import org.apache.maven.project.MavenProject; ++import org.eclipse.sisu.bean.BeanProperties; ++import org.eclipse.sisu.bean.BeanProperty; + + /** + * Listens to various MOJO executions and captures useful information. +@@ -44,6 +46,25 @@ import org.apache.maven.project.MavenProject; + public class XMvnMojoExecutionListener + implements MojoExecutionListener + { ++ private static final boolean IS_JAVA8_OR_LATER; ++ ++ static ++ { ++ boolean isJava8; ++ ++ try ++ { ++ Class.forName( "java.lang.reflect.Executable" ); ++ isJava8 = true; ++ } ++ catch ( Throwable t ) ++ { ++ isJava8 = false; ++ } ++ ++ IS_JAVA8_OR_LATER = isJava8; ++ } ++ + private static class MojoGoal + { + private final String groupId; +@@ -191,7 +212,18 @@ public class XMvnMojoExecutionListener + @Override + public void beforeMojoExecution( MojoExecutionEvent event ) + { +- // Nothing to do ++ Mojo mojo = event.getMojo(); ++ MojoExecution execution = event.getExecution(); ++ ++ // Disable doclint on Java 8+ ++ if ( IS_JAVA8_OR_LATER && JAVADOC_AGGREGATE.equals( execution ) ) ++ { ++ for ( BeanProperty property : new BeanProperties( mojo.getClass() ) ) ++ { ++ if ( property.getName().equals( "additionalparam" ) ) ++ property.set( mojo, "-Xdoclint:none" ); ++ } ++ } + } + + @Override +-- +2.5.0 + diff --git a/SOURCES/0002-Add-duplicated-ZIP-entry-hack-for-OpenJDK.patch b/SOURCES/0002-Add-duplicated-ZIP-entry-hack-for-OpenJDK.patch new file mode 100644 index 0000000..a59404a --- /dev/null +++ b/SOURCES/0002-Add-duplicated-ZIP-entry-hack-for-OpenJDK.patch @@ -0,0 +1,75 @@ +From df720cdeb86e671ac336d337dfedda1cf2d1f711 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 28 Oct 2015 13:08:23 +0100 +Subject: [PATCH 2/4] Add duplicated ZIP entry hack for OpenJDK + +--- + .../xmvn/tools/install/impl/JarUtils.java | 29 ++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/JarUtils.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/JarUtils.java +index 5dd09ea..ae2a5a6 100644 +--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/JarUtils.java ++++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/JarUtils.java +@@ -16,8 +16,10 @@ + package org.fedoraproject.xmvn.tools.install.impl; + + import java.io.IOException; ++import java.lang.reflect.Field; + import java.nio.file.Files; + import java.nio.file.Path; ++import java.util.Collection; + import java.util.jar.Attributes; + import java.util.jar.JarEntry; + import java.util.jar.JarInputStream; +@@ -25,6 +27,7 @@ import java.util.jar.JarOutputStream; + import java.util.jar.Manifest; + import java.util.zip.ZipEntry; + import java.util.zip.ZipInputStream; ++import java.util.zip.ZipOutputStream; + + import org.objectweb.asm.ClassReader; + import org.objectweb.asm.ClassVisitor; +@@ -165,6 +168,31 @@ class JarUtils + } + + /** ++ * OpenJDK has a sanity check that prevents adding duplicate entries to ZIP streams. The problem is that some of ++ * JARs we try to inject manifests to (especially the ones created by Gradle) already contain duplicate entries, so ++ * manifest injection would always fail for them with "ZipException: duplicate entry". ++ *

++ * This function tries to work around this OpenJDK sanity check, effectively allowing creating ZIP files with ++ * duplicated entries. It should be called on particular ZIP output stream before adding each duplicate entry. ++ * ++ * @param zipOutputStream ZIP stream to hack ++ */ ++ private static void openJdkAvoidDuplicateEntryHack( ZipOutputStream zipOutputStream ) ++ { ++ try ++ { ++ Field namesField = ZipOutputStream.class.getDeclaredField( "names" ); ++ namesField.setAccessible( true ); ++ Collection names = (Collection) namesField.get( zipOutputStream ); ++ names.clear(); ++ } ++ catch ( ReflectiveOperationException e ) ++ { ++ // This hack relies on OpenJDK internals and therefore is not ugarranteed to work. Ignore failures. ++ } ++ } ++ ++ /** + * Inject artifact coordinates into manifest of specified JAR (or WAR, EAR, ...) file. The file is modified + * in-place. + * +@@ -200,6 +228,7 @@ class JarUtils + JarEntry entry; + while ( ( entry = jis.getNextJarEntry() ) != null ) + { ++ openJdkAvoidDuplicateEntryHack( jos ); + jos.putNextEntry( entry ); + + int sz; +-- +2.5.0 + diff --git a/SOURCES/0003-Add-hack-for-forcing-correct-namespace-in-depmap-res.patch b/SOURCES/0003-Add-hack-for-forcing-correct-namespace-in-depmap-res.patch new file mode 100644 index 0000000..a9cfde0 --- /dev/null +++ b/SOURCES/0003-Add-hack-for-forcing-correct-namespace-in-depmap-res.patch @@ -0,0 +1,28 @@ +From de97042bc5c3eaea30f6f63958e422a05b0290b0 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 17 Dec 2014 23:31:35 +0100 +Subject: [PATCH 3/4] Add hack for forcing correct namespace in depmap resolver + +--- + .../fedoraproject/xmvn/resolver/impl/depmap/DepmapBasedResolver.java | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/depmap/DepmapBasedResolver.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/depmap/DepmapBasedResolver.java +index 298b060..8ad228d 100644 +--- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/depmap/DepmapBasedResolver.java ++++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/depmap/DepmapBasedResolver.java +@@ -202,6 +202,11 @@ public class DepmapBasedResolver + DefaultResolutionResult result = new DefaultResolutionResult( artifactPath ); + result.setCompatVersion( version ); + result.setNamespace( repo != null ? repo.getNamespace() : null ); ++ ++ // XXX an ugly hack ++ if ( artifactPath.startsWith( Paths.get( "/opt/rh" ) ) ) ++ result.setNamespace( artifactPath.getName( 2 ).toString() ); ++ + return result; + } + } +-- +2.5.0 + diff --git a/SOURCES/0004-Port-to-Modello-1.7.patch b/SOURCES/0004-Port-to-Modello-1.7.patch new file mode 100644 index 0000000..2bab6e4 --- /dev/null +++ b/SOURCES/0004-Port-to-Modello-1.7.patch @@ -0,0 +1,8123 @@ +From 06cbffad8f5609188a788e85991918078d9fca12 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 7 Jan 2015 10:21:15 +0100 +Subject: [PATCH 4/4] Port to Modello 1.7 + +--- + xmvn-core/pom.xml | 2 - + .../org/fedoraproject/xmvn/config/Artifact.java | 197 ++++ + .../fedoraproject/xmvn/config/BuildSettings.java | 148 +++ + .../fedoraproject/xmvn/config/Configuration.java | 343 ++++++ + .../xmvn/config/InstallerSettings.java | 108 ++ + .../fedoraproject/xmvn/config/PackagingRule.java | 374 +++++++ + .../org/fedoraproject/xmvn/config/Repository.java | 308 ++++++ + .../xmvn/config/ResolverSettings.java | 310 ++++++ + .../org/fedoraproject/xmvn/config/Stereotype.java | 122 +++ + .../config/io/stax/ConfigurationStaxReader.java | 1139 ++++++++++++++++++++ + .../config/io/stax/ConfigurationStaxWriter.java | 597 ++++++++++ + .../config/io/stax/IndentingXMLStreamWriter.java | 653 +++++++++++ + .../fedoraproject/xmvn/metadata/ArtifactAlias.java | 157 +++ + .../xmvn/metadata/ArtifactMetadata.java | 520 +++++++++ + .../fedoraproject/xmvn/metadata/Dependency.java | 323 ++++++ + .../xmvn/metadata/DependencyExclusion.java | 103 ++ + .../xmvn/metadata/PackageMetadata.java | 270 +++++ + .../xmvn/metadata/SkippedArtifactMetadata.java | 159 +++ + .../metadata/io/stax/IndentingXMLStreamWriter.java | 653 +++++++++++ + .../xmvn/metadata/io/stax/MetadataStaxReader.java | 950 ++++++++++++++++ + .../xmvn/metadata/io/stax/MetadataStaxWriter.java | 490 +++++++++ + xmvn-parent/pom.xml | 2 +- + 22 files changed, 7925 insertions(+), 3 deletions(-) + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Artifact.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/BuildSettings.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Configuration.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/InstallerSettings.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/PackagingRule.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Repository.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/ResolverSettings.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Stereotype.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxReader.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxWriter.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/IndentingXMLStreamWriter.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactAlias.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactMetadata.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/Dependency.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/DependencyExclusion.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/PackageMetadata.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/SkippedArtifactMetadata.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/IndentingXMLStreamWriter.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxReader.java + create mode 100644 xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxWriter.java + +diff --git a/xmvn-core/pom.xml b/xmvn-core/pom.xml +index 1c1808a..3c3f878 100644 +--- a/xmvn-core/pom.xml ++++ b/xmvn-core/pom.xml +@@ -85,8 +85,6 @@ + standard + + java +- stax-reader +- stax-writer + + + +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Artifact.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Artifact.java +new file mode 100644 +index 0000000..96bb7ed +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Artifact.java +@@ -0,0 +1,197 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * Identifier of Maven artifact. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class Artifact ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Group ID of the artifact. ++ */ ++ private String groupId = ""; ++ ++ /** ++ * Artifact ID of the artifact. ++ */ ++ private String artifactId = ""; ++ ++ /** ++ * Version of the artifact. ++ */ ++ private String version = ""; ++ ++ /** ++ * Classifier of the artifact. ++ */ ++ private String classifier = ""; ++ ++ /** ++ * Maven stereotype of the artifact. ++ */ ++ private String stereotype = ""; ++ ++ /** ++ * Extension of the artifact. ++ */ ++ private String extension = ""; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return Artifact ++ */ ++ public Artifact clone() ++ { ++ try ++ { ++ Artifact copy = (Artifact) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- Artifact clone() ++ ++ /** ++ * Get artifact ID of the artifact. ++ * ++ * @return String ++ */ ++ public String getArtifactId() ++ { ++ return this.artifactId; ++ } //-- String getArtifactId() ++ ++ /** ++ * Get classifier of the artifact. ++ * ++ * @return String ++ */ ++ public String getClassifier() ++ { ++ return this.classifier; ++ } //-- String getClassifier() ++ ++ /** ++ * Get extension of the artifact. ++ * ++ * @return String ++ */ ++ public String getExtension() ++ { ++ return this.extension; ++ } //-- String getExtension() ++ ++ /** ++ * Get group ID of the artifact. ++ * ++ * @return String ++ */ ++ public String getGroupId() ++ { ++ return this.groupId; ++ } //-- String getGroupId() ++ ++ /** ++ * Get maven stereotype of the artifact. ++ * ++ * @return String ++ */ ++ public String getStereotype() ++ { ++ return this.stereotype; ++ } //-- String getStereotype() ++ ++ /** ++ * Get version of the artifact. ++ * ++ * @return String ++ */ ++ public String getVersion() ++ { ++ return this.version; ++ } //-- String getVersion() ++ ++ /** ++ * Set artifact ID of the artifact. ++ * ++ * @param artifactId ++ */ ++ public void setArtifactId( String artifactId ) ++ { ++ this.artifactId = artifactId; ++ } //-- void setArtifactId( String ) ++ ++ /** ++ * Set classifier of the artifact. ++ * ++ * @param classifier ++ */ ++ public void setClassifier( String classifier ) ++ { ++ this.classifier = classifier; ++ } //-- void setClassifier( String ) ++ ++ /** ++ * Set extension of the artifact. ++ * ++ * @param extension ++ */ ++ public void setExtension( String extension ) ++ { ++ this.extension = extension; ++ } //-- void setExtension( String ) ++ ++ /** ++ * Set group ID of the artifact. ++ * ++ * @param groupId ++ */ ++ public void setGroupId( String groupId ) ++ { ++ this.groupId = groupId; ++ } //-- void setGroupId( String ) ++ ++ /** ++ * Set maven stereotype of the artifact. ++ * ++ * @param stereotype ++ */ ++ public void setStereotype( String stereotype ) ++ { ++ this.stereotype = stereotype; ++ } //-- void setStereotype( String ) ++ ++ /** ++ * Set version of the artifact. ++ * ++ * @param version ++ */ ++ public void setVersion( String version ) ++ { ++ this.version = version; ++ } //-- void setVersion( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/BuildSettings.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/BuildSettings.java +new file mode 100644 +index 0000000..5b3e278 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/BuildSettings.java +@@ -0,0 +1,148 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * Basic build settings. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class BuildSettings ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Whether detailed debugging information about the ++ * build ++ * process should be logged. ++ * ++ */ ++ private Boolean debug; ++ ++ /** ++ * ++ * Whether compilation and execution of unit and ++ * integration tests should be skipped. ++ * ++ */ ++ private Boolean skipTests; ++ ++ /** ++ * ++ * Compatibility version of Java sources in the ++ * reactor. If ++ * not specified then it defaults to 1.5 or ++ * whatever is ++ * specified in configuration of Maven Compiler ++ * Plugin. ++ * ++ */ ++ private String compilerSource; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return BuildSettings ++ */ ++ public BuildSettings clone() ++ { ++ try ++ { ++ BuildSettings copy = (BuildSettings) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- BuildSettings clone() ++ ++ /** ++ * Get compatibility version of Java sources in the reactor. If ++ * not specified then it defaults to 1.5 or ++ * whatever is ++ * specified in configuration of Maven Compiler ++ * Plugin. ++ * ++ * @return String ++ */ ++ public String getCompilerSource() ++ { ++ return this.compilerSource; ++ } //-- String getCompilerSource() ++ ++ /** ++ * Get whether detailed debugging information about the build ++ * process should be logged. ++ * ++ * @return Boolean ++ */ ++ public Boolean isDebug() ++ { ++ return this.debug; ++ } //-- Boolean isDebug() ++ ++ /** ++ * Get whether compilation and execution of unit and ++ * integration tests should be skipped. ++ * ++ * @return Boolean ++ */ ++ public Boolean isSkipTests() ++ { ++ return this.skipTests; ++ } //-- Boolean isSkipTests() ++ ++ /** ++ * Set compatibility version of Java sources in the reactor. If ++ * not specified then it defaults to 1.5 or ++ * whatever is ++ * specified in configuration of Maven Compiler ++ * Plugin. ++ * ++ * @param compilerSource ++ */ ++ public void setCompilerSource( String compilerSource ) ++ { ++ this.compilerSource = compilerSource; ++ } //-- void setCompilerSource( String ) ++ ++ /** ++ * Set whether detailed debugging information about the build ++ * process should be logged. ++ * ++ * @param debug ++ */ ++ public void setDebug( Boolean debug ) ++ { ++ this.debug = debug; ++ } //-- void setDebug( Boolean ) ++ ++ /** ++ * Set whether compilation and execution of unit and ++ * integration tests should be skipped. ++ * ++ * @param skipTests ++ */ ++ public void setSkipTests( Boolean skipTests ) ++ { ++ this.skipTests = skipTests; ++ } //-- void setSkipTests( Boolean ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Configuration.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Configuration.java +new file mode 100644 +index 0000000..f898bca +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Configuration.java +@@ -0,0 +1,343 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * ++ * Root element of the configuration file. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class Configuration ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Field properties. ++ */ ++ private java.util.Properties properties; ++ ++ /** ++ * Field repositories. ++ */ ++ private java.util.List repositories; ++ ++ /** ++ * ++ * This element contains basic XMvn settings. ++ * ++ */ ++ private BuildSettings buildSettings; ++ ++ /** ++ * Field artifactManagement. ++ */ ++ private java.util.List artifactManagement; ++ ++ /** ++ * ++ * This element contains configuration of XMvn ++ * resolver. ++ * ++ */ ++ private ResolverSettings resolverSettings; ++ ++ /** ++ * ++ * This element contains configuration of XMvn ++ * installer. ++ * ++ */ ++ private InstallerSettings installerSettings; ++ ++ /** ++ * Field modelEncoding. ++ */ ++ private String modelEncoding = "UTF-8"; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addArtifactManagement. ++ * ++ * @param packagingRule ++ */ ++ public void addArtifactManagement( PackagingRule packagingRule ) ++ { ++ getArtifactManagement().add( packagingRule ); ++ } //-- void addArtifactManagement( PackagingRule ) ++ ++ /** ++ * Method addProperty. ++ * ++ * @param key ++ * @param value ++ */ ++ public void addProperty( String key, String value ) ++ { ++ getProperties().put( key, value ); ++ } //-- void addProperty( String, String ) ++ ++ /** ++ * Method addRepository. ++ * ++ * @param repository ++ */ ++ public void addRepository( Repository repository ) ++ { ++ getRepositories().add( repository ); ++ } //-- void addRepository( Repository ) ++ ++ /** ++ * Method clone. ++ * ++ * @return Configuration ++ */ ++ public Configuration clone() ++ { ++ try ++ { ++ Configuration copy = (Configuration) super.clone(); ++ ++ if ( this.properties != null ) ++ { ++ copy.properties = (java.util.Properties) this.properties.clone(); ++ } ++ ++ if ( this.repositories != null ) ++ { ++ copy.repositories = new java.util.ArrayList(); ++ for ( Repository item : this.repositories ) ++ { ++ copy.repositories.add( ( (Repository) item).clone() ); ++ } ++ } ++ ++ if ( this.buildSettings != null ) ++ { ++ copy.buildSettings = (BuildSettings) this.buildSettings.clone(); ++ } ++ ++ if ( this.artifactManagement != null ) ++ { ++ copy.artifactManagement = new java.util.ArrayList(); ++ for ( PackagingRule item : this.artifactManagement ) ++ { ++ copy.artifactManagement.add( ( (PackagingRule) item).clone() ); ++ } ++ } ++ ++ if ( this.resolverSettings != null ) ++ { ++ copy.resolverSettings = (ResolverSettings) this.resolverSettings.clone(); ++ } ++ ++ if ( this.installerSettings != null ) ++ { ++ copy.installerSettings = (InstallerSettings) this.installerSettings.clone(); ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- Configuration clone() ++ ++ /** ++ * Method getArtifactManagement. ++ * ++ * @return List ++ */ ++ public java.util.List getArtifactManagement() ++ { ++ if ( this.artifactManagement == null ) ++ { ++ this.artifactManagement = new java.util.ArrayList(); ++ } ++ ++ return this.artifactManagement; ++ } //-- java.util.List getArtifactManagement() ++ ++ /** ++ * Get this element contains basic XMvn settings. ++ * ++ * @return BuildSettings ++ */ ++ public BuildSettings getBuildSettings() ++ { ++ return this.buildSettings; ++ } //-- BuildSettings getBuildSettings() ++ ++ /** ++ * Get this element contains configuration of XMvn installer. ++ * ++ * @return InstallerSettings ++ */ ++ public InstallerSettings getInstallerSettings() ++ { ++ return this.installerSettings; ++ } //-- InstallerSettings getInstallerSettings() ++ ++ /** ++ * Get the modelEncoding field. ++ * ++ * @return String ++ */ ++ public String getModelEncoding() ++ { ++ return this.modelEncoding; ++ } //-- String getModelEncoding() ++ ++ /** ++ * Method getProperties. ++ * ++ * @return Properties ++ */ ++ public java.util.Properties getProperties() ++ { ++ if ( this.properties == null ) ++ { ++ this.properties = new java.util.Properties(); ++ } ++ ++ return this.properties; ++ } //-- java.util.Properties getProperties() ++ ++ /** ++ * Method getRepositories. ++ * ++ * @return List ++ */ ++ public java.util.List getRepositories() ++ { ++ if ( this.repositories == null ) ++ { ++ this.repositories = new java.util.ArrayList(); ++ } ++ ++ return this.repositories; ++ } //-- java.util.List getRepositories() ++ ++ /** ++ * Get this element contains configuration of XMvn resolver. ++ * ++ * @return ResolverSettings ++ */ ++ public ResolverSettings getResolverSettings() ++ { ++ return this.resolverSettings; ++ } //-- ResolverSettings getResolverSettings() ++ ++ /** ++ * Method removeArtifactManagement. ++ * ++ * @param packagingRule ++ */ ++ public void removeArtifactManagement( PackagingRule packagingRule ) ++ { ++ getArtifactManagement().remove( packagingRule ); ++ } //-- void removeArtifactManagement( PackagingRule ) ++ ++ /** ++ * Method removeRepository. ++ * ++ * @param repository ++ */ ++ public void removeRepository( Repository repository ) ++ { ++ getRepositories().remove( repository ); ++ } //-- void removeRepository( Repository ) ++ ++ /** ++ * Set this element configures how artifacts should be assigned ++ * to individual packages. ++ * ++ * @param artifactManagement ++ */ ++ public void setArtifactManagement( java.util.List artifactManagement ) ++ { ++ this.artifactManagement = artifactManagement; ++ } //-- void setArtifactManagement( java.util.List ) ++ ++ /** ++ * Set this element contains basic XMvn settings. ++ * ++ * @param buildSettings ++ */ ++ public void setBuildSettings( BuildSettings buildSettings ) ++ { ++ this.buildSettings = buildSettings; ++ } //-- void setBuildSettings( BuildSettings ) ++ ++ /** ++ * Set this element contains configuration of XMvn installer. ++ * ++ * @param installerSettings ++ */ ++ public void setInstallerSettings( InstallerSettings installerSettings ) ++ { ++ this.installerSettings = installerSettings; ++ } //-- void setInstallerSettings( InstallerSettings ) ++ ++ /** ++ * Set the modelEncoding field. ++ * ++ * @param modelEncoding ++ */ ++ public void setModelEncoding( String modelEncoding ) ++ { ++ this.modelEncoding = modelEncoding; ++ } //-- void setModelEncoding( String ) ++ ++ /** ++ * Set this element lists system Java properties that should be ++ * set before XMvn build is started. ++ * ++ * @param properties ++ */ ++ public void setProperties( java.util.Properties properties ) ++ { ++ this.properties = properties; ++ } //-- void setProperties( java.util.Properties ) ++ ++ /** ++ * Set list of repositories. Repositories can be used by ++ * resolvers as source of artifacts, by installers ++ * as target ++ * where artifacts should be installed, or by any ++ * other ++ * component. ++ * ++ * @param repositories ++ */ ++ public void setRepositories( java.util.List repositories ) ++ { ++ this.repositories = repositories; ++ } //-- void setRepositories( java.util.List ) ++ ++ /** ++ * Set this element contains configuration of XMvn resolver. ++ * ++ * @param resolverSettings ++ */ ++ public void setResolverSettings( ResolverSettings resolverSettings ) ++ { ++ this.resolverSettings = resolverSettings; ++ } //-- void setResolverSettings( ResolverSettings ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/InstallerSettings.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/InstallerSettings.java +new file mode 100644 +index 0000000..96d87b3 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/InstallerSettings.java +@@ -0,0 +1,108 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * XMvn settings related to installation of artifacts. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class InstallerSettings ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Whether additional debugging information about ++ * artifact ++ * installation should be printed. ++ * ++ */ ++ private Boolean debug; ++ ++ /** ++ * ++ * Directory into which XMvn metadata files are be ++ * installed. ++ * ++ */ ++ private String metadataDir; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return InstallerSettings ++ */ ++ public InstallerSettings clone() ++ { ++ try ++ { ++ InstallerSettings copy = (InstallerSettings) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- InstallerSettings clone() ++ ++ /** ++ * Get directory into which XMvn metadata files are be ++ * installed. ++ * ++ * @return String ++ */ ++ public String getMetadataDir() ++ { ++ return this.metadataDir; ++ } //-- String getMetadataDir() ++ ++ /** ++ * Get whether additional debugging information about artifact ++ * installation should be printed. ++ * ++ * @return Boolean ++ */ ++ public Boolean isDebug() ++ { ++ return this.debug; ++ } //-- Boolean isDebug() ++ ++ /** ++ * Set whether additional debugging information about artifact ++ * installation should be printed. ++ * ++ * @param debug ++ */ ++ public void setDebug( Boolean debug ) ++ { ++ this.debug = debug; ++ } //-- void setDebug( Boolean ) ++ ++ /** ++ * Set directory into which XMvn metadata files are be ++ * installed. ++ * ++ * @param metadataDir ++ */ ++ public void setMetadataDir( String metadataDir ) ++ { ++ this.metadataDir = metadataDir; ++ } //-- void setMetadataDir( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/PackagingRule.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/PackagingRule.java +new file mode 100644 +index 0000000..d40ab78 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/PackagingRule.java +@@ -0,0 +1,374 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * Identification of Maven Artifact. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class PackagingRule ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Pattern specifying one or more Maven artifacts. ++ */ ++ private Artifact artifactGlob; ++ ++ /** ++ * Name of binary package into which artifacts are assigned. ++ */ ++ private String targetPackage; ++ ++ /** ++ * ++ * ID of repository into which artifacts are ++ * installed. ++ * ++ */ ++ private String targetRepository; ++ ++ /** ++ * Field files. ++ */ ++ private java.util.List files; ++ ++ /** ++ * Field versions. ++ */ ++ private java.util.List versions; ++ ++ /** ++ * Field aliases. ++ */ ++ private java.util.List aliases; ++ ++ /** ++ * ++ * Whether this rule is optional. Non-optional ++ * rules cause ++ * build failure if they are not matched. ++ * ++ */ ++ private Boolean optional = Boolean.valueOf( false ); ++ ++ /** ++ * ++ * Whether any reactor artifact matches artifact ++ * glob pattern ++ * for this rule. Non-optional rules cause build ++ * failure if ++ * they are not matched. ++ * ++ */ ++ private Boolean matched = Boolean.valueOf( false ); ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addFile. ++ * ++ * @param string ++ */ ++ public void addFile( String string ) ++ { ++ getFiles().add( string ); ++ } //-- void addFile( String ) ++ ++ /** ++ * Method addVersion. ++ * ++ * @param string ++ */ ++ public void addVersion( String string ) ++ { ++ getVersions().add( string ); ++ } //-- void addVersion( String ) ++ ++ /** ++ * Method clone. ++ * ++ * @return PackagingRule ++ */ ++ public PackagingRule clone() ++ { ++ try ++ { ++ PackagingRule copy = (PackagingRule) super.clone(); ++ ++ if ( this.artifactGlob != null ) ++ { ++ copy.artifactGlob = (Artifact) this.artifactGlob.clone(); ++ } ++ ++ if ( this.files != null ) ++ { ++ copy.files = new java.util.ArrayList(); ++ copy.files.addAll( this.files ); ++ } ++ ++ if ( this.versions != null ) ++ { ++ copy.versions = new java.util.ArrayList(); ++ copy.versions.addAll( this.versions ); ++ } ++ ++ if ( this.aliases != null ) ++ { ++ copy.aliases = new java.util.ArrayList(); ++ for ( Artifact item : this.aliases ) ++ { ++ copy.aliases.add( ( (Artifact) item).clone() ); ++ } ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- PackagingRule clone() ++ ++ /** ++ * Method getAliases. ++ * ++ * @return List ++ */ ++ public java.util.List getAliases() ++ { ++ if ( this.aliases == null ) ++ { ++ this.aliases = new java.util.ArrayList(); ++ } ++ ++ return this.aliases; ++ } //-- java.util.List getAliases() ++ ++ /** ++ * Get pattern specifying one or more Maven artifacts. ++ * ++ * @return Artifact ++ */ ++ public Artifact getArtifactGlob() ++ { ++ return this.artifactGlob; ++ } //-- Artifact getArtifactGlob() ++ ++ /** ++ * Method getFiles. ++ * ++ * @return List ++ */ ++ public java.util.List getFiles() ++ { ++ if ( this.files == null ) ++ { ++ this.files = new java.util.ArrayList(); ++ } ++ ++ return this.files; ++ } //-- java.util.List getFiles() ++ ++ /** ++ * Get name of binary package into which artifacts are ++ * assigned. ++ * ++ * @return String ++ */ ++ public String getTargetPackage() ++ { ++ return this.targetPackage; ++ } //-- String getTargetPackage() ++ ++ /** ++ * Get iD of repository into which artifacts are installed. ++ * ++ * @return String ++ */ ++ public String getTargetRepository() ++ { ++ return this.targetRepository; ++ } //-- String getTargetRepository() ++ ++ /** ++ * Method getVersions. ++ * ++ * @return List ++ */ ++ public java.util.List getVersions() ++ { ++ if ( this.versions == null ) ++ { ++ this.versions = new java.util.ArrayList(); ++ } ++ ++ return this.versions; ++ } //-- java.util.List getVersions() ++ ++ /** ++ * Get whether any reactor artifact matches artifact glob ++ * pattern ++ * for this rule. Non-optional rules cause build ++ * failure if ++ * they are not matched. ++ * ++ * @return Boolean ++ */ ++ public Boolean isMatched() ++ { ++ return this.matched; ++ } //-- Boolean isMatched() ++ ++ /** ++ * Get whether this rule is optional. Non-optional rules cause ++ * build failure if they are not matched. ++ * ++ * @return Boolean ++ */ ++ public Boolean isOptional() ++ { ++ return this.optional; ++ } //-- Boolean isOptional() ++ ++ /** ++ * Method removeFile. ++ * ++ * @param string ++ */ ++ public void removeFile( String string ) ++ { ++ getFiles().remove( string ); ++ } //-- void removeFile( String ) ++ ++ /** ++ * Method removeVersion. ++ * ++ * @param string ++ */ ++ public void removeVersion( String string ) ++ { ++ getVersions().remove( string ); ++ } //-- void removeVersion( String ) ++ ++ /** ++ * Set alternative identifiers of artifacts. ++ * ++ * @param aliases ++ */ ++ public void setAliases( java.util.List aliases ) ++ { ++ this.aliases = aliases; ++ } //-- void setAliases( java.util.List ) ++ ++ /** ++ * Set pattern specifying one or more Maven artifacts. ++ * ++ * @param artifactGlob ++ */ ++ public void setArtifactGlob( Artifact artifactGlob ) ++ { ++ this.artifactGlob = artifactGlob; ++ } //-- void setArtifactGlob( Artifact ) ++ ++ /** ++ * Set files holding the artifact. ++ * ++ * @param files ++ */ ++ public void setFiles( java.util.List files ) ++ { ++ this.files = files; ++ } //-- void setFiles( java.util.List ) ++ ++ /** ++ * Set whether any reactor artifact matches artifact glob ++ * pattern ++ * for this rule. Non-optional rules cause build ++ * failure if ++ * they are not matched. ++ * ++ * @param matched ++ */ ++ public void setMatched( Boolean matched ) ++ { ++ this.matched = matched; ++ } //-- void setMatched( Boolean ) ++ ++ /** ++ * Set whether this rule is optional. Non-optional rules cause ++ * build failure if they are not matched. ++ * ++ * @param optional ++ */ ++ public void setOptional( Boolean optional ) ++ { ++ this.optional = optional; ++ } //-- void setOptional( Boolean ) ++ ++ /** ++ * Set name of binary package into which artifacts are ++ * assigned. ++ * ++ * @param targetPackage ++ */ ++ public void setTargetPackage( String targetPackage ) ++ { ++ this.targetPackage = targetPackage; ++ } //-- void setTargetPackage( String ) ++ ++ /** ++ * Set iD of repository into which artifacts are installed. ++ * ++ * @param targetRepository ++ */ ++ public void setTargetRepository( String targetRepository ) ++ { ++ this.targetRepository = targetRepository; ++ } //-- void setTargetRepository( String ) ++ ++ /** ++ * Set compatibility versions of the artifact. ++ * ++ * @param versions ++ */ ++ public void setVersions( java.util.List versions ) ++ { ++ this.versions = versions; ++ } //-- void setVersions( java.util.List ) ++ ++ ++ ++ /** ++ * Add an alias. ++ * @param artifact alias to be added ++ */ ++ public void addAlias( Artifact artifact ) ++ { ++ getAliases().add( artifact ); ++ } ++ ++ /** ++ * Remove an alias. ++ * @param artifact alias to be removed ++ */ ++ public void removeAlias( Artifact artifact ) ++ { ++ getAliases().remove( artifact ); ++ } ++ ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Repository.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Repository.java +new file mode 100644 +index 0000000..88a5374 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Repository.java +@@ -0,0 +1,308 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * Artifact repository. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class Repository ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Unique string identifying this repository. ++ */ ++ private String id; ++ ++ /** ++ * ++ * Role hint of Plexus component implementing the ++ * repository. ++ * ++ */ ++ private String type; ++ ++ /** ++ * Field stereotypes. ++ */ ++ private java.util.List stereotypes; ++ ++ /** ++ * Field properties. ++ */ ++ private java.util.Properties properties; ++ ++ /** ++ * ++ * Arbitrary XML used to configure structure of the ++ * repository. Configuration can be freely used by ++ * the ++ * implementation, so their exact meaning depends ++ * on ++ * repository type. See documentation for ++ * repository types ++ * to see the format of supported configuration (if ++ * any). ++ * ++ */ ++ private Object configuration; ++ ++ /** ++ * ++ * A boolean expression describing which artifacts ++ * can be ++ * stored in this repository. ++ * ++ */ ++ private Object filter; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addProperty. ++ * ++ * @param key ++ * @param value ++ */ ++ public void addProperty( String key, String value ) ++ { ++ getProperties().put( key, value ); ++ } //-- void addProperty( String, String ) ++ ++ /** ++ * Method addStereotype. ++ * ++ * @param stereotype ++ */ ++ public void addStereotype( Stereotype stereotype ) ++ { ++ getStereotypes().add( stereotype ); ++ } //-- void addStereotype( Stereotype ) ++ ++ /** ++ * Method clone. ++ * ++ * @return Repository ++ */ ++ public Repository clone() ++ { ++ try ++ { ++ Repository copy = (Repository) super.clone(); ++ ++ if ( this.stereotypes != null ) ++ { ++ copy.stereotypes = new java.util.ArrayList(); ++ for ( Stereotype item : this.stereotypes ) ++ { ++ copy.stereotypes.add( ( (Stereotype) item).clone() ); ++ } ++ } ++ ++ if ( this.properties != null ) ++ { ++ copy.properties = (java.util.Properties) this.properties.clone(); ++ } ++ ++ if ( this.configuration != null ) ++ { ++ copy.configuration = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.configuration ); ++ } ++ ++ if ( this.filter != null ) ++ { ++ copy.filter = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.filter ); ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- Repository clone() ++ ++ /** ++ * Get arbitrary XML used to configure structure of the ++ * repository. Configuration can be freely used by ++ * the ++ * implementation, so their exact meaning depends ++ * on ++ * repository type. See documentation for ++ * repository types ++ * to see the format of supported configuration (if ++ * any). ++ * ++ * @return Object ++ */ ++ public Object getConfiguration() ++ { ++ return this.configuration; ++ } //-- Object getConfiguration() ++ ++ /** ++ * Get a boolean expression describing which artifacts can be ++ * stored in this repository. ++ * ++ * @return Object ++ */ ++ public Object getFilter() ++ { ++ return this.filter; ++ } //-- Object getFilter() ++ ++ /** ++ * Get unique string identifying this repository. ++ * ++ * @return String ++ */ ++ public String getId() ++ { ++ return this.id; ++ } //-- String getId() ++ ++ /** ++ * Method getProperties. ++ * ++ * @return Properties ++ */ ++ public java.util.Properties getProperties() ++ { ++ if ( this.properties == null ) ++ { ++ this.properties = new java.util.Properties(); ++ } ++ ++ return this.properties; ++ } //-- java.util.Properties getProperties() ++ ++ /** ++ * Method getStereotypes. ++ * ++ * @return List ++ */ ++ public java.util.List getStereotypes() ++ { ++ if ( this.stereotypes == null ) ++ { ++ this.stereotypes = new java.util.ArrayList(); ++ } ++ ++ return this.stereotypes; ++ } //-- java.util.List getStereotypes() ++ ++ /** ++ * Get role hint of Plexus component implementing the ++ * repository. ++ * ++ * @return String ++ */ ++ public String getType() ++ { ++ return this.type; ++ } //-- String getType() ++ ++ /** ++ * Method removeStereotype. ++ * ++ * @param stereotype ++ */ ++ public void removeStereotype( Stereotype stereotype ) ++ { ++ getStereotypes().remove( stereotype ); ++ } //-- void removeStereotype( Stereotype ) ++ ++ /** ++ * Set arbitrary XML used to configure structure of the ++ * repository. Configuration can be freely used by ++ * the ++ * implementation, so their exact meaning depends ++ * on ++ * repository type. See documentation for ++ * repository types ++ * to see the format of supported configuration (if ++ * any). ++ * ++ * @param configuration ++ */ ++ public void setConfiguration( Object configuration ) ++ { ++ this.configuration = configuration; ++ } //-- void setConfiguration( Object ) ++ ++ /** ++ * Set a boolean expression describing which artifacts can be ++ * stored in this repository. ++ * ++ * @param filter ++ */ ++ public void setFilter( Object filter ) ++ { ++ this.filter = filter; ++ } //-- void setFilter( Object ) ++ ++ /** ++ * Set unique string identifying this repository. ++ * ++ * @param id ++ */ ++ public void setId( String id ) ++ { ++ this.id = id; ++ } //-- void setId( String ) ++ ++ /** ++ * Set properties associated with this repository. Properties ++ * can be freely used by the implementation, so ++ * their exact ++ * meaning depends on repository type. See ++ * documentation for ++ * repository types to see list of supported ++ * properties. ++ * ++ * @param properties ++ */ ++ public void setProperties( java.util.Properties properties ) ++ { ++ this.properties = properties; ++ } //-- void setProperties( java.util.Properties ) ++ ++ /** ++ * Set list of artifact types that can be stored in this ++ * repository. Empty list means that this ++ * repository can ++ * store any artifact type. ++ * ++ * @param stereotypes ++ */ ++ public void setStereotypes( java.util.List stereotypes ) ++ { ++ this.stereotypes = stereotypes; ++ } //-- void setStereotypes( java.util.List ) ++ ++ /** ++ * Set role hint of Plexus component implementing the ++ * repository. ++ * ++ * @param type ++ */ ++ public void setType( String type ) ++ { ++ this.type = type; ++ } //-- void setType( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/ResolverSettings.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/ResolverSettings.java +new file mode 100644 +index 0000000..5d99b74 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/ResolverSettings.java +@@ -0,0 +1,310 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * XMvn settings related to resolution of artifacts. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class ResolverSettings ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Whether detailed debugging information about ++ * artifact ++ * resolution process should be logged. ++ * ++ */ ++ private Boolean debug; ++ ++ /** ++ * Field localRepositories. ++ */ ++ private java.util.List localRepositories; ++ ++ /** ++ * Field metadataRepositories. ++ */ ++ private java.util.List metadataRepositories; ++ ++ /** ++ * Field prefixes. ++ */ ++ private java.util.List prefixes; ++ ++ /** ++ * Field blacklist. ++ */ ++ private java.util.List blacklist; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addBlacklist. ++ * ++ * @param artifact ++ */ ++ public void addBlacklist( Artifact artifact ) ++ { ++ getBlacklist().add( artifact ); ++ } //-- void addBlacklist( Artifact ) ++ ++ /** ++ * Method addLocalRepository. ++ * ++ * @param string ++ */ ++ public void addLocalRepository( String string ) ++ { ++ getLocalRepositories().add( string ); ++ } //-- void addLocalRepository( String ) ++ ++ /** ++ * Method addMetadataRepository. ++ * ++ * @param string ++ */ ++ public void addMetadataRepository( String string ) ++ { ++ getMetadataRepositories().add( string ); ++ } //-- void addMetadataRepository( String ) ++ ++ /** ++ * Method addPrefix. ++ * ++ * @param string ++ */ ++ public void addPrefix( String string ) ++ { ++ getPrefixes().add( string ); ++ } //-- void addPrefix( String ) ++ ++ /** ++ * Method clone. ++ * ++ * @return ResolverSettings ++ */ ++ public ResolverSettings clone() ++ { ++ try ++ { ++ ResolverSettings copy = (ResolverSettings) super.clone(); ++ ++ if ( this.localRepositories != null ) ++ { ++ copy.localRepositories = new java.util.ArrayList(); ++ copy.localRepositories.addAll( this.localRepositories ); ++ } ++ ++ if ( this.metadataRepositories != null ) ++ { ++ copy.metadataRepositories = new java.util.ArrayList(); ++ copy.metadataRepositories.addAll( this.metadataRepositories ); ++ } ++ ++ if ( this.prefixes != null ) ++ { ++ copy.prefixes = new java.util.ArrayList(); ++ copy.prefixes.addAll( this.prefixes ); ++ } ++ ++ if ( this.blacklist != null ) ++ { ++ copy.blacklist = new java.util.ArrayList(); ++ for ( Artifact item : this.blacklist ) ++ { ++ copy.blacklist.add( ( (Artifact) item).clone() ); ++ } ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- ResolverSettings clone() ++ ++ /** ++ * Method getBlacklist. ++ * ++ * @return List ++ */ ++ public java.util.List getBlacklist() ++ { ++ if ( this.blacklist == null ) ++ { ++ this.blacklist = new java.util.ArrayList(); ++ } ++ ++ return this.blacklist; ++ } //-- java.util.List getBlacklist() ++ ++ /** ++ * Method getLocalRepositories. ++ * ++ * @return List ++ */ ++ public java.util.List getLocalRepositories() ++ { ++ if ( this.localRepositories == null ) ++ { ++ this.localRepositories = new java.util.ArrayList(); ++ } ++ ++ return this.localRepositories; ++ } //-- java.util.List getLocalRepositories() ++ ++ /** ++ * Method getMetadataRepositories. ++ * ++ * @return List ++ */ ++ public java.util.List getMetadataRepositories() ++ { ++ if ( this.metadataRepositories == null ) ++ { ++ this.metadataRepositories = new java.util.ArrayList(); ++ } ++ ++ return this.metadataRepositories; ++ } //-- java.util.List getMetadataRepositories() ++ ++ /** ++ * Method getPrefixes. ++ * ++ * @return List ++ */ ++ public java.util.List getPrefixes() ++ { ++ if ( this.prefixes == null ) ++ { ++ this.prefixes = new java.util.ArrayList(); ++ } ++ ++ return this.prefixes; ++ } //-- java.util.List getPrefixes() ++ ++ /** ++ * Get whether detailed debugging information about artifact ++ * resolution process should be logged. ++ * ++ * @return Boolean ++ */ ++ public Boolean isDebug() ++ { ++ return this.debug; ++ } //-- Boolean isDebug() ++ ++ /** ++ * Method removeBlacklist. ++ * ++ * @param artifact ++ */ ++ public void removeBlacklist( Artifact artifact ) ++ { ++ getBlacklist().remove( artifact ); ++ } //-- void removeBlacklist( Artifact ) ++ ++ /** ++ * Method removeLocalRepository. ++ * ++ * @param string ++ */ ++ public void removeLocalRepository( String string ) ++ { ++ getLocalRepositories().remove( string ); ++ } //-- void removeLocalRepository( String ) ++ ++ /** ++ * Method removeMetadataRepository. ++ * ++ * @param string ++ */ ++ public void removeMetadataRepository( String string ) ++ { ++ getMetadataRepositories().remove( string ); ++ } //-- void removeMetadataRepository( String ) ++ ++ /** ++ * Method removePrefix. ++ * ++ * @param string ++ */ ++ public void removePrefix( String string ) ++ { ++ getPrefixes().remove( string ); ++ } //-- void removePrefix( String ) ++ ++ /** ++ * Set list of blacklisted artifacts which will not be ++ * resolved. ++ * ++ * @param blacklist ++ */ ++ public void setBlacklist( java.util.List blacklist ) ++ { ++ this.blacklist = blacklist; ++ } //-- void setBlacklist( java.util.List ) ++ ++ /** ++ * Set whether detailed debugging information about artifact ++ * resolution process should be logged. ++ * ++ * @param debug ++ */ ++ public void setDebug( Boolean debug ) ++ { ++ this.debug = debug; ++ } //-- void setDebug( Boolean ) ++ ++ /** ++ * Set list of local repositories where XMvn will look for ++ * artifacts. ++ * ++ * @param localRepositories ++ */ ++ public void setLocalRepositories( java.util.List localRepositories ) ++ { ++ this.localRepositories = localRepositories; ++ } //-- void setLocalRepositories( java.util.List ) ++ ++ /** ++ * Set list of repositories where XMvn will look for metadata ++ * files. ++ * ++ * @param metadataRepositories ++ */ ++ public void setMetadataRepositories( java.util.List metadataRepositories ) ++ { ++ this.metadataRepositories = metadataRepositories; ++ } //-- void setMetadataRepositories( java.util.List ) ++ ++ /** ++ * Set list of prefixes that XMvn resolver will prepend to ++ * system ++ * repositories. ++ * ++ * @param prefixes ++ */ ++ public void setPrefixes( java.util.List prefixes ) ++ { ++ this.prefixes = prefixes; ++ } //-- void setPrefixes( java.util.List ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Stereotype.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Stereotype.java +new file mode 100644 +index 0000000..0a1d79e +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/Stereotype.java +@@ -0,0 +1,122 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config; ++ ++/** ++ * Stereotype of Maven artifact. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class Stereotype ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Type ID of the stereotype. ++ */ ++ private String type; ++ ++ /** ++ * Extension of the artifact. ++ */ ++ private String extension; ++ ++ /** ++ * Classifier of the artifact. ++ */ ++ private String classifier; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return Stereotype ++ */ ++ public Stereotype clone() ++ { ++ try ++ { ++ Stereotype copy = (Stereotype) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- Stereotype clone() ++ ++ /** ++ * Get classifier of the artifact. ++ * ++ * @return String ++ */ ++ public String getClassifier() ++ { ++ return this.classifier; ++ } //-- String getClassifier() ++ ++ /** ++ * Get extension of the artifact. ++ * ++ * @return String ++ */ ++ public String getExtension() ++ { ++ return this.extension; ++ } //-- String getExtension() ++ ++ /** ++ * Get type ID of the stereotype. ++ * ++ * @return String ++ */ ++ public String getType() ++ { ++ return this.type; ++ } //-- String getType() ++ ++ /** ++ * Set classifier of the artifact. ++ * ++ * @param classifier ++ */ ++ public void setClassifier( String classifier ) ++ { ++ this.classifier = classifier; ++ } //-- void setClassifier( String ) ++ ++ /** ++ * Set extension of the artifact. ++ * ++ * @param extension ++ */ ++ public void setExtension( String extension ) ++ { ++ this.extension = extension; ++ } //-- void setExtension( String ) ++ ++ /** ++ * Set type ID of the stereotype. ++ * ++ * @param type ++ */ ++ public void setType( String type ) ++ { ++ this.type = type; ++ } //-- void setType( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxReader.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxReader.java +new file mode 100644 +index 0000000..1b52cab +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxReader.java +@@ -0,0 +1,1139 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config.io.stax; ++ ++ //---------------------------------/ ++ //- Imported classes and packages -/ ++//---------------------------------/ ++ ++import java.io.ByteArrayInputStream; ++import java.io.FileInputStream; ++import java.io.IOException; ++import java.io.InputStream; ++import java.io.InputStreamReader; ++import java.io.Reader; ++import java.io.StringReader; ++import java.io.StringWriter; ++import java.text.DateFormat; ++import java.text.ParsePosition; ++import java.util.Locale; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; ++import javax.xml.stream.*; ++import org.codehaus.plexus.util.xml.Xpp3Dom; ++import org.fedoraproject.xmvn.config.Artifact; ++import org.fedoraproject.xmvn.config.BuildSettings; ++import org.fedoraproject.xmvn.config.Configuration; ++import org.fedoraproject.xmvn.config.InstallerSettings; ++import org.fedoraproject.xmvn.config.PackagingRule; ++import org.fedoraproject.xmvn.config.Repository; ++import org.fedoraproject.xmvn.config.ResolverSettings; ++import org.fedoraproject.xmvn.config.Stereotype; ++ ++/** ++ * Class ConfigurationStaxReader. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class ConfigurationStaxReader ++{ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method read. ++ * ++ * @param reader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ public Configuration read( Reader reader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader( reader ); ++ ++ return read( xmlStreamReader, strict ); ++ } //-- Configuration read( Reader, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param reader ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ public Configuration read( Reader reader ) ++ throws IOException, XMLStreamException ++ { ++ return read( reader, true ); ++ } //-- Configuration read( Reader ) ++ ++ /** ++ * Method read. ++ * ++ * @param stream ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ public Configuration read( InputStream stream, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader( stream ); ++ ++ return read( xmlStreamReader, strict ); ++ } //-- Configuration read( InputStream, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param stream ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ public Configuration read( InputStream stream ) ++ throws IOException, XMLStreamException ++ { ++ return read( stream, true ); ++ } //-- Configuration read( InputStream ) ++ ++ /** ++ * Method read. ++ * ++ * @param filePath ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ public Configuration read( String filePath, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ java.io.File file = new java.io.File( filePath ); ++ XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader( file.toURI().toURL().toExternalForm(), new FileInputStream( file ) ); ++ ++ return read( xmlStreamReader, strict ); ++ } //-- Configuration read( String, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param filePath ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ public Configuration read( String filePath ) ++ throws IOException, XMLStreamException ++ { ++ return read( filePath, true ); ++ } //-- Configuration read( String ) ++ ++ /** ++ * Method buildDom. ++ * ++ * @param xmlStreamReader ++ * @param trim ++ * @throws XMLStreamException ++ * @return Xpp3Dom ++ */ ++ private Xpp3Dom buildDom( XMLStreamReader xmlStreamReader, boolean trim ) ++ throws XMLStreamException ++ { ++ java.util.Stack elements = new java.util.Stack(); ++ java.util.Stack values = new java.util.Stack(); ++ int eventType = xmlStreamReader.getEventType(); ++ boolean spacePreserve = false; ++ while ( xmlStreamReader.hasNext() ) ++ { ++ if ( eventType == XMLStreamConstants.START_ELEMENT ) ++ { ++ spacePreserve = false; ++ String rawName = xmlStreamReader.getLocalName(); ++ Xpp3Dom element = new Xpp3Dom( rawName ); ++ if ( !elements.empty() ) ++ { ++ Xpp3Dom parent = (Xpp3Dom) elements.peek(); ++ parent.addChild( element ); ++ } ++ elements.push( element ); ++ if ( xmlStreamReader.isEndElement() ) ++ { ++ values.push( null ); ++ } ++ else ++ { ++ values.push( new StringBuffer() ); ++ } ++ int attributesSize = xmlStreamReader.getAttributeCount(); ++ for ( int i = 0; i < attributesSize; i++ ) ++ { ++ String name = xmlStreamReader.getAttributeLocalName( i ); ++ String value = xmlStreamReader.getAttributeValue( i ); ++ element.setAttribute( name, value ); ++ spacePreserve = spacePreserve || ( "xml".equals( xmlStreamReader.getAttributePrefix( i ) ) && "space".equals( name ) && "preserve".equals( value ) ); ++ } ++ } ++ else if ( eventType == XMLStreamConstants.CHARACTERS ) ++ { ++ StringBuffer valueBuffer = (StringBuffer) values.peek(); ++ String text = xmlStreamReader.getText(); ++ if ( trim && !spacePreserve ) ++ { ++ text = text.trim(); ++ } ++ valueBuffer.append( text ); ++ } ++ else if ( eventType == XMLStreamConstants.END_ELEMENT ) ++ { ++ Xpp3Dom element = (Xpp3Dom) elements.pop(); ++ // this Object could be null if it is a singleton tag ++ Object accumulatedValue = values.pop(); ++ if ( element.getChildCount() == 0 ) ++ { ++ element.setValue( ( accumulatedValue == null ) ? null : accumulatedValue.toString() ); ++ } ++ if ( values.empty() ) ++ { ++ return element; ++ } ++ } ++ eventType = xmlStreamReader.next(); ++ } ++ throw new IllegalStateException( "End of document found before returning to 0 depth" ); ++ } //-- Xpp3Dom buildDom( XMLStreamReader, boolean ) ++ ++ /** ++ * Method checkFieldWithDuplicate. ++ * ++ * @param xmlStreamReader ++ * @param parsed ++ * @param alias ++ * @param tagName ++ * @throws XMLStreamException ++ * @return boolean ++ */ ++ private boolean checkFieldWithDuplicate( XMLStreamReader xmlStreamReader, String tagName, String alias, java.util.Set parsed ) ++ throws XMLStreamException ++ { ++ if ( !( xmlStreamReader.getLocalName().equals( tagName ) || xmlStreamReader.getLocalName().equals( alias ) ) ) ++ { ++ return false; ++ } ++ if ( !parsed.add( tagName ) ) ++ { ++ throw new XMLStreamException( "Duplicated tag: '" + tagName + "'", xmlStreamReader.getLocation() ); ++ } ++ return true; ++ } //-- boolean checkFieldWithDuplicate( XMLStreamReader, String, String, java.util.Set ) ++ ++ /** ++ * Method checkUnknownElement. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws XMLStreamException ++ */ ++ private void checkUnknownElement( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ int unrecognizedTagCount = 1; ++ while( unrecognizedTagCount != 0 ) ++ { ++ xmlStreamReader.next(); ++ if ( xmlStreamReader.getEventType() == XMLStreamConstants.START_ELEMENT ) ++ { ++ unrecognizedTagCount++; ++ } ++ else if ( xmlStreamReader.getEventType() == XMLStreamConstants.END_ELEMENT ) ++ { ++ unrecognizedTagCount--; ++ } ++ } ++ } //-- void checkUnknownElement( XMLStreamReader, boolean ) ++ ++ /** ++ * Method getBooleanValue. ++ * ++ * @param s ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return boolean ++ */ ++ private boolean getBooleanValue( String s, String attribute, XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ return Boolean.valueOf( s ).booleanValue(); ++ } ++ return false; ++ } //-- boolean getBooleanValue( String, String, XMLStreamReader ) ++ ++ /** ++ * Method getByteValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return byte ++ */ ++ private byte getByteValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Byte.valueOf( s ).byteValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a byte but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- byte getByteValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getCharacterValue. ++ * ++ * @param s ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return char ++ */ ++ private char getCharacterValue( String s, String attribute, XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ return s.charAt( 0 ); ++ } ++ return 0; ++ } //-- char getCharacterValue( String, String, XMLStreamReader ) ++ ++ /** ++ * Method getDateValue. ++ * ++ * @param s ++ * @param xmlStreamReader ++ * @param dateFormat ++ * @param attribute ++ * @throws XMLStreamException ++ * @return Date ++ */ ++ private java.util.Date getDateValue( String s, String attribute, String dateFormat, XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ String effectiveDateFormat = dateFormat; ++ if ( dateFormat == null ) ++ { ++ effectiveDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS"; ++ } ++ if ( "long".equals( effectiveDateFormat ) ) ++ { ++ try ++ { ++ return new java.util.Date( Long.parseLong( s ) ); ++ } ++ catch ( NumberFormatException e ) ++ { ++ throw new XMLStreamException( e.getMessage(), xmlStreamReader.getLocation(), e ); ++ } ++ } ++ else ++ { ++ try ++ { ++ DateFormat dateParser = new java.text.SimpleDateFormat( effectiveDateFormat, java.util.Locale.US ); ++ return dateParser.parse( s ); ++ } ++ catch ( java.text.ParseException e ) ++ { ++ throw new XMLStreamException( e.getMessage(), xmlStreamReader.getLocation(), e ); ++ } ++ } ++ } ++ return null; ++ } //-- java.util.Date getDateValue( String, String, String, XMLStreamReader ) ++ ++ /** ++ * Method getDefaultValue. ++ * ++ * @param s ++ * @param v ++ * @return String ++ */ ++ private String getDefaultValue( String s, String v ) ++ { ++ if ( s == null ) ++ { ++ s = v; ++ } ++ return s; ++ } //-- String getDefaultValue( String, String ) ++ ++ /** ++ * Method getDoubleValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return double ++ */ ++ private double getDoubleValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Double.valueOf( s ).doubleValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a floating point number but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- double getDoubleValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getFloatValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return float ++ */ ++ private float getFloatValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Float.valueOf( s ).floatValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a floating point number but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- float getFloatValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getIntegerValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return int ++ */ ++ private int getIntegerValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Integer.valueOf( s ).intValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be an integer but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- int getIntegerValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getLongValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return long ++ */ ++ private long getLongValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Long.valueOf( s ).longValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a long integer but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- long getLongValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getRequiredAttributeValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return String ++ */ ++ private String getRequiredAttributeValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s == null ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Missing required value for attribute '" + attribute + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ return s; ++ } //-- String getRequiredAttributeValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getShortValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return short ++ */ ++ private short getShortValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Short.valueOf( s ).shortValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a short integer but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- short getShortValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getTrimmedValue. ++ * ++ * @param s ++ * @return String ++ */ ++ private String getTrimmedValue( String s ) ++ { ++ if ( s != null ) ++ { ++ s = s.trim(); ++ } ++ return s; ++ } //-- String getTrimmedValue( String ) ++ ++ /** ++ * Method nextTag. ++ * ++ * @param xmlStreamReader ++ * @throws XMLStreamException ++ * @return int ++ */ ++ private int nextTag( XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ while ( true ) ++ { ++ int eventType = xmlStreamReader.next(); ++ switch ( eventType ) ++ { ++ case XMLStreamConstants.CHARACTERS: ++ case XMLStreamConstants.CDATA: ++ case XMLStreamConstants.SPACE: ++ case XMLStreamConstants.PROCESSING_INSTRUCTION: ++ case XMLStreamConstants.COMMENT: ++ break; ++ case XMLStreamConstants.START_ELEMENT: ++ case XMLStreamConstants.END_ELEMENT: ++ return eventType; ++ default: ++ throw new XMLStreamException( "expected start or end tag", xmlStreamReader.getLocation() ); ++ } ++ } ++ } //-- int nextTag( XMLStreamReader ) ++ ++ /** ++ * Method parseArtifact. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Artifact ++ */ ++ private Artifact parseArtifact( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ Artifact artifact = new Artifact(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "groupId", null, parsed ) ) ++ { ++ artifact.setGroupId( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactId", null, parsed ) ) ++ { ++ artifact.setArtifactId( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "version", null, parsed ) ) ++ { ++ artifact.setVersion( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "classifier", null, parsed ) ) ++ { ++ artifact.setClassifier( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "stereotype", null, parsed ) ) ++ { ++ artifact.setStereotype( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "extension", null, parsed ) ) ++ { ++ artifact.setExtension( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return artifact; ++ } //-- Artifact parseArtifact( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseBuildSettings. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return BuildSettings ++ */ ++ private BuildSettings parseBuildSettings( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ BuildSettings buildSettings = new BuildSettings(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "debug", null, parsed ) ) ++ { ++ buildSettings.setDebug( getBooleanValue( getTrimmedValue( xmlStreamReader.getElementText() ), "debug", xmlStreamReader ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "skipTests", null, parsed ) ) ++ { ++ buildSettings.setSkipTests( getBooleanValue( getTrimmedValue( xmlStreamReader.getElementText() ), "skipTests", xmlStreamReader ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "compilerSource", null, parsed ) ) ++ { ++ buildSettings.setCompilerSource( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return buildSettings; ++ } //-- BuildSettings parseBuildSettings( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseConfiguration. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ private Configuration parseConfiguration( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ Configuration configuration = new Configuration(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "properties", null, parsed ) ) ++ { ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ String key = xmlStreamReader.getLocalName(); ++ String value = xmlStreamReader.getElementText().trim(); ++ configuration.addProperty( key, value ); ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "repositories", null, parsed ) ) ++ { ++ java.util.List repositories = new java.util.ArrayList/**/(); ++ configuration.setRepositories( repositories ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "repository".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ configuration.addRepository( parseRepository( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "buildSettings", null, parsed ) ) ++ { ++ configuration.setBuildSettings( parseBuildSettings( xmlStreamReader, strict ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactManagement", null, parsed ) ) ++ { ++ java.util.List artifactManagement = new java.util.ArrayList/**/(); ++ configuration.setArtifactManagement( artifactManagement ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "rule".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ configuration.addArtifactManagement( parsePackagingRule( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "resolverSettings", null, parsed ) ) ++ { ++ configuration.setResolverSettings( parseResolverSettings( xmlStreamReader, strict ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "installerSettings", null, parsed ) ) ++ { ++ configuration.setInstallerSettings( parseInstallerSettings( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return configuration; ++ } //-- Configuration parseConfiguration( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseInstallerSettings. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return InstallerSettings ++ */ ++ private InstallerSettings parseInstallerSettings( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ InstallerSettings installerSettings = new InstallerSettings(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "debug", null, parsed ) ) ++ { ++ installerSettings.setDebug( getBooleanValue( getTrimmedValue( xmlStreamReader.getElementText() ), "debug", xmlStreamReader ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "metadataDir", null, parsed ) ) ++ { ++ installerSettings.setMetadataDir( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return installerSettings; ++ } //-- InstallerSettings parseInstallerSettings( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parsePackagingRule. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackagingRule ++ */ ++ private PackagingRule parsePackagingRule( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ PackagingRule packagingRule = new PackagingRule(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "artifactGlob", null, parsed ) ) ++ { ++ packagingRule.setArtifactGlob( parseArtifact( xmlStreamReader, strict ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "targetPackage", null, parsed ) ) ++ { ++ packagingRule.setTargetPackage( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "targetRepository", null, parsed ) ) ++ { ++ packagingRule.setTargetRepository( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "files", null, parsed ) ) ++ { ++ java.util.List files = new java.util.ArrayList/**/(); ++ packagingRule.setFiles( files ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "file".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ files.add( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "new java.util.ArrayList/**/()" ) ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "versions", null, parsed ) ) ++ { ++ java.util.List versions = new java.util.ArrayList/**/(); ++ packagingRule.setVersions( versions ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "version".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ versions.add( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "new java.util.ArrayList/**/()" ) ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "aliases", null, parsed ) ) ++ { ++ java.util.List aliases = new java.util.ArrayList/**/(); ++ packagingRule.setAliases( aliases ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "alias".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ aliases.add( parseArtifact( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "optional", null, parsed ) ) ++ { ++ packagingRule.setOptional( getBooleanValue( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "false" ) ), "optional", xmlStreamReader ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return packagingRule; ++ } //-- PackagingRule parsePackagingRule( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseRepository. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Repository ++ */ ++ private Repository parseRepository( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ Repository repository = new Repository(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "id", null, parsed ) ) ++ { ++ repository.setId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "type", null, parsed ) ) ++ { ++ repository.setType( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "stereotypes", null, parsed ) ) ++ { ++ java.util.List stereotypes = new java.util.ArrayList/**/(); ++ repository.setStereotypes( stereotypes ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "stereotype".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ repository.addStereotype( parseStereotype( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "properties", null, parsed ) ) ++ { ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ String key = xmlStreamReader.getLocalName(); ++ String value = xmlStreamReader.getElementText().trim(); ++ repository.addProperty( key, value ); ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "configuration", null, parsed ) ) ++ { ++ repository.setConfiguration( buildDom( xmlStreamReader, true ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "filter", null, parsed ) ) ++ { ++ repository.setFilter( buildDom( xmlStreamReader, true ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return repository; ++ } //-- Repository parseRepository( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseResolverSettings. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return ResolverSettings ++ */ ++ private ResolverSettings parseResolverSettings( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ ResolverSettings resolverSettings = new ResolverSettings(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "debug", null, parsed ) ) ++ { ++ resolverSettings.setDebug( getBooleanValue( getTrimmedValue( xmlStreamReader.getElementText() ), "debug", xmlStreamReader ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "localRepositories", null, parsed ) ) ++ { ++ java.util.List localRepositories = new java.util.ArrayList/**/(); ++ resolverSettings.setLocalRepositories( localRepositories ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "repository".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ localRepositories.add( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "new java.util.ArrayList/**/()" ) ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "metadataRepositories", null, parsed ) ) ++ { ++ java.util.List metadataRepositories = new java.util.ArrayList/**/(); ++ resolverSettings.setMetadataRepositories( metadataRepositories ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "repository".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ metadataRepositories.add( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "new java.util.ArrayList/**/()" ) ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "prefixes", null, parsed ) ) ++ { ++ java.util.List prefixes = new java.util.ArrayList/**/(); ++ resolverSettings.setPrefixes( prefixes ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "prefix".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ prefixes.add( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "new java.util.ArrayList/**/()" ) ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "blacklist", null, parsed ) ) ++ { ++ java.util.List blacklist = new java.util.ArrayList/**/(); ++ resolverSettings.setBlacklist( blacklist ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "artifact".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ resolverSettings.addBlacklist( parseArtifact( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return resolverSettings; ++ } //-- ResolverSettings parseResolverSettings( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseStereotype. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Stereotype ++ */ ++ private Stereotype parseStereotype( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ Stereotype stereotype = new Stereotype(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "type", null, parsed ) ) ++ { ++ stereotype.setType( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "extension", null, parsed ) ) ++ { ++ stereotype.setExtension( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "classifier", null, parsed ) ) ++ { ++ stereotype.setClassifier( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return stereotype; ++ } //-- Stereotype parseStereotype( XMLStreamReader, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Configuration ++ */ ++ private Configuration read( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ int eventType = xmlStreamReader.getEventType(); ++ String encoding = null; ++ while ( eventType != XMLStreamConstants.END_DOCUMENT ) ++ { ++ if ( eventType == XMLStreamConstants.START_DOCUMENT ) ++ { ++ encoding = xmlStreamReader.getCharacterEncodingScheme(); ++ } ++ if ( eventType == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( strict && ! "configuration".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ throw new XMLStreamException( "Expected root element 'configuration' but found '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation(), null ); ++ } ++ Configuration configuration = parseConfiguration( xmlStreamReader, strict ); ++ configuration.setModelEncoding( encoding ); ++ resolveReferences( configuration ); ++ return configuration; ++ } ++ eventType = xmlStreamReader.next(); ++ } ++ throw new XMLStreamException( "Expected root element 'configuration' but found no element at all: invalid XML document", xmlStreamReader.getLocation(), null ); ++ } //-- Configuration read( XMLStreamReader, boolean ) ++ ++ /** ++ * Method resolveReferences. ++ * ++ * @param value ++ */ ++ private void resolveReferences( Configuration value ) ++ { ++ java.util.Map refs; ++ } //-- void resolveReferences( Configuration ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxWriter.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxWriter.java +new file mode 100644 +index 0000000..9f870f9 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/ConfigurationStaxWriter.java +@@ -0,0 +1,597 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config.io.stax; ++ ++ //---------------------------------/ ++ //- Imported classes and packages -/ ++//---------------------------------/ ++ ++import java.io.IOException; ++import java.io.OutputStream; ++import java.io.StringWriter; ++import java.io.Writer; ++import java.text.DateFormat; ++import java.util.Iterator; ++import java.util.Locale; ++import java.util.jar.Manifest; ++import javax.xml.stream.*; ++import org.codehaus.plexus.util.xml.Xpp3Dom; ++import org.fedoraproject.xmvn.config.Artifact; ++import org.fedoraproject.xmvn.config.BuildSettings; ++import org.fedoraproject.xmvn.config.Configuration; ++import org.fedoraproject.xmvn.config.InstallerSettings; ++import org.fedoraproject.xmvn.config.PackagingRule; ++import org.fedoraproject.xmvn.config.Repository; ++import org.fedoraproject.xmvn.config.ResolverSettings; ++import org.fedoraproject.xmvn.config.Stereotype; ++ ++/** ++ * Class ConfigurationStaxWriter. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class ConfigurationStaxWriter ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Field curId. ++ */ ++ private int curId; ++ ++ /** ++ * Field idMap. ++ */ ++ private java.util.Map idMap; ++ ++ ++ //----------------/ ++ //- Constructors -/ ++ //----------------/ ++ ++ public ConfigurationStaxWriter() ++ { ++ idMap = new java.util.HashMap(); ++ } //-- org.fedoraproject.xmvn.config.io.stax.ConfigurationStaxWriter() ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method write. ++ * ++ * @param writer ++ * @param configuration ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ public void write( Writer writer, Configuration configuration ) ++ throws java.io.IOException, XMLStreamException ++ { ++ XMLOutputFactory factory = XMLOutputFactory.newInstance(); ++ boolean supportWindowsLineEndings = false; ++ if ( factory.isPropertySupported( "com.ctc.wstx.outputEscapeCr" ) ) ++ { ++ factory.setProperty( "com.ctc.wstx.outputEscapeCr", Boolean.FALSE ); ++ supportWindowsLineEndings = true; ++ } ++ if ( factory.isPropertySupported( "org.codehaus.stax2.automaticEmptyElements" ) ) ++ { ++ factory.setProperty( "org.codehaus.stax2.automaticEmptyElements", Boolean.FALSE ); ++ } ++ IndentingXMLStreamWriter serializer = new IndentingXMLStreamWriter( factory.createXMLStreamWriter( writer ) ); ++ if ( supportWindowsLineEndings ) ++ { ++ serializer.setNewLine( serializer.getLineSeparator() ); ++ } ++ serializer.writeStartDocument( configuration.getModelEncoding(), "1.0" ); ++ writeConfiguration( configuration, "configuration", serializer ); ++ serializer.writeEndDocument(); ++ } //-- void write( Writer, Configuration ) ++ ++ /** ++ * Method write. ++ * ++ * @param stream ++ * @param configuration ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ public void write( OutputStream stream, Configuration configuration ) ++ throws java.io.IOException, XMLStreamException ++ { ++ XMLOutputFactory factory = XMLOutputFactory.newInstance(); ++ boolean supportWindowsLineEndings = false; ++ if ( factory.isPropertySupported( "com.ctc.wstx.outputEscapeCr" ) ) ++ { ++ factory.setProperty( "com.ctc.wstx.outputEscapeCr", Boolean.FALSE ); ++ supportWindowsLineEndings = true; ++ } ++ if ( factory.isPropertySupported( "org.codehaus.stax2.automaticEmptyElements" ) ) ++ { ++ factory.setProperty( "org.codehaus.stax2.automaticEmptyElements", Boolean.FALSE ); ++ } ++ IndentingXMLStreamWriter serializer = new IndentingXMLStreamWriter( factory.createXMLStreamWriter( stream, configuration.getModelEncoding() ) ); ++ if ( supportWindowsLineEndings ) ++ { ++ serializer.setNewLine( serializer.getLineSeparator() ); ++ } ++ serializer.writeStartDocument( configuration.getModelEncoding(), "1.0" ); ++ writeConfiguration( configuration, "configuration", serializer ); ++ serializer.writeEndDocument(); ++ } //-- void write( OutputStream, Configuration ) ++ ++ /** ++ * Method writeArtifact. ++ * ++ * @param artifact ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeArtifact( Artifact artifact, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( artifact != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( ( artifact.getGroupId() != null ) && !artifact.getGroupId().equals( "" ) ) ++ { ++ serializer.writeStartElement( "groupId" ); ++ serializer.writeCharacters( artifact.getGroupId() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifact.getArtifactId() != null ) && !artifact.getArtifactId().equals( "" ) ) ++ { ++ serializer.writeStartElement( "artifactId" ); ++ serializer.writeCharacters( artifact.getArtifactId() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifact.getVersion() != null ) && !artifact.getVersion().equals( "" ) ) ++ { ++ serializer.writeStartElement( "version" ); ++ serializer.writeCharacters( artifact.getVersion() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifact.getClassifier() != null ) && !artifact.getClassifier().equals( "" ) ) ++ { ++ serializer.writeStartElement( "classifier" ); ++ serializer.writeCharacters( artifact.getClassifier() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifact.getStereotype() != null ) && !artifact.getStereotype().equals( "" ) ) ++ { ++ serializer.writeStartElement( "stereotype" ); ++ serializer.writeCharacters( artifact.getStereotype() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifact.getExtension() != null ) && !artifact.getExtension().equals( "" ) ) ++ { ++ serializer.writeStartElement( "extension" ); ++ serializer.writeCharacters( artifact.getExtension() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeArtifact( Artifact, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeBuildSettings. ++ * ++ * @param buildSettings ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeBuildSettings( BuildSettings buildSettings, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( buildSettings != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( buildSettings.isDebug() != null ) ++ { ++ serializer.writeStartElement( "debug" ); ++ serializer.writeCharacters( String.valueOf( buildSettings.isDebug() ) ); ++ serializer.writeEndElement(); ++ } ++ if ( buildSettings.isSkipTests() != null ) ++ { ++ serializer.writeStartElement( "skipTests" ); ++ serializer.writeCharacters( String.valueOf( buildSettings.isSkipTests() ) ); ++ serializer.writeEndElement(); ++ } ++ if ( buildSettings.getCompilerSource() != null ) ++ { ++ serializer.writeStartElement( "compilerSource" ); ++ serializer.writeCharacters( buildSettings.getCompilerSource() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeBuildSettings( BuildSettings, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeConfiguration. ++ * ++ * @param configuration ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeConfiguration( Configuration configuration, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( configuration != null ) ++ { ++ serializer.setDefaultNamespace( "http://fedorahosted.org/xmvn/CONFIG/2.0.0" ); ++ serializer.writeStartElement( tagName ); ++ serializer.writeDefaultNamespace( "http://fedorahosted.org/xmvn/CONFIG/2.0.0" ); ++ if ( ( configuration.getProperties() != null ) && ( configuration.getProperties().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "properties" ); ++ for ( Iterator iter = configuration.getProperties().keySet().iterator(); iter.hasNext(); ) ++ { ++ String key = (String) iter.next(); ++ String value = (String) configuration.getProperties().get( key ); ++ serializer.writeStartElement( "" + key + "" ); ++ serializer.writeCharacters( value ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( configuration.getRepositories() != null ) && ( configuration.getRepositories().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "repositories" ); ++ for ( Iterator iter = configuration.getRepositories().iterator(); iter.hasNext(); ) ++ { ++ Repository o = (Repository) iter.next(); ++ writeRepository( o, "repository", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( configuration.getBuildSettings() != null ) ++ { ++ writeBuildSettings( (BuildSettings) configuration.getBuildSettings(), "buildSettings", serializer ); ++ } ++ if ( ( configuration.getArtifactManagement() != null ) && ( configuration.getArtifactManagement().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "artifactManagement" ); ++ for ( Iterator iter = configuration.getArtifactManagement().iterator(); iter.hasNext(); ) ++ { ++ PackagingRule o = (PackagingRule) iter.next(); ++ writePackagingRule( o, "rule", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( configuration.getResolverSettings() != null ) ++ { ++ writeResolverSettings( (ResolverSettings) configuration.getResolverSettings(), "resolverSettings", serializer ); ++ } ++ if ( configuration.getInstallerSettings() != null ) ++ { ++ writeInstallerSettings( (InstallerSettings) configuration.getInstallerSettings(), "installerSettings", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeConfiguration( Configuration, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeDom. ++ * ++ * @param dom ++ * @param serializer ++ * @throws XMLStreamException ++ */ ++ private void writeDom( Xpp3Dom dom, XMLStreamWriter serializer ) ++ throws XMLStreamException ++ { ++ serializer.writeStartElement( dom.getName() ); ++ String[] attributeNames = dom.getAttributeNames(); ++ for ( int i = 0; i < attributeNames.length; i++ ) ++ { ++ String attributeName = attributeNames[i]; ++ serializer.writeAttribute( attributeName, dom.getAttribute( attributeName ) ); ++ } ++ Xpp3Dom[] children = dom.getChildren(); ++ for ( int i = 0; i < children.length; i++ ) ++ { ++ writeDom( children[i], serializer ); ++ } ++ String value = dom.getValue(); ++ if ( value != null ) ++ { ++ serializer.writeCharacters( value ); ++ } ++ serializer.writeEndElement(); ++ } //-- void writeDom( Xpp3Dom, XMLStreamWriter ) ++ ++ /** ++ * Method writeInstallerSettings. ++ * ++ * @param installerSettings ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeInstallerSettings( InstallerSettings installerSettings, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( installerSettings != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( installerSettings.isDebug() != null ) ++ { ++ serializer.writeStartElement( "debug" ); ++ serializer.writeCharacters( String.valueOf( installerSettings.isDebug() ) ); ++ serializer.writeEndElement(); ++ } ++ if ( installerSettings.getMetadataDir() != null ) ++ { ++ serializer.writeStartElement( "metadataDir" ); ++ serializer.writeCharacters( installerSettings.getMetadataDir() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeInstallerSettings( InstallerSettings, String, XMLStreamWriter ) ++ ++ /** ++ * Method writePackagingRule. ++ * ++ * @param packagingRule ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writePackagingRule( PackagingRule packagingRule, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( packagingRule != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( packagingRule.getArtifactGlob() != null ) ++ { ++ writeArtifact( (Artifact) packagingRule.getArtifactGlob(), "artifactGlob", serializer ); ++ } ++ if ( packagingRule.getTargetPackage() != null ) ++ { ++ serializer.writeStartElement( "targetPackage" ); ++ serializer.writeCharacters( packagingRule.getTargetPackage() ); ++ serializer.writeEndElement(); ++ } ++ if ( packagingRule.getTargetRepository() != null ) ++ { ++ serializer.writeStartElement( "targetRepository" ); ++ serializer.writeCharacters( packagingRule.getTargetRepository() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( packagingRule.getFiles() != null ) && ( packagingRule.getFiles().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "files" ); ++ for ( Iterator iter = packagingRule.getFiles().iterator(); iter.hasNext(); ) ++ { ++ String file = (String) iter.next(); ++ serializer.writeStartElement( "file" ); ++ serializer.writeCharacters( file ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( packagingRule.getVersions() != null ) && ( packagingRule.getVersions().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "versions" ); ++ for ( Iterator iter = packagingRule.getVersions().iterator(); iter.hasNext(); ) ++ { ++ String version = (String) iter.next(); ++ serializer.writeStartElement( "version" ); ++ serializer.writeCharacters( version ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( packagingRule.getAliases() != null ) && ( packagingRule.getAliases().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "aliases" ); ++ for ( Iterator iter = packagingRule.getAliases().iterator(); iter.hasNext(); ) ++ { ++ Artifact o = (Artifact) iter.next(); ++ writeArtifact( o, "alias", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( packagingRule.isOptional() != null ) ++ { ++ serializer.writeStartElement( "optional" ); ++ serializer.writeCharacters( String.valueOf( packagingRule.isOptional() ) ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writePackagingRule( PackagingRule, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeRepository. ++ * ++ * @param repository ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeRepository( Repository repository, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( repository != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( repository.getId() != null ) ++ { ++ serializer.writeStartElement( "id" ); ++ serializer.writeCharacters( repository.getId() ); ++ serializer.writeEndElement(); ++ } ++ if ( repository.getType() != null ) ++ { ++ serializer.writeStartElement( "type" ); ++ serializer.writeCharacters( repository.getType() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( repository.getStereotypes() != null ) && ( repository.getStereotypes().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "stereotypes" ); ++ for ( Iterator iter = repository.getStereotypes().iterator(); iter.hasNext(); ) ++ { ++ Stereotype o = (Stereotype) iter.next(); ++ writeStereotype( o, "stereotype", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( repository.getProperties() != null ) && ( repository.getProperties().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "properties" ); ++ for ( Iterator iter = repository.getProperties().keySet().iterator(); iter.hasNext(); ) ++ { ++ String key = (String) iter.next(); ++ String value = (String) repository.getProperties().get( key ); ++ serializer.writeStartElement( "" + key + "" ); ++ serializer.writeCharacters( value ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( repository.getConfiguration() != null ) ++ { ++ writeDom( (Xpp3Dom) repository.getConfiguration(), serializer ); ++ } ++ if ( repository.getFilter() != null ) ++ { ++ writeDom( (Xpp3Dom) repository.getFilter(), serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeRepository( Repository, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeResolverSettings. ++ * ++ * @param resolverSettings ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeResolverSettings( ResolverSettings resolverSettings, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( resolverSettings != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( resolverSettings.isDebug() != null ) ++ { ++ serializer.writeStartElement( "debug" ); ++ serializer.writeCharacters( String.valueOf( resolverSettings.isDebug() ) ); ++ serializer.writeEndElement(); ++ } ++ if ( ( resolverSettings.getLocalRepositories() != null ) && ( resolverSettings.getLocalRepositories().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "localRepositories" ); ++ for ( Iterator iter = resolverSettings.getLocalRepositories().iterator(); iter.hasNext(); ) ++ { ++ String localRepository = (String) iter.next(); ++ serializer.writeStartElement( "repository" ); ++ serializer.writeCharacters( localRepository ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( resolverSettings.getMetadataRepositories() != null ) && ( resolverSettings.getMetadataRepositories().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "metadataRepositories" ); ++ for ( Iterator iter = resolverSettings.getMetadataRepositories().iterator(); iter.hasNext(); ) ++ { ++ String metadataRepository = (String) iter.next(); ++ serializer.writeStartElement( "repository" ); ++ serializer.writeCharacters( metadataRepository ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( resolverSettings.getPrefixes() != null ) && ( resolverSettings.getPrefixes().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "prefixes" ); ++ for ( Iterator iter = resolverSettings.getPrefixes().iterator(); iter.hasNext(); ) ++ { ++ String prefix = (String) iter.next(); ++ serializer.writeStartElement( "prefix" ); ++ serializer.writeCharacters( prefix ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( resolverSettings.getBlacklist() != null ) && ( resolverSettings.getBlacklist().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "blacklist" ); ++ for ( Iterator iter = resolverSettings.getBlacklist().iterator(); iter.hasNext(); ) ++ { ++ Artifact o = (Artifact) iter.next(); ++ writeArtifact( o, "artifact", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeResolverSettings( ResolverSettings, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeStereotype. ++ * ++ * @param stereotype ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeStereotype( Stereotype stereotype, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( stereotype != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( stereotype.getType() != null ) ++ { ++ serializer.writeStartElement( "type" ); ++ serializer.writeCharacters( stereotype.getType() ); ++ serializer.writeEndElement(); ++ } ++ if ( stereotype.getExtension() != null ) ++ { ++ serializer.writeStartElement( "extension" ); ++ serializer.writeCharacters( stereotype.getExtension() ); ++ serializer.writeEndElement(); ++ } ++ if ( stereotype.getClassifier() != null ) ++ { ++ serializer.writeStartElement( "classifier" ); ++ serializer.writeCharacters( stereotype.getClassifier() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeStereotype( Stereotype, String, XMLStreamWriter ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/IndentingXMLStreamWriter.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/IndentingXMLStreamWriter.java +new file mode 100644 +index 0000000..5fd340e +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/config/io/stax/IndentingXMLStreamWriter.java +@@ -0,0 +1,653 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.config.io.stax; ++ ++ //---------------------------------/ ++ //- Imported classes and packages -/ ++//---------------------------------/ ++ ++import javax.xml.namespace.NamespaceContext; ++import javax.xml.stream.XMLStreamException; ++import javax.xml.stream.XMLStreamWriter; ++ ++/** ++ * Class IndentingXMLStreamWriter. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++class IndentingXMLStreamWriter ++ implements XMLStreamWriter ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Field out. ++ */ ++ private XMLStreamWriter out; ++ ++ /** ++ * Field NEW_LINE. ++ */ ++ private static final String NEW_LINE = "\n"; ++ ++ /** ++ * Field newLine. ++ */ ++ private String newLine = NEW_LINE; ++ ++ /** ++ * Field indent. ++ */ ++ private String indent = " "; ++ ++ /** ++ * Field linePrefix. ++ */ ++ private char[] linePrefix = " ".toCharArray(); ++ ++ /** ++ * Field depth. ++ */ ++ private int depth; ++ ++ /** ++ * Field states. ++ */ ++ private byte[] states = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ++ ++ /** ++ * Field ELEMENT_HAS_DATA. ++ */ ++ private static final int ELEMENT_HAS_DATA = 0x1; ++ ++ /** ++ * Field ELEMENT_HAS_MARKUP. ++ */ ++ private static final int ELEMENT_HAS_MARKUP = 0x2; ++ ++ ++ //----------------/ ++ //- Constructors -/ ++ //----------------/ ++ ++ public IndentingXMLStreamWriter(XMLStreamWriter out) ++ { ++ this.out = out; ++ } //-- org.fedoraproject.xmvn.config.io.stax.IndentingXMLStreamWriter(XMLStreamWriter) ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method close. ++ * ++ * @throws XMLStreamException ++ */ ++ public void close() ++ throws XMLStreamException ++ { ++ out.close(); ++ } //-- void close() ++ ++ /** ++ * Method flush. ++ * ++ * @throws XMLStreamException ++ */ ++ public void flush() ++ throws XMLStreamException ++ { ++ out.flush(); ++ } //-- void flush() ++ ++ /** ++ * Method getNamespaceContext. ++ * ++ * @return NamespaceContext ++ */ ++ public NamespaceContext getNamespaceContext() ++ { ++ return out.getNamespaceContext(); ++ } //-- NamespaceContext getNamespaceContext() ++ ++ /** ++ * Method getPrefix. ++ * ++ * @param uri ++ * @throws XMLStreamException ++ * @return String ++ */ ++ public String getPrefix( String uri ) ++ throws XMLStreamException ++ { ++ return out.getPrefix( uri ); ++ } //-- String getPrefix( String ) ++ ++ /** ++ * Method getProperty. ++ * ++ * @param name ++ * @throws IllegalArgumentException ++ * @return Object ++ */ ++ public Object getProperty( String name ) ++ throws IllegalArgumentException ++ { ++ return out.getProperty( name ); ++ } //-- Object getProperty( String ) ++ ++ /** ++ * Method setDefaultNamespace. ++ * ++ * @param uri ++ * @throws XMLStreamException ++ */ ++ public void setDefaultNamespace( String uri ) ++ throws XMLStreamException ++ { ++ out.setDefaultNamespace( uri ); ++ } //-- void setDefaultNamespace( String ) ++ ++ /** ++ * Method setNamespaceContext. ++ * ++ * @param context ++ * @throws XMLStreamException ++ */ ++ public void setNamespaceContext( NamespaceContext context ) ++ throws XMLStreamException ++ { ++ out.setNamespaceContext( context ); ++ } //-- void setNamespaceContext( NamespaceContext ) ++ ++ /** ++ * Method setPrefix. ++ * ++ * @param prefix ++ * @param uri ++ * @throws XMLStreamException ++ */ ++ public void setPrefix( String prefix, String uri ) ++ throws XMLStreamException ++ { ++ out.setPrefix( prefix, uri ); ++ } //-- void setPrefix( String, String ) ++ ++ /** ++ * Method writeAttribute. ++ * ++ * @param localName ++ * @param value ++ * @throws XMLStreamException ++ */ ++ public void writeAttribute( String localName, String value ) ++ throws XMLStreamException ++ { ++ out.writeAttribute( localName, value ); ++ } //-- void writeAttribute( String, String ) ++ ++ /** ++ * Method writeAttribute. ++ * ++ * @param namespaceURI ++ * @param value ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeAttribute( String namespaceURI, String localName, String value ) ++ throws XMLStreamException ++ { ++ out.writeAttribute( namespaceURI, localName, value ); ++ } //-- void writeAttribute( String, String, String ) ++ ++ /** ++ * Method writeAttribute. ++ * ++ * @param prefix ++ * @param value ++ * @param localName ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeAttribute( String prefix, String namespaceURI, String localName, String value ) ++ throws XMLStreamException ++ { ++ out.writeAttribute( prefix, namespaceURI, localName, value ); ++ } //-- void writeAttribute( String, String, String, String ) ++ ++ /** ++ * Method writeCData. ++ * ++ * @param data ++ * @throws XMLStreamException ++ */ ++ public void writeCData( String data ) ++ throws XMLStreamException ++ { ++ out.writeCData( data ); ++ afterData(); ++ } //-- void writeCData( String ) ++ ++ /** ++ * Method writeCharacters. ++ * ++ * @param text ++ * @throws XMLStreamException ++ */ ++ public void writeCharacters( String text ) ++ throws XMLStreamException ++ { ++ out.writeCharacters( text ); ++ afterData(); ++ } //-- void writeCharacters( String ) ++ ++ /** ++ * Method writeCharacters. ++ * ++ * @param text ++ * @param len ++ * @param start ++ * @throws XMLStreamException ++ */ ++ public void writeCharacters( char[] text, int start, int len ) ++ throws XMLStreamException ++ { ++ out.writeCharacters( text, start, len ); ++ afterData(); ++ } //-- void writeCharacters( char[], int, int ) ++ ++ /** ++ * Method writeComment. ++ * ++ * @param data ++ * @throws XMLStreamException ++ */ ++ public void writeComment( String data ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeComment( data ); ++ afterMarkup(); ++ } //-- void writeComment( String ) ++ ++ /** ++ * Method writeDTD. ++ * ++ * @param dtd ++ * @throws XMLStreamException ++ */ ++ public void writeDTD( String dtd ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeDTD( dtd ); ++ afterMarkup(); ++ } //-- void writeDTD( String ) ++ ++ /** ++ * Method writeDefaultNamespace. ++ * ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeDefaultNamespace( String namespaceURI ) ++ throws XMLStreamException ++ { ++ out.writeDefaultNamespace( namespaceURI ); ++ } //-- void writeDefaultNamespace( String ) ++ ++ /** ++ * Method writeEmptyElement. ++ * ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeEmptyElement( String localName ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeEmptyElement( localName ); ++ afterMarkup(); ++ } //-- void writeEmptyElement( String ) ++ ++ /** ++ * Method writeEmptyElement. ++ * ++ * @param namespaceURI ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeEmptyElement( String namespaceURI, String localName ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeEmptyElement( namespaceURI, localName ); ++ afterMarkup(); ++ } //-- void writeEmptyElement( String, String ) ++ ++ /** ++ * Method writeEmptyElement. ++ * ++ * @param prefix ++ * @param localName ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeEmptyElement( String prefix, String namespaceURI, String localName ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeEmptyElement( prefix, namespaceURI, localName ); ++ afterMarkup(); ++ } //-- void writeEmptyElement( String, String, String ) ++ ++ /** ++ * Method writeEndDocument. ++ * ++ * @throws XMLStreamException ++ */ ++ public void writeEndDocument() ++ throws XMLStreamException ++ { ++ out.writeEndDocument( ); ++ } //-- void writeEndDocument() ++ ++ /** ++ * Method writeEndElement. ++ * ++ * @throws XMLStreamException ++ */ ++ public void writeEndElement() ++ throws XMLStreamException ++ { ++ beforeEndElement(); ++ out.writeEndElement( ); ++ afterEndElement(); ++ } //-- void writeEndElement() ++ ++ /** ++ * Method writeEntityRef. ++ * ++ * @param name ++ * @throws XMLStreamException ++ */ ++ public void writeEntityRef( String name ) ++ throws XMLStreamException ++ { ++ out.writeEntityRef( name ); ++ afterData(); ++ } //-- void writeEntityRef( String ) ++ ++ /** ++ * Method writeNamespace. ++ * ++ * @param prefix ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeNamespace( String prefix, String namespaceURI ) ++ throws XMLStreamException ++ { ++ out.writeNamespace( prefix, namespaceURI ); ++ } //-- void writeNamespace( String, String ) ++ ++ /** ++ * Method writeProcessingInstruction. ++ * ++ * @param target ++ * @throws XMLStreamException ++ */ ++ public void writeProcessingInstruction( String target ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeProcessingInstruction( target ); ++ afterMarkup(); ++ } //-- void writeProcessingInstruction( String ) ++ ++ /** ++ * Method writeProcessingInstruction. ++ * ++ * @param target ++ * @param data ++ * @throws XMLStreamException ++ */ ++ public void writeProcessingInstruction( String target, String data ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeProcessingInstruction( target, data ); ++ afterMarkup(); ++ } //-- void writeProcessingInstruction( String, String ) ++ ++ /** ++ * Method writeStartDocument. ++ * ++ * @throws XMLStreamException ++ */ ++ public void writeStartDocument() ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeStartDocument( ); ++ afterMarkup(); ++ } //-- void writeStartDocument() ++ ++ /** ++ * Method writeStartDocument. ++ * ++ * @param version ++ * @throws XMLStreamException ++ */ ++ public void writeStartDocument( String version ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeStartDocument( version ); ++ afterMarkup(); ++ } //-- void writeStartDocument( String ) ++ ++ /** ++ * Method writeStartDocument. ++ * ++ * @param encoding ++ * @param version ++ * @throws XMLStreamException ++ */ ++ public void writeStartDocument( String encoding, String version ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeStartDocument( encoding, version ); ++ afterMarkup(); ++ } //-- void writeStartDocument( String, String ) ++ ++ /** ++ * Method writeStartElement. ++ * ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeStartElement( String localName ) ++ throws XMLStreamException ++ { ++ beforeStartElement(); ++ out.writeStartElement( localName ); ++ afterStartElement(); ++ } //-- void writeStartElement( String ) ++ ++ /** ++ * Method writeStartElement. ++ * ++ * @param namespaceURI ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeStartElement( String namespaceURI, String localName ) ++ throws XMLStreamException ++ { ++ beforeStartElement(); ++ out.writeStartElement( namespaceURI, localName ); ++ afterStartElement(); ++ } //-- void writeStartElement( String, String ) ++ ++ /** ++ * Method writeStartElement. ++ * ++ * @param prefix ++ * @param namespaceURI ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeStartElement( String prefix, String localName, String namespaceURI ) ++ throws XMLStreamException ++ { ++ beforeStartElement(); ++ out.writeStartElement( prefix, localName, namespaceURI ); ++ afterStartElement(); ++ } //-- void writeStartElement( String, String, String ) ++ ++ /** ++ * Method afterData. ++ */ ++ private void afterData() ++ { ++ states[depth] |= ELEMENT_HAS_DATA; ++ } //-- void afterData() ++ ++ /** ++ * Method afterEndElement. ++ */ ++ private void afterEndElement() ++ { ++ if ( depth > 0 ) ++ { ++ depth--; ++ if ( depth <= 0 ) ++ { ++ newLine( 0 ); ++ } ++ } ++ } //-- void afterEndElement() ++ ++ /** ++ * Method afterMarkup. ++ */ ++ private void afterMarkup() ++ { ++ states[depth] |= ELEMENT_HAS_MARKUP; ++ } //-- void afterMarkup() ++ ++ /** ++ * Method afterStartElement. ++ */ ++ private void afterStartElement() ++ { ++ afterMarkup(); ++ depth++; ++ } //-- void afterStartElement() ++ ++ /** ++ * Method beforeEndElement. ++ */ ++ private void beforeEndElement() ++ { ++ if ( depth > 0 && states[depth] == ELEMENT_HAS_MARKUP ) ++ { ++ newLine( depth - 1 ); ++ } ++ } //-- void beforeEndElement() ++ ++ /** ++ * Method beforeMarkup. ++ */ ++ private void beforeMarkup() ++ { ++ int state = states[depth]; ++ if ( ( state & ELEMENT_HAS_DATA ) == 0 && ( depth > 0 || state != 0 ) ) ++ { ++ newLine( depth ); ++ if ( depth > 0 && indent.length() > 0 ) ++ { ++ afterMarkup(); ++ } ++ } ++ } //-- void beforeMarkup() ++ ++ /** ++ * Method beforeStartElement. ++ */ ++ private void beforeStartElement() ++ { ++ beforeMarkup(); ++ if ( states.length <= depth + 1 ) ++ { ++ byte[] tmp = new byte[states.length * 2]; ++ System.arraycopy( states, 0, tmp, 0, states.length ); ++ states = tmp; ++ } ++ states[depth + 1] = 0; ++ } //-- void beforeStartElement() ++ ++ /** ++ * Method getLineSeparator. ++ * ++ * @return String ++ */ ++ public String getLineSeparator() ++ { ++ try ++ { ++ return System.getProperty( "line.separator", NEW_LINE ); ++ } ++ catch ( Exception e ) ++ { ++ return NEW_LINE; ++ } ++ } //-- String getLineSeparator() ++ ++ /** ++ * Method newLine. ++ * ++ * @param depth ++ */ ++ private void newLine( int depth ) ++ { ++ try ++ { ++ out.writeCharacters( newLine ); ++ int prefixLength = depth * indent.length(); ++ while ( linePrefix.length < prefixLength ) ++ { ++ char[] tmp = new char[linePrefix.length * 2]; ++ System.arraycopy( linePrefix, 0, tmp, 0, linePrefix.length ); ++ System.arraycopy( linePrefix, 0, tmp, linePrefix.length, linePrefix.length ); ++ linePrefix = tmp; ++ } ++ out.writeCharacters( linePrefix, 0, prefixLength ); ++ } ++ catch ( Exception e ) ++ { ++ } ++ } //-- void newLine( int ) ++ ++ /** ++ * Method setNewLine. ++ * ++ * @param newLine ++ */ ++ public void setNewLine( String newLine ) ++ { ++ this.newLine = newLine; ++ } //-- void setNewLine( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactAlias.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactAlias.java +new file mode 100644 +index 0000000..4da0d4b +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactAlias.java +@@ -0,0 +1,157 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata; ++ ++/** ++ * ++ * Alternative artifact identification coordinates. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class ArtifactAlias ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Group ID of the artifact alias. ++ * ++ */ ++ private String groupId; ++ ++ /** ++ * ++ * Artifact ID of the artifact alias. ++ * ++ */ ++ private String artifactId; ++ ++ /** ++ * ++ * Extension of the artifact alias. ++ * ++ */ ++ private String extension = "jar"; ++ ++ /** ++ * ++ * Classifier of the artifact alias. ++ * ++ */ ++ private String classifier = ""; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return ArtifactAlias ++ */ ++ public ArtifactAlias clone() ++ { ++ try ++ { ++ ArtifactAlias copy = (ArtifactAlias) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- ArtifactAlias clone() ++ ++ /** ++ * Get artifact ID of the artifact alias. ++ * ++ * @return String ++ */ ++ public String getArtifactId() ++ { ++ return this.artifactId; ++ } //-- String getArtifactId() ++ ++ /** ++ * Get classifier of the artifact alias. ++ * ++ * @return String ++ */ ++ public String getClassifier() ++ { ++ return this.classifier; ++ } //-- String getClassifier() ++ ++ /** ++ * Get extension of the artifact alias. ++ * ++ * @return String ++ */ ++ public String getExtension() ++ { ++ return this.extension; ++ } //-- String getExtension() ++ ++ /** ++ * Get group ID of the artifact alias. ++ * ++ * @return String ++ */ ++ public String getGroupId() ++ { ++ return this.groupId; ++ } //-- String getGroupId() ++ ++ /** ++ * Set artifact ID of the artifact alias. ++ * ++ * @param artifactId ++ */ ++ public void setArtifactId( String artifactId ) ++ { ++ this.artifactId = artifactId; ++ } //-- void setArtifactId( String ) ++ ++ /** ++ * Set classifier of the artifact alias. ++ * ++ * @param classifier ++ */ ++ public void setClassifier( String classifier ) ++ { ++ this.classifier = classifier; ++ } //-- void setClassifier( String ) ++ ++ /** ++ * Set extension of the artifact alias. ++ * ++ * @param extension ++ */ ++ public void setExtension( String extension ) ++ { ++ this.extension = extension; ++ } //-- void setExtension( String ) ++ ++ /** ++ * Set group ID of the artifact alias. ++ * ++ * @param groupId ++ */ ++ public void setGroupId( String groupId ) ++ { ++ this.groupId = groupId; ++ } //-- void setGroupId( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactMetadata.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactMetadata.java +new file mode 100644 +index 0000000..b227b38 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/ArtifactMetadata.java +@@ -0,0 +1,520 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata; ++ ++/** ++ * ++ * Information about a single artifact. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class ArtifactMetadata ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Group identifier of the artifact. ++ * ++ */ ++ private String groupId; ++ ++ /** ++ * ++ * Identifier of the artifact. ++ * ++ */ ++ private String artifactId; ++ ++ /** ++ * ++ * Extension of artifact file. ++ * ++ */ ++ private String extension = "jar"; ++ ++ /** ++ * ++ * Classifier of the artifact. ++ * ++ */ ++ private String classifier = ""; ++ ++ /** ++ * ++ * Artifact version. This is always upstream ++ * version, never ++ * compat version nor SYSTEM. ++ * ++ */ ++ private String version; ++ ++ /** ++ * ++ * Absolute path to artifact file stored in the ++ * local file ++ * system. ++ * ++ */ ++ private String path; ++ ++ /** ++ * ++ * A namespace within which this artifact is ++ * stored. This ++ * usually is an identifier of software collection. ++ * ++ */ ++ private String namespace = ""; ++ ++ /** ++ * ++ * Universally unique identifier of this artifact. ++ * ++ */ ++ private String uuid; ++ ++ /** ++ * Field properties. ++ */ ++ private java.util.Properties properties; ++ ++ /** ++ * Field compatVersions. ++ */ ++ private java.util.List compatVersions; ++ ++ /** ++ * Field aliases. ++ */ ++ private java.util.List aliases; ++ ++ /** ++ * Field dependencies. ++ */ ++ private java.util.List dependencies; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addCompatVersion. ++ * ++ * @param string ++ */ ++ public void addCompatVersion( String string ) ++ { ++ getCompatVersions().add( string ); ++ } //-- void addCompatVersion( String ) ++ ++ /** ++ * Method addDependency. ++ * ++ * @param dependency ++ */ ++ public void addDependency( Dependency dependency ) ++ { ++ getDependencies().add( dependency ); ++ } //-- void addDependency( Dependency ) ++ ++ /** ++ * Method addProperty. ++ * ++ * @param key ++ * @param value ++ */ ++ public void addProperty( String key, String value ) ++ { ++ getProperties().put( key, value ); ++ } //-- void addProperty( String, String ) ++ ++ /** ++ * Method clone. ++ * ++ * @return ArtifactMetadata ++ */ ++ public ArtifactMetadata clone() ++ { ++ try ++ { ++ ArtifactMetadata copy = (ArtifactMetadata) super.clone(); ++ ++ if ( this.properties != null ) ++ { ++ copy.properties = (java.util.Properties) this.properties.clone(); ++ } ++ ++ if ( this.compatVersions != null ) ++ { ++ copy.compatVersions = new java.util.ArrayList(); ++ copy.compatVersions.addAll( this.compatVersions ); ++ } ++ ++ if ( this.aliases != null ) ++ { ++ copy.aliases = new java.util.ArrayList(); ++ for ( ArtifactAlias item : this.aliases ) ++ { ++ copy.aliases.add( ( (ArtifactAlias) item).clone() ); ++ } ++ } ++ ++ if ( this.dependencies != null ) ++ { ++ copy.dependencies = new java.util.ArrayList(); ++ for ( Dependency item : this.dependencies ) ++ { ++ copy.dependencies.add( ( (Dependency) item).clone() ); ++ } ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- ArtifactMetadata clone() ++ ++ /** ++ * Method getAliases. ++ * ++ * @return List ++ */ ++ public java.util.List getAliases() ++ { ++ if ( this.aliases == null ) ++ { ++ this.aliases = new java.util.ArrayList(); ++ } ++ ++ return this.aliases; ++ } //-- java.util.List getAliases() ++ ++ /** ++ * Get identifier of the artifact. ++ * ++ * @return String ++ */ ++ public String getArtifactId() ++ { ++ return this.artifactId; ++ } //-- String getArtifactId() ++ ++ /** ++ * Get classifier of the artifact. ++ * ++ * @return String ++ */ ++ public String getClassifier() ++ { ++ return this.classifier; ++ } //-- String getClassifier() ++ ++ /** ++ * Method getCompatVersions. ++ * ++ * @return List ++ */ ++ public java.util.List getCompatVersions() ++ { ++ if ( this.compatVersions == null ) ++ { ++ this.compatVersions = new java.util.ArrayList(); ++ } ++ ++ return this.compatVersions; ++ } //-- java.util.List getCompatVersions() ++ ++ /** ++ * Method getDependencies. ++ * ++ * @return List ++ */ ++ public java.util.List getDependencies() ++ { ++ if ( this.dependencies == null ) ++ { ++ this.dependencies = new java.util.ArrayList(); ++ } ++ ++ return this.dependencies; ++ } //-- java.util.List getDependencies() ++ ++ /** ++ * Get extension of artifact file. ++ * ++ * @return String ++ */ ++ public String getExtension() ++ { ++ return this.extension; ++ } //-- String getExtension() ++ ++ /** ++ * Get group identifier of the artifact. ++ * ++ * @return String ++ */ ++ public String getGroupId() ++ { ++ return this.groupId; ++ } //-- String getGroupId() ++ ++ /** ++ * Get a namespace within which this artifact is stored. This ++ * usually is an identifier of software collection. ++ * ++ * @return String ++ */ ++ public String getNamespace() ++ { ++ return this.namespace; ++ } //-- String getNamespace() ++ ++ /** ++ * Get absolute path to artifact file stored in the local file ++ * system. ++ * ++ * @return String ++ */ ++ public String getPath() ++ { ++ return this.path; ++ } //-- String getPath() ++ ++ /** ++ * Method getProperties. ++ * ++ * @return Properties ++ */ ++ public java.util.Properties getProperties() ++ { ++ if ( this.properties == null ) ++ { ++ this.properties = new java.util.Properties(); ++ } ++ ++ return this.properties; ++ } //-- java.util.Properties getProperties() ++ ++ /** ++ * Get universally unique identifier of this artifact. ++ * ++ * @return String ++ */ ++ public String getUuid() ++ { ++ return this.uuid; ++ } //-- String getUuid() ++ ++ /** ++ * Get artifact version. This is always upstream version, ++ * never ++ * compat version nor SYSTEM. ++ * ++ * @return String ++ */ ++ public String getVersion() ++ { ++ return this.version; ++ } //-- String getVersion() ++ ++ /** ++ * Method removeCompatVersion. ++ * ++ * @param string ++ */ ++ public void removeCompatVersion( String string ) ++ { ++ getCompatVersions().remove( string ); ++ } //-- void removeCompatVersion( String ) ++ ++ /** ++ * Method removeDependency. ++ * ++ * @param dependency ++ */ ++ public void removeDependency( Dependency dependency ) ++ { ++ getDependencies().remove( dependency ); ++ } //-- void removeDependency( Dependency ) ++ ++ /** ++ * Set alternative identifiers of the artifact. ++ * ++ * @param aliases ++ */ ++ public void setAliases( java.util.List aliases ) ++ { ++ this.aliases = aliases; ++ } //-- void setAliases( java.util.List ) ++ ++ /** ++ * Set identifier of the artifact. ++ * ++ * @param artifactId ++ */ ++ public void setArtifactId( String artifactId ) ++ { ++ this.artifactId = artifactId; ++ } //-- void setArtifactId( String ) ++ ++ /** ++ * Set classifier of the artifact. ++ * ++ * @param classifier ++ */ ++ public void setClassifier( String classifier ) ++ { ++ this.classifier = classifier; ++ } //-- void setClassifier( String ) ++ ++ /** ++ * Set compatibility versions of this artifact. If the list is ++ * empty then this artifact is not considered as ++ * compatibility artifact. ++ * ++ * @param compatVersions ++ */ ++ public void setCompatVersions( java.util.List compatVersions ) ++ { ++ this.compatVersions = compatVersions; ++ } //-- void setCompatVersions( java.util.List ) ++ ++ /** ++ * Set list of artifact dependencies. ++ * ++ * @param dependencies ++ */ ++ public void setDependencies( java.util.List dependencies ) ++ { ++ this.dependencies = dependencies; ++ } //-- void setDependencies( java.util.List ) ++ ++ /** ++ * Set extension of artifact file. ++ * ++ * @param extension ++ */ ++ public void setExtension( String extension ) ++ { ++ this.extension = extension; ++ } //-- void setExtension( String ) ++ ++ /** ++ * Set group identifier of the artifact. ++ * ++ * @param groupId ++ */ ++ public void setGroupId( String groupId ) ++ { ++ this.groupId = groupId; ++ } //-- void setGroupId( String ) ++ ++ /** ++ * Set a namespace within which this artifact is stored. This ++ * usually is an identifier of software collection. ++ * ++ * @param namespace ++ */ ++ public void setNamespace( String namespace ) ++ { ++ this.namespace = namespace; ++ } //-- void setNamespace( String ) ++ ++ /** ++ * Set absolute path to artifact file stored in the local file ++ * system. ++ * ++ * @param path ++ */ ++ public void setPath( String path ) ++ { ++ this.path = path; ++ } //-- void setPath( String ) ++ ++ /** ++ * Set extra properties of this artifact. ++ * ++ * @param properties ++ */ ++ public void setProperties( java.util.Properties properties ) ++ { ++ this.properties = properties; ++ } //-- void setProperties( java.util.Properties ) ++ ++ /** ++ * Set universally unique identifier of this artifact. ++ * ++ * @param uuid ++ */ ++ public void setUuid( String uuid ) ++ { ++ this.uuid = uuid; ++ } //-- void setUuid( String ) ++ ++ /** ++ * Set artifact version. This is always upstream version, ++ * never ++ * compat version nor SYSTEM. ++ * ++ * @param version ++ */ ++ public void setVersion( String version ) ++ { ++ this.version = version; ++ } //-- void setVersion( String ) ++ ++ ++ ++ /** ++ * Add an alias. ++ * @param alias alias to be added ++ */ ++ public void addAlias( ArtifactAlias alias ) ++ { ++ getAliases().add( alias ); ++ } ++ ++ /** ++ * Remove an alias. ++ * @param alias alias to be removed ++ */ ++ public void removeAlias( ArtifactAlias alias ) ++ { ++ getAliases().remove( alias ); ++ } ++ ++ /** ++ * Return list of versions from which this artifact can be resolved. ++ *

++ * For non-compat artifacts this method returns a singleton list containing default artfact version. ++ * Otherwise it returns a list of compat versions. ++ * ++ * @return non-empty list of versions, never {@code null} ++ */ ++ public java.util.List getResolvableVersions() ++ { ++ java.util.List versions = java.util.Collections.unmodifiableList( getCompatVersions() ); ++ ++ if ( versions.isEmpty() ) ++ versions = java.util.Collections.singletonList( org.fedoraproject.xmvn.artifact.Artifact.DEFAULT_VERSION ); ++ ++ return versions; ++ } ++ ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/Dependency.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/Dependency.java +new file mode 100644 +index 0000000..ad83f24 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/Dependency.java +@@ -0,0 +1,323 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata; ++ ++/** ++ * ++ * Description of dependency artifact. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class Dependency ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Group ID of the dependency artifact. ++ * ++ */ ++ private String groupId; ++ ++ /** ++ * ++ * Artifact ID of the dependency artifact. ++ * ++ */ ++ private String artifactId; ++ ++ /** ++ * ++ * Extension of the dependency artifact. ++ * ++ */ ++ private String extension = "jar"; ++ ++ /** ++ * ++ * Classifier of the dependency artifact. ++ * ++ */ ++ private String classifier = ""; ++ ++ /** ++ * ++ * Version of the dependency artifact as defined in ++ * the main ++ * artifact descriptor. This may be a version ++ * range as ++ * supported by Aether. ++ * ++ */ ++ private String requestedVersion = "SYSTEM"; ++ ++ /** ++ * ++ * Version of the dependency artifact, as resolved ++ * during ++ * build. Absence of this field indicates a ++ * dependency on ++ * default artifact version. ++ * ++ */ ++ private String resolvedVersion = "SYSTEM"; ++ ++ /** ++ * ++ * A namespace within which this artifact is ++ * stored. This ++ * usually is an identifier of software collection. ++ * ++ */ ++ private String namespace = ""; ++ ++ /** ++ * Field exclusions. ++ */ ++ private java.util.List exclusions; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addExclusion. ++ * ++ * @param dependencyExclusion ++ */ ++ public void addExclusion( DependencyExclusion dependencyExclusion ) ++ { ++ getExclusions().add( dependencyExclusion ); ++ } //-- void addExclusion( DependencyExclusion ) ++ ++ /** ++ * Method clone. ++ * ++ * @return Dependency ++ */ ++ public Dependency clone() ++ { ++ try ++ { ++ Dependency copy = (Dependency) super.clone(); ++ ++ if ( this.exclusions != null ) ++ { ++ copy.exclusions = new java.util.ArrayList(); ++ for ( DependencyExclusion item : this.exclusions ) ++ { ++ copy.exclusions.add( ( (DependencyExclusion) item).clone() ); ++ } ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- Dependency clone() ++ ++ /** ++ * Get artifact ID of the dependency artifact. ++ * ++ * @return String ++ */ ++ public String getArtifactId() ++ { ++ return this.artifactId; ++ } //-- String getArtifactId() ++ ++ /** ++ * Get classifier of the dependency artifact. ++ * ++ * @return String ++ */ ++ public String getClassifier() ++ { ++ return this.classifier; ++ } //-- String getClassifier() ++ ++ /** ++ * Method getExclusions. ++ * ++ * @return List ++ */ ++ public java.util.List getExclusions() ++ { ++ if ( this.exclusions == null ) ++ { ++ this.exclusions = new java.util.ArrayList(); ++ } ++ ++ return this.exclusions; ++ } //-- java.util.List getExclusions() ++ ++ /** ++ * Get extension of the dependency artifact. ++ * ++ * @return String ++ */ ++ public String getExtension() ++ { ++ return this.extension; ++ } //-- String getExtension() ++ ++ /** ++ * Get group ID of the dependency artifact. ++ * ++ * @return String ++ */ ++ public String getGroupId() ++ { ++ return this.groupId; ++ } //-- String getGroupId() ++ ++ /** ++ * Get a namespace within which this artifact is stored. This ++ * usually is an identifier of software collection. ++ * ++ * @return String ++ */ ++ public String getNamespace() ++ { ++ return this.namespace; ++ } //-- String getNamespace() ++ ++ /** ++ * Get version of the dependency artifact as defined in the ++ * main ++ * artifact descriptor. This may be a version ++ * range as ++ * supported by Aether. ++ * ++ * @return String ++ */ ++ public String getRequestedVersion() ++ { ++ return this.requestedVersion; ++ } //-- String getRequestedVersion() ++ ++ /** ++ * Get version of the dependency artifact, as resolved during ++ * build. Absence of this field indicates a ++ * dependency on ++ * default artifact version. ++ * ++ * @return String ++ */ ++ public String getResolvedVersion() ++ { ++ return this.resolvedVersion; ++ } //-- String getResolvedVersion() ++ ++ /** ++ * Method removeExclusion. ++ * ++ * @param dependencyExclusion ++ */ ++ public void removeExclusion( DependencyExclusion dependencyExclusion ) ++ { ++ getExclusions().remove( dependencyExclusion ); ++ } //-- void removeExclusion( DependencyExclusion ) ++ ++ /** ++ * Set artifact ID of the dependency artifact. ++ * ++ * @param artifactId ++ */ ++ public void setArtifactId( String artifactId ) ++ { ++ this.artifactId = artifactId; ++ } //-- void setArtifactId( String ) ++ ++ /** ++ * Set classifier of the dependency artifact. ++ * ++ * @param classifier ++ */ ++ public void setClassifier( String classifier ) ++ { ++ this.classifier = classifier; ++ } //-- void setClassifier( String ) ++ ++ /** ++ * Set list of dependency exclusions. ++ * ++ * @param exclusions ++ */ ++ public void setExclusions( java.util.List exclusions ) ++ { ++ this.exclusions = exclusions; ++ } //-- void setExclusions( java.util.List ) ++ ++ /** ++ * Set extension of the dependency artifact. ++ * ++ * @param extension ++ */ ++ public void setExtension( String extension ) ++ { ++ this.extension = extension; ++ } //-- void setExtension( String ) ++ ++ /** ++ * Set group ID of the dependency artifact. ++ * ++ * @param groupId ++ */ ++ public void setGroupId( String groupId ) ++ { ++ this.groupId = groupId; ++ } //-- void setGroupId( String ) ++ ++ /** ++ * Set a namespace within which this artifact is stored. This ++ * usually is an identifier of software collection. ++ * ++ * @param namespace ++ */ ++ public void setNamespace( String namespace ) ++ { ++ this.namespace = namespace; ++ } //-- void setNamespace( String ) ++ ++ /** ++ * Set version of the dependency artifact as defined in the ++ * main ++ * artifact descriptor. This may be a version ++ * range as ++ * supported by Aether. ++ * ++ * @param requestedVersion ++ */ ++ public void setRequestedVersion( String requestedVersion ) ++ { ++ this.requestedVersion = requestedVersion; ++ } //-- void setRequestedVersion( String ) ++ ++ /** ++ * Set version of the dependency artifact, as resolved during ++ * build. Absence of this field indicates a ++ * dependency on ++ * default artifact version. ++ * ++ * @param resolvedVersion ++ */ ++ public void setResolvedVersion( String resolvedVersion ) ++ { ++ this.resolvedVersion = resolvedVersion; ++ } //-- void setResolvedVersion( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/DependencyExclusion.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/DependencyExclusion.java +new file mode 100644 +index 0000000..419c939 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/DependencyExclusion.java +@@ -0,0 +1,103 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata; ++ ++/** ++ * ++ * Description of artifact excluded from dependency tree. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class DependencyExclusion ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Group ID of the excluded artifact. ++ * ++ */ ++ private String groupId; ++ ++ /** ++ * ++ * Artifact ID of the excluded artifact. ++ * ++ */ ++ private String artifactId; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return DependencyExclusion ++ */ ++ public DependencyExclusion clone() ++ { ++ try ++ { ++ DependencyExclusion copy = (DependencyExclusion) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- DependencyExclusion clone() ++ ++ /** ++ * Get artifact ID of the excluded artifact. ++ * ++ * @return String ++ */ ++ public String getArtifactId() ++ { ++ return this.artifactId; ++ } //-- String getArtifactId() ++ ++ /** ++ * Get group ID of the excluded artifact. ++ * ++ * @return String ++ */ ++ public String getGroupId() ++ { ++ return this.groupId; ++ } //-- String getGroupId() ++ ++ /** ++ * Set artifact ID of the excluded artifact. ++ * ++ * @param artifactId ++ */ ++ public void setArtifactId( String artifactId ) ++ { ++ this.artifactId = artifactId; ++ } //-- void setArtifactId( String ) ++ ++ /** ++ * Set group ID of the excluded artifact. ++ * ++ * @param groupId ++ */ ++ public void setGroupId( String groupId ) ++ { ++ this.groupId = groupId; ++ } //-- void setGroupId( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/PackageMetadata.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/PackageMetadata.java +new file mode 100644 +index 0000000..762652f +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/PackageMetadata.java +@@ -0,0 +1,270 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata; ++ ++/** ++ * ++ * Root element of the metadata file. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class PackageMetadata ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Universally unique identifier of this piece of ++ * metadata. ++ * ++ */ ++ private String uuid; ++ ++ /** ++ * Field properties. ++ */ ++ private java.util.Properties properties; ++ ++ /** ++ * Field artifacts. ++ */ ++ private java.util.List artifacts; ++ ++ /** ++ * Field skippedArtifacts. ++ */ ++ private java.util.List skippedArtifacts; ++ ++ /** ++ * Field modelEncoding. ++ */ ++ private String modelEncoding = "UTF-8"; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method addArtifact. ++ * ++ * @param artifactMetadata ++ */ ++ public void addArtifact( ArtifactMetadata artifactMetadata ) ++ { ++ getArtifacts().add( artifactMetadata ); ++ } //-- void addArtifact( ArtifactMetadata ) ++ ++ /** ++ * Method addProperty. ++ * ++ * @param key ++ * @param value ++ */ ++ public void addProperty( String key, String value ) ++ { ++ getProperties().put( key, value ); ++ } //-- void addProperty( String, String ) ++ ++ /** ++ * Method addSkippedArtifact. ++ * ++ * @param skippedArtifactMetadata ++ */ ++ public void addSkippedArtifact( SkippedArtifactMetadata skippedArtifactMetadata ) ++ { ++ getSkippedArtifacts().add( skippedArtifactMetadata ); ++ } //-- void addSkippedArtifact( SkippedArtifactMetadata ) ++ ++ /** ++ * Method clone. ++ * ++ * @return PackageMetadata ++ */ ++ public PackageMetadata clone() ++ { ++ try ++ { ++ PackageMetadata copy = (PackageMetadata) super.clone(); ++ ++ if ( this.properties != null ) ++ { ++ copy.properties = (java.util.Properties) this.properties.clone(); ++ } ++ ++ if ( this.artifacts != null ) ++ { ++ copy.artifacts = new java.util.ArrayList(); ++ for ( ArtifactMetadata item : this.artifacts ) ++ { ++ copy.artifacts.add( ( (ArtifactMetadata) item).clone() ); ++ } ++ } ++ ++ if ( this.skippedArtifacts != null ) ++ { ++ copy.skippedArtifacts = new java.util.ArrayList(); ++ for ( SkippedArtifactMetadata item : this.skippedArtifacts ) ++ { ++ copy.skippedArtifacts.add( ( (SkippedArtifactMetadata) item).clone() ); ++ } ++ } ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- PackageMetadata clone() ++ ++ /** ++ * Method getArtifacts. ++ * ++ * @return List ++ */ ++ public java.util.List getArtifacts() ++ { ++ if ( this.artifacts == null ) ++ { ++ this.artifacts = new java.util.ArrayList(); ++ } ++ ++ return this.artifacts; ++ } //-- java.util.List getArtifacts() ++ ++ /** ++ * Get the modelEncoding field. ++ * ++ * @return String ++ */ ++ public String getModelEncoding() ++ { ++ return this.modelEncoding; ++ } //-- String getModelEncoding() ++ ++ /** ++ * Method getProperties. ++ * ++ * @return Properties ++ */ ++ public java.util.Properties getProperties() ++ { ++ if ( this.properties == null ) ++ { ++ this.properties = new java.util.Properties(); ++ } ++ ++ return this.properties; ++ } //-- java.util.Properties getProperties() ++ ++ /** ++ * Method getSkippedArtifacts. ++ * ++ * @return List ++ */ ++ public java.util.List getSkippedArtifacts() ++ { ++ if ( this.skippedArtifacts == null ) ++ { ++ this.skippedArtifacts = new java.util.ArrayList(); ++ } ++ ++ return this.skippedArtifacts; ++ } //-- java.util.List getSkippedArtifacts() ++ ++ /** ++ * Get universally unique identifier of this piece of metadata. ++ * ++ * @return String ++ */ ++ public String getUuid() ++ { ++ return this.uuid; ++ } //-- String getUuid() ++ ++ /** ++ * Method removeArtifact. ++ * ++ * @param artifactMetadata ++ */ ++ public void removeArtifact( ArtifactMetadata artifactMetadata ) ++ { ++ getArtifacts().remove( artifactMetadata ); ++ } //-- void removeArtifact( ArtifactMetadata ) ++ ++ /** ++ * Method removeSkippedArtifact. ++ * ++ * @param skippedArtifactMetadata ++ */ ++ public void removeSkippedArtifact( SkippedArtifactMetadata skippedArtifactMetadata ) ++ { ++ getSkippedArtifacts().remove( skippedArtifactMetadata ); ++ } //-- void removeSkippedArtifact( SkippedArtifactMetadata ) ++ ++ /** ++ * Set list of installed artifacts described by this piece of ++ * metadata. ++ * ++ * @param artifacts ++ */ ++ public void setArtifacts( java.util.List artifacts ) ++ { ++ this.artifacts = artifacts; ++ } //-- void setArtifacts( java.util.List ) ++ ++ /** ++ * Set the modelEncoding field. ++ * ++ * @param modelEncoding ++ */ ++ public void setModelEncoding( String modelEncoding ) ++ { ++ this.modelEncoding = modelEncoding; ++ } //-- void setModelEncoding( String ) ++ ++ /** ++ * Set properties of this piece of metadata. ++ * ++ * @param properties ++ */ ++ public void setProperties( java.util.Properties properties ) ++ { ++ this.properties = properties; ++ } //-- void setProperties( java.util.Properties ) ++ ++ /** ++ * Set list of artifacts built but not installed in any ++ * package. ++ * Useful for detecting broken package ++ * dependencies. ++ * ++ * @param skippedArtifacts ++ */ ++ public void setSkippedArtifacts( java.util.List skippedArtifacts ) ++ { ++ this.skippedArtifacts = skippedArtifacts; ++ } //-- void setSkippedArtifacts( java.util.List ) ++ ++ /** ++ * Set universally unique identifier of this piece of metadata. ++ * ++ * @param uuid ++ */ ++ public void setUuid( String uuid ) ++ { ++ this.uuid = uuid; ++ } //-- void setUuid( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/SkippedArtifactMetadata.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/SkippedArtifactMetadata.java +new file mode 100644 +index 0000000..0ccc123 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/SkippedArtifactMetadata.java +@@ -0,0 +1,159 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata; ++ ++/** ++ * ++ * Information about artifact which was built, but not ++ * installed ++ * into any package. ++ * ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class SkippedArtifactMetadata ++ implements java.io.Serializable, java.lang.Cloneable ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * ++ * Group ID of skipped artifact. ++ * ++ */ ++ private String groupId; ++ ++ /** ++ * ++ * Artifact ID of skipped artifact. ++ * ++ */ ++ private String artifactId; ++ ++ /** ++ * ++ * Extension of skipped artifact. ++ * ++ */ ++ private String extension = "jar"; ++ ++ /** ++ * ++ * Classifier of skipped artifact. ++ * ++ */ ++ private String classifier = ""; ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method clone. ++ * ++ * @return SkippedArtifactMetadata ++ */ ++ public SkippedArtifactMetadata clone() ++ { ++ try ++ { ++ SkippedArtifactMetadata copy = (SkippedArtifactMetadata) super.clone(); ++ ++ return copy; ++ } ++ catch ( java.lang.Exception ex ) ++ { ++ throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() ++ + " does not support clone()" ).initCause( ex ); ++ } ++ } //-- SkippedArtifactMetadata clone() ++ ++ /** ++ * Get artifact ID of skipped artifact. ++ * ++ * @return String ++ */ ++ public String getArtifactId() ++ { ++ return this.artifactId; ++ } //-- String getArtifactId() ++ ++ /** ++ * Get classifier of skipped artifact. ++ * ++ * @return String ++ */ ++ public String getClassifier() ++ { ++ return this.classifier; ++ } //-- String getClassifier() ++ ++ /** ++ * Get extension of skipped artifact. ++ * ++ * @return String ++ */ ++ public String getExtension() ++ { ++ return this.extension; ++ } //-- String getExtension() ++ ++ /** ++ * Get group ID of skipped artifact. ++ * ++ * @return String ++ */ ++ public String getGroupId() ++ { ++ return this.groupId; ++ } //-- String getGroupId() ++ ++ /** ++ * Set artifact ID of skipped artifact. ++ * ++ * @param artifactId ++ */ ++ public void setArtifactId( String artifactId ) ++ { ++ this.artifactId = artifactId; ++ } //-- void setArtifactId( String ) ++ ++ /** ++ * Set classifier of skipped artifact. ++ * ++ * @param classifier ++ */ ++ public void setClassifier( String classifier ) ++ { ++ this.classifier = classifier; ++ } //-- void setClassifier( String ) ++ ++ /** ++ * Set extension of skipped artifact. ++ * ++ * @param extension ++ */ ++ public void setExtension( String extension ) ++ { ++ this.extension = extension; ++ } //-- void setExtension( String ) ++ ++ /** ++ * Set group ID of skipped artifact. ++ * ++ * @param groupId ++ */ ++ public void setGroupId( String groupId ) ++ { ++ this.groupId = groupId; ++ } //-- void setGroupId( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/IndentingXMLStreamWriter.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/IndentingXMLStreamWriter.java +new file mode 100644 +index 0000000..510caf1 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/IndentingXMLStreamWriter.java +@@ -0,0 +1,653 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata.io.stax; ++ ++ //---------------------------------/ ++ //- Imported classes and packages -/ ++//---------------------------------/ ++ ++import javax.xml.namespace.NamespaceContext; ++import javax.xml.stream.XMLStreamException; ++import javax.xml.stream.XMLStreamWriter; ++ ++/** ++ * Class IndentingXMLStreamWriter. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++class IndentingXMLStreamWriter ++ implements XMLStreamWriter ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Field out. ++ */ ++ private XMLStreamWriter out; ++ ++ /** ++ * Field NEW_LINE. ++ */ ++ private static final String NEW_LINE = "\n"; ++ ++ /** ++ * Field newLine. ++ */ ++ private String newLine = NEW_LINE; ++ ++ /** ++ * Field indent. ++ */ ++ private String indent = " "; ++ ++ /** ++ * Field linePrefix. ++ */ ++ private char[] linePrefix = " ".toCharArray(); ++ ++ /** ++ * Field depth. ++ */ ++ private int depth; ++ ++ /** ++ * Field states. ++ */ ++ private byte[] states = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ++ ++ /** ++ * Field ELEMENT_HAS_DATA. ++ */ ++ private static final int ELEMENT_HAS_DATA = 0x1; ++ ++ /** ++ * Field ELEMENT_HAS_MARKUP. ++ */ ++ private static final int ELEMENT_HAS_MARKUP = 0x2; ++ ++ ++ //----------------/ ++ //- Constructors -/ ++ //----------------/ ++ ++ public IndentingXMLStreamWriter(XMLStreamWriter out) ++ { ++ this.out = out; ++ } //-- org.fedoraproject.xmvn.metadata.io.stax.IndentingXMLStreamWriter(XMLStreamWriter) ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method close. ++ * ++ * @throws XMLStreamException ++ */ ++ public void close() ++ throws XMLStreamException ++ { ++ out.close(); ++ } //-- void close() ++ ++ /** ++ * Method flush. ++ * ++ * @throws XMLStreamException ++ */ ++ public void flush() ++ throws XMLStreamException ++ { ++ out.flush(); ++ } //-- void flush() ++ ++ /** ++ * Method getNamespaceContext. ++ * ++ * @return NamespaceContext ++ */ ++ public NamespaceContext getNamespaceContext() ++ { ++ return out.getNamespaceContext(); ++ } //-- NamespaceContext getNamespaceContext() ++ ++ /** ++ * Method getPrefix. ++ * ++ * @param uri ++ * @throws XMLStreamException ++ * @return String ++ */ ++ public String getPrefix( String uri ) ++ throws XMLStreamException ++ { ++ return out.getPrefix( uri ); ++ } //-- String getPrefix( String ) ++ ++ /** ++ * Method getProperty. ++ * ++ * @param name ++ * @throws IllegalArgumentException ++ * @return Object ++ */ ++ public Object getProperty( String name ) ++ throws IllegalArgumentException ++ { ++ return out.getProperty( name ); ++ } //-- Object getProperty( String ) ++ ++ /** ++ * Method setDefaultNamespace. ++ * ++ * @param uri ++ * @throws XMLStreamException ++ */ ++ public void setDefaultNamespace( String uri ) ++ throws XMLStreamException ++ { ++ out.setDefaultNamespace( uri ); ++ } //-- void setDefaultNamespace( String ) ++ ++ /** ++ * Method setNamespaceContext. ++ * ++ * @param context ++ * @throws XMLStreamException ++ */ ++ public void setNamespaceContext( NamespaceContext context ) ++ throws XMLStreamException ++ { ++ out.setNamespaceContext( context ); ++ } //-- void setNamespaceContext( NamespaceContext ) ++ ++ /** ++ * Method setPrefix. ++ * ++ * @param prefix ++ * @param uri ++ * @throws XMLStreamException ++ */ ++ public void setPrefix( String prefix, String uri ) ++ throws XMLStreamException ++ { ++ out.setPrefix( prefix, uri ); ++ } //-- void setPrefix( String, String ) ++ ++ /** ++ * Method writeAttribute. ++ * ++ * @param localName ++ * @param value ++ * @throws XMLStreamException ++ */ ++ public void writeAttribute( String localName, String value ) ++ throws XMLStreamException ++ { ++ out.writeAttribute( localName, value ); ++ } //-- void writeAttribute( String, String ) ++ ++ /** ++ * Method writeAttribute. ++ * ++ * @param namespaceURI ++ * @param value ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeAttribute( String namespaceURI, String localName, String value ) ++ throws XMLStreamException ++ { ++ out.writeAttribute( namespaceURI, localName, value ); ++ } //-- void writeAttribute( String, String, String ) ++ ++ /** ++ * Method writeAttribute. ++ * ++ * @param prefix ++ * @param value ++ * @param localName ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeAttribute( String prefix, String namespaceURI, String localName, String value ) ++ throws XMLStreamException ++ { ++ out.writeAttribute( prefix, namespaceURI, localName, value ); ++ } //-- void writeAttribute( String, String, String, String ) ++ ++ /** ++ * Method writeCData. ++ * ++ * @param data ++ * @throws XMLStreamException ++ */ ++ public void writeCData( String data ) ++ throws XMLStreamException ++ { ++ out.writeCData( data ); ++ afterData(); ++ } //-- void writeCData( String ) ++ ++ /** ++ * Method writeCharacters. ++ * ++ * @param text ++ * @throws XMLStreamException ++ */ ++ public void writeCharacters( String text ) ++ throws XMLStreamException ++ { ++ out.writeCharacters( text ); ++ afterData(); ++ } //-- void writeCharacters( String ) ++ ++ /** ++ * Method writeCharacters. ++ * ++ * @param text ++ * @param len ++ * @param start ++ * @throws XMLStreamException ++ */ ++ public void writeCharacters( char[] text, int start, int len ) ++ throws XMLStreamException ++ { ++ out.writeCharacters( text, start, len ); ++ afterData(); ++ } //-- void writeCharacters( char[], int, int ) ++ ++ /** ++ * Method writeComment. ++ * ++ * @param data ++ * @throws XMLStreamException ++ */ ++ public void writeComment( String data ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeComment( data ); ++ afterMarkup(); ++ } //-- void writeComment( String ) ++ ++ /** ++ * Method writeDTD. ++ * ++ * @param dtd ++ * @throws XMLStreamException ++ */ ++ public void writeDTD( String dtd ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeDTD( dtd ); ++ afterMarkup(); ++ } //-- void writeDTD( String ) ++ ++ /** ++ * Method writeDefaultNamespace. ++ * ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeDefaultNamespace( String namespaceURI ) ++ throws XMLStreamException ++ { ++ out.writeDefaultNamespace( namespaceURI ); ++ } //-- void writeDefaultNamespace( String ) ++ ++ /** ++ * Method writeEmptyElement. ++ * ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeEmptyElement( String localName ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeEmptyElement( localName ); ++ afterMarkup(); ++ } //-- void writeEmptyElement( String ) ++ ++ /** ++ * Method writeEmptyElement. ++ * ++ * @param namespaceURI ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeEmptyElement( String namespaceURI, String localName ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeEmptyElement( namespaceURI, localName ); ++ afterMarkup(); ++ } //-- void writeEmptyElement( String, String ) ++ ++ /** ++ * Method writeEmptyElement. ++ * ++ * @param prefix ++ * @param localName ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeEmptyElement( String prefix, String namespaceURI, String localName ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeEmptyElement( prefix, namespaceURI, localName ); ++ afterMarkup(); ++ } //-- void writeEmptyElement( String, String, String ) ++ ++ /** ++ * Method writeEndDocument. ++ * ++ * @throws XMLStreamException ++ */ ++ public void writeEndDocument() ++ throws XMLStreamException ++ { ++ out.writeEndDocument( ); ++ } //-- void writeEndDocument() ++ ++ /** ++ * Method writeEndElement. ++ * ++ * @throws XMLStreamException ++ */ ++ public void writeEndElement() ++ throws XMLStreamException ++ { ++ beforeEndElement(); ++ out.writeEndElement( ); ++ afterEndElement(); ++ } //-- void writeEndElement() ++ ++ /** ++ * Method writeEntityRef. ++ * ++ * @param name ++ * @throws XMLStreamException ++ */ ++ public void writeEntityRef( String name ) ++ throws XMLStreamException ++ { ++ out.writeEntityRef( name ); ++ afterData(); ++ } //-- void writeEntityRef( String ) ++ ++ /** ++ * Method writeNamespace. ++ * ++ * @param prefix ++ * @param namespaceURI ++ * @throws XMLStreamException ++ */ ++ public void writeNamespace( String prefix, String namespaceURI ) ++ throws XMLStreamException ++ { ++ out.writeNamespace( prefix, namespaceURI ); ++ } //-- void writeNamespace( String, String ) ++ ++ /** ++ * Method writeProcessingInstruction. ++ * ++ * @param target ++ * @throws XMLStreamException ++ */ ++ public void writeProcessingInstruction( String target ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeProcessingInstruction( target ); ++ afterMarkup(); ++ } //-- void writeProcessingInstruction( String ) ++ ++ /** ++ * Method writeProcessingInstruction. ++ * ++ * @param target ++ * @param data ++ * @throws XMLStreamException ++ */ ++ public void writeProcessingInstruction( String target, String data ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeProcessingInstruction( target, data ); ++ afterMarkup(); ++ } //-- void writeProcessingInstruction( String, String ) ++ ++ /** ++ * Method writeStartDocument. ++ * ++ * @throws XMLStreamException ++ */ ++ public void writeStartDocument() ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeStartDocument( ); ++ afterMarkup(); ++ } //-- void writeStartDocument() ++ ++ /** ++ * Method writeStartDocument. ++ * ++ * @param version ++ * @throws XMLStreamException ++ */ ++ public void writeStartDocument( String version ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeStartDocument( version ); ++ afterMarkup(); ++ } //-- void writeStartDocument( String ) ++ ++ /** ++ * Method writeStartDocument. ++ * ++ * @param encoding ++ * @param version ++ * @throws XMLStreamException ++ */ ++ public void writeStartDocument( String encoding, String version ) ++ throws XMLStreamException ++ { ++ beforeMarkup(); ++ out.writeStartDocument( encoding, version ); ++ afterMarkup(); ++ } //-- void writeStartDocument( String, String ) ++ ++ /** ++ * Method writeStartElement. ++ * ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeStartElement( String localName ) ++ throws XMLStreamException ++ { ++ beforeStartElement(); ++ out.writeStartElement( localName ); ++ afterStartElement(); ++ } //-- void writeStartElement( String ) ++ ++ /** ++ * Method writeStartElement. ++ * ++ * @param namespaceURI ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeStartElement( String namespaceURI, String localName ) ++ throws XMLStreamException ++ { ++ beforeStartElement(); ++ out.writeStartElement( namespaceURI, localName ); ++ afterStartElement(); ++ } //-- void writeStartElement( String, String ) ++ ++ /** ++ * Method writeStartElement. ++ * ++ * @param prefix ++ * @param namespaceURI ++ * @param localName ++ * @throws XMLStreamException ++ */ ++ public void writeStartElement( String prefix, String localName, String namespaceURI ) ++ throws XMLStreamException ++ { ++ beforeStartElement(); ++ out.writeStartElement( prefix, localName, namespaceURI ); ++ afterStartElement(); ++ } //-- void writeStartElement( String, String, String ) ++ ++ /** ++ * Method afterData. ++ */ ++ private void afterData() ++ { ++ states[depth] |= ELEMENT_HAS_DATA; ++ } //-- void afterData() ++ ++ /** ++ * Method afterEndElement. ++ */ ++ private void afterEndElement() ++ { ++ if ( depth > 0 ) ++ { ++ depth--; ++ if ( depth <= 0 ) ++ { ++ newLine( 0 ); ++ } ++ } ++ } //-- void afterEndElement() ++ ++ /** ++ * Method afterMarkup. ++ */ ++ private void afterMarkup() ++ { ++ states[depth] |= ELEMENT_HAS_MARKUP; ++ } //-- void afterMarkup() ++ ++ /** ++ * Method afterStartElement. ++ */ ++ private void afterStartElement() ++ { ++ afterMarkup(); ++ depth++; ++ } //-- void afterStartElement() ++ ++ /** ++ * Method beforeEndElement. ++ */ ++ private void beforeEndElement() ++ { ++ if ( depth > 0 && states[depth] == ELEMENT_HAS_MARKUP ) ++ { ++ newLine( depth - 1 ); ++ } ++ } //-- void beforeEndElement() ++ ++ /** ++ * Method beforeMarkup. ++ */ ++ private void beforeMarkup() ++ { ++ int state = states[depth]; ++ if ( ( state & ELEMENT_HAS_DATA ) == 0 && ( depth > 0 || state != 0 ) ) ++ { ++ newLine( depth ); ++ if ( depth > 0 && indent.length() > 0 ) ++ { ++ afterMarkup(); ++ } ++ } ++ } //-- void beforeMarkup() ++ ++ /** ++ * Method beforeStartElement. ++ */ ++ private void beforeStartElement() ++ { ++ beforeMarkup(); ++ if ( states.length <= depth + 1 ) ++ { ++ byte[] tmp = new byte[states.length * 2]; ++ System.arraycopy( states, 0, tmp, 0, states.length ); ++ states = tmp; ++ } ++ states[depth + 1] = 0; ++ } //-- void beforeStartElement() ++ ++ /** ++ * Method getLineSeparator. ++ * ++ * @return String ++ */ ++ public String getLineSeparator() ++ { ++ try ++ { ++ return System.getProperty( "line.separator", NEW_LINE ); ++ } ++ catch ( Exception e ) ++ { ++ return NEW_LINE; ++ } ++ } //-- String getLineSeparator() ++ ++ /** ++ * Method newLine. ++ * ++ * @param depth ++ */ ++ private void newLine( int depth ) ++ { ++ try ++ { ++ out.writeCharacters( newLine ); ++ int prefixLength = depth * indent.length(); ++ while ( linePrefix.length < prefixLength ) ++ { ++ char[] tmp = new char[linePrefix.length * 2]; ++ System.arraycopy( linePrefix, 0, tmp, 0, linePrefix.length ); ++ System.arraycopy( linePrefix, 0, tmp, linePrefix.length, linePrefix.length ); ++ linePrefix = tmp; ++ } ++ out.writeCharacters( linePrefix, 0, prefixLength ); ++ } ++ catch ( Exception e ) ++ { ++ } ++ } //-- void newLine( int ) ++ ++ /** ++ * Method setNewLine. ++ * ++ * @param newLine ++ */ ++ public void setNewLine( String newLine ) ++ { ++ this.newLine = newLine; ++ } //-- void setNewLine( String ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxReader.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxReader.java +new file mode 100644 +index 0000000..5f9c959 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxReader.java +@@ -0,0 +1,950 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata.io.stax; ++ ++ //---------------------------------/ ++ //- Imported classes and packages -/ ++//---------------------------------/ ++ ++import java.io.ByteArrayInputStream; ++import java.io.FileInputStream; ++import java.io.IOException; ++import java.io.InputStream; ++import java.io.InputStreamReader; ++import java.io.Reader; ++import java.io.StringReader; ++import java.io.StringWriter; ++import java.text.DateFormat; ++import java.text.ParsePosition; ++import java.util.Locale; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; ++import javax.xml.stream.*; ++import org.fedoraproject.xmvn.metadata.ArtifactAlias; ++import org.fedoraproject.xmvn.metadata.ArtifactMetadata; ++import org.fedoraproject.xmvn.metadata.Dependency; ++import org.fedoraproject.xmvn.metadata.DependencyExclusion; ++import org.fedoraproject.xmvn.metadata.PackageMetadata; ++import org.fedoraproject.xmvn.metadata.SkippedArtifactMetadata; ++ ++/** ++ * Class MetadataStaxReader. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class MetadataStaxReader ++{ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method read. ++ * ++ * @param reader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ public PackageMetadata read( Reader reader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader( reader ); ++ ++ return read( xmlStreamReader, strict ); ++ } //-- PackageMetadata read( Reader, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param reader ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ public PackageMetadata read( Reader reader ) ++ throws IOException, XMLStreamException ++ { ++ return read( reader, true ); ++ } //-- PackageMetadata read( Reader ) ++ ++ /** ++ * Method read. ++ * ++ * @param stream ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ public PackageMetadata read( InputStream stream, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader( stream ); ++ ++ return read( xmlStreamReader, strict ); ++ } //-- PackageMetadata read( InputStream, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param stream ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ public PackageMetadata read( InputStream stream ) ++ throws IOException, XMLStreamException ++ { ++ return read( stream, true ); ++ } //-- PackageMetadata read( InputStream ) ++ ++ /** ++ * Method read. ++ * ++ * @param filePath ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ public PackageMetadata read( String filePath, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ java.io.File file = new java.io.File( filePath ); ++ XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader( file.toURI().toURL().toExternalForm(), new FileInputStream( file ) ); ++ ++ return read( xmlStreamReader, strict ); ++ } //-- PackageMetadata read( String, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param filePath ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ public PackageMetadata read( String filePath ) ++ throws IOException, XMLStreamException ++ { ++ return read( filePath, true ); ++ } //-- PackageMetadata read( String ) ++ ++ /** ++ * Method checkFieldWithDuplicate. ++ * ++ * @param xmlStreamReader ++ * @param parsed ++ * @param alias ++ * @param tagName ++ * @throws XMLStreamException ++ * @return boolean ++ */ ++ private boolean checkFieldWithDuplicate( XMLStreamReader xmlStreamReader, String tagName, String alias, java.util.Set parsed ) ++ throws XMLStreamException ++ { ++ if ( !( xmlStreamReader.getLocalName().equals( tagName ) || xmlStreamReader.getLocalName().equals( alias ) ) ) ++ { ++ return false; ++ } ++ if ( !parsed.add( tagName ) ) ++ { ++ throw new XMLStreamException( "Duplicated tag: '" + tagName + "'", xmlStreamReader.getLocation() ); ++ } ++ return true; ++ } //-- boolean checkFieldWithDuplicate( XMLStreamReader, String, String, java.util.Set ) ++ ++ /** ++ * Method checkUnknownElement. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws XMLStreamException ++ */ ++ private void checkUnknownElement( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ int unrecognizedTagCount = 1; ++ while( unrecognizedTagCount != 0 ) ++ { ++ xmlStreamReader.next(); ++ if ( xmlStreamReader.getEventType() == XMLStreamConstants.START_ELEMENT ) ++ { ++ unrecognizedTagCount++; ++ } ++ else if ( xmlStreamReader.getEventType() == XMLStreamConstants.END_ELEMENT ) ++ { ++ unrecognizedTagCount--; ++ } ++ } ++ } //-- void checkUnknownElement( XMLStreamReader, boolean ) ++ ++ /** ++ * Method getBooleanValue. ++ * ++ * @param s ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return boolean ++ */ ++ private boolean getBooleanValue( String s, String attribute, XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ return Boolean.valueOf( s ).booleanValue(); ++ } ++ return false; ++ } //-- boolean getBooleanValue( String, String, XMLStreamReader ) ++ ++ /** ++ * Method getByteValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return byte ++ */ ++ private byte getByteValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Byte.valueOf( s ).byteValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a byte but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- byte getByteValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getCharacterValue. ++ * ++ * @param s ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return char ++ */ ++ private char getCharacterValue( String s, String attribute, XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ return s.charAt( 0 ); ++ } ++ return 0; ++ } //-- char getCharacterValue( String, String, XMLStreamReader ) ++ ++ /** ++ * Method getDateValue. ++ * ++ * @param s ++ * @param xmlStreamReader ++ * @param dateFormat ++ * @param attribute ++ * @throws XMLStreamException ++ * @return Date ++ */ ++ private java.util.Date getDateValue( String s, String attribute, String dateFormat, XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ String effectiveDateFormat = dateFormat; ++ if ( dateFormat == null ) ++ { ++ effectiveDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS"; ++ } ++ if ( "long".equals( effectiveDateFormat ) ) ++ { ++ try ++ { ++ return new java.util.Date( Long.parseLong( s ) ); ++ } ++ catch ( NumberFormatException e ) ++ { ++ throw new XMLStreamException( e.getMessage(), xmlStreamReader.getLocation(), e ); ++ } ++ } ++ else ++ { ++ try ++ { ++ DateFormat dateParser = new java.text.SimpleDateFormat( effectiveDateFormat, java.util.Locale.US ); ++ return dateParser.parse( s ); ++ } ++ catch ( java.text.ParseException e ) ++ { ++ throw new XMLStreamException( e.getMessage(), xmlStreamReader.getLocation(), e ); ++ } ++ } ++ } ++ return null; ++ } //-- java.util.Date getDateValue( String, String, String, XMLStreamReader ) ++ ++ /** ++ * Method getDefaultValue. ++ * ++ * @param s ++ * @param v ++ * @return String ++ */ ++ private String getDefaultValue( String s, String v ) ++ { ++ if ( s == null ) ++ { ++ s = v; ++ } ++ return s; ++ } //-- String getDefaultValue( String, String ) ++ ++ /** ++ * Method getDoubleValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return double ++ */ ++ private double getDoubleValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Double.valueOf( s ).doubleValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a floating point number but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- double getDoubleValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getFloatValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return float ++ */ ++ private float getFloatValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Float.valueOf( s ).floatValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a floating point number but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- float getFloatValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getIntegerValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return int ++ */ ++ private int getIntegerValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Integer.valueOf( s ).intValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be an integer but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- int getIntegerValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getLongValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return long ++ */ ++ private long getLongValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Long.valueOf( s ).longValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a long integer but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- long getLongValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getRequiredAttributeValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return String ++ */ ++ private String getRequiredAttributeValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s == null ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Missing required value for attribute '" + attribute + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ return s; ++ } //-- String getRequiredAttributeValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getShortValue. ++ * ++ * @param s ++ * @param strict ++ * @param xmlStreamReader ++ * @param attribute ++ * @throws XMLStreamException ++ * @return short ++ */ ++ private short getShortValue( String s, String attribute, XMLStreamReader xmlStreamReader, boolean strict ) ++ throws XMLStreamException ++ { ++ if ( s != null ) ++ { ++ try ++ { ++ return Short.valueOf( s ).shortValue(); ++ } ++ catch ( NumberFormatException nfe ) ++ { ++ if ( strict ) ++ { ++ throw new XMLStreamException( "Unable to parse element '" + attribute + "', must be a short integer but was '" + s + "'", xmlStreamReader.getLocation(), nfe ); ++ } ++ } ++ } ++ return 0; ++ } //-- short getShortValue( String, String, XMLStreamReader, boolean ) ++ ++ /** ++ * Method getTrimmedValue. ++ * ++ * @param s ++ * @return String ++ */ ++ private String getTrimmedValue( String s ) ++ { ++ if ( s != null ) ++ { ++ s = s.trim(); ++ } ++ return s; ++ } //-- String getTrimmedValue( String ) ++ ++ /** ++ * Method nextTag. ++ * ++ * @param xmlStreamReader ++ * @throws XMLStreamException ++ * @return int ++ */ ++ private int nextTag( XMLStreamReader xmlStreamReader ) ++ throws XMLStreamException ++ { ++ while ( true ) ++ { ++ int eventType = xmlStreamReader.next(); ++ switch ( eventType ) ++ { ++ case XMLStreamConstants.CHARACTERS: ++ case XMLStreamConstants.CDATA: ++ case XMLStreamConstants.SPACE: ++ case XMLStreamConstants.PROCESSING_INSTRUCTION: ++ case XMLStreamConstants.COMMENT: ++ break; ++ case XMLStreamConstants.START_ELEMENT: ++ case XMLStreamConstants.END_ELEMENT: ++ return eventType; ++ default: ++ throw new XMLStreamException( "expected start or end tag", xmlStreamReader.getLocation() ); ++ } ++ } ++ } //-- int nextTag( XMLStreamReader ) ++ ++ /** ++ * Method parseArtifactAlias. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return ArtifactAlias ++ */ ++ private ArtifactAlias parseArtifactAlias( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ ArtifactAlias artifactAlias = new ArtifactAlias(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "groupId", null, parsed ) ) ++ { ++ artifactAlias.setGroupId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactId", null, parsed ) ) ++ { ++ artifactAlias.setArtifactId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "extension", null, parsed ) ) ++ { ++ artifactAlias.setExtension( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "jar" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "classifier", null, parsed ) ) ++ { ++ artifactAlias.setClassifier( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return artifactAlias; ++ } //-- ArtifactAlias parseArtifactAlias( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseArtifactMetadata. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return ArtifactMetadata ++ */ ++ private ArtifactMetadata parseArtifactMetadata( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ ArtifactMetadata artifactMetadata = new ArtifactMetadata(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "groupId", null, parsed ) ) ++ { ++ artifactMetadata.setGroupId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactId", null, parsed ) ) ++ { ++ artifactMetadata.setArtifactId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "extension", null, parsed ) ) ++ { ++ artifactMetadata.setExtension( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "jar" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "classifier", null, parsed ) ) ++ { ++ artifactMetadata.setClassifier( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "version", null, parsed ) ) ++ { ++ artifactMetadata.setVersion( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "path", null, parsed ) ) ++ { ++ artifactMetadata.setPath( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "namespace", null, parsed ) ) ++ { ++ artifactMetadata.setNamespace( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "uuid", null, parsed ) ) ++ { ++ artifactMetadata.setUuid( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "properties", null, parsed ) ) ++ { ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ String key = xmlStreamReader.getLocalName(); ++ String value = xmlStreamReader.getElementText().trim(); ++ artifactMetadata.addProperty( key, value ); ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "compatVersions", null, parsed ) ) ++ { ++ java.util.List compatVersions = new java.util.ArrayList/**/(); ++ artifactMetadata.setCompatVersions( compatVersions ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "version".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ compatVersions.add( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "new java.util.ArrayList/**/()" ) ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "aliases", null, parsed ) ) ++ { ++ java.util.List aliases = new java.util.ArrayList/**/(); ++ artifactMetadata.setAliases( aliases ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "alias".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ aliases.add( parseArtifactAlias( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "dependencies", null, parsed ) ) ++ { ++ java.util.List dependencies = new java.util.ArrayList/**/(); ++ artifactMetadata.setDependencies( dependencies ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "dependency".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ artifactMetadata.addDependency( parseDependency( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return artifactMetadata; ++ } //-- ArtifactMetadata parseArtifactMetadata( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseDependency. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return Dependency ++ */ ++ private Dependency parseDependency( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ Dependency dependency = new Dependency(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "groupId", null, parsed ) ) ++ { ++ dependency.setGroupId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactId", null, parsed ) ) ++ { ++ dependency.setArtifactId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "extension", null, parsed ) ) ++ { ++ dependency.setExtension( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "jar" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "classifier", null, parsed ) ) ++ { ++ dependency.setClassifier( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "requestedVersion", null, parsed ) ) ++ { ++ dependency.setRequestedVersion( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "SYSTEM" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "resolvedVersion", null, parsed ) ) ++ { ++ dependency.setResolvedVersion( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "SYSTEM" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "namespace", null, parsed ) ) ++ { ++ dependency.setNamespace( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "exclusions", null, parsed ) ) ++ { ++ java.util.List exclusions = new java.util.ArrayList/**/(); ++ dependency.setExclusions( exclusions ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "exclusion".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ dependency.addExclusion( parseDependencyExclusion( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return dependency; ++ } //-- Dependency parseDependency( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseDependencyExclusion. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return DependencyExclusion ++ */ ++ private DependencyExclusion parseDependencyExclusion( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ DependencyExclusion dependencyExclusion = new DependencyExclusion(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "groupId", null, parsed ) ) ++ { ++ dependencyExclusion.setGroupId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactId", null, parsed ) ) ++ { ++ dependencyExclusion.setArtifactId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return dependencyExclusion; ++ } //-- DependencyExclusion parseDependencyExclusion( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parsePackageMetadata. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ private PackageMetadata parsePackageMetadata( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ PackageMetadata packageMetadata = new PackageMetadata(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "uuid", null, parsed ) ) ++ { ++ packageMetadata.setUuid( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "properties", null, parsed ) ) ++ { ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ String key = xmlStreamReader.getLocalName(); ++ String value = xmlStreamReader.getElementText().trim(); ++ packageMetadata.addProperty( key, value ); ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifacts", null, parsed ) ) ++ { ++ java.util.List artifacts = new java.util.ArrayList/**/(); ++ packageMetadata.setArtifacts( artifacts ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "artifact".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ packageMetadata.addArtifact( parseArtifactMetadata( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "skippedArtifacts", null, parsed ) ) ++ { ++ java.util.List skippedArtifacts = new java.util.ArrayList/**/(); ++ packageMetadata.setSkippedArtifacts( skippedArtifacts ); ++ while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( "skippedArtifact".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ packageMetadata.addSkippedArtifact( parseSkippedArtifactMetadata( xmlStreamReader, strict ) ); ++ } ++ else ++ { ++ throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() ); ++ } ++ } ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return packageMetadata; ++ } //-- PackageMetadata parsePackageMetadata( XMLStreamReader, boolean ) ++ ++ /** ++ * Method parseSkippedArtifactMetadata. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return SkippedArtifactMetadata ++ */ ++ private SkippedArtifactMetadata parseSkippedArtifactMetadata( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ SkippedArtifactMetadata skippedArtifactMetadata = new SkippedArtifactMetadata(); ++ java.util.Set parsed = new java.util.HashSet(); ++ while ( ( strict ? xmlStreamReader.nextTag() : nextTag( xmlStreamReader ) ) == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( checkFieldWithDuplicate( xmlStreamReader, "groupId", null, parsed ) ) ++ { ++ skippedArtifactMetadata.setGroupId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "artifactId", null, parsed ) ) ++ { ++ skippedArtifactMetadata.setArtifactId( getTrimmedValue( xmlStreamReader.getElementText() ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "extension", null, parsed ) ) ++ { ++ skippedArtifactMetadata.setExtension( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "jar" ) ) ); ++ } ++ else if ( checkFieldWithDuplicate( xmlStreamReader, "classifier", null, parsed ) ) ++ { ++ skippedArtifactMetadata.setClassifier( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "" ) ) ); ++ } ++ else ++ { ++ checkUnknownElement( xmlStreamReader, strict ); ++ } ++ } ++ return skippedArtifactMetadata; ++ } //-- SkippedArtifactMetadata parseSkippedArtifactMetadata( XMLStreamReader, boolean ) ++ ++ /** ++ * Method read. ++ * ++ * @param xmlStreamReader ++ * @param strict ++ * @throws IOException ++ * @throws XMLStreamException ++ * @return PackageMetadata ++ */ ++ private PackageMetadata read( XMLStreamReader xmlStreamReader, boolean strict ) ++ throws IOException, XMLStreamException ++ { ++ int eventType = xmlStreamReader.getEventType(); ++ String encoding = null; ++ while ( eventType != XMLStreamConstants.END_DOCUMENT ) ++ { ++ if ( eventType == XMLStreamConstants.START_DOCUMENT ) ++ { ++ encoding = xmlStreamReader.getCharacterEncodingScheme(); ++ } ++ if ( eventType == XMLStreamConstants.START_ELEMENT ) ++ { ++ if ( strict && ! "metadata".equals( xmlStreamReader.getLocalName() ) ) ++ { ++ throw new XMLStreamException( "Expected root element 'metadata' but found '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation(), null ); ++ } ++ PackageMetadata packageMetadata = parsePackageMetadata( xmlStreamReader, strict ); ++ packageMetadata.setModelEncoding( encoding ); ++ resolveReferences( packageMetadata ); ++ return packageMetadata; ++ } ++ eventType = xmlStreamReader.next(); ++ } ++ throw new XMLStreamException( "Expected root element 'metadata' but found no element at all: invalid XML document", xmlStreamReader.getLocation(), null ); ++ } //-- PackageMetadata read( XMLStreamReader, boolean ) ++ ++ /** ++ * Method resolveReferences. ++ * ++ * @param value ++ */ ++ private void resolveReferences( PackageMetadata value ) ++ { ++ java.util.Map refs; ++ } //-- void resolveReferences( PackageMetadata ) ++ ++} +diff --git a/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxWriter.java b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxWriter.java +new file mode 100644 +index 0000000..36eddd4 +--- /dev/null ++++ b/xmvn-core/target/generated-sources/modello/org/fedoraproject/xmvn/metadata/io/stax/MetadataStaxWriter.java +@@ -0,0 +1,490 @@ ++// =================== DO NOT EDIT THIS FILE ==================== ++// Generated by Modello 1.8.2, ++// any modifications will be overwritten. ++// ============================================================== ++ ++package org.fedoraproject.xmvn.metadata.io.stax; ++ ++ //---------------------------------/ ++ //- Imported classes and packages -/ ++//---------------------------------/ ++ ++import java.io.IOException; ++import java.io.OutputStream; ++import java.io.StringWriter; ++import java.io.Writer; ++import java.text.DateFormat; ++import java.util.Iterator; ++import java.util.Locale; ++import java.util.jar.Manifest; ++import javax.xml.stream.*; ++import org.fedoraproject.xmvn.metadata.ArtifactAlias; ++import org.fedoraproject.xmvn.metadata.ArtifactMetadata; ++import org.fedoraproject.xmvn.metadata.Dependency; ++import org.fedoraproject.xmvn.metadata.DependencyExclusion; ++import org.fedoraproject.xmvn.metadata.PackageMetadata; ++import org.fedoraproject.xmvn.metadata.SkippedArtifactMetadata; ++ ++/** ++ * Class MetadataStaxWriter. ++ * ++ * @version $Revision$ $Date$ ++ */ ++@SuppressWarnings( "all" ) ++public class MetadataStaxWriter ++{ ++ ++ //--------------------------/ ++ //- Class/Member Variables -/ ++ //--------------------------/ ++ ++ /** ++ * Field curId. ++ */ ++ private int curId; ++ ++ /** ++ * Field idMap. ++ */ ++ private java.util.Map idMap; ++ ++ ++ //----------------/ ++ //- Constructors -/ ++ //----------------/ ++ ++ public MetadataStaxWriter() ++ { ++ idMap = new java.util.HashMap(); ++ } //-- org.fedoraproject.xmvn.metadata.io.stax.MetadataStaxWriter() ++ ++ ++ //-----------/ ++ //- Methods -/ ++ //-----------/ ++ ++ /** ++ * Method write. ++ * ++ * @param writer ++ * @param packageMetadata ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ public void write( Writer writer, PackageMetadata packageMetadata ) ++ throws java.io.IOException, XMLStreamException ++ { ++ XMLOutputFactory factory = XMLOutputFactory.newInstance(); ++ boolean supportWindowsLineEndings = false; ++ if ( factory.isPropertySupported( "com.ctc.wstx.outputEscapeCr" ) ) ++ { ++ factory.setProperty( "com.ctc.wstx.outputEscapeCr", Boolean.FALSE ); ++ supportWindowsLineEndings = true; ++ } ++ if ( factory.isPropertySupported( "org.codehaus.stax2.automaticEmptyElements" ) ) ++ { ++ factory.setProperty( "org.codehaus.stax2.automaticEmptyElements", Boolean.FALSE ); ++ } ++ IndentingXMLStreamWriter serializer = new IndentingXMLStreamWriter( factory.createXMLStreamWriter( writer ) ); ++ if ( supportWindowsLineEndings ) ++ { ++ serializer.setNewLine( serializer.getLineSeparator() ); ++ } ++ serializer.writeStartDocument( packageMetadata.getModelEncoding(), "1.0" ); ++ writePackageMetadata( packageMetadata, "metadata", serializer ); ++ serializer.writeEndDocument(); ++ } //-- void write( Writer, PackageMetadata ) ++ ++ /** ++ * Method write. ++ * ++ * @param stream ++ * @param packageMetadata ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ public void write( OutputStream stream, PackageMetadata packageMetadata ) ++ throws java.io.IOException, XMLStreamException ++ { ++ XMLOutputFactory factory = XMLOutputFactory.newInstance(); ++ boolean supportWindowsLineEndings = false; ++ if ( factory.isPropertySupported( "com.ctc.wstx.outputEscapeCr" ) ) ++ { ++ factory.setProperty( "com.ctc.wstx.outputEscapeCr", Boolean.FALSE ); ++ supportWindowsLineEndings = true; ++ } ++ if ( factory.isPropertySupported( "org.codehaus.stax2.automaticEmptyElements" ) ) ++ { ++ factory.setProperty( "org.codehaus.stax2.automaticEmptyElements", Boolean.FALSE ); ++ } ++ IndentingXMLStreamWriter serializer = new IndentingXMLStreamWriter( factory.createXMLStreamWriter( stream, packageMetadata.getModelEncoding() ) ); ++ if ( supportWindowsLineEndings ) ++ { ++ serializer.setNewLine( serializer.getLineSeparator() ); ++ } ++ serializer.writeStartDocument( packageMetadata.getModelEncoding(), "1.0" ); ++ writePackageMetadata( packageMetadata, "metadata", serializer ); ++ serializer.writeEndDocument(); ++ } //-- void write( OutputStream, PackageMetadata ) ++ ++ /** ++ * Method writeArtifactAlias. ++ * ++ * @param artifactAlias ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeArtifactAlias( ArtifactAlias artifactAlias, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( artifactAlias != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( artifactAlias.getGroupId() != null ) ++ { ++ serializer.writeStartElement( "groupId" ); ++ serializer.writeCharacters( artifactAlias.getGroupId() ); ++ serializer.writeEndElement(); ++ } ++ if ( artifactAlias.getArtifactId() != null ) ++ { ++ serializer.writeStartElement( "artifactId" ); ++ serializer.writeCharacters( artifactAlias.getArtifactId() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactAlias.getExtension() != null ) && !artifactAlias.getExtension().equals( "jar" ) ) ++ { ++ serializer.writeStartElement( "extension" ); ++ serializer.writeCharacters( artifactAlias.getExtension() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactAlias.getClassifier() != null ) && !artifactAlias.getClassifier().equals( "" ) ) ++ { ++ serializer.writeStartElement( "classifier" ); ++ serializer.writeCharacters( artifactAlias.getClassifier() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeArtifactAlias( ArtifactAlias, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeArtifactMetadata. ++ * ++ * @param artifactMetadata ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeArtifactMetadata( ArtifactMetadata artifactMetadata, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( artifactMetadata != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( artifactMetadata.getGroupId() != null ) ++ { ++ serializer.writeStartElement( "groupId" ); ++ serializer.writeCharacters( artifactMetadata.getGroupId() ); ++ serializer.writeEndElement(); ++ } ++ if ( artifactMetadata.getArtifactId() != null ) ++ { ++ serializer.writeStartElement( "artifactId" ); ++ serializer.writeCharacters( artifactMetadata.getArtifactId() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getExtension() != null ) && !artifactMetadata.getExtension().equals( "jar" ) ) ++ { ++ serializer.writeStartElement( "extension" ); ++ serializer.writeCharacters( artifactMetadata.getExtension() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getClassifier() != null ) && !artifactMetadata.getClassifier().equals( "" ) ) ++ { ++ serializer.writeStartElement( "classifier" ); ++ serializer.writeCharacters( artifactMetadata.getClassifier() ); ++ serializer.writeEndElement(); ++ } ++ if ( artifactMetadata.getVersion() != null ) ++ { ++ serializer.writeStartElement( "version" ); ++ serializer.writeCharacters( artifactMetadata.getVersion() ); ++ serializer.writeEndElement(); ++ } ++ if ( artifactMetadata.getPath() != null ) ++ { ++ serializer.writeStartElement( "path" ); ++ serializer.writeCharacters( artifactMetadata.getPath() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getNamespace() != null ) && !artifactMetadata.getNamespace().equals( "" ) ) ++ { ++ serializer.writeStartElement( "namespace" ); ++ serializer.writeCharacters( artifactMetadata.getNamespace() ); ++ serializer.writeEndElement(); ++ } ++ if ( artifactMetadata.getUuid() != null ) ++ { ++ serializer.writeStartElement( "uuid" ); ++ serializer.writeCharacters( artifactMetadata.getUuid() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getProperties() != null ) && ( artifactMetadata.getProperties().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "properties" ); ++ for ( Iterator iter = artifactMetadata.getProperties().keySet().iterator(); iter.hasNext(); ) ++ { ++ String key = (String) iter.next(); ++ String value = (String) artifactMetadata.getProperties().get( key ); ++ serializer.writeStartElement( "" + key + "" ); ++ serializer.writeCharacters( value ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getCompatVersions() != null ) && ( artifactMetadata.getCompatVersions().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "compatVersions" ); ++ for ( Iterator iter = artifactMetadata.getCompatVersions().iterator(); iter.hasNext(); ) ++ { ++ String compatVersion = (String) iter.next(); ++ serializer.writeStartElement( "version" ); ++ serializer.writeCharacters( compatVersion ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getAliases() != null ) && ( artifactMetadata.getAliases().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "aliases" ); ++ for ( Iterator iter = artifactMetadata.getAliases().iterator(); iter.hasNext(); ) ++ { ++ ArtifactAlias o = (ArtifactAlias) iter.next(); ++ writeArtifactAlias( o, "alias", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( artifactMetadata.getDependencies() != null ) && ( artifactMetadata.getDependencies().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "dependencies" ); ++ for ( Iterator iter = artifactMetadata.getDependencies().iterator(); iter.hasNext(); ) ++ { ++ Dependency o = (Dependency) iter.next(); ++ writeDependency( o, "dependency", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeArtifactMetadata( ArtifactMetadata, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeDependency. ++ * ++ * @param dependency ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeDependency( Dependency dependency, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( dependency != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( dependency.getGroupId() != null ) ++ { ++ serializer.writeStartElement( "groupId" ); ++ serializer.writeCharacters( dependency.getGroupId() ); ++ serializer.writeEndElement(); ++ } ++ if ( dependency.getArtifactId() != null ) ++ { ++ serializer.writeStartElement( "artifactId" ); ++ serializer.writeCharacters( dependency.getArtifactId() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( dependency.getExtension() != null ) && !dependency.getExtension().equals( "jar" ) ) ++ { ++ serializer.writeStartElement( "extension" ); ++ serializer.writeCharacters( dependency.getExtension() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( dependency.getClassifier() != null ) && !dependency.getClassifier().equals( "" ) ) ++ { ++ serializer.writeStartElement( "classifier" ); ++ serializer.writeCharacters( dependency.getClassifier() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( dependency.getRequestedVersion() != null ) && !dependency.getRequestedVersion().equals( "SYSTEM" ) ) ++ { ++ serializer.writeStartElement( "requestedVersion" ); ++ serializer.writeCharacters( dependency.getRequestedVersion() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( dependency.getResolvedVersion() != null ) && !dependency.getResolvedVersion().equals( "SYSTEM" ) ) ++ { ++ serializer.writeStartElement( "resolvedVersion" ); ++ serializer.writeCharacters( dependency.getResolvedVersion() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( dependency.getNamespace() != null ) && !dependency.getNamespace().equals( "" ) ) ++ { ++ serializer.writeStartElement( "namespace" ); ++ serializer.writeCharacters( dependency.getNamespace() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( dependency.getExclusions() != null ) && ( dependency.getExclusions().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "exclusions" ); ++ for ( Iterator iter = dependency.getExclusions().iterator(); iter.hasNext(); ) ++ { ++ DependencyExclusion o = (DependencyExclusion) iter.next(); ++ writeDependencyExclusion( o, "exclusion", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeDependency( Dependency, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeDependencyExclusion. ++ * ++ * @param dependencyExclusion ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeDependencyExclusion( DependencyExclusion dependencyExclusion, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( dependencyExclusion != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( dependencyExclusion.getGroupId() != null ) ++ { ++ serializer.writeStartElement( "groupId" ); ++ serializer.writeCharacters( dependencyExclusion.getGroupId() ); ++ serializer.writeEndElement(); ++ } ++ if ( dependencyExclusion.getArtifactId() != null ) ++ { ++ serializer.writeStartElement( "artifactId" ); ++ serializer.writeCharacters( dependencyExclusion.getArtifactId() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeDependencyExclusion( DependencyExclusion, String, XMLStreamWriter ) ++ ++ /** ++ * Method writePackageMetadata. ++ * ++ * @param packageMetadata ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writePackageMetadata( PackageMetadata packageMetadata, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( packageMetadata != null ) ++ { ++ serializer.setDefaultNamespace( "http://fedorahosted.org/xmvn/METADATA/2.0.0" ); ++ serializer.writeStartElement( tagName ); ++ serializer.writeDefaultNamespace( "http://fedorahosted.org/xmvn/METADATA/2.0.0" ); ++ if ( packageMetadata.getUuid() != null ) ++ { ++ serializer.writeStartElement( "uuid" ); ++ serializer.writeCharacters( packageMetadata.getUuid() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( packageMetadata.getProperties() != null ) && ( packageMetadata.getProperties().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "properties" ); ++ for ( Iterator iter = packageMetadata.getProperties().keySet().iterator(); iter.hasNext(); ) ++ { ++ String key = (String) iter.next(); ++ String value = (String) packageMetadata.getProperties().get( key ); ++ serializer.writeStartElement( "" + key + "" ); ++ serializer.writeCharacters( value ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( packageMetadata.getArtifacts() != null ) && ( packageMetadata.getArtifacts().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "artifacts" ); ++ for ( Iterator iter = packageMetadata.getArtifacts().iterator(); iter.hasNext(); ) ++ { ++ ArtifactMetadata o = (ArtifactMetadata) iter.next(); ++ writeArtifactMetadata( o, "artifact", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ if ( ( packageMetadata.getSkippedArtifacts() != null ) && ( packageMetadata.getSkippedArtifacts().size() > 0 ) ) ++ { ++ serializer.writeStartElement( "skippedArtifacts" ); ++ for ( Iterator iter = packageMetadata.getSkippedArtifacts().iterator(); iter.hasNext(); ) ++ { ++ SkippedArtifactMetadata o = (SkippedArtifactMetadata) iter.next(); ++ writeSkippedArtifactMetadata( o, "skippedArtifact", serializer ); ++ } ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writePackageMetadata( PackageMetadata, String, XMLStreamWriter ) ++ ++ /** ++ * Method writeSkippedArtifactMetadata. ++ * ++ * @param skippedArtifactMetadata ++ * @param serializer ++ * @param tagName ++ * @throws java.io.IOException ++ * @throws XMLStreamException ++ */ ++ private void writeSkippedArtifactMetadata( SkippedArtifactMetadata skippedArtifactMetadata, String tagName, XMLStreamWriter serializer ) ++ throws java.io.IOException, XMLStreamException ++ { ++ if ( skippedArtifactMetadata != null ) ++ { ++ serializer.writeStartElement( tagName ); ++ if ( skippedArtifactMetadata.getGroupId() != null ) ++ { ++ serializer.writeStartElement( "groupId" ); ++ serializer.writeCharacters( skippedArtifactMetadata.getGroupId() ); ++ serializer.writeEndElement(); ++ } ++ if ( skippedArtifactMetadata.getArtifactId() != null ) ++ { ++ serializer.writeStartElement( "artifactId" ); ++ serializer.writeCharacters( skippedArtifactMetadata.getArtifactId() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( skippedArtifactMetadata.getExtension() != null ) && !skippedArtifactMetadata.getExtension().equals( "jar" ) ) ++ { ++ serializer.writeStartElement( "extension" ); ++ serializer.writeCharacters( skippedArtifactMetadata.getExtension() ); ++ serializer.writeEndElement(); ++ } ++ if ( ( skippedArtifactMetadata.getClassifier() != null ) && !skippedArtifactMetadata.getClassifier().equals( "" ) ) ++ { ++ serializer.writeStartElement( "classifier" ); ++ serializer.writeCharacters( skippedArtifactMetadata.getClassifier() ); ++ serializer.writeEndElement(); ++ } ++ serializer.writeEndElement(); ++ } ++ } //-- void writeSkippedArtifactMetadata( SkippedArtifactMetadata, String, XMLStreamWriter ) ++ ++} +diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml +index 5f7544b..9ed9ff0 100644 +--- a/xmvn-parent/pom.xml ++++ b/xmvn-parent/pom.xml +@@ -104,7 +104,7 @@ + 4.11 + 2.3 + 1.0 +- 1.8.2 ++ 1.7 + 3.0.1 + 2.7 + 2.7 +-- +2.5.0 + diff --git a/SPECS/xmvn.spec b/SPECS/xmvn.spec new file mode 100644 index 0000000..390aaa4 --- /dev/null +++ b/SPECS/xmvn.spec @@ -0,0 +1,589 @@ +%global pkg_name xmvn +%{?scl:%scl_package %{pkg_name}} +%{?maven_find_provides_and_requires} + +Name: %{?scl_prefix}%{pkg_name} +Version: 2.1.1 +Release: 1.19%{?dist} +Summary: Local Extensions for Apache Maven +License: ASL 2.0 +URL: http://mizdebsk.fedorapeople.org/xmvn +BuildArch: noarch + +# git snapshot +Source0: https://fedorahosted.org/released/%{pkg_name}/%{pkg_name}-%{version}.tar.xz + +Patch0001: 0001-Disable-doclint-in-javadoc-aggregate-MOJO-executions.patch +Patch0002: 0002-Add-duplicated-ZIP-entry-hack-for-OpenJDK.patch +Patch0003: 0003-Add-hack-for-forcing-correct-namespace-in-depmap-res.patch +Patch0004: 0004-Port-to-Modello-1.7.patch + +BuildRequires: %{?scl_prefix}maven +BuildRequires: %{?scl_prefix}maven-local +BuildRequires: %{?scl_prefix}beust-jcommander +BuildRequires: %{?scl_prefix}cglib +BuildRequires: %{?scl_prefix}maven-dependency-plugin +BuildRequires: %{?scl_prefix}maven-plugin-build-helper +BuildRequires: %{?scl_prefix}maven-assembly-plugin +BuildRequires: %{?scl_prefix}maven-invoker-plugin +BuildRequires: %{?scl_prefix_java_common}objectweb-asm5 +BuildRequires: %{?scl_prefix}modello >= 1.7 +BuildRequires: %{?scl_prefix}xmlunit +BuildRequires: %{?scl_prefix}apache-ivy >= 2.3.0-4.8 +BuildRequires: %{?scl_prefix_java_common}junit +BuildRequires: %{?scl_prefix_java_common}slf4j-simple +BuildRequires: %{?scl_prefix}sisu-mojos + +Requires: %{?scl_prefix}maven +Requires: %{name}-api = %{version}-%{release} +Requires: %{name}-connector-aether = %{version}-%{release} +Requires: %{name}-core = %{version}-%{release} + +%description +This package provides extensions for Apache Maven that can be used to +manage system artifact repository and use it to resolve Maven +artifacts in offline mode, as well as Maven plugins to help with +creating RPM packages containing Maven artifacts. + +%package parent-pom +Summary: XMvn Parent POM + +%description parent-pom +This package provides XMvn parent POM. + +%package api +Summary: XMvn API + +%description api +This package provides XMvn API module which contains public interface +for functionality implemented by XMvn Core. + +%package launcher +Summary: XMvn Launcher + +%description launcher +This package provides XMvn Launcher module, which provides a way of +launching XMvn running in isolated class realm and locating XMVn +services. + +%package core +Summary: XMvn Core + +%description core +This package provides XMvn Core module, which implements the essential +functionality of XMvn such as resolution of artifacts from system +repository. + +%package connector-aether +Summary: XMvn Connector for Eclipse Aether + +%description connector-aether +This package provides XMvn Connector for Eclipse Aether, which +provides integration of Eclipse Aether with XMvn. It provides an +adapter which allows XMvn resolver to be used as Aether workspace +reader. + +%package connector-ivy +Summary: XMvn Connector for Apache Ivy + +%description connector-ivy +This package provides XMvn Connector for Apache Ivy, which provides +integration of Apache Ivy with XMvn. It provides an adapter which +allows XMvn resolver to be used as Ivy resolver. + +%package mojo +Summary: XMvn MOJO + +%description mojo +This package provides XMvn MOJO, which is a Maven plugin that consists +of several MOJOs. Some goals of these MOJOs are intended to be +attached to default Maven lifecycle when building packages, others can +be called directly from Maven command line. + +%package tools-pom +Summary: XMvn Tools POM + +%description tools-pom +This package provides XMvn Tools parent POM. + +%package resolve +Summary: XMvn Resolver + +%description resolve +This package provides XMvn Resolver, which is a very simple +commald-line tool to resolve Maven artifacts from system repositories. +Basically it's just an interface to artifact resolution mechanism +implemented by XMvn Core. The primary intended use case of XMvn +Resolver is debugging local artifact repositories. + +%package bisect +Summary: XMvn Bisect + +%description bisect +This package provides XMvn Bisect, which is a debugging tool that can +diagnose build failures by using bisection method. + +%package subst +Summary: XMvn Subst + +%description subst +This package provides XMvn Subst, which is a tool that can substitute +Maven artifact files with symbolic links to corresponding files in +artifact repository. + +%package install +Summary: XMvn Install + +%description install +This package provides XMvn Install, which is a command-line interface +to XMvn installer. The installer reads reactor metadata and performs +artifact installation according to specified configuration. + +%package javadoc +Summary: API documentation for %{pkg_name} + +%description javadoc +This package provides %{summary}. + +%prep +%setup -q -n %{pkg_name}-%{version} +%{?scl:scl enable %{scl} - <<"EOF"} +set -e -x +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch0004 -p1 + +# XXX Disable duplicate metadata enforcing for now +sed -i /artifactMap.remove/d $(find -name MetadataResolver.java) + +%mvn_package :xmvn __noinstall + +# In XMvn 2.x xmvn-connector was renamed to xmvn-connector-aether +%mvn_alias :xmvn-connector-aether :xmvn-connector + +# remove dependency plugin maven-binaries execution +# we provide apache-maven by symlink +%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]" + +# get mavenVersion that is expected +mver=$(sed -n '//{s/.*>\(.*\)<.*/\1/;p}' \ + xmvn-parent/pom.xml) +mkdir -p target/dependency/ +cp -aL %{_datadir}/maven target/dependency/apache-maven-$mver + +# skip ITs for now (mix of old & new XMvn config causes issues +rm -rf src/it +%{?scl:EOF} + +%build +%{?scl:scl enable %{scl} - <<"EOF"} +set -e -x +# XXX some tests fail on ARM for unknown reason, see why +%mvn_build -s -f + +tar --delay-directory-restore -xvf target/*tar.bz2 +chmod -R +rwX %{pkg_name}-%{version}* +# These are installed as doc +rm -Rf %{pkg_name}-%{version}*/{AUTHORS,README,LICENSE,NOTICE} +%{?scl:EOF} + + +%install +%{?scl:scl enable %{scl} - <<"EOF"} +set -e -x +%mvn_install + +install -d -m 755 %{buildroot}%{_datadir}/%{pkg_name} +cp -r %{pkg_name}-%{version}*/* %{buildroot}%{_datadir}/%{pkg_name}/ +ln -sf %{_datadir}/maven/bin/mvn %{buildroot}%{_datadir}/%{pkg_name}/bin/mvn +ln -sf %{_datadir}/maven/bin/mvnDebug %{buildroot}%{_datadir}/%{pkg_name}/bin/mvnDebug +ln -sf %{_datadir}/maven/bin/mvnyjp %{buildroot}%{_datadir}/%{pkg_name}/bin/mvnyjp + +# helper scripts +install -d -m 755 %{buildroot}%{_bindir} +for tool in subst resolve bisect install;do + cat <%{buildroot}%{_bindir}/%{pkg_name}-$tool +#!/bin/sh -e +exec %{_datadir}/%{pkg_name}/bin/%{pkg_name}-$tool "\${@}" +XEOF + chmod +x %{buildroot}%{_bindir}/%{pkg_name}-$tool +done + +# copy over maven lib directory +cp -r %{_datadir}/maven/lib/* %{buildroot}%{_datadir}/%{pkg_name}/lib/ + +# possibly recreate symlinks that can be automated with xmvn-subst +%{pkg_name}-subst %{buildroot}%{_datadir}/%{pkg_name}/ + +# /usr/bin/xmvn script +echo "#!/bin/sh -e +export M2_HOME=\"\${M2_HOME:-%{_datadir}/%{pkg_name}}\" +exec mvn \"\${@}\"" >%{buildroot}%{_bindir}/%{pkg_name} + +# make sure our conf is identical to maven so yum won't freak out +install -d -m 755 %{buildroot}%{_datadir}/%{pkg_name}/conf/ +cp -P %{_datadir}/maven/conf/settings.xml %{buildroot}%{_datadir}/%{pkg_name}/conf/ +cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{pkg_name}/bin/ +%{?scl:EOF} + +%files +%attr(755,-,-) %{_bindir}/%{pkg_name} +%dir %{_datadir}/%{pkg_name}/bin +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/lib/*.jar +%{_datadir}/%{pkg_name}/lib/ext +%{_datadir}/%{pkg_name}/bin/m2.conf +%{_datadir}/%{pkg_name}/bin/mvn +%{_datadir}/%{pkg_name}/bin/mvnDebug +%{_datadir}/%{pkg_name}/bin/mvnyjp +%{_datadir}/%{pkg_name}/bin/xmvn +%{_datadir}/%{pkg_name}/boot +%{_datadir}/%{pkg_name}/conf + +%files parent-pom -f .mfiles-xmvn-parent +%doc LICENSE NOTICE + +%files launcher -f .mfiles-xmvn-launcher +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/lib/core + +%files core -f .mfiles-xmvn-core + +%files api -f .mfiles-xmvn-api +%dir %{_javadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} +%doc LICENSE NOTICE +%doc AUTHORS README + +%files connector-aether -f .mfiles-xmvn-connector-aether + +%files connector-ivy -f .mfiles-xmvn-connector-ivy +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/lib/ivy + +%files mojo -f .mfiles-xmvn-mojo + +%files tools-pom -f .mfiles-xmvn-tools + +%files resolve -f .mfiles-xmvn-resolve +%attr(755,-,-) %{_bindir}/%{pkg_name}-resolve +%dir %{_datadir}/%{pkg_name}/bin +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/bin/%{pkg_name}-resolve +%{_datadir}/%{pkg_name}/lib/resolver + +%files bisect -f .mfiles-xmvn-bisect +%attr(755,-,-) %{_bindir}/%{pkg_name}-bisect +%dir %{_datadir}/%{pkg_name}/bin +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/bin/%{pkg_name}-bisect +%{_datadir}/%{pkg_name}/lib/bisect + +%files subst -f .mfiles-xmvn-subst +%attr(755,-,-) %{_bindir}/%{pkg_name}-subst +%dir %{_datadir}/%{pkg_name}/bin +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/bin/%{pkg_name}-subst +%{_datadir}/%{pkg_name}/lib/subst + +%files install -f .mfiles-xmvn-install +%attr(755,-,-) %{_bindir}/%{pkg_name}-install +%dir %{_datadir}/%{pkg_name}/bin +%dir %{_datadir}/%{pkg_name}/lib +%{_datadir}/%{pkg_name}/bin/%{pkg_name}-install +%{_datadir}/%{pkg_name}/lib/installer + +%files javadoc -f .mfiles-javadoc +%doc LICENSE NOTICE + +%changelog +* Mon Feb 08 2016 Michal Srb - 2.1.1-1.19 +- Fix BR on maven-local & co. + +* Wed Jan 20 2016 Mikolaj Izdebski - 2.1.1-1.18 +- Disable javadoc doclint only on Java 8 or later + +* Tue Jan 19 2016 Mikolaj Izdebski - 2.1.1-1.17 +- Disable doclint in javadoc:aggregate MOJO executions +- Add duplicated ZIP entry hack for OpenJDK + +* Tue Jan 19 2016 Michal Srb - 2.1.1-1.16 +- Rebuild to fix classworlds symlink + +* Mon Jan 18 2016 Michal Srb - 2.1.1-1.15 +- Drop build hacks + +* Mon Jan 18 2016 Michal Srb - 2.1.1-1.14 +- Rebuild to remove asm3 symlink + +* Fri Jan 15 2016 Michal Srb - 2.1.1-1.13 +- maven33 rebuild #3 + +* Mon Jan 11 2016 Michal Srb - 2.1.1-1.12 +- maven33 rebuild #2 + +* Sat Jan 09 2016 Michal Srb - 2.1.1-1.11 +- maven33 rebuild + +* Thu Jan 15 2015 Michal Srb - 2.1.1-1.10 +- Fix directory ownership + +* Tue Jan 13 2015 Michal Srb - 2.1.1-1.9 +- Rebuild to fix httpcommons symlinks + +* Tue Jan 13 2015 Michal Srb - 2.1.1-1.8 +- httpcomponents 4.2 (compat) rebuild + +* Tue Jan 13 2015 Michael Simacek - 2.1.1-1.7 +- Mass rebuild 2015-01-13 + +* Mon Jan 12 2015 Mikolaj Izdebski - 2.1.1-1.6 +- Rebuild to fix symlinks + +* Mon Jan 12 2015 Michael Simacek - 2.1.1-1.5 +- Rebuild to regenerate requires from java-common + +* Fri Jan 9 2015 Mikolaj Izdebski - 2.1.1-1.4 +- Disable duplicate metadata enforcing for now + +* Wed Jan 7 2015 Mikolaj Izdebski - 2.1.1-1.3 +- Re-add dependency on ASM 5 + +* Wed Jan 7 2015 Mikolaj Izdebski - 2.1.1-1.2 +- Port to Modello 1.7 + +* Mon Jan 5 2015 Mikolaj Izdebski - 2.1.1-1.1 +- Update to upstream version 2.1.1 + +* Fri Jan 2 2015 Mikolaj Izdebski - 2.2.0-0.3.20141212git221a2d4 +- Prevent xmvn-resolve from failing in XML mode + +* Wed Dec 17 2014 Mikolaj Izdebski - 2.2.0-0.2.20141212git221a2d4 +- Add patch for namespace support in depmap resolver + +* Tue Dec 16 2014 Mikolaj Izdebski - 2.2.0-0.1.20141212git221a2d4 +- Update to upstream 2.2.0 snapshot + +* Mon May 26 2014 Mikolaj Izdebski - 1.3.0-5.11 +- Mass rebuild 2014-05-26 + +* Wed Feb 19 2014 Mikolaj Izdebski - 1.3.0-5.10 +- Mass rebuild 2014-02-19 + +* Wed Feb 19 2014 Mikolaj Izdebski - 1.3.0-5.9 +- Remove workaround for rhbz#447156 + +* Tue Feb 18 2014 Mikolaj Izdebski - 1.3.0-5.8 +- Mass rebuild 2014-02-18 + +* Mon Feb 17 2014 Mikolaj Izdebski - 1.3.0-5.7 +- Add missing BR: maven-plugin-plugin, plexus-containers-component-metadata + +* Mon Feb 17 2014 Mikolaj Izdebski - 1.3.0-5.6 +- Remove temporary hacks + +* Fri Feb 14 2014 Mikolaj Izdebski - 1.3.0-5.5 +- Remove temp BR + +* Thu Feb 13 2014 Mikolaj Izdebski - 1.3.0-5.4 +- SCL-ize requires and build-requires +- Bump version requirement on maven + +* Thu Feb 13 2014 Mikolaj Izdebski - 1.3.0-5.3 +- Rebuild to regenerate auto-requires + +* Wed Feb 12 2014 Mikolaj Izdebski - 1.3.0-5.2 +- Use Maven from %%{_root_datadir} for now +- Fix quotation in nested here-documents +- Fix symlinks to Maven +- Fix dangling symlinks to Maven JARs +- Avoid nested here-documents + +* Tue Feb 11 2014 Mikolaj Izdebski - 1.3.0-5.1 +- First maven30 software collection build + +* Fri Jan 10 2014 Mikolaj Izdebski - 1.3.0-5 +- Split 1 patch to 3 patches, one per feature +- Add support for absolute artifact symlinks + +* Fri Dec 27 2013 Daniel Mach - 1.3.0-4 +- Mass rebuild 2013-12-27 + +* Thu Nov 7 2013 Mikolaj Izdebski - 1.3.0-3 +- Fix guice symlinks + +* Thu Nov 7 2013 Mikolaj Izdebski - 1.3.0-2 +- Bump Maven requirement to 3.0.5-14 + +* Thu Nov 7 2013 Mikolaj Izdebski - 1.3.0-1 +- Rebase upstream version 1.3.0 + +* Tue Oct 01 2013 Stanislav Ochotnicky - 1.1.0-1 +- Update to upstream version 1.1.0 + +* Fri Sep 27 2013 Stanislav Ochotnicky - 1.0.2-3 +- Add __default package specifier support + +* Mon Sep 23 2013 Mikolaj Izdebski - 1.0.2-2 +- Don't try to relativize symlink targets +- Restotre support for relative symlinks + +* Fri Sep 20 2013 Mikolaj Izdebski - 1.0.2-1 +- Update to upstream version 1.0.2 + +* Tue Sep 10 2013 Stanislav Ochotnicky - 1.0.0-2 +- Workaround broken symlinks for core and connector (#986909) + +* Mon Sep 09 2013 Stanislav Ochotnicky - 1.0.0-1 +- Updating to upstream 1.0.0 + +* Tue Sep 3 2013 Stanislav Ochotnicky 1.0.0-0.2.alpha1 +- Update to upstream version 1.0.0 alpha1 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 23 2013 Mikolaj Izdebski - 0.5.1-3 +- Rebuild without bootstrapping + +* Tue Jul 23 2013 Mikolaj Izdebski - 0.5.1-2 +- Install symlink to simplelogger.properties in %{_sysconfdir} + +* Tue Jul 23 2013 Mikolaj Izdebski - 0.5.1-1 +- Update to upstream version 0.5.1 + +* Tue Jul 23 2013 Mikolaj Izdebski - 0.5.0-7 +- Allow installation of Eclipse plugins in javadir + +* Mon Jul 22 2013 Mikolaj Izdebski - 0.5.0-6 +- Remove workaround for plexus-archiver bug +- Use sonatype-aether symlinks + +* Fri Jun 28 2013 Mikolaj Izdebski - 0.5.0-5 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Wed Jun 5 2013 Mikolaj Izdebski - 0.5.0-5 +- Fix resolution of tools.jar + +* Fri May 31 2013 Stanislav Ochotnicky - 0.5.0-4 +- Fix handling of packages with dots in groupId +- Previous versions also fixed bug #948731 + +* Tue May 28 2013 Stanislav Ochotnicky - 0.5.0-3 +- Move pre scriptlet to pretrans and implement in lua + +* Fri May 24 2013 Stanislav Ochotnicky - 0.5.0-2 +- Fix upgrade path scriptlet +- Add patch to fix NPE when debugging is disabled + +* Fri May 24 2013 Stanislav Ochotnicky - 0.5.0-1 +- Update to upstream version 0.5.0 + +* Fri May 17 2013 Mikolaj Izdebski - 0.4.2-3 +- Add patch: install MOJO fix + +* Wed Apr 17 2013 Mikolaj Izdebski - 0.4.2-2 +- Update plexus-containers-container-default JAR location + +* Tue Apr 9 2013 Mikolaj Izdebski - 0.4.2-1 +- Update to upstream version 0.4.2 + +* Thu Mar 21 2013 Michal Srb - 0.4.1-1 +- Update to upstream version 0.4.1 + +* Fri Mar 15 2013 Mikolaj Izdebski - 0.4.0-1 +- Update to upstream version 0.4.0 + +* Fri Mar 15 2013 Mikolaj Izdebski - 0.4.0-0.7 +- Enable tests + +* Thu Mar 14 2013 Mikolaj Izdebski - 0.4.0-0.6 +- Update to newer snapshot + +* Wed Mar 13 2013 Mikolaj Izdebski - 0.4.0-0.5 +- Update to newer snapshot + +* Wed Mar 13 2013 Mikolaj Izdebski - 0.4.0-0.4 +- Set proper permissions for scripts in _bindir + +* Tue Mar 12 2013 Mikolaj Izdebski - 0.4.0-0.3 +- Update to new upstream snapshot +- Create custom /usr/bin/xmvn instead of using %%jpackage_script +- Mirror maven directory structure +- Add Plexus Classworlds config file + +* Wed Mar 6 2013 Mikolaj Izdebski - 0.4.0-0.2 +- Update to newer snapshot + +* Wed Mar 6 2013 Mikolaj Izdebski - 0.4.0-0.1 +- Update to upstream snapshot of version 0.4.0 + +* Mon Feb 25 2013 Mikolaj Izdebski - 0.3.1-2 +- Install effective POMs into a separate directory + +* Thu Feb 7 2013 Mikolaj Izdebski - 0.3.1-1 +- Update to upstream version 0.3.1 + +* Tue Feb 5 2013 Mikolaj Izdebski - 0.3.0-1 +- Update to upstream version 0.3.0 +- Don't rely on JPP symlinks when resolving artifacts +- Blacklist more artifacts +- Fix dependencies + +* Thu Jan 24 2013 Mikolaj Izdebski - 0.2.6-1 +- Update to upstream version 0.2.6 + +* Mon Jan 21 2013 Mikolaj Izdebski - 0.2.5-1 +- Update to upstream version 0.2.5 + +* Fri Jan 11 2013 Mikolaj Izdebski - 0.2.4-1 +- Update to upstream version 0.2.4 + +* Wed Jan 9 2013 Mikolaj Izdebski - 0.2.3-1 +- Update to upstream version 0.2.3 + +* Tue Jan 8 2013 Mikolaj Izdebski - 0.2.2-1 +- Update to upstream version 0.2.2 + +* Tue Jan 8 2013 Mikolaj Izdebski - 0.2.1-1 +- Update to upstream version 0.2.1 + +* Mon Jan 7 2013 Mikolaj Izdebski - 0.2.0-1 +- Update to upstream version 0.2.0 +- New major features: depmaps, compat symlinks, builddep MOJO +- Install effective POMs for non-POM artifacts +- Multiple major and minor bugfixes +- Drop support for resolving artifacts from %%_javajnidir + +* Fri Dec 7 2012 Mikolaj Izdebski - 0.1.5-1 +- Update to upstream version 0.1.5 + +* Fri Dec 7 2012 Mikolaj Izdebski - 0.1.4-1 +- Update to upstream version 0.1.4 + +* Fri Dec 7 2012 Mikolaj Izdebski - 0.1.3-1 +- Update to upstream version 0.1.3 + +* Fri Dec 7 2012 Mikolaj Izdebski - 0.1.2-1 +- Update to upstream version 0.1.2 + +* Fri Dec 7 2012 Mikolaj Izdebski - 0.1.1-1 +- Update to upstream version 0.1.1 + +* Thu Dec 6 2012 Mikolaj Izdebski - 0.1.0-1 +- Update to upstream version 0.1.0 +- Implement auto requires generator + +* Mon Dec 3 2012 Mikolaj Izdebski - 0.0.2-1 +- Update to upstream version 0.0.2 + +* Thu Nov 29 2012 Mikolaj Izdebski - 0.0.1-1 +- Update to upstream version 0.0.1 + +* Wed Nov 28 2012 Mikolaj Izdebski - 0-2 +- Add jpackage scripts + +* Mon Nov 5 2012 Mikolaj Izdebski - 0-1 +- Initial packaging