Modified: incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/RepositoryConverter.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/RepositoryConverter.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/RepositoryConverter.java (original) +++ incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/RepositoryConverter.java Mon May 2 08:46:33 2011 @@ -18,6 +18,7 @@ */ package npanday.repository; +import npanday.registry.NPandayRepositoryException; import org.openrdf.repository.Repository; import org.apache.maven.artifact.Artifact; import npanday.artifact.ApplicationConfig; @@ -42,11 +43,12 @@ public interface RepositoryConverter * @param mavenRepository the base directory where the converted repository, with the default local repository * format, should be placed * @throws IOException if there is a problem in converting the repository + * @throws NPandayRepositoryException */ void convertRepositoryFormat( Repository repository, File mavenRepository ) - throws IOException; + throws IOException, NPandayRepositoryException; void convertRepositoryFormatFor( Artifact artifact, ApplicationConfig applicationConfig, Repository repository, File mavenRepository ) - throws IOException; + throws IOException, NPandayRepositoryException; }
Modified: incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/impl/RepositoryConverterImpl.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/impl/RepositoryConverterImpl.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/impl/RepositoryConverterImpl.java (original) +++ incubator/npanday/trunk/components/dotnet-repository/src/main/java/npanday/repository/impl/RepositoryConverterImpl.java Mon May 2 08:46:33 2011 @@ -18,6 +18,8 @@ */ package npanday.repository.impl; +import npanday.dao.ProjectDaoException; +import npanday.registry.NPandayRepositoryException; import npanday.repository.RepositoryConverter; import npanday.dao.Project; import npanday.dao.ProjectDao; @@ -88,13 +90,23 @@ public class RepositoryConverterImpl * @see RepositoryConverter#convertRepositoryFormat(org.openrdf.repository.Repository, java.io.File) */ public void convertRepositoryFormat( Repository repository, File mavenRepository ) - throws IOException + throws IOException, NPandayRepositoryException { ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" ); dao.init( artifactFactory, artifactResolver ); dao.setRdfRepository( repository ); dao.openConnection(); - Set<Project> projects = dao.getAllProjects(); + Set<Project> projects; + + try + { + projects = dao.getAllProjects(); + } + catch( ProjectDaoException e ) + { + throw new NPandayRepositoryException( "NPANDAY-190-004: An error occurred while retrieving projects.", e ); + } + for ( Project project : projects ) { logger.finest( "NPANDAY-190-000: Converting Project: Artifact ID = " + project.getArtifactId() + @@ -144,15 +156,25 @@ public class RepositoryConverterImpl public void convertRepositoryFormatFor( Artifact artifact, ApplicationConfig applicationConfig, Repository repository, File mavenRepository ) - throws IOException + throws IOException, NPandayRepositoryException { ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" ); dao.init( artifactFactory, artifactResolver ); dao.setRdfRepository( repository ); dao.openConnection(); - Project project = dao.getProjectFor( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), + Project project; + + try + { + project = dao.getProjectFor( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(), artifact.getClassifier() ); + } + catch( ProjectDaoException e ) + { + throw new NPandayRepositoryException( "NPANDAY-190-005: An error occurred while retrieving projects.", e ); + } + logger.finest( "NPANDAY-190-002: Converting Project: Artifact ID = " + project.getArtifactId() + ", Dependency Count =" + project.getProjectDependencies().size() ); Model model = ProjectFactory.createModelFrom( project ); @@ -219,4 +241,4 @@ public class RepositoryConverterImpl artifact.getBaseVersion() ).append( "." ).append( ( artifact.getArtifactHandler() ).getExtension() ); return artifactPath.toString(); } -} +} \ No newline at end of file Modified: incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java (original) +++ incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java Mon May 2 08:46:33 2011 @@ -71,7 +71,7 @@ public class RepositoryConverterImplTest { dao.storeProjectAndResolveDependencies( project, testRepo, new ArrayList<ArtifactRepository>() ); } - catch ( java.io.IOException e ) + catch ( Exception e ) { e.printStackTrace(); fail( "Could not store the project: " + e.getMessage() ); @@ -84,7 +84,7 @@ public class RepositoryConverterImplTest { repositoryConverter.convertRepositoryFormat( repository, testRepo ); } - catch ( IOException e ) + catch ( Exception e ) { fail( "Could not convert the repository: " + e.getMessage() ); } Modified: incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/SettingsUtil.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/SettingsUtil.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/SettingsUtil.java (original) +++ incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/SettingsUtil.java Mon May 2 08:46:33 2011 @@ -20,6 +20,7 @@ package npanday.vendor; import npanday.PathUtil; +import npanday.registry.NPandayRepositoryException; import npanday.registry.RepositoryRegistry; import npanday.registry.impl.StandardRepositoryLoader; import npanday.vendor.impl.SettingsRepository; @@ -124,5 +125,9 @@ public class SettingsUtil { throw new SettingsException( "NPANDAY-108-003: Error loading " + settingsFile.getAbsolutePath(), e ); } + catch( NPandayRepositoryException e ) + { + throw new SettingsException( "NPANDAY-108-004: Error loading settings repository.", e ); + } } } Modified: incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java (original) +++ incubator/npanday/trunk/components/dotnet-vendor/src/main/java/npanday/vendor/impl/SettingsRepository.java Mon May 2 08:46:33 2011 @@ -18,6 +18,7 @@ */ package npanday.vendor.impl; +import npanday.registry.NPandayRepositoryException; import npanday.registry.Repository; import npanday.registry.RepositoryRegistry; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; @@ -76,7 +77,7 @@ public final class SettingsRepository * @see Repository#load(java.io.InputStream, java.util.Hashtable) */ public void load( InputStream inputStream, Hashtable properties ) - throws IOException + throws NPandayRepositoryException { NPandaySettingsXpp3Reader xpp3Reader = new NPandaySettingsXpp3Reader(); Reader reader = new InputStreamReader( inputStream ); @@ -85,10 +86,13 @@ public final class SettingsRepository { settings = xpp3Reader.read( reader ); } + catch( IOException e ) + { + throw new NPandayRepositoryException( "NPANDAY-104-000: An error occurred while reading npanday-settings.xml", e ); + } catch ( XmlPullParserException e ) { - e.printStackTrace(); - throw new IOException( "NPANDAY-104-000: Could not read npanday-settings.xml" ); + throw new NPandayRepositoryException( "NPANDAY-104-001: Could not read npanday-settings.xml", e ); } vendors = settings.getVendors(); defaultSetup = settings.getDefaultSetup(); @@ -117,8 +121,7 @@ public final class SettingsRepository } public void reload() - throws IOException - { + throws IOException, NPandayRepositoryException { if ( fileUri == null || fileUri.trim().equals( "" ) ) { @@ -152,17 +155,17 @@ public final class SettingsRepository { load( stream, props ); } - catch ( IOException e ) + catch ( NPandayRepositoryException e ) { - throw new IOException( "NPANDAY-084-004: " + e.toString() + " : " + message ); + throw new NPandayRepositoryException( "NPANDAY-084-004: " + e.toString() + " : " + message, e ); } catch ( Exception e ) { - throw new IOException( "NPANDAY-084-005: " + e.toString() + " : " + message ); + throw new NPandayRepositoryException( "NPANDAY-084-005: " + e.toString() + " : " + message, e ); } catch ( Error e ) { - throw new IOException( "NPANDAY-084-006: " + e.toString() + " : " + message ); + throw new NPandayRepositoryException( "NPANDAY-084-006: " + e.toString() + " : " + message, e ); } } Modified: incubator/npanday/trunk/components/dotnet-vendor/src/test/java/npanday/vendor/impl/RepositoryRegistryTestStub.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-vendor/src/test/java/npanday/vendor/impl/RepositoryRegistryTestStub.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/components/dotnet-vendor/src/test/java/npanday/vendor/impl/RepositoryRegistryTestStub.java (original) +++ incubator/npanday/trunk/components/dotnet-vendor/src/test/java/npanday/vendor/impl/RepositoryRegistryTestStub.java Mon May 2 08:46:33 2011 @@ -18,10 +18,7 @@ */ package npanday.vendor.impl; -import npanday.registry.RepositoryRegistry; -import npanday.registry.RepositoryLoader; -import npanday.registry.RegistryLoader; -import npanday.registry.Repository; +import npanday.registry.*; import java.io.IOException; @@ -47,17 +44,17 @@ final class RepositoryRegistryTestStub } public synchronized void loadFromInputStream( InputStream inputStream ) - throws IOException + throws IOException, NPandayRepositoryException { } public synchronized void loadFromFile( String fileName ) - throws IOException + throws IOException, NPandayRepositoryException { } public synchronized void loadFromResource( String fileName, Class sourceClass ) - throws IOException + throws IOException, NPandayRepositoryException { } Modified: incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/ComponentInitializerMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/ComponentInitializerMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/ComponentInitializerMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/ComponentInitializerMojo.java Mon May 2 08:46:33 2011 @@ -18,6 +18,7 @@ */ package npanday.plugin.compile; +import npanday.artifact.NPandayArtifactResolutionException; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; import org.apache.maven.plugin.AbstractMojo; @@ -88,7 +89,11 @@ public class ComponentInitializerMojo } catch ( java.io.IOException e ) { - throw new MojoExecutionException(e.getMessage()); + throw new MojoExecutionException( e.getMessage() ); + } + catch( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( e.getMessage() ); } try Modified: incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopAggregateMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopAggregateMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopAggregateMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopAggregateMojo.java Mon May 2 08:46:33 2011 @@ -18,6 +18,8 @@ */ package npanday.plugin.fxcop; +import npanday.artifact.NPandayArtifactResolutionException; +import npanday.registry.NPandayRepositoryException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; @@ -130,7 +132,11 @@ public class FxCopAggregateMojo } catch ( IOException e ) { - throw new MojoExecutionException(e.getMessage()); + throw new MojoExecutionException( e.getMessage() ); + } + catch( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( e.getMessage() ); } for ( Artifact artifact : (Set<Artifact>) project.getDependencyArtifacts() ) Modified: incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-fxcop-plugin/src/main/java/npanday/plugin/fxcop/FxCopMojo.java Mon May 2 08:46:33 2011 @@ -19,6 +19,7 @@ package npanday.plugin.fxcop; import npanday.ArtifactTypeHelper; +import npanday.artifact.NPandayArtifactResolutionException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import npanday.executable.ExecutionException; @@ -121,7 +122,11 @@ public class FxCopMojo } catch ( IOException e ) { - throw new MojoExecutionException(e.getMessage()); + throw new MojoExecutionException( e.getMessage() ); + } + catch( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( e.getMessage() ); } Set<Artifact> artifacts = project.getDependencyArtifacts(); Modified: incubator/npanday/trunk/plugins/maven-install-plugin/src/main/java/npanday/plugin/install/InstallerMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-install-plugin/src/main/java/npanday/plugin/install/InstallerMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-install-plugin/src/main/java/npanday/plugin/install/InstallerMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-install-plugin/src/main/java/npanday/plugin/install/InstallerMojo.java Mon May 2 08:46:33 2011 @@ -19,6 +19,7 @@ package npanday.plugin.install; import npanday.ArtifactTypeHelper; +import npanday.dao.ProjectDaoException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; @@ -263,5 +264,9 @@ public class InstallerMojo { throw new MojoExecutionException( "NPANDAY-1001-001: Failed to install artifacts", e ); } + catch( ProjectDaoException e ) + { + throw new MojoExecutionException( "NPANDAY-1001-002: Failed to install artifacts", e ); + } } } Modified: incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/ArtifactManagerMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/ArtifactManagerMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/ArtifactManagerMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/ArtifactManagerMojo.java Mon May 2 08:46:33 2011 @@ -19,6 +19,7 @@ package npanday.plugin.repository; +import npanday.dao.ProjectDaoException; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; @@ -101,12 +102,12 @@ public class ArtifactManagerMojo { dao.removeProjectFor( tokens[0], tokens[1], tokens[2], tokens[3] ); } - catch ( IOException e ) + catch ( ProjectDaoException e ) { e.printStackTrace(); throw new MojoExecutionException( e.getMessage() ); } + dao.closeConnection(); - } } Modified: incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryAssemblerMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryAssemblerMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryAssemblerMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryAssemblerMojo.java Mon May 2 08:46:33 2011 @@ -19,6 +19,7 @@ package npanday.plugin.repository; import npanday.ArtifactTypeHelper; +import npanday.artifact.NPandayArtifactResolutionException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; @@ -187,6 +188,10 @@ public class RepositoryAssemblerMojo { throw new MojoExecutionException( "NPANDAY-1700-009: Message = " + e.getMessage(), e ); } + catch( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( "NPANDAY-1700-010: Message = " + e.getMessage(), e ); + } for ( Artifact artifact : (Set<Artifact>) project.getDependencyArtifacts() ) { Modified: incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryConverterForArtifactMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryConverterForArtifactMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryConverterForArtifactMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryConverterForArtifactMojo.java Mon May 2 08:46:33 2011 @@ -18,6 +18,8 @@ */ package npanday.plugin.repository; +import npanday.artifact.NPandayArtifactResolutionException; +import npanday.registry.NPandayRepositoryException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; @@ -93,5 +95,9 @@ public class RepositoryConverterForArtif { throw new MojoExecutionException( e.getMessage() ); } + catch( NPandayRepositoryException e ) + { + throw new MojoExecutionException( e.getMessage() ); + } } } Modified: incubator/npanday/trunk/plugins/maven-resolver-plugin/src/main/java/npanday/plugin/resolver/NetDependencyResolverMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-resolver-plugin/src/main/java/npanday/plugin/resolver/NetDependencyResolverMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-resolver-plugin/src/main/java/npanday/plugin/resolver/NetDependencyResolverMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-resolver-plugin/src/main/java/npanday/plugin/resolver/NetDependencyResolverMojo.java Mon May 2 08:46:33 2011 @@ -18,12 +18,13 @@ */ package npanday.plugin.resolver; +import npanday.artifact.NPandayArtifactResolutionException; +import npanday.registry.NPandayRepositoryException; import org.apache.maven.project.MavenProject; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.model.Dependency; import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.installer.ArtifactInstaller; import npanday.registry.RepositoryRegistry; import java.io.File; @@ -31,7 +32,6 @@ import java.io.IOException; import java.util.List; import java.util.ArrayList; -import npanday.artifact.AssemblyResolver; import npanday.artifact.NetDependenciesRepository; import npanday.artifact.NetDependencyMatchPolicy; import npanday.artifact.ArtifactContext; @@ -138,6 +138,11 @@ public class NetDependencyResolverMojo throw new MojoExecutionException( "NPANDAY-1600-000: Failed to create the repository registry for this plugin", e ); } + catch( NPandayRepositoryException e ) + { + throw new MojoExecutionException( + "NPANDAY-1600-007: Failed to create the repository registry for this plugin", e ); + } if ( netDependencies == null ) { @@ -163,10 +168,13 @@ public class NetDependencyResolverMojo artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( profile, dependencies, null ); } + catch ( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( e.getMessage(), e ); + } catch ( IOException e ) { - e.printStackTrace(); - throw new MojoExecutionException( e.getMessage() ); + throw new MojoExecutionException( e.getMessage(), e ); } new File( localRepository, "npanday.artifacts.resolved" ).mkdir(); Modified: incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java Mon May 2 08:46:33 2011 @@ -21,6 +21,7 @@ package npanday.plugin.test; import npanday.ArtifactTypeHelper; import npanday.artifact.AssemblyResolver; +import npanday.artifact.NPandayArtifactResolutionException; import npanday.executable.CommandExecutor; import npanday.executable.ExecutionException; import npanday.vendor.IllegalStateException; @@ -293,6 +294,10 @@ extends AbstractMojo { throw new MojoExecutionException( e.getMessage() ); } + catch( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( e.getMessage() ); + } List<Artifact> nunitLibs = new ArrayList<Artifact>(); Set<Artifact> artifacts = project.getDependencyArtifacts(); Modified: incubator/npanday/trunk/plugins/maven-vsinstaller-plugin/src/main/java/npanday/plugin/vsinstaller/VsInstallerMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-vsinstaller-plugin/src/main/java/npanday/plugin/vsinstaller/VsInstallerMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-vsinstaller-plugin/src/main/java/npanday/plugin/vsinstaller/VsInstallerMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-vsinstaller-plugin/src/main/java/npanday/plugin/vsinstaller/VsInstallerMojo.java Mon May 2 08:46:33 2011 @@ -21,11 +21,13 @@ package npanday.plugin.vsinstaller; import npanday.PlatformUnsupportedException; import npanday.artifact.ArtifactContext; +import npanday.artifact.NPandayArtifactResolutionException; import npanday.artifact.NetDependenciesRepository; import npanday.artifact.NetDependencyMatchPolicy; import npanday.executable.ExecutionException; import npanday.executable.NetExecutable; import npanday.model.netdependency.NetDependency; +import npanday.registry.NPandayRepositoryException; import npanday.registry.RepositoryRegistry; import npanday.vendor.Vendor; import org.apache.maven.artifact.Artifact; @@ -49,7 +51,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import javax.swing.*; -import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileSystemView; /** @@ -138,6 +139,11 @@ public class VsInstallerMojo throw new MojoExecutionException( "NPANDAY-1600-000: Failed to create the repository registry for this plugin", e ); } + catch( NPandayRepositoryException e ) + { + throw new MojoExecutionException( + "NPANDAY-1600-007: Failed to create the repository registry for this plugin", e ); + } NetDependenciesRepository netRepository = (NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" ); @@ -160,7 +166,11 @@ public class VsInstallerMojo artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( "VisualStudio2005", null, null ); } - catch ( IOException e ) + catch ( NPandayArtifactResolutionException e ) + { + throw new MojoExecutionException( e.getMessage(), e ); + } + catch( IOException e ) { throw new MojoExecutionException( e.getMessage(), e ); } Modified: incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XmlToXsdGeneratorMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XmlToXsdGeneratorMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XmlToXsdGeneratorMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XmlToXsdGeneratorMojo.java Mon May 2 08:46:33 2011 @@ -18,6 +18,7 @@ */ package npanday.plugin.xsd; +import npanday.registry.NPandayRepositoryException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; @@ -114,6 +115,11 @@ public class XmlToXsdGeneratorMojo throw new MojoExecutionException( "NPANDAY-1401-003: Failed to create the repository registry for this plugin", e ); } + catch( NPandayRepositoryException e ) + { + throw new MojoExecutionException( + "NPANDAY-1401-004: Failed to create the repository registry for this plugin", e ); + } FileUtils.mkdir( outputDirectory ); try Modified: incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XsdGeneratorMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XsdGeneratorMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XsdGeneratorMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-xsd-plugin/src/main/java/npanday/plugin/xsd/XsdGeneratorMojo.java Mon May 2 08:46:33 2011 @@ -18,6 +18,7 @@ */ package npanday.plugin.xsd; +import npanday.registry.NPandayRepositoryException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; @@ -175,6 +176,11 @@ public class XsdGeneratorMojo throw new MojoExecutionException( "NPANDAY-1400-0032 Failed to create the repository registry for this plugin", e ); } + catch( NPandayRepositoryException e ) + { + throw new MojoExecutionException( + "NPANDAY-1400-0033 Failed to create the repository registry for this plugin", e ); + } FileUtils.mkdir( outputDirectory ); try Modified: incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java?rev=1098512&r1=1098511&r2=1098512&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java (original) +++ incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Settings/javabinding/src/main/java/NPanday/Plugin/Settings/SettingsGeneratorMojo.java Mon May 2 08:46:33 2011 @@ -20,6 +20,7 @@ package NPanday.Plugin.Settings; import npanday.PathUtil; +import npanday.registry.NPandayRepositoryException; import npanday.registry.RepositoryRegistry; import npanday.registry.impl.StandardRepositoryLoader; import npanday.vendor.SettingsException; @@ -291,6 +292,9 @@ public class SettingsGeneratorMojo { e.printStackTrace(); } - + catch( NPandayRepositoryException e ) + { + e.printStackTrace(); + } } }