directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oer...@apache.org
Subject svn commit: r519232 [5/7] - in /directory/sandbox/oersoy/rpm.factory.parent: ./ rpm.factory.archetype/ rpm.factory.archetype/.settings/ rpm.factory.archetype/src/ rpm.factory.archetype/src/main/ rpm.factory.archetype/src/main/resources/ rpm.factory.arc...
Date Sat, 17 Mar 2007 03:39:39 GMT
Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.classpath
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.classpath?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.classpath (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.classpath Fri Mar 16 20:39:26 2007
@@ -0,0 +1,112 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/main/resources"/>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.common/2.3.0/emf.common-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/xsd/edit/2.3.0-M4/edit-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/emf/metadata.model.v200/1.0-SNAPSHOT/metadata.model.v200-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.commonj.sdo/2.3.0/emf.commonj.sdo-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-xsd2ecore/2.3.0-M4/mapping-xsd2ecore-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.sdo.editor/2.3.0/emf.ecore.sdo.editor-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-xsd2ecore-editor/2.3.0-M4/mapping-xsd2ecore-editor-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/codegen-ecore-ui/2.3.0-M4/codegen-ecore-ui-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.xsd.ecore.importer/2.3.0/emf.xsd.ecore.importer-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/importer-rose/2.3.0-M4/importer-rose-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.ecore2ecore.editor/2.3.0/emf.mapping.ecore2ecore.editor-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.edit/2.3.0/emf.ecore.edit-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.exporter/2.3.0/emf.exporter-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-ui/2.3.0-M4/mapping-ui-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/importer-ecore/2.3.0-M4/importer-ecore-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.codegen.ecore.ui/2.3.0/emf.codegen.ecore.ui-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.importer.rose/2.3.0/emf.importer.rose-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore/2.3.0-M4/ecore-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.sdo.edit/2.3.0/emf.ecore.sdo.edit-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.xsd2ecore.editor/2.3.0/emf.mapping.xsd2ecore.editor-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.xsd.editor/2.3.0/emf.xsd.editor-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/importer-java/2.3.0-M4/importer-java-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/emf/pom.model.v400/1.0-SNAPSHOT/pom.model.v400-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="src" path="/rpm.factory.model.spec"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.xsd/2.3.0/emf.xsd-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/emf/model/util/MavenEMFModelUtilities/1.0-SNAPSHOT/MavenEMFModelUtilities-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/edit/2.3.0-M4/edit-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore/2.3.0/emf.ecore-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/codegen/2.3.0-M4/codegen-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.importer.java/2.3.0/emf.importer.java-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jpackage/maven/pom.model/1.0-SNAPSHOT/pom.model-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore-sdo/2.3.0-M4/ecore-sdo-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.2/commons-lang-2.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-ecore2ecore/2.3.0-M4/mapping-ecore2ecore-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-ecore2xml-ui/2.3.0-M4/mapping-ecore2xml-ui-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.codegen/2.3.0/emf.codegen-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore/util/OptionalNamespaceExtendedMetaData/1.0-SNAPSHOT/OptionalNamespaceExtendedMetaData-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/exporter/2.3.0-M4/exporter-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-ecore2xml/2.3.0-M4/mapping-ecore2xml-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.common.ui/2.3.0/emf.common.ui-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping-ecore2ecore-editor/2.3.0-M4/mapping-ecore2ecore-editor-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.sdo/2.3.0/emf.ecore.sdo-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.editor/2.3.0/emf.ecore.editor-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.codegen.ecore/2.3.0/emf.codegen.ecore-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/emf/model/util/ArtifactIdToResourceMapCreator/1.0-SNAPSHOT/ArtifactIdToResourceMapCreator-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ant/2.3.0/emf.ant-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore-change/2.3.0-M4/ecore-change-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.edit.ui/2.3.0/emf.edit.ui-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/common/2.3.0-M4/common-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/edit-ui/2.3.0-M4/edit-ui-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/2.2.0/emf-2.2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.change.edit/2.3.0/emf.ecore.change.edit-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/common-ui/2.3.0-M4/common-ui-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/tuscany/emf.io.util/1.0-SNAPSHOT/emf.io.util-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping/2.3.0/emf.mapping-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0/maven-model-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.change/2.3.0/emf.ecore.change-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.ecore2xml/2.3.0/emf.mapping.ecore2xml-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.edit/2.3.0/emf.edit-2.3.0.jar"/>
+  <classpathentry kind="src" path="/rpm.factory.spec.generators"/>
+  <classpathentry kind="var" path="M2_REPO/commons-vfs/commons-vfs/1.0/commons-vfs-1.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/xsd/ecore-importer/2.3.0-M4/ecore-importer-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore-change-edit/2.3.0-M4/ecore-change-edit-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.xsd.ecore.exporter/2.3.0/emf.xsd.ecore.exporter-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/codegen-ecore/2.3.0-M4/codegen-ecore-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore-sdo-edit/2.3.0-M4/ecore-sdo-edit-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.ui/2.3.0/emf.mapping.ui-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.importer/2.3.0/emf.importer-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/converter/2.3.0-M4/converter-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.xsd.edit/2.3.0/emf.xsd.edit-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ant/2.3.0-M4/ant-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/importer/2.3.0-M4/importer-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/xsd/xsd/2.3.0-M4/xsd-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/commonj-sdo/2.3.0-M4/commonj-sdo-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.ecore.xmi/2.3.0/emf.ecore.xmi-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/codegen-ui/2.3.0-M4/codegen-ui-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/xsd/ecore-exporter/2.3.0-M4/ecore-exporter-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.ecore2xml.ui/2.3.0/emf.mapping.ecore2xml.ui-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/plugins/mojo.util/1.0-SNAPSHOT/mojo.util-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore-edit/2.3.0-M4/ecore-edit-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.importer.ecore/2.3.0/emf.importer.ecore-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.ecore2ecore/2.3.0/emf.mapping.ecore2ecore-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/tuscany/emf/ecore2ecore.processor/1.0-SNAPSHOT/ecore2ecore.processor-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/emf/2.3.0-M4/emf-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/emf/metadata.model.v100/1.0-SNAPSHOT/metadata.model.v100-1.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/mapping/2.3.0-M4/mapping-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.mapping.xsd2ecore/2.3.0/emf.mapping.xsd2ecore-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.converter/2.3.0/emf.converter-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf.codegen.ui/2.3.0/emf.codegen.ui-2.3.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/eclipse/emf/ecore-xmi/2.3.0-M4/ecore-xmi-2.3.0-M4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/maven/emf/ecore2ecore.model/1.0-SNAPSHOT/ecore2ecore.model-1.0-SNAPSHOT.jar"/>
+</classpath>
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.project
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.project?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.project (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.project Fri Mar 16 20:39:26 2007
@@ -0,0 +1,17 @@
+<projectDescription>
+  <name>rpm.factory.mojo</name>
+  <comment/>
+  <projects>
+    <project>rpm.factory.model.spec</project>
+    <project>rpm.factory.spec.generators</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.settings/org.eclipse.jdt.core.prefs?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.settings/org.eclipse.jdt.core.prefs (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/.settings/org.eclipse.jdt.core.prefs Fri Mar 16 20:39:26 2007
@@ -0,0 +1,5 @@
+#Wed Jan 24 20:58:28 CST 2007
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/pom.xml?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/pom.xml (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/pom.xml Fri Mar 16 20:39:26 2007
@@ -0,0 +1,357 @@
+<?xml version="1.0"?>
+<project>
+   <parent>
+      <artifactId>rpm.factory.parent</artifactId>
+      <groupId>org.apache.maven</groupId>
+      <version>1.0-SNAPSHOT</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.apache.maven</groupId>
+   <artifactId>rpm.factory.mojo</artifactId>
+   <packaging>maven-plugin</packaging>
+   <name>rpm.factory.mojo Maven Mojo</name>
+   <version>1.0-SNAPSHOT</version>
+   <url>http://maven.apache.org</url>
+
+   <dependencies>
+
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <version>3.8.1</version>
+         <scope>test</scope>
+      </dependency>
+      <modelVersion>4.0.0</modelVersion>
+
+      <dependency>
+         <groupId>org.apache.maven</groupId>
+         <artifactId>rpm.factory.spec.generators</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>commons-lang</groupId>
+         <artifactId>commons-lang</artifactId>
+         <version>2.3</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.tuscany</groupId>
+         <artifactId>emf.io.util</artifactId>
+         <version>1.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.tuscany.emf</groupId>
+         <artifactId>ecore2ecore.processor</artifactId>
+         <version>1.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>commons-vfs</groupId>
+         <artifactId>commons-vfs</artifactId>
+         <version>1.0</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven.emf</groupId>
+         <artifactId>pom.model.v400</artifactId>
+         <version>1.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven</groupId>
+         <artifactId>rpm.factory.model.spec</artifactId>
+         <version>1.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>mojo.util</artifactId>
+         <version>1.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>commons-lang</groupId>
+         <artifactId>commons-lang</artifactId>
+         <version>2.2</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>commons-io</groupId>
+         <artifactId>commons-io</artifactId>
+         <version>1.2</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven.emf.model.util</groupId>
+         <artifactId>MavenEMFModelUtilities</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven.emf.model.util</groupId>
+         <artifactId>ArtifactIdToResourceMapCreator</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <!-- TODO Update the artifactId to include the version -->
+         <groupId>org.apache.maven</groupId>
+         <artifactId>rpm.factory.model.spec</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven.emf</groupId>
+         <artifactId>metadata.model.v200</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven.emf</groupId>
+         <artifactId>metadata.model.v100</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>compile</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.apache.maven</groupId>
+         <artifactId>maven-plugin-api</artifactId>
+         <version>2.0</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ant</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>codegen</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>codegen-ecore</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>codegen-ecore-ui</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>codegen-ui</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>common</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>commonj-sdo</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>common-ui</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>converter</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore-change</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore-change-edit</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore-edit</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore-sdo</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore-sdo-edit</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>ecore-xmi</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>edit</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>edit-ui</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>emf</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>exporter</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>importer</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>importer-ecore</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>importer-java</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>importer-rose</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-ecore2ecore</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-ecore2ecore-editor</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-ecore2xml</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-ecore2xml-ui</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-ui</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-xsd2ecore</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.emf</groupId>
+         <artifactId>mapping-xsd2ecore-editor</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.xsd</groupId>
+         <artifactId>ecore-exporter</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.xsd</groupId>
+         <artifactId>ecore-importer</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.xsd</groupId>
+         <artifactId>edit</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+      <dependency>
+         <groupId>org.eclipse.xsd</groupId>
+         <artifactId>xsd</artifactId>
+         <version>2.3.0-M4</version>
+      </dependency>
+
+   </dependencies>
+
+   <repositories>
+      <repository>
+         <id>emf-maven-mirror</id>
+         <url>http://mirrors.cat.pdx.edu/eclipse/tools/emf/maven2/</url>
+      </repository>
+   </repositories>
+
+</project>
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojo.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojo.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojo.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojo.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,360 @@
+package org.apache.maven.plugins.rpm.factory.mojo;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.vfs.FileObject;
+import org.apache.maven.plugin.logging.Log;
+
+import org.apache.maven.model.emf.metadata.v200.MetaData;
+import org.apache.maven.model.emf.metadata.v200.MetadataV200Factory;
+import org.apache.maven.model.emf.metadata.v200.Project;
+import org.apache.maven.model.emf.pom.v400.Dependency;
+import org.apache.maven.model.emf.pom.v400.License;
+import org.apache.maven.model.emf.pom.v400.LicensesType;
+import org.apache.maven.model.emf.pom.v400.Model;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.build.ArtifactIdToResourceMapBuilder;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.build.MetadataListBuilder;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.build.PomFileListBuilder;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.filter.DependencyFilter;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.initialize.DependencyInitializer;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.initialize.ProjectInitializer;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.initialize.ResourceSetInitializer;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.load.MetadataResourceLoad;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.load.PomLoad;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.load.PomResourceLoad;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.transform.MetadataV1ToMetadataV2Transform;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.transform.Pom2SpecTransform;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.validate.LibrarySpecValidator;
+import org.apache.maven.rpm.factory.model.spec.v100.LibrarySpecDescriptor;
+import org.apache.maven.rpm.factory.spec.generators.LibrarySpecGenerator;
+import org.apache.tuscany.model.emf.ecore2ecore.MappingRoot;
+import org.apache.tuscany.model.emf.processor.ecore2ecore.impl.Ecore2EcoreProcessor;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+import org.codehaus.plexus.util.cli.StreamConsumer;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 
+ * Goal that reads a maven-metadata.xml file and generates
+ * binary rpms for all the library artifacts listed in the file.
+ * 
+ * @goal generate
+ * 
+ * @phase generate-sources
+ * 
+ * TODO - Write the pom that is included with the RPM so that it has the
+ * parent values set on it.
+ */
+public class RPMFactoryMojo
+    extends AbstractMojo
+    implements RPMFactoryMojoConstants
+{
+	/** @parameter default-value="${basedir}  */
+	private File baseDirectory;
+	
+    /** @parameter */
+    private File repositoryBaseDirectory;
+
+    /** @parameter */
+    private File aggregatedMetadataTargetStorageDirectory;
+    
+    /** @parameter */
+    private String rpmTopDirectoryPath;
+    
+    /** @parameter */
+    private String rpmTmpDirectoryPath;
+    
+    /** @parameter */
+    private String rpmBuildDirectoryPath;
+
+    /** @parameter */
+    private String rpmSpecsDirectoryPath;
+    
+    /** @parameter */
+    private String rpmRpmsDirectoryPath;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        getLog().info( "========================================================== ");
+        getLog().info( "Repository Base Directory: " + repositoryBaseDirectory.toString() );
+        getLog().info( "========================================================== \n");
+    
+        getLog().info( "========================================================== ");
+        getLog().info( "Aggregated Metadata Storage Directory: " + 
+            aggregatedMetadataTargetStorageDirectory.toString() );
+        getLog().info( "========================================================== \n");
+
+        getLog().info( "========================================================== ");
+        getLog().info( "RPM Top Directory: " +  rpmTopDirectoryPath );
+        getLog().info( "========================================================== \n");
+
+        
+        FileObject[] pomFiles = 
+            PomFileListBuilder.discoverPomResources( repositoryBaseDirectory );
+        
+        ResourceSet pomResourceSet  = 
+            ResourceSetInitializer.getInitializedPomV400ResourceSet();
+        
+        List<Resource> pomResources = PomResourceLoad.loadPomResources(
+            pomFiles, 
+            pomResourceSet);
+        
+        
+
+        File rpmBuildContainerDirectory = new File(
+                baseDirectory.getAbsolutePath(), 
+                rpmTopDirectoryPath);
+        
+        File tmpDirectory = new File(
+            rpmBuildContainerDirectory.getAbsolutePath(), rpmTmpDirectoryPath); 
+
+        File buildDirectory = new File(
+            rpmBuildContainerDirectory.getAbsolutePath(), rpmBuildDirectoryPath); 
+
+        File specsDirectory = new File(
+            rpmBuildContainerDirectory.getAbsolutePath(), rpmSpecsDirectoryPath); 
+
+        File rpmsDirectory = new File(
+            rpmBuildContainerDirectory.getAbsolutePath(), rpmRpmsDirectoryPath);
+        
+        try {
+            FileUtils.deleteDirectory(rpmBuildContainerDirectory);
+        } catch (IOException e) 
+        {
+            getLog().error("-----------------------------------------------------------\n");
+            getLog().error("The root rpm build directory: " + rpmBuildContainerDirectory.getAbsolutePath() + " could not be deleted.");
+            getLog().error("-----------------------------------------------------------\n");
+            throw new MojoExecutionException(
+                "The root rpm build directory: " + rpmBuildContainerDirectory.getAbsolutePath() + " could not be deleted.");
+        }
+        
+        rpmBuildContainerDirectory.mkdirs();
+        tmpDirectory.mkdirs();
+        buildDirectory.mkdirs();
+        specsDirectory.mkdirs();
+        rpmsDirectory.mkdirs();
+        
+        
+        Iterator<Resource> resourceIterator = pomResources.iterator();
+
+        MappingRoot model2LibrarySpecDescriptorMappingRoot = 
+            Pom2SpecTransform.createPomV400ToSpecV100MappingRoot();
+        
+        Map<String, Resource> artifactIdToPomResourceMap = 
+            new HashMap<String, Resource>();
+        
+        while(resourceIterator.hasNext())
+        {
+            Resource pomResource     = resourceIterator.next();
+            Model model              = ( Model ) pomResource.getEObject( POM_PROJECT_FRAGMENT_PATH );
+            
+            if (model.getParent() != null)
+            {
+                ArtifactIdToResourceMapBuilder.loadAncestors( 
+                    pomResourceSet, 
+                    pomResource, 
+                    artifactIdToPomResourceMap, 
+                    repositoryBaseDirectory );
+                
+                ProjectInitializer.initializeProject( 
+                    model, 
+                    artifactIdToPomResourceMap );
+                
+                
+                EList<Dependency> dependencies = DependencyInitializer.initializeDependencies( 
+                    pomResource, 
+                    artifactIdToPomResourceMap );
+                
+                if ( dependencies != null )
+                {
+                    DependencyFilter.filterRequiredDependencies( dependencies );                    
+                }
+            }
+
+            LicensesType licensesType = model.getLicenses();
+            EList<License> licenses   = licensesType.getLicense();
+            License license           = licenses.get(0);
+            String licenseName        = license.getName();
+            
+            LibrarySpecDescriptor librarySpecDescriptor = (LibrarySpecDescriptor)
+            Pom2SpecTransform.transform(
+            model, model2LibrarySpecDescriptorMappingRoot);
+            
+            //TODO Probably easier to ask the model resource where it is located.
+            //Now that the poms are loaded directly
+            String artifactContainerDirectoryPath = 
+                PomLoad.computePomContainerDirectoryPath( 
+                repositoryBaseDirectory.getAbsolutePath(), 
+                model.getGroupId(), 
+                model.getArtifactId(), 
+                model.getVersion() );
+            
+            librarySpecDescriptor.setLibraryDirectory( 
+                artifactContainerDirectoryPath );
+            
+            //TODO Update when ecore2ecoreprocessor can map many references to EAttributes.
+            librarySpecDescriptor.setLicense( licenseName );
+            librarySpecDescriptor.setRequiresDependencies( model.getDependencies() );
+            
+            LibrarySpecGenerator librarySpecGenerator = 
+                new LibrarySpecGenerator();
+            
+            String result = 
+                librarySpecGenerator.generate(librarySpecDescriptor);
+            
+            String specFileName = 
+                model.getArtifactId() + 
+                "-" + 
+                model.getVersion() + 
+                "." + 
+                SPEC_RESOURCE_EXTENSION;
+            
+            File specFile = new File(specsDirectory.getAbsolutePath(), specFileName);
+            specFile.delete();
+            
+            try {
+                FileWriter fileWriter = new FileWriter(specFile);
+                fileWriter.write(result);
+                fileWriter.close();
+            } catch (IOException e) {
+                 throw new MojoExecutionException("Could not write spec file to: "+ specFile.getAbsolutePath());
+            }
+
+            getLog().info("-----------------------------------------------------------\n");
+            getLog().info("Spec File Written to: " + specFile.getAbsolutePath());
+            getLog().info("-----------------------------------------------------------\n");
+            
+            getLog().info("-----------------------------------------------------------\n");
+            getLog().info("Starting rpmbuild.");
+            getLog().info("-----------------------------------------------------------\n");
+
+            Commandline commandLine = new Commandline();
+            StreamConsumer stdout = new StdoutConsumer( getLog() );
+            StreamConsumer stderr = new StderrConsumer( getLog() );
+            
+            commandLine.setExecutable(RPMBUILD_COMMAND_STRING);
+            
+            commandLine.createArgument().setValue( "-bb");
+
+            commandLine.createArgument().setValue(RPMBUILD_ARGUMENT_TARGET_STRING);
+            commandLine.createArgument().setValue(librarySpecDescriptor.getBuildArchitecture());
+            
+            commandLine.createArgument().setValue( RPMBUILD_ARGUMENT_DEFINE_STRING );
+            commandLine.createArgument().setValue( RPMBUILD_ARGUMENT_TOP_DIR + rpmBuildContainerDirectory.getAbsolutePath() );
+            
+            commandLine.createArgument().setValue( RPMBUILD_ARGUMENT_DEFINE_STRING );
+            commandLine.createArgument().setValue( RPMBUILD_ARGUMENT_TMP_DIR + tmpDirectory.getAbsolutePath() );
+            
+            commandLine.createArgument().setValue( RPMBUILD_ARGUMENT_DEFINE_STRING );
+            commandLine.createArgument().setValue( RPMBUILD_ARGUMENT_RPMS_DIR + rpmsDirectory.getAbsolutePath() );
+            
+            commandLine.createArgument().setValue( specFile.getAbsolutePath()  );
+                
+            try
+            {
+                int rpmBuildResult = CommandLineUtils.executeCommandLine( commandLine, stdout, stderr );
+                if ( rpmBuildResult != 0 )
+                {
+                    throw new MojoExecutionException( "RPM build execution returned: \'" + result + "\'." );
+                }
+            }
+            catch ( CommandLineException e )
+            {
+                throw new MojoExecutionException( "Unable to build the RPM", e );
+            }
+            
+        }
+        getLog().info("-----------------------------------------------------------\n");
+        getLog().info("RPM Packaging Complete");
+        getLog().info("-----------------------------------------------------------\n");
+   }
+    
+    //TODO Update these inner classes when switching to CommonsExec
+    /**
+     * Consumer to receive lines sent to stdout.  The lines are logged
+     * as info.
+     */
+    private class StdoutConsumer  implements StreamConsumer
+    {
+        /** Logger to receive the lines. */
+        private Log logger;
+        
+        /**
+         * Constructor.
+         * @param log The logger to receive the lines
+         */
+        public StdoutConsumer( Log log )
+        {
+            logger = log;
+        }
+        
+        /**
+         * Consume a line.
+         * @param string The line to consume
+         */
+        public void consumeLine( String string )
+        {
+            logger.info( string );
+        }
+    }
+
+    /**
+     * Consumer to receive lines sent to stderr.  The lines are logged
+     * as warnings.
+     */
+    private class StderrConsumer  implements StreamConsumer
+    {
+        /** Logger to receive the lines. */
+        private Log logger;
+        
+        /**
+         * Constructor.
+         * @param log The logger to receive the lines
+         */
+        public StderrConsumer( Log log )
+        {
+            logger = log;
+        }
+        
+        /**
+         * Consume a line.
+         * @param string The line to consume
+         */
+        public void consumeLine( String string )
+        {
+            logger.warn( string );
+        }
+    }
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoConstants.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoConstants.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoConstants.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoConstants.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,49 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public interface RPMFactoryMojoConstants
+{
+    String MAVEN_REPOSITORY_METADATA_VERSION_1_FILE_NAME = "maven-metadata.xml";
+    String MAVEN_REPOSITORY_METADATA_VERSION_2_FILE_NAME = "maven-metadata-v200.xml";
+
+    String MAVEN_REPOSITORY_POM_EXTENSION                = "pom";
+    String XML_RESOURCE_EXTENSION                        = "xml";
+    String SPEC_RESOURCE_EXTENSION                       = "spec";
+    
+    String METADATA_FRAGMENT_PATH                        = "//@metadata";
+    String POM_PROJECT_FRAGMENT_PATH                     = "//@project";
+    String POM_DEPENDENCIES_FRAGMENT_PATH                = "//@project/@dependencies";
+    String POM_DEPENDENCY_MANAGEMENT_FRAGMENT_PATH       = "//@project/@dependencyManagement";
+    String POM_PARENT_FRAGMENT_PATH                      = "//@project/@parent";
+    
+    String DEPENDENCY_SCOPE_TEST                      = "test";
+    
+    String RPMBUILD_COMMAND_STRING          = "rpmbuild";
+    String RPMBUILD_ARGUMENT_TARGET_STRING  = "--target";
+    String RPMBUILD_ARGUMENT_DEFINE_STRING  = "--define";
+    String RPMBUILD_ARGUMENT_TOP_DIR        = "_topdir";
+    String RPMBUILD_ARGUMENT_TMP_DIR        = "_tmpdir";
+    String RPMBUILD_ARGUMENT_SOURCES_DIR    = "_sourcedir";
+    String RPMBUILD_ARGUMENT_BUILD_DIR      = "_builddir";
+    String RPMBUILD_ARGUMENT_RPMS_DIR       = "_rpmdir";
+    String RPMBUILD_ARGUMENT_SRPMS_DIR      = "_srcrpmdir";
+
+    
+    
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoHelper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoHelper.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoHelper.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/RPMFactoryMojoHelper.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,160 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.model.emf.metadata.v100.MetaData;
+import org.apache.maven.model.emf.metadata.v100.MetadataV100Package;
+import org.apache.maven.model.emf.metadata.v100.Versions;
+import org.apache.maven.model.emf.metadata.v100.util.MetadataV100ResourceFactoryImpl;
+import org.apache.maven.model.emf.metadata.v200.MetadataV200Package;
+import org.apache.maven.model.emf.metadata.v200.util.MetadataV200ResourceFactoryImpl;
+import org.apache.maven.plugin.MojoExecutionException;
+
+
+public class RPMFactoryMojoHelper 
+implements RPMFactoryMojoConstants
+{
+ 
+    
+    public static void generateRPM(MetaData metadata)
+    {
+        String artifactId      = metadata.getArtifactId();
+        String groupId         = metadata.getGroupId();
+        EList<String> versions = metadata.getVersioning().getVersions().getVersion();
+        
+        //Load the pom for the thing used to generate the spec file
+        
+        
+        
+        //generate the spec
+        
+        //run rpm on the spec
+        
+        //move the thing to the target directory
+        
+        
+    }
+    
+    
+/*    
+    public static void generateRecipes(
+        File recipeRootDirectory, 
+        Recipes recipes) 
+    throws MojoExecutionException
+    {
+        EList<RecipeGroup> checkGroups           = recipes.getRecipeGroups();
+        
+        Iterator<RecipeGroup> iterator           = checkGroups.iterator();
+
+        while(iterator.hasNext())
+        {
+            RecipeGroup recipeGroup   = ( RecipeGroup ) iterator.next();
+            
+            File recipeDirectory = new File(recipeRootDirectory, recipeGroup.getId());
+            
+            try
+            {
+                FileUtils.deleteDirectory( recipeDirectory );
+            }
+            catch ( IOException e )
+            {
+                e.printStackTrace();
+                throw new MojoExecutionException("TODO -Sexy Message");
+            }
+            
+            recipeDirectory.mkdirs();
+            
+            RecipeHTMLGenerator recipeHTMLGenerator 
+                                    = new RecipeHTMLGenerator();
+
+            EList<Recipe> recipeEList = recipeGroup.getRecipes();
+            Iterator<Recipe> recipeIterator = recipeEList.iterator();
+            Recipe recipe = null;
+            
+            while (recipeIterator.hasNext())
+            {
+                recipe = recipeIterator.next();
+                generateRecipe(
+                    recipe, 
+                    recipeHTMLGenerator, 
+                    recipeDirectory);
+            }
+        }
+    }
+*/
+    
+    /*
+     * TODO Consider catching NPE's from trying to access recipes that are non existant on the recipeMap
+     * This can occur when there's an invalid recipeReferenceId on a CheckItem.
+     * Also, I have to get the recipe both here and in the template.
+     * It would be sexier if I just had to get it in one place.
+     */
+  /*  
+    public static void generateRecipe(
+        Recipe recipe, 
+        RecipeHTMLGenerator recipeHTMLGenerator,
+        File recipeDirectory) throws MojoExecutionException 
+    {
+        String recipeString = recipeHTMLGenerator.generate( recipe );
+       
+        File recipeFile     = new File(recipeDirectory, recipe.getFileName());
+        
+        recipeFile.delete();
+        
+        try 
+        {
+            FileWriter fileWriter = new FileWriter(recipeFile);
+            fileWriter.write(recipeString);
+            fileWriter.close();
+        } catch (IOException e) 
+        {
+             throw new MojoExecutionException("Could not write recipe file to: "+ recipeFile.getAbsolutePath());
+        } 
+    }
+    
+    public static void generateTOC(
+        Recipes recipes) throws MojoExecutionException
+    {
+        TOCGenerator tocGenerator = new TOCGenerator();
+        String tocString = tocGenerator.generate(recipes);
+        File tocFile = new File(TOC_FILE_NAME);
+        tocFile.delete();
+        try 
+        {
+            FileWriter fileWriter = new FileWriter(tocFile);
+            fileWriter.write(tocString);
+            fileWriter.close();
+        } catch (IOException e) 
+        {
+             throw new MojoExecutionException("Could not write toc file to: " + tocFile.getAbsolutePath());
+        }    
+    }*/
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/AggregateMetadataBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/AggregateMetadataBuilder.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/AggregateMetadataBuilder.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/AggregateMetadataBuilder.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,52 @@
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.build;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystemException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+public class AggregateMetadataBuilder {
+
+    /**
+     * Builds a RepositoryMetadata Version 2 Model from a list of Repository Metadata Version 1 models
+     *
+     * @param m Metadata
+     * @param metadataPath path
+     * @return RepositoryMetadata if the parameters represent one; null if not
+     * @todo should we just be using the path information, and loading it later when it is needed? (for reporting, etc)
+     */
+	
+	public static Resource createAggreatedMetadata(
+			List<Resource> metadataResources, 
+			ResourceSet resourceSet) throws FileSystemException
+	{
+		Iterator<Resource> metadataIterator = metadataResources.iterator();
+        while(metadataIterator.hasNext())
+		{
+            Resource metadataResource = metadataIterator.next();
+	    	EObject eObject = metadataResource.getEObject("//@metadata");
+	    	eObject.eSet(EcorePackage.eINSTANCE.getENamedElement_Name(), "project");
+            
+            
+
+	    	//I need an ecore2ecore processor thing here.
+	    	
+	    	
+	    	//Add the project object to the metadata root of the new 
+	    	//metadata resource.
+	    	
+	    	
+	    	
+//	    	resources.add(resource);
+		}
+		return null;//resources;
+	}
+
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/ArtifactIdToResourceMapBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/ArtifactIdToResourceMapBuilder.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/ArtifactIdToResourceMapBuilder.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/ArtifactIdToResourceMapBuilder.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,71 @@
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.build;
+
+import java.io.File;
+import java.util.Map;
+
+import org.apache.maven.model.emf.pom.v400.Model;
+import org.apache.maven.model.emf.pom.v400.Parent;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.load.PomLoad;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+public class ArtifactIdToResourceMapBuilder implements RPMFactoryMojoConstants {
+	
+	/**
+	 * Load pom ancestors.
+	 * 
+	 * @param resourceSet the resource set used to load pom artifacts
+	 * @param artifactIdToPomResourceMap the artifact id to pom resource map
+	 * @param resource the pom resource
+	 * @param repositoryBaseDirectory the repository base directory
+	 * 
+	 * @return the map< string, resource>
+	 */
+	public static Map<String, Resource> loadAncestors(
+			ResourceSet resourceSet, 
+			Resource resource, 
+			Map<String, Resource> artifactIdToPomResourceMap,
+            File repositoryBaseDirectory) {
+		
+		Model model 	= (Model) resource.getEObject(POM_PROJECT_FRAGMENT_PATH);
+		Parent parent = model.getParent();
+		
+		if (parent != null)
+		{
+			String artifactId = parent.getArtifactId();
+			String groupId = parent.getGroupId();
+			String version = parent.getVersion();
+            
+            String parentResourcePath = 
+                PomLoad.computePomResourcePath( 
+                    repositoryBaseDirectory.getAbsolutePath(), 
+                    groupId, 
+                    artifactId, 
+                    version);
+			
+			resource = resourceSet.getResource(
+                URI.createFileURI(parentResourcePath), true); 
+
+			artifactIdToPomResourceMap.put(artifactId, resource);
+			
+			model = (Model) resource.getEObject(POM_PROJECT_FRAGMENT_PATH);
+			parent = model.getParent();
+
+			if (parent != null)
+			{
+				loadAncestors(
+						resourceSet, 
+						resource, 
+						artifactIdToPomResourceMap,
+                        repositoryBaseDirectory);
+			}
+			else 
+			{
+				return artifactIdToPomResourceMap;
+			}
+		}
+		return artifactIdToPomResourceMap;
+	}
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/MetadataListBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/MetadataListBuilder.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/MetadataListBuilder.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/MetadataListBuilder.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,47 @@
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.build;
+
+import java.io.File;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSelectInfo;
+import org.apache.commons.vfs.FileSelector;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.VFS;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+
+public class MetadataListBuilder implements RPMFactoryMojoConstants {
+	
+    /**
+     * Returns an array of FileObject that have the name "maven-metadata.xml".  
+     *
+     * @param baseDir File pointing to the base directory.
+     * @return FileObject[] if maven-metadata.xml files are found. null otherwise.
+     * @throws MojoExecutionException 
+     */
+
+	public static FileObject[] discoverMetadata(File baseDirectory) throws MojoExecutionException
+	{
+		FileSelector fileSelector = new FileSelector()
+		{
+		    public boolean includeFile(FileSelectInfo fileInfo) throws Exception
+		    {
+		        FileObject fileObject = fileInfo.getFile();
+		        return fileObject.getName().getBaseName().contentEquals(MAVEN_REPOSITORY_METADATA_VERSION_1_FILE_NAME);
+		    }
+
+		    public boolean traverseDescendents(FileSelectInfo fileInfo) throws Exception
+		    {
+		        return true;
+		    }
+		};
+        
+		try
+        {
+            return VFS.getManager().resolveFile(baseDirectory.getAbsolutePath()).findFiles(fileSelector);
+        }
+        catch ( FileSystemException e )
+        {
+            throw new MojoExecutionException("An error ocurred while discovering metadata.  TODO - More info as these are debugged + look at the VFS code");        }
+	    }
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomFileListBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomFileListBuilder.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomFileListBuilder.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomFileListBuilder.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,47 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.build;
+
+import java.io.File;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSelectInfo;
+import org.apache.commons.vfs.FileSelector;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.VFS;
+import org.apache.maven.plugin.MojoExecutionException;
+
+public class PomFileListBuilder
+{
+    /**
+     * Returns an array of FileObject that have the name "*.pom".  
+     *
+     * @param baseDir File pointing to the base directory.
+     * @return FileObject[] if *.pom files are found. null otherwise.
+     * @throws MojoExecutionException 
+     */
+
+    public static FileObject[] discoverPomResources(File baseDirectory) throws MojoExecutionException
+    {
+        FileSelector fileSelector = new FileSelector()
+        {
+            public boolean includeFile(FileSelectInfo fileInfo) throws Exception
+            {
+                FileObject fileObject = fileInfo.getFile();
+                return fileObject.getName().getBaseName().endsWith(".pom");
+            }
+
+            public boolean traverseDescendents(FileSelectInfo fileInfo) throws Exception
+            {
+                return true;
+            }
+        };
+        
+        try
+        {
+            return VFS.getManager().resolveFile(baseDirectory.getAbsolutePath()).findFiles(fileSelector);
+        }
+        catch ( FileSystemException e )
+        {
+            throw new MojoExecutionException("An error ocurred while discovering metadata.  TODO - More info as these are debugged + look at the VFS code");        }
+        }
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomName2ResourceMapBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomName2ResourceMapBuilder.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomName2ResourceMapBuilder.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/build/PomName2ResourceMapBuilder.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,63 @@
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.build;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.maven.model.emf.metadata.v200.MetaData;
+import org.apache.maven.model.emf.metadata.v200.Project;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+import org.apache.maven.plugins.rpm.factory.mojo.helpers.load.PomLoad;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+public class PomName2ResourceMapBuilder implements RPMFactoryMojoConstants {
+
+	public static Map<String, Resource> getPomName2ResourceMap(
+            File repositoryBaseDirectory,
+			MetaData metadataV2, 
+			ResourceSet resourceSet) throws MojoExecutionException
+	{
+		Map<String, Resource> pomName2ResourceMap   = new HashMap<String, Resource>();
+        
+        EList<Project> projectEList = metadataV2.getProjects();
+        
+        Iterator<Project> projectIterator    = projectEList.iterator();
+        
+        while (projectIterator.hasNext())
+        {
+            Project project = projectIterator.next();
+            
+            String artifactId   = project.getArtifactId();
+            String groupId      = project.getGroupId();
+            
+            EList versionEList = 
+                project.getVersioning().getVersions().getVersion();
+            
+            Iterator<String> versionIterator = versionEList.iterator();
+            
+            while (versionIterator.hasNext())
+            {
+                String version         = versionIterator.next();
+                String pomResourcePath = PomLoad.computePomResourcePath( 
+                    repositoryBaseDirectory.getAbsolutePath(), 
+                    groupId, 
+                    artifactId, 
+                    version );
+                
+                Resource pomResource      = 
+                    resourceSet.getResource( URI.createFileURI( 
+                    pomResourcePath ), true );
+                
+                String pomName = PomLoad.computePomName( artifactId, version );
+                
+                pomName2ResourceMap.put( pomName, pomResource );
+            }
+        }
+        return pomName2ResourceMap;
+	}
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/DependencyFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/DependencyFilter.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/DependencyFilter.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/DependencyFilter.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,32 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.filter;
+
+import java.util.Iterator;
+
+import org.apache.maven.model.emf.pom.v400.Dependency;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+import org.eclipse.emf.common.util.EList;
+
+public class DependencyFilter implements RPMFactoryMojoConstants
+{
+    public static void filterRequiredDependencies(EList<Dependency> dependencies)
+    {
+        Iterator<Dependency> dependencyIterator = dependencies.iterator();
+        while (dependencyIterator.hasNext())
+        {
+            Dependency dependency   = (Dependency) dependencyIterator.next();
+            String scope            = dependency.getScope();
+
+            //TODO this can happen if the dependency has default scope
+            if (scope != null)
+            {
+                if ( scope.equals(DEPENDENCY_SCOPE_TEST) )
+                {
+                    dependencies.remove(dependency);
+                }
+                
+            }
+        }       
+        
+    }
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/MetadataV1ResourceFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/MetadataV1ResourceFilter.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/MetadataV1ResourceFilter.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/filter/MetadataV1ResourceFilter.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,16 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.filter;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.resource.Resource;
+
+public class MetadataV1ResourceFilter
+{
+    public static void buildArtifactProcessingList(EList<Resource> resources)
+    {
+        
+        
+        
+    }
+
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/DependencyInitializer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/DependencyInitializer.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/DependencyInitializer.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/DependencyInitializer.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,187 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.initialize;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.maven.model.emf.pom.v400.DependenciesType;
+import org.apache.maven.model.emf.pom.v400.Dependency;
+import org.apache.maven.model.emf.pom.v400.DependencyManagement;
+import org.apache.maven.model.emf.pom.v400.Parent;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * The POM DependencyInitializer.
+ */
+public class DependencyInitializer implements RPMFactoryMojoConstants
+{
+    /**
+     * Initialize the pom's dependencies when maven dependency management is used.
+     * 
+     * @param resource the resource
+     * @param artifactIdToPomResourceMap the artifact id to pom resource map
+     */
+    public static EList<Dependency> initializeDependencies(
+        Resource resource,
+        Map<String, Resource> artifactIdToPomResourceMap)
+    {
+        EList<Dependency> dependencies = null;
+        DependenciesType dependencyType   = 
+            (DependenciesType)resource.getEObject(POM_DEPENDENCIES_FRAGMENT_PATH);
+        
+        if (dependencyType != null)
+        {
+            dependencies          = dependencyType.getDependency();
+            
+            Iterator<Dependency> dependencyIterator = dependencies.iterator();
+
+            while(dependencyIterator.hasNext())
+            {
+                Dependency dependency   = (Dependency) dependencyIterator.next();
+                
+                String dependencyArtifactId = dependency.getArtifactId();
+                String dependencyScope      = dependency.getScope();
+                String dependencyVersion    = dependency.getVersion();
+
+                Parent parent     = (Parent) resource.getEObject(POM_PARENT_FRAGMENT_PATH);
+
+                if ((dependencyVersion == null) && (parent != null ))
+                {
+                    Dependency dependencyParent = findDependencyMatchInPomHiearchy(
+                        parent,
+                        artifactIdToPomResourceMap,
+                        dependencyArtifactId);
+                    
+                    if (dependencyParent != null)
+                    {
+                        dependency.setVersion(dependencyParent.getVersion());
+                        
+                        if (dependencyScope == null)
+                        {
+                            dependency.setScope(dependencyParent.getScope());
+                        }
+                    }
+                }
+            }
+        }
+        return dependencies;
+    }
+    
+    
+    
+    /**
+     * Find dependency match in pom hiearchy.
+     * 
+     * @param dependencyArtifactId the dependency artifact id
+     * @param artifactIdToPomResourceMap the artifact id to pom resource map
+     * @param parent the parent
+     * 
+     * @return the dependency
+     */
+    public static Dependency findDependencyMatchInPomHiearchy(
+        Parent parent,
+        Map<String, Resource> artifactIdToPomResourceMap,
+        String dependencyArtifactId)
+    {
+        Resource parentResource = artifactIdToPomResourceMap.get(
+            parent.getArtifactId());
+        
+        EList<Dependency> parentDependencies = 
+            computeParentDependencies( parentResource, artifactIdToPomResourceMap );
+        
+        Dependency dependency                = 
+            matchDependency(parentDependencies, dependencyArtifactId);
+        
+        if (dependency != null)
+        {
+            return dependency;
+        }
+        else
+        {
+            parent = (Parent) parentResource.getEObject( POM_PARENT_FRAGMENT_PATH );
+            
+            if ( parent != null)
+            {
+                return findDependencyMatchInPomHiearchy(
+                    parent, 
+                    artifactIdToPomResourceMap, 
+                    dependencyArtifactId);
+            }
+            else
+            {
+                return null;
+            }
+        }
+    }
+    
+    /**
+     * Finds a dependency management dependency that
+     * matches a artifactId of a child projects dependency.
+     * 
+     * This is used when the version of a dependency is specified
+     * on in a parent project's dependencyManagement section.
+     * 
+     * @param dependencyArtifactId the dependency artifact id
+     * @param dependencies the dependencies
+     * 
+     * @return the dependency
+     * 
+     * TODO Consider creating an index to speed this up.
+     * NOTES
+     * This way we would just use the dependencyArtifactId as a key
+     * We would thus have to create a dependencyArtifactId to Dependency
+     * map using all the dependencies in the dependency management section
+     * for the parent poms.  This could save time depending on the fraction
+     * of projects that use dependency management.
+     * 
+     * First do the the maven best practices plugins so that the ratio goes up
+     * then consider it.
+     */
+    public static Dependency matchDependency(
+        EList<Dependency> dependencies,
+        String dependencyArtifactId)
+    {
+        Iterator<Dependency> dependencyIterator = 
+            dependencies.iterator();
+        
+        boolean versionFound = false;
+        
+        while(dependencyIterator.hasNext() && !versionFound)
+        {
+            Dependency parentDependency = (Dependency) dependencyIterator.next();
+            if (parentDependency.getArtifactId() == dependencyArtifactId)
+            {
+                return parentDependency;
+            }
+        }
+        return null;
+    }
+    
+    /**
+     * Compute parent dependencies.
+     * 
+     * @param parentResource the parent resource
+     * @param artifactIdToPomResourceMap the artifact id to pom resource map
+     * 
+     * @return the list< dependency> of dependencies
+     */
+    public static EList<Dependency> computeParentDependencies(
+        Resource parentResource, 
+        Map<String, Resource> artifactIdToPomResourceMap)
+    {
+        DependencyManagement dependencyManagement = 
+            (DependencyManagement) 
+            parentResource.getEObject(POM_DEPENDENCY_MANAGEMENT_FRAGMENT_PATH);
+
+        DependenciesType parentDependencyType     = 
+            (DependenciesType)
+            dependencyManagement.getDependencies();
+        
+        EList<Dependency> parentDependencies      = 
+            parentDependencyType.getDependency();
+        
+        return parentDependencies;
+    }
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ProjectInitializer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ProjectInitializer.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ProjectInitializer.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ProjectInitializer.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,129 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.initialize;
+
+import java.util.Map;
+
+import org.apache.maven.model.emf.pom.v400.LicensesType;
+import org.apache.maven.model.emf.pom.v400.Model;
+import org.apache.maven.model.emf.pom.v400.Parent;
+import org.apache.maven.model.emf.pom.v400.PomV400Package;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ProjectInitializer.
+ */
+public class ProjectInitializer
+{
+    /**
+     * Initialize project.
+     * This looks for licenses, the project description, and the project url
+     * on the ancestor poms if they are not already contained in the target pom.
+     * 
+     * The youngest ancestor is searched first.  If the value is not found, then
+     * it's parent and so on.
+     * 
+     * @param model the model
+     * @param artifactIdToPomResourceMap the artifact id to pom resource map
+     * 
+     * TODO - If the project cannot be initialized properly, we could skip processing this project
+     * 
+     * TODO - Note that if the project does not have a url we could use the group id.
+     * 
+     * TODO - Analyze the maven repository and clean it up so that we don't have to hack
+     */
+    public static void initializeProject(
+        Model model, 
+        Map<String, Resource> artifactIdToPomResourceMap)
+    {
+        PomV400Package pomV400Package    = PomV400Package.eINSTANCE;
+        EAttribute descriptionEAttribute = pomV400Package.getModel_Description();
+        EAttribute urlEAttribute         = pomV400Package.getModel_Url();
+        EReference licensesEReference    = pomV400Package.getModel_Licenses();
+        
+        //EAttribute licenseName           = pomV400Package.getLicense_Name();
+        
+        String description = model.getDescription();
+        
+        if (description == null)
+        {
+            description = (String) lookupEStructuralFeatureValue( 
+                descriptionEAttribute, 
+                model, 
+                artifactIdToPomResourceMap );
+            
+            model.setDescription( description );
+        }
+        
+        String url         = model.getUrl();
+        
+        if (url == null)
+        {
+            url = (String) lookupEStructuralFeatureValue( 
+                urlEAttribute, 
+                model, 
+                artifactIdToPomResourceMap );
+            
+            if (url == null)
+            {
+                
+            }
+            //TODO note that we are setting url to groupid if it is not set
+            model.setUrl( model.getGroupId() );
+        }
+        
+        LicensesType licensesType = model.getLicenses();
+        
+        if (licensesType == null)
+        {
+            licensesType = (LicensesType) lookupEStructuralFeatureValue( 
+                licensesEReference, 
+                model, 
+                artifactIdToPomResourceMap );
+            
+            model.setLicenses( licensesType );
+        }
+    }
+    
+    /**
+     * Lookup E structural feature value.
+     * 
+     * @param model the model
+     * @param artifactIdToPomResourceMap the artifact id to pom resource map
+     * @param eAttribute the e attribute
+     * 
+     * @return the object
+     */
+    public static Object lookupEStructuralFeatureValue(
+        EStructuralFeature eAttribute, 
+        Model model,
+        Map<String, Resource> artifactIdToPomResourceMap)
+    {
+        Parent parent = model.getParent();
+        if (parent != null)
+        {
+            String artifactId = parent.getArtifactId();
+            
+            Resource parentResource = 
+                artifactIdToPomResourceMap.get( artifactId );
+            
+            Model parentModel  = ( Model ) parentResource.getEObject("//@project");
+            Object value = model.eGet( eAttribute );
+            if (value != null)
+            {
+                return value;
+            }
+            else if (model.getParent() != null)
+            {
+                return lookupEStructuralFeatureValue(
+                    eAttribute, 
+                    parentModel, 
+                    artifactIdToPomResourceMap);
+            }
+        }
+        return null;
+    }
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ResourceSetInitializer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ResourceSetInitializer.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ResourceSetInitializer.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/initialize/ResourceSetInitializer.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,67 @@
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.initialize;
+
+import org.apache.maven.model.emf.metadata.v100.MetadataV100Package;
+import org.apache.maven.model.emf.metadata.v100.util.MetadataOptionalNamespaceResourceFactoryImpl;
+import org.apache.maven.model.emf.metadata.v200.MetadataV200Package;
+import org.apache.maven.model.emf.metadata.v200.util.MetadataV200ResourceFactoryImpl;
+import org.apache.maven.model.emf.pom.v400.PomV400Package;
+import org.apache.maven.model.emf.pom.v400.util.PomV400OptionalNamespaceResourceFactory;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+public class ResourceSetInitializer implements RPMFactoryMojoConstants {
+	
+	public static ResourceSet getInitializedMetadataV100ResourceSet()
+	{
+		ResourceSet resourceSet = new ResourceSetImpl();
+
+		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
+		(XML_RESOURCE_EXTENSION, 
+		 new MetadataOptionalNamespaceResourceFactoryImpl());
+		
+		resourceSet.getPackageRegistry().put
+		(		
+            MetadataV100Package.eNS_URI, 
+            MetadataV100Package.eINSTANCE
+		);
+        return resourceSet;
+	}
+    
+    public static ResourceSet getInitializedMetadataV200ResourceSet()
+    {
+        ResourceSet resourceSet = new ResourceSetImpl();
+
+
+        resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
+        (XML_RESOURCE_EXTENSION, 
+         new MetadataV200ResourceFactoryImpl());
+        
+        resourceSet.getPackageRegistry().put
+        (       
+            MetadataV200Package.eNS_URI, 
+            MetadataV200Package.eINSTANCE
+        );
+        
+        return resourceSet;
+    }
+
+    public static ResourceSet getInitializedPomV400ResourceSet()
+    {
+        ResourceSet resourceSet = new ResourceSetImpl();
+
+
+        resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
+        (MAVEN_REPOSITORY_POM_EXTENSION, 
+         new PomV400OptionalNamespaceResourceFactory());
+        
+        resourceSet.getPackageRegistry().put
+        (       
+            PomV400Package.eNS_URI, 
+            PomV400Package.eINSTANCE
+        );
+        return resourceSet;
+    }
+
+
+}

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/MetadataResourceLoad.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/MetadataResourceLoad.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/MetadataResourceLoad.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/MetadataResourceLoad.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,41 @@
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.load;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+public class MetadataResourceLoad {
+
+	public static List<Resource> getMetadataResources(
+			FileObject[] metadataFiles, 
+			ResourceSet resourceSet) throws MojoExecutionException
+	{
+		List<Resource> resources   = new ArrayList<Resource>();
+        
+		for (int i = 0; i<metadataFiles.length; i++)
+		{
+			FileObject fileObject = metadataFiles[i];
+			String fileObjectPath = null;
+            try
+            {
+                fileObjectPath = fileObject.getURL().getFile();
+            }
+            catch ( FileSystemException e )
+            {
+                throw new MojoExecutionException("Stuff Happened here + TODO More Info");
+            }
+			
+	    	Resource resource = resourceSet.getResource(
+	    			URI.createFileURI(fileObjectPath), true);
+	    	
+	    	resources.add(resource);
+		}
+		return resources;
+	}
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/PomLoad.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/PomLoad.java?view=auto&rev=519232
==============================================================================
--- directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/PomLoad.java (added)
+++ directory/sandbox/oersoy/rpm.factory.parent/rpm.factory.mojo/src/main/java/org/apache/maven/plugins/rpm/factory/mojo/helpers/load/PomLoad.java Fri Mar 16 20:39:26 2007
@@ -0,0 +1,70 @@
+
+package org.apache.maven.plugins.rpm.factory.mojo.helpers.load;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.plugins.rpm.factory.mojo.RPMFactoryMojoConstants;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+public class PomLoad implements  RPMFactoryMojoConstants
+{
+    //TODO Use a generic method instead of this.
+    public Resource load(
+        String pomResourcePath, 
+        ResourceSet resourceSet)
+    {
+        Resource resource = 
+            resourceSet.getResource(
+                URI.createFileURI(pomResourcePath), true);
+        return resource;
+    }
+    
+    public static String computePomResourcePath(
+        String repositoryBaseDirectoryPath,
+        String groupId, 
+        String artifactId, 
+        String version)
+    {
+        return 
+        computePomContainerDirectoryPath(
+                repositoryBaseDirectoryPath, 
+                groupId, 
+                artifactId, 
+                version) +
+            "/" + 
+            computePomName(artifactId, version); 
+ 
+    }
+    
+    public static String computePomContainerDirectoryPath(
+        String repositoryBaseDirectoryPath,
+        String groupId, 
+        String artifactId,
+        String version)
+    {
+        String groupIdSegment  = StringUtils.replace( groupId, ".", "/" );
+
+        return
+            repositoryBaseDirectoryPath + 
+            "/" + 
+            groupIdSegment + 
+            "/" + 
+            artifactId +
+            "/" +
+            version;
+    }
+    
+    public static String computePomName(String artifactId, String version)
+    {
+        return 
+            artifactId + 
+            "-" 
+            + 
+            version 
+            + 
+            "." 
+            + 
+            MAVEN_REPOSITORY_POM_EXTENSION;
+    }
+}



Mime
View raw message