Revision: 80
          http://mvn-infix.svn.sourceforge.net/mvn-infix/?rev=80&view=rev
Author:   bindul
Date:     2010-12-05 15:49:49 +0000 (Sun, 05 Dec 2010)

Log Message:
-----------
Modello configuration updates

Modified Paths:
--------------
    plugins/sfnet-mvnrepo-plugin/trunk/pom.xml
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/SfNetMvnMojoInfo.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/actions/RepoMapGenAction.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/DefaultMapGeneratorFactory.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/ExistingMapParser.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGenerator.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGeneratorFactory.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SfNetFRSParserMapGenerator.java
    
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mojos/AbstractRepositoryMojo.java
    plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-config.mdo
    plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-map.mdo

Modified: plugins/sfnet-mvnrepo-plugin/trunk/pom.xml
===================================================================
--- plugins/sfnet-mvnrepo-plugin/trunk/pom.xml  2010-12-05 13:50:09 UTC (rev 79)
+++ plugins/sfnet-mvnrepo-plugin/trunk/pom.xml  2010-12-05 15:49:49 UTC (rev 80)
@@ -75,65 +75,161 @@
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-interactivity-api</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>org.apache.sshd</groupId>
+                       <artifactId>sshd-core</artifactId>
+                       <version>0.5.0</version>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.codehaus.modello</groupId>
                                <artifactId>modello-maven-plugin</artifactId>
-                               <configuration>
-                                       <models>
-                                               
<model>src/main/mdo/mvn-repo-map.mdo</model>
-                                               
<model>src/main/mdo/mvn-repo-config.mdo</model>
-                                       </models>
-                                       <!-- Add packaged with versions later 
when older versions are to be supported
-                                       <packagedVersions>
-                                               
<packagedVersion>0.1.0</packagedVersion>
-                                       </packagedVersions>
-                                       -->
-                                       <version>0.1.0</version>
-                                       <useJava5>true</useJava5>
-                               </configuration>
+                               <!-- Executions for Repo Map -->
                                <executions>
                                        <execution>
-                                               <id>mdo</id>
+                                               <id>mdo-map</id>
                                                <phase>generate-sources</phase>
                                                <goals>
-                                                       
<goal>xpp3-extended-reader</goal>
-                                                       <goal>xpp3-writer</goal>
+                                                       <goal>stax-reader</goal>
+                                                       <goal>stax-writer</goal>
                                                        <goal>java</goal>
+                                                       <goal>converters</goal>
                                                </goals>
                                                <configuration>
-                                                       
<packageWithVersion>true</packageWithVersion>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-map.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
+                                                       
<useJava5>true</useJava5>
                                                </configuration>
                                        </execution>
                                        <execution>
-                                               <id>mdo-xsd</id>
+                                               <id>mdo-map-xsd</id>
                                                <phase>generate-sources</phase>
                                                <goals>
                                                        <goal>xsd</goal>
                                                </goals>
                                                <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-map.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
                                                        
<outputDirectory>${project.build.outputDirectory}/META-INF/xsds</outputDirectory>
                                                </configuration>
                                        </execution>
                                        <execution>
-                                               <id>mdo-site</id>
+                                               <id>mdo-map-site</id>
                                                <phase>pre-site</phase>
                                                <goals>
                                                        <goal>xdoc</goal>
                                                </goals>
+                                               <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-map.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
+                                               </configuration>
                                        </execution>
                                        <execution>
-                                               <id>mdo-site-xsd</id>
+                                               <id>mdo-map-site-xsd</id>
                                                <phase>pre-site</phase>
                                                <goals>
                                                        <goal>xsd</goal>
                                                </goals>
                                                <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-map.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
                                                        
<outputDirectory>${project.reporting.outputDirectory}/xsds</outputDirectory>
                                                </configuration>
                                        </execution>
+                                       <!-- Executions for Repo Config -->
+                                       <execution>
+                                               <id>mdo-config</id>
+                                               <phase>generate-sources</phase>
+                                               <goals>
+                                                       <goal>stax-reader</goal>
+                                                       <goal>stax-writer</goal>
+                                                       <goal>java</goal>
+                                                       <goal>converters</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-config.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
+                                                       
<useJava5>true</useJava5>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>mdo-config-xsd</id>
+                                               <phase>generate-sources</phase>
+                                               <goals>
+                                                       <goal>xsd</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-config.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
+                                                       
<outputDirectory>${project.build.outputDirectory}/META-INF/xsds</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>mdo-config-site</id>
+                                               <phase>pre-site</phase>
+                                               <goals>
+                                                       <goal>xdoc</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-config.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>mdo-config-site-xsd</id>
+                                               <phase>pre-site</phase>
+                                               <goals>
+                                                       <goal>xsd</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <models>
+                                                               
<model>src/main/mdo/mvn-repo-config.mdo</model>
+                                                       </models>
+                                                       <version>0.1.0</version>
+                                                       <packagedVersions>
+                                                               
<packagedVersion>0.1.0</packagedVersion>
+                                                       </packagedVersions>
+                                                       
<outputDirectory>${project.reporting.outputDirectory}/xsds</outputDirectory>
+                                               </configuration>
+                                       </execution>
                                </executions>
                        </plugin>
                        <plugin>

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/SfNetMvnMojoInfo.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/SfNetMvnMojoInfo.java
    2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/SfNetMvnMojoInfo.java
    2010-12-05 15:49:49 UTC (rev 80)
@@ -22,7 +22,7 @@
 
 import java.util.List;
 
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.RepositoryConfig;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.RepositoryConfig;
 import com.mindtree.techworks.infix.pluginscommon.mojo.MojoInfo;
 
 /**

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/actions/RepoMapGenAction.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/actions/RepoMapGenAction.java
    2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/actions/RepoMapGenAction.java
    2010-12-05 15:49:49 UTC (rev 80)
@@ -30,10 +30,10 @@
 import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.MapGenerationException;
 import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.MapGenerator;
 import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.MapGeneratorFactory;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.ExistingRepositoryMap;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.RepositoryConfig;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.SourceForgeFRSMapper;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.RepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.ExistingRepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.RepositoryConfig;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.SourceForgeFRSMapper;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.RepositoryMap;
 
 
 /**

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/DefaultMapGeneratorFactory.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/DefaultMapGeneratorFactory.java
   2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/DefaultMapGeneratorFactory.java
   2010-12-05 15:49:49 UTC (rev 80)
@@ -26,11 +26,10 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Serviceable;
 
 import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.sfnetsftp.SfNetFRSParserMapGenerator;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.ExistingRepositoryMap;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.RepositoryMapperConfig;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.SourceForgeFRSMapper;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.ExistingRepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.RepositoryMapperConfig;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.SourceForgeFRSMapper;
 
-
 /**
  * Default factory implementation
  * 

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/ExistingMapParser.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/ExistingMapParser.java
    2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/ExistingMapParser.java
    2010-12-05 15:49:49 UTC (rev 80)
@@ -21,16 +21,19 @@
 package com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper;
 
 import java.io.File;
-import java.io.FileReader;
+import java.io.IOException;
 import java.util.List;
 
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLStreamException;
+
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
 import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.SfNetMvnMojoInfo;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.ExistingRepositoryMap;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.RepositoryMap;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.io.xpp3.RepositoryMapXpp3ReaderEx;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.ExistingRepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.RepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.convert.ConverterTool;
 import com.mindtree.techworks.infix.pluginscommon.mojo.resolver.Resolver;
 
 
@@ -66,12 +69,21 @@
                        throw new MapGenerationException("Unable to get 
location : " + configuration.getSource());
                }
                
-               RepositoryMapXpp3ReaderEx mapReader = new 
RepositoryMapXpp3ReaderEx();
+               ConverterTool convertTool = new ConverterTool();
                try {
-                       return mapReader.read(new 
FileReader(resolvedLocation.get(0)), true);
-               } catch (Exception e) {
+                       return 
convertTool.convertFromFile(resolvedLocation.get(0));
+               } catch (IOException e) {
                        mojoInfo.getLog().error("Error parsing existing model", 
e);
                        throw new MapGenerationException("Error parsing 
existing model", e);
+               } catch (XMLStreamException e) {
+                       Location loc = e.getLocation();
+                       StringBuilder sb = new StringBuilder("Error parsing 
Xml: ");
+                       sb.append(e.getMessage());
+                       if (null != loc) {
+                               sb.append(" at 
Line:").append(loc.getLineNumber());
+                               sb.append(" 
Column:").append(loc.getColumnNumber());
+                       }
+                       throw new MapGenerationException(sb.toString() , e);
                }
        }
 

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGenerator.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGenerator.java
 2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGenerator.java
 2010-12-05 15:49:49 UTC (rev 80)
@@ -21,8 +21,8 @@
 package com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper;
 
 import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.SfNetMvnMojoInfo;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.RepositoryMapperConfig;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.RepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.RepositoryMapperConfig;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.RepositoryMap;
 
 
 /**

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGeneratorFactory.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGeneratorFactory.java
  2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/MapGeneratorFactory.java
  2010-12-05 15:49:49 UTC (rev 80)
@@ -20,7 +20,7 @@
  */
 package com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper;
 
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.RepositoryMapperConfig;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.RepositoryMapperConfig;
 
 /**
  * Gets repository map generators

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SfNetFRSParserMapGenerator.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SfNetFRSParserMapGenerator.java
 2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SfNetFRSParserMapGenerator.java
 2010-12-05 15:49:49 UTC (rev 80)
@@ -40,11 +40,11 @@
 import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.MapGenerationException;
 import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.MapGenerator;
 import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.jschutil.UserInfoImpl;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.SourceForgeFRSMapper;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.Directory;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.File;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.Node;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.v0_1_0.RepositoryMap;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.SourceForgeFRSMapper;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.Directory;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.FileItem;
+import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.Node;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.RepositoryMap;
 import com.mindtree.techworks.infix.pluginscommon.mojo.MojoInfo;
 
 
@@ -113,7 +113,7 @@
                                mapWorkingDir.addDirectory(newDir);
                        } else {
                                // Handle file
-                               File file = new File();
+                               FileItem file = new FileItem();
                                setNodeInfo(file, lsEntry);
                                if (configuration.isAddDownloadSuffix()) {
                                        file.setUrlSuffix("/download");

Modified: 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mojos/AbstractRepositoryMojo.java
===================================================================
--- 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mojos/AbstractRepositoryMojo.java
        2010-12-05 13:50:09 UTC (rev 79)
+++ 
plugins/sfnet-mvnrepo-plugin/trunk/src/main/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mojos/AbstractRepositoryMojo.java
        2010-12-05 15:49:49 UTC (rev 80)
@@ -21,24 +21,24 @@
 package com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mojos;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLStreamException;
+
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectHelper;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
 import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.SfNetMvnMojoInfo;
 import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.mapper.MapGenerationException;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.RepositoryConfig;
-import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.v0_1_0.io.xpp3.RepositoryConfigXpp3ReaderEx;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.RepositoryConfig;
+import 
com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repoconfig.convert.ConverterTool;
 
 /**
  * @author Bindul Bhowmik
@@ -113,20 +113,26 @@
                }
                
                List<RepositoryConfig> tempRepoConfigs = new 
ArrayList<RepositoryConfig>();
-               RepositoryConfigXpp3ReaderEx reader = new 
RepositoryConfigXpp3ReaderEx();
+               
+               ConverterTool convertTool = new ConverterTool();
                for (File repositoryConfiguration : repositoryConfigurations) {
                        getLog().debug("Parsing repository configuration: " + 
repositoryConfiguration.getAbsolutePath());
                        
                        try {
-                               tempRepoConfigs.add(reader.read(new 
FileInputStream(repositoryConfiguration), true));
+                               
tempRepoConfigs.add(convertTool.convertFromFile(repositoryConfiguration));
                        } catch (IOException e) {
                                // Failed to parse the project xml file
                                getLog().error("Invalid Repository 
Configuration file : " + repositoryConfiguration.getAbsolutePath(), e);
                                throw new MojoExecutionException("Invalid 
Repository Configuration file : " + repositoryConfiguration.getAbsolutePath(), 
e);
-                       } catch (XmlPullParserException e) {
-                               // Failed to parse the project xml file
-                               getLog().error("Invalid Repository 
Configuration file : " + repositoryConfiguration.getAbsolutePath(), e);
-                               throw new MojoExecutionException("Invalid 
Repository Configuration file : " + repositoryConfiguration.getAbsolutePath(), 
e);
+                       } catch (XMLStreamException e) {
+                               Location loc = e.getLocation();
+                               StringBuilder sb = new StringBuilder("Error 
parsing Xml: ");
+                               sb.append(e.getMessage());
+                               if (null != loc) {
+                                       sb.append(" at 
Line:").append(loc.getLineNumber());
+                                       sb.append(" 
Column:").append(loc.getColumnNumber());
+                               }
+                               throw new MojoExecutionException(sb.toString() 
, e);
                        }
                }
                repositoryConfigs = tempRepoConfigs;

Modified: plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-config.mdo
===================================================================
--- plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-config.mdo 
2010-12-05 13:50:09 UTC (rev 79)
+++ plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-config.mdo 
2010-12-05 15:49:49 UTC (rev 80)
@@ -61,13 +61,6 @@
                </interface>
        </interfaces>
        <classes>
-               <class locationTracker="locations" java.clone="shallow">
-                       <name>Location</name>
-                       <version>0.1.0+</version>
-                       <fields>
-                               <!-- line and column fields are auto-generated 
by Modello -->
-                       </fields>
-               </class>
                <class rootElement="true" xsd.compositor="sequence" 
xml.tagName="Repository">
                        <name>RepositoryConfig</name>
                        <version>0.1.0+</version>
@@ -133,7 +126,8 @@
                        </interfaces>
                        <superClass>FileItem</superClass>
                </class>
-               <class java.abstract="true">
+               <class>
+                       <!-- TODO Put java.abstract="true" back in when 
http://jira.codehaus.org/browse/MODELLO-250 is fixed -->
                        <name>RepositoryMapper</name>
                        <version>0.1.0+</version>
                        <description>A mapper component that generates a 
repository map from a location</description>
@@ -149,7 +143,8 @@
                                </field>
                        </fields>
                </class>
-               <class java.abstract="true">
+               <class>
+                       <!-- TODO Put java.abstract="true" back in when 
http://jira.codehaus.org/browse/MODELLO-250 is fixed -->
                        <name>AuthenticatedRepositoryMapper</name>
                        <version>0.1.0+</version>
                        <superClass>RepositoryMapper</superClass>
@@ -236,7 +231,8 @@
                </class>
                
                <!-- Set base import! Modello forces us to copy it -->
-               <class java.abstract="true">
+               <class>
+                       <!-- TODO Put java.abstract="true" back in when 
http://jira.codehaus.org/browse/MODELLO-250 is fixed -->
                        <name>SetBase</name>
                        <description>The common base for file based 
inclusions</description>
                        <version>0.1.0+</version>

Modified: plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-map.mdo
===================================================================
--- plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-map.mdo    
2010-12-05 13:50:09 UTC (rev 79)
+++ plugins/sfnet-mvnrepo-plugin/trunk/src/main/mdo/mvn-repo-map.mdo    
2010-12-05 15:49:49 UTC (rev 80)
@@ -54,14 +54,8 @@
                <type>namespace</type>
        </versionDefinition>
        <classes>
-               <class locationTracker="locations" java.clone="shallow">
-                       <name>Location</name>
-                       <version>0.1.0+</version>
-                       <fields>
-                               <!-- line and column fields are auto-generated 
by Modello -->
-                       </fields>
-               </class>
-               <class java.abstract="true">
+               <class>
+                       <!-- TODO Put java.abstract="true" back in when 
http://jira.codehaus.org/browse/MODELLO-250 is fixed -->
                        <name>Node</name>
                        <description>The base node object</description>
                        <version>0.1.0+</version>
@@ -84,8 +78,8 @@
                        </fields>
                </class>
                <class xsd.compositor="sequence">
-                       <name>File</name>
-                       <description>Represents a file</description>
+                       <name>FileItem</name>
+                       <description>Represents a file. We had to call it 
FileItem for modello bug 
http://jira.codehaus.org/browse/MODELLO-251</description>
                        <version>0.1.0+</version>
                        <superClass>Node</superClass>
                        <fields>
@@ -130,7 +124,7 @@
                                        <version>0.1.0+</version>
                                        <description>Files in the 
directory</description>
                                        <association>
-                                               <type>File</type>
+                                               <type>FileItem</type>
                                                <multiplicity>*</multiplicity>
                                        </association>
                                </field>


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
mvn-Infix-commits mailing list
mvn-Infix-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mvn-infix-commits

Reply via email to