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=1210767&r1=1210766&r2=1210767&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 Tue Dec 6 03:24:44 2011 @@ -18,19 +18,16 @@ */ package npanday.plugin.install; -import npanday.ArtifactTypeHelper; +import npanday.PathUtil; import npanday.dao.ProjectDaoException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; import org.apache.maven.artifact.installer.ArtifactInstallationException; -import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolver; import npanday.artifact.ArtifactContext; -import npanday.ArtifactType; -import npanday.artifact.ApplicationConfig; import npanday.executable.NetExecutable; import npanday.executable.ExecutionException; import npanday.PlatformUnsupportedException; @@ -183,43 +180,6 @@ public class InstallerMojo } } - // To allow executables to be runnable from the repo - Artifact artifact = project.getArtifact(); - - if (ArtifactTypeHelper.isDotnetExecutable( artifact.getType() ) || - ArtifactTypeHelper.isDotnetMavenPlugin( artifact.getType() ) || - artifact.getType().equals( ArtifactType.VISUAL_STUDIO_ADDIN.getPackagingType() ) || - artifact.getType().equals( ArtifactType.SHARP_DEVELOP_ADDIN.getPackagingType() ) ) - { - List<Dependency> dependencies = project.getDependencies(); - if ( ArtifactTypeHelper.isDotnetExecutable( artifact.getType() ) ) - { - ApplicationConfig applicationConfig = artifactContext.getApplicationConfigFor( artifact ); - // File configExeFile = new File( applicationConfig.getConfigDestinationPath() ); - /* - if ( configExeFile.exists() ) - { - Dependency dependency = new Dependency(); - dependency.setGroupId( artifact.getGroupId() ); - dependency.setArtifactId( artifact.getArtifactId() ); - dependency.setVersion( artifact.getVersion() ); - dependency.setType( ArtifactType.EXECONFIG.getPackagingType() ); - dependencies.add( dependency ); - } - */ - } - try - { - artifactContext.getArtifactInstaller() - .installArtifactAndDependenciesIntoPrivateApplicationBase( localRepository, artifact, - dependencies ); - } - catch ( java.io.IOException e ) - { - throw new MojoExecutionException( e.getMessage() ); - } - } - long endTime = System.currentTimeMillis(); getLog().info( "Mojo Execution Time = " + ( endTime - startTime ) ); } @@ -258,7 +218,9 @@ public class InstallerMojo try { - dao.storeProjectAndResolveDependencies( proj, localRepository, new ArrayList<ArtifactRepository>() ); + File targetDir = PathUtil.getPrivateApplicationBaseDirectory( project ); + dao.storeProjectAndResolveDependencies( proj, localRepository, new ArrayList<ArtifactRepository>(), + targetDir ); } catch ( java.io.IOException e ) {
Modified: incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java?rev=1210767&r1=1210766&r2=1210767&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java (original) +++ incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java Tue Dec 6 03:24:44 2011 @@ -18,6 +18,8 @@ */ package npanday.plugin.generator; +import npanday.PathUtil; +import npanday.artifact.ArtifactContext; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; @@ -91,6 +93,11 @@ public class MojoGeneratorMojo */ private npanday.executable.NetExecutableFactory netExecutableFactory; + /** + * @component + */ + private ArtifactContext artifactContext; + /** @parameter default-value="false" */ private boolean skip; @@ -102,6 +109,7 @@ public class MojoGeneratorMojo return; } + artifactContext.init( project, project.getRemoteArtifactRepositories(), localRepository ); try { List<String> commands = new ArrayList<String>(); @@ -112,8 +120,9 @@ public class MojoGeneratorMojo } vendorInfo.setFrameworkVersion( frameworkVersion ); vendorInfo.setVendorVersion( vendorVersion ); + File targetDir = PathUtil.getPrivateApplicationBaseDirectory( project ); File targetAssemblyFile = - new File( project.getBuild().getDirectory() + "/" + project.getArtifactId() + ".dll" ); + new File( targetDir, project.getArtifactId() + ".dll" ); commands.add( "targetAssemblyFile=" + targetAssemblyFile.getAbsolutePath() ); commands.add( "outputDirectory=" + basedir ); commands.add( "groupId=" + project.getGroupId() ); @@ -121,7 +130,7 @@ public class MojoGeneratorMojo commands.add( "artifactVersion=" + project.getVersion()); netExecutableFactory.getNetExecutableFromRepository( "org.apache.npanday.plugins", "NPanday.Plugin.MojoGenerator", vendorInfo, localRepository, commands, - true ).execute(); + true, targetDir ).execute(); } catch ( PlatformUnsupportedException e ) { Modified: incubator/npanday/trunk/plugins/maven-repository-plugin/pom.xml URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-repository-plugin/pom.xml?rev=1210767&r1=1210766&r2=1210767&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/maven-repository-plugin/pom.xml (original) +++ incubator/npanday/trunk/plugins/maven-repository-plugin/pom.xml Tue Dec 6 03:24:44 2011 @@ -35,10 +35,6 @@ under the License. <artifactId>plexus-archiver</artifactId> <version>1.0-alpha-3</version> </dependency> - <dependency> - <groupId>org.apache.npanday</groupId> - <artifactId>dotnet-repository</artifactId> - </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> 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=1210767&r1=1210766&r2=1210767&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 Tue Dec 6 03:24:44 2011 @@ -19,45 +19,44 @@ package npanday.plugin.repository; import npanday.ArtifactTypeHelper; +import npanday.artifact.ArtifactContext; +import npanday.artifact.AssemblyResolver; import npanday.artifact.NPandayArtifactResolutionException; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.deployer.ArtifactDeployer; +import org.apache.maven.artifact.deployer.ArtifactDeploymentException; +import org.apache.maven.artifact.factory.ArtifactFactory; +import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.metadata.ArtifactMetadata; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.deployer.ArtifactDeployer; -import org.apache.maven.artifact.deployer.ArtifactDeploymentException; -import npanday.artifact.AssemblyResolver; -import npanday.artifact.ArtifactContext; -import npanday.repository.RepositoryConverter; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.artifact.ProjectArtifactMetadata; +import org.apache.maven.model.Dependency; import org.apache.maven.model.Model; import org.apache.maven.model.Parent; -import org.apache.maven.model.Dependency; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; +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.artifact.ProjectArtifactMetadata; +import org.codehaus.plexus.archiver.ArchiverException; +import org.codehaus.plexus.archiver.tar.TarArchiver; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; -import org.codehaus.plexus.archiver.tar.TarArchiver; -import org.codehaus.plexus.archiver.ArchiverException; -import org.openrdf.repository.sail.SailRepository; import org.openrdf.repository.RepositoryException; +import org.openrdf.repository.sail.SailRepository; import org.openrdf.sail.memory.MemoryStore; -import java.util.Set; -import java.util.HashSet; -import java.util.ArrayList; -import java.util.List; import java.io.File; -import java.io.IOException; -import java.io.FileReader; import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * @author Shane Isbell @@ -124,11 +123,6 @@ public class RepositoryAssemblerMojo */ private ArtifactContext artifactContext; - /** - * @component - */ - private RepositoryConverter repositoryConverter; - public void execute() throws MojoExecutionException, MojoFailureException { 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=1210767&r1=1210766&r2=1210767&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 Tue Dec 6 03:24:44 2011 @@ -18,6 +18,7 @@ */ package npanday.plugin.resolver; +import npanday.artifact.ArtifactInstaller; import npanday.artifact.NPandayArtifactResolutionException; import npanday.registry.NPandayRepositoryException; import org.apache.maven.project.MavenProject; @@ -165,8 +166,8 @@ public class NetDependencyResolverMojo { try { - artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( profile, - dependencies, null ); + ArtifactInstaller installer = artifactContext.getArtifactInstaller(); + installer.resolveAndInstallNetDependenciesForProfile( profile, dependencies, null, project ); } catch ( NPandayArtifactResolutionException e ) { 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=1210767&r1=1210766&r2=1210767&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 Tue Dec 6 03:24:44 2011 @@ -21,6 +21,7 @@ package npanday.plugin.vsinstaller; import npanday.PlatformUnsupportedException; import npanday.artifact.ArtifactContext; +import npanday.artifact.ArtifactInstaller; import npanday.artifact.NPandayArtifactResolutionException; import npanday.artifact.NetDependenciesRepository; import npanday.artifact.NetDependencyMatchPolicy; @@ -37,6 +38,7 @@ import org.apache.maven.model.Dependency 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.settings.Settings; import org.apache.commons.io.filefilter.*; import org.apache.commons.io.FileUtils; @@ -50,7 +52,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.swing.*; import javax.swing.filechooser.FileSystemView; /** @@ -163,8 +164,8 @@ public class VsInstallerMojo try { - artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( "VisualStudio2005", null, - null ); + ArtifactInstaller installer = artifactContext.getArtifactInstaller(); + installer.resolveAndInstallNetDependenciesForProfile( "VisualStudio2005", null, null, mavenProject ); } catch ( NPandayArtifactResolutionException e ) { Modified: incubator/npanday/trunk/pom.xml URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/pom.xml?rev=1210767&r1=1210766&r2=1210767&view=diff ============================================================================== --- incubator/npanday/trunk/pom.xml (original) +++ incubator/npanday/trunk/pom.xml Tue Dec 6 03:24:44 2011 @@ -397,11 +397,6 @@ under the License. </dependency> <dependency> <groupId>org.apache.npanday</groupId> - <artifactId>dotnet-repository</artifactId> - <version>1.4.1-incubating-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.npanday</groupId> <artifactId>dotnet-core</artifactId> <version>1.4.1-incubating-SNAPSHOT</version> </dependency>