You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by br...@apache.org on 2011/12/06 03:24:46 UTC
svn commit: r1210767 [1/2] - in /incubator/npanday/trunk: ./ components/
components/dotnet-artifact/src/main/java/npanday/artifact/
components/dotnet-artifact/src/main/java/npanday/artifact/impl/
components/dotnet-core/src/main/java/npanday/ components...
Author: brett
Date: Tue Dec 6 03:24:44 2011
New Revision: 1210767
URL: http://svn.apache.org/viewvc?rev=1210767&view=rev
Log:
[NPANDAY-410] do not require NPanday.Plugin and other dependencies to reside in the GAC.
As prerequisites, also did the following:
- Refactor several calls so that files are stored in the project target directory rather than user.dir for better multi-module build operation.
- Remove pieces of functionality that are not longer used.
Removed:
incubator/npanday/trunk/components/dotnet-repository/
incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin/src/main/csharp/PluginDomainManager.cs
incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryConverterForArtifactMojo.java
Modified:
incubator/npanday/trunk/ (props changed)
incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactContext.java
incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactInstaller.java
incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactContextImpl.java
incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java
incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/AssemblyResolverImpl.java
incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java
incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectDao.java
incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java
incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
incubator/npanday/trunk/components/dotnet-dao-project/src/test/java/npanday/dao/impl/ProjectDaoImplTest.java
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java
incubator/npanday/trunk/components/pom.xml
incubator/npanday/trunk/dotnet/assemblies/NPanday.Model.Pom/pom.xml
incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Loader/src/main/csharp/PluginLoader.cs
incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.MojoGenerator/src/main/csharp/Generator.cs
incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Runner/src/main/csharp/PluginLauncher.cs
incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin/pom.xml
incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/groovy/npanday/plugin/compile/CompileLifecycleMap.groovy
incubator/npanday/trunk/plugins/maven-install-plugin/src/main/java/npanday/plugin/install/InstallerMojo.java
incubator/npanday/trunk/plugins/maven-mojo-generator-plugin/src/main/java/npanday/plugin/generator/MojoGeneratorMojo.java
incubator/npanday/trunk/plugins/maven-repository-plugin/pom.xml
incubator/npanday/trunk/plugins/maven-repository-plugin/src/main/java/npanday/plugin/repository/RepositoryAssemblerMojo.java
incubator/npanday/trunk/plugins/maven-resolver-plugin/src/main/java/npanday/plugin/resolver/NetDependencyResolverMojo.java
incubator/npanday/trunk/plugins/maven-vsinstaller-plugin/src/main/java/npanday/plugin/vsinstaller/VsInstallerMojo.java
incubator/npanday/trunk/pom.xml
Propchange: incubator/npanday/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 6 03:24:44 2011
@@ -1,2 +1,3 @@
+/incubator/npanday/branches/NPANDAY-410:1210743-1210765
/incubator/npanday/branches/npanday-uac-removed:1002005-1024539
/incubator/npanday/branches/npanday-vs2010-support:1002029-1025477
Modified: incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactContext.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactContext.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactContext.java (original)
+++ incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactContext.java Tue Dec 6 03:24:44 2011
@@ -95,22 +95,6 @@ public interface ArtifactContext
ApplicationConfig getApplicationConfigFor( Artifact artifact );
/**
- * Returns the directory containing the local Maven repository
- *
- * @return the directory containing the local Maven repository
- */
- File getLocalRepository();
-
- /**
- * Returns a list of .NET artifacts that reside within the specified repository.
- *
- * @param repository the local repository directory. If value is null, the localRepository reference will default to
- * the specified localRepository passed to the init method of the context.
- * @return list of .NET artifacts that reside within the specified repository.
- */
- List<Artifact> getAllNetArtifactsFromRepository( File repository );
-
- /**
* Initializes this artifact context. Neither parameter value should be null.
*
* @param mavenProject the maven project
Modified: incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactInstaller.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactInstaller.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactInstaller.java (original)
+++ incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/ArtifactInstaller.java Tue Dec 6 03:24:44 2011
@@ -22,6 +22,7 @@ import org.apache.maven.artifact.Artifac
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.installer.ArtifactInstallationException;
import org.apache.maven.model.Dependency;
+import org.apache.maven.project.MavenProject;
import java.io.File;
import java.io.IOException;
@@ -78,26 +79,30 @@ public interface ArtifactInstaller
* with that profile.
*
*
+ *
* @param profile the specified profile to resolve. This value may be null.
* @param netDependencies additional .NET artifacts to resolve and install.
* @param javaDependencies the Java Dependencies to resolve. Typically these should be the java bindings for the
* .NET plugins.
+ * @param project
* @throws IOException if there is a problem with installation
*/
void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency> netDependencies,
- List<Dependency> javaDependencies )
+ List<Dependency> javaDependencies, MavenProject project )
throws IOException, NPandayArtifactResolutionException;
/**
* Installs both the artifact and all of its dependencies into the private application base.
*
+ *
* @param applicationBase the root directory of the private application base
* @param artifact the artifact to install
* @param dependencies the dependencies to install
+ * @param outputDir
* @throws IOException if there is a problem installing any of the artifacts into the private application base
*/
void installArtifactAndDependenciesIntoPrivateApplicationBase( File applicationBase, Artifact artifact,
- List<Dependency> dependencies )
+ List<Dependency> dependencies, File outputDir )
throws IOException;
/**
Modified: incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactContextImpl.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactContextImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactContextImpl.java Tue Dec 6 03:24:44 2011
@@ -28,8 +28,6 @@ import npanday.PathUtil;
import org.codehaus.plexus.logging.LogEnabled;
import org.codehaus.plexus.logging.Logger;
import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.project.MavenProject;
@@ -66,7 +64,7 @@ public final class ArtifactContextImpl
/**
* Root path of the local Maven repository
*/
- private String localRepository;
+ private File localRepository;
/**
* A logger for writing log messages
@@ -89,15 +87,6 @@ public final class ArtifactContextImpl
}
/**
- * @see npanday.artifact.ArtifactContext#getLocalRepository()
- */
- public File getLocalRepository()
- {
- return ( localRepository != null ) ? new File( localRepository )
- : new File( System.getProperty( "user.home" ), "/.m2/repository" );
- }
-
- /**
* @see ArtifactContext#getArtifactsFor(String, String, String, String)
*/
public List<Artifact> getArtifactsFor( String groupId, String artifactId, String version, String type )
@@ -116,7 +105,7 @@ public final class ArtifactContextImpl
for ( Artifact artifact : artifacts )
{
logger.debug("NPANDAY-000-002: set file");
- artifact.setFile( PathUtil.getUserAssemblyCacheFileFor( artifact, getLocalRepository() ) );
+ artifact.setFile( PathUtil.getMavenLocalRepositoryFileFor( artifact, localRepository ) );
}
return artifacts;
}
@@ -166,11 +155,6 @@ public final class ArtifactContextImpl
//return getDirectDependenciesFor( artifact, matchPolicies );
}
- public List<Artifact> getAllNetArtifactsFromRepository( File repository )
- {
- return null;
- }
-
/**
* @see ArtifactContext#init(org.apache.maven.project.MavenProject,java.util.List, File)
*/
@@ -178,29 +162,10 @@ public final class ArtifactContextImpl
File localRepository )
{
this.project = mavenProject;
- this.localRepository = localRepository.getAbsolutePath();
+ this.localRepository = localRepository;
artifactInstaller.init( this, remoteArtifactRepositories, localRepository );
}
- /**
- * Returns true if the artifact matches <i>all</i> match policies, otherwise returns false.
- *
- * @param artifact the artifact to match against the match policies
- * @param matchPolicies the match policies
- * @return true if the artifact matches <i>all</i> match policies, otherwise returns false
- */
- private boolean matchArtifacts( Artifact artifact, List<ArtifactMatchPolicy> matchPolicies )
- {
- for ( ArtifactMatchPolicy matchPolicy : matchPolicies )
- {
- if ( !matchPolicy.match( artifact ) )
- {
- return false;
- }
- }
- return true;
- }
-
/*
* Matches .NET module artifacts.
*/
Modified: incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/ArtifactInstallerImpl.java Tue Dec 6 03:24:44 2011
@@ -51,8 +51,6 @@ import java.io.FileWriter;
import java.io.FileReader;
import java.util.List;
import java.util.ArrayList;
-import java.util.Set;
-import java.util.HashSet;
/**
* Provides an implementation of the <code>ArtifactInstaller</code> interface.
@@ -132,11 +130,8 @@ public class ArtifactInstallerImpl
this.logger = logger;
}
- /**
- * @see npanday.artifact.ArtifactInstaller#resolveAndInstallNetDependenciesForProfile(String, java.util.List, java.util.List)
- */
public void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency> netDependencies,
- List<Dependency> javaDependencies )
+ List<Dependency> javaDependencies, MavenProject project )
throws IOException, NPandayArtifactResolutionException
{
if ( netDependencies == null )
@@ -155,7 +150,7 @@ public class ArtifactInstallerImpl
matchPolicies.add( new ProfileMatchPolicy( profile ) );
netDependencies.addAll( repository.getDependenciesFor( matchPolicies ) );
- assemblyResolver.resolveTransitivelyFor( new MavenProject(), netDependencies, remoteArtifactRepositories,
+ assemblyResolver.resolveTransitivelyFor( project, netDependencies, remoteArtifactRepositories,
localRepository, false );
//Do Library Installs for Net Dependencies
@@ -222,14 +217,14 @@ public class ArtifactInstallerImpl
}
/**
- * @see npanday.artifact.ArtifactInstaller#installArtifactAndDependenciesIntoPrivateApplicationBase(java.io.File, org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.model.Dependency>)
+ * TODO: this should be able to be removed - we're relying on copy side-effects of getDotNetArtifact
*/
public void installArtifactAndDependenciesIntoPrivateApplicationBase( File localRepository, Artifact artifact,
- List<Dependency> dependencies )
+ List<Dependency> dependencies,
+ File outputDir )
throws IOException
{
- Set<Artifact> artifactDependencies = new HashSet<Artifact>();
for ( Dependency dependency : dependencies )
{
@@ -241,9 +236,9 @@ public class ArtifactInstallerImpl
dependency.getType(),
dependency.getClassifier(), scope,
null );
-
- File artifactDependencyFile = PathUtil.getDotNetArtifact( artifactDependency , localRepository );
-
+
+ File artifactDependencyFile = PathUtil.getDotNetArtifact( artifactDependency , localRepository, outputDir );
+
if ( artifactDependencyFile == null || !artifactDependencyFile.exists() )
{
if (!ArtifactTypeHelper.isDotnetAnyGac( artifactDependency.getType() ))
@@ -256,7 +251,6 @@ public class ArtifactInstallerImpl
}
artifactDependency.setFile( artifactDependencyFile );
- artifactDependencies.add( artifactDependency );
}
if ( artifact != null )
@@ -268,7 +262,6 @@ public class ArtifactInstallerImpl
artifact.getArtifactId() + ", Path = " +
( ( artifactFile != null ) ? artifactFile.getAbsolutePath() : null ) );
}
- artifactDependencies.add( artifact );
}
}
@@ -288,8 +281,9 @@ public class ArtifactInstallerImpl
if ( configExeFile.exists() )
{
try
- {
- FileUtils.copyFileToDirectory( configExeFile, PathUtil.getUserAssemblyCacheFileFor( artifact,localRepository ).getParentFile() );
+ {
+ File directory = PathUtil.getMavenLocalRepositoryFileFor( artifact, localRepository ).getParentFile();
+ FileUtils.copyFileToDirectory( configExeFile, directory );
}
catch ( IOException e )
{
Modified: incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/AssemblyResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/AssemblyResolverImpl.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/AssemblyResolverImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-artifact/src/main/java/npanday/artifact/impl/AssemblyResolverImpl.java Tue Dec 6 03:24:44 2011
@@ -18,6 +18,7 @@
*/
package npanday.artifact.impl;
+import npanday.PathUtil;
import npanday.artifact.AssemblyResolver;
import npanday.artifact.NPandayArtifactResolutionException;
import npanday.dao.ProjectDao;
@@ -140,8 +141,11 @@ public class AssemblyResolverImpl
Set<Artifact> artifactDependencies = new HashSet<Artifact>();
try
{
+ // TODO: do we really need to copy these?
+ File targetDirectory = PathUtil.getPrivateApplicationBaseDirectory( mavenProject );
artifactDependencies =
- dao.storeProjectAndResolveDependencies( project, localArtifactRepository, remoteArtifactRepositories );
+ dao.storeProjectAndResolveDependencies( project, localArtifactRepository, remoteArtifactRepositories,
+ targetDirectory );
}
catch( ProjectDaoException e )
{
Modified: incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java (original)
+++ incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java Tue Dec 6 03:24:44 2011
@@ -20,26 +20,12 @@ package npanday;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import npanday.ArtifactTypeHelper;
-import npanday.ArtifactType;
-import org.codehaus.plexus.util.DirectoryScanner;
+import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.FileUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
import java.util.logging.Logger;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
/**
* This class provides methods for obtaining the location of artifacts.
@@ -97,8 +83,6 @@ public final class PathUtil
return null;
}
-
-
if ( artifact.getClassifier() == null )
{
logger.warning( "NPANDAY-040-002: Assembly must be signed - Cannot get application file." );
@@ -113,19 +97,10 @@ public final class PathUtil
logger.finest( "NPANDAY-040-003: Read global assembly cache folder for: " + artifact);
//TODO: gac_generic
//String processArchitecture = ( artifact.getType().equals( "gac_generic" ) );
-
- File defaultGac = new File(
- "C:\\WINDOWS\\assembly\\" + artifact.getType() + File.separator + artifact.getArtifactId() + File.separator + version + "__" +
- artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" );
- if(defaultGac.exists())
- {
- return defaultGac;
- }
- else
- {
- return getDotNetArtifact( artifact , gacRepository );
- }
-
+
+ return new File( "C:\\WINDOWS\\assembly\\" + artifact.getType() + File.separator + artifact.getArtifactId() +
+ File.separator + version + "__" + artifact.getClassifier() + File.separator +
+ artifact.getArtifactId() + ".dll" );
}
/**
@@ -154,12 +129,14 @@ public final class PathUtil
/**
* Returns the path of the artifact within the private application base.
*
+ *
* @param artifact the artifact to find the path of. This value should not be null.
* @param localRepository the local repository. This value should not be null.
+ * @param outputDir
* @return the path of the artifact within the private application base or null if either of the specified
* parameters is null
*/
- public static File getPrivateApplicationBaseFileFor( Artifact artifact, File localRepository )
+ public static File getPrivateApplicationBaseFileFor( Artifact artifact, File localRepository, File outputDir )
{
if ( artifact == null )
{
@@ -172,129 +149,53 @@ public final class PathUtil
return null;
}
- return getDotNetArtifact( artifact, localRepository );
+ return getDotNetArtifact( artifact, localRepository, outputDir );
}
/**
* Returns the path of the artifact within the user assembly cache.
*
- * @param artifact the artifact to find the path of. This value should not be null.
- * @param localRepository the local repository. This value should not be null.
- * @return the path of the artifact within the user assembly cache or null if either of the specified
- * parameters is null
- */
- public static File getUserAssemblyCacheFileFor( Artifact artifact, File localRepository )
- {
- if ( artifact == null )
- {
- logger.warning( "NPANDAY-040-005: Artifact is null - Cannot get application file." );
- return null;
- }
- if ( localRepository == null )
- {
- logger.warning( "NPANDAY-040-006: Local Repository is null - Cannot get application file." );
- return null;
- }
-
- return getDotNetArtifact( artifact , localRepository );
-
- }
-
- private static String getTokenizedPath(String path)
- {
- return path.replace(".",File.separator);
- }
-
- /**
- * Returns the path of the artifact within the user assembly cache.
*
* @param artifact the artifact to find the path of. This value should not be null.
+ * @param outputDir
* @return the path of the artifact within the user assembly cache or null if either of the specified
* parameters is null
*/
- public static File getDotNetArtifact( Artifact artifact, String source )
+ public static File getDotNetArtifact( Artifact artifact, File localRepository, File outputDir )
{
if ( artifact == null )
{
- logger.warning( "NPANDAY-040-053.1: Artifact is null - Cannot get application file." );
- return null;
- }
- if ( source == null )
- {
- logger.warning( "NPANDAY-040-054.1: Local Repository is null - Cannot get application file." );
+ logger.warning( "NPANDAY-040-0532: Artifact is null - Cannot get application file." );
return null;
}
-
- String outputDir = System.getProperty("user.dir");
- outputDir = outputDir+File.separator+"target";
- new File(outputDir).mkdir();
-
+ outputDir.mkdir();
+
String filename = artifact.getArtifactId() + "." + artifact.getArtifactHandler().getExtension();
- File targetFile = new File(outputDir+File.separator+ filename);
-
-
+ File targetFile = new File( outputDir, filename );
+
try
{
- File artifactFile = artifact.getFile();
- File sourceFile = ( artifactFile != null && artifactFile.exists() ) ? artifactFile : new File( source );
- FileUtils.copyFile( sourceFile, targetFile );
- }
- catch (IOException ioe)
+ File artifactFile = artifact.getFile();
+ File sourceFile;
+ if ( artifactFile != null && artifactFile.exists() )
+ {
+ sourceFile = artifactFile;
+ }
+ else
+ {
+ sourceFile = getMavenLocalRepositoryFileFor( artifact, localRepository );
+ }
+
+ FileUtils.copyFile( sourceFile, targetFile );
+ }
+ catch (IOException ioe)
{
logger.warning("\nNPANDAY-1005-0001: Error copying dependency " + artifact +" "+ioe.getMessage());
}
-
+
return targetFile;
}
-
- /**
- * Returns the path of the artifact within the user assembly cache.
- *
- * @param artifact the artifact to find the path of. This value should not be null.
- * @return the path of the artifact within the user assembly cache or null if either of the specified
- * parameters is null
- */
- public static File getDotNetArtifact( Artifact artifact, File localRepository )
- {
- if ( artifact == null )
- {
- logger.warning( "NPANDAY-040-0532: Artifact is null - Cannot get application file." );
- return null;
- }
-
- String ext = ArtifactType.getArtifactTypeForPackagingName( artifact.getType() ).getExtension();
-
- //assumes that since it was not found as a .dll or a .exe it will be considered as a default library
- if(ext == null)
- {
- ext = "jar";
- }
-
- File source = null;
-
- String classifier = "";
-
- if(artifact.getClassifier()!= null)
- {
- classifier = "-"+artifact.getClassifier();
- }
-
-
- if( localRepository!= null )
- {
- source = new File( localRepository + File.separator + getTokenizedPath(artifact.getGroupId() ) + File.separator + artifact.getArtifactId() + File.separator + artifact.getVersion() + File.separator + artifact.getArtifactId() + "-" + artifact.getVersion() + classifier +"." + ext );
- }
- else
- {
- source = new File( System.getProperty( "user.home" ),".m2" + File.separator + "repository" + File.separator + getTokenizedPath(artifact.getGroupId() ) + File.separator + artifact.getArtifactId() + File.separator + artifact.getVersion() + File.separator + artifact.getArtifactId() + "-" + artifact.getVersion() +"." + ext );
-
- }
-
- File dotnetFile = getDotNetArtifact( artifact, source.toString() );
-
- return dotnetFile;
- }
public static boolean containsExecutable(String executablePath, String executable) {
@@ -348,4 +249,10 @@ public final class PathUtil
{
return new File(System.getProperty( "user.home" ), ".m2").getAbsolutePath();
}
+
+ public static File getPrivateApplicationBaseDirectory( MavenProject project )
+ {
+ // Maven already basedir aligns this
+ return new File( project.getBuild().getDirectory() );
+ }
}
Modified: incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectDao.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectDao.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectDao.java (original)
+++ incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectDao.java Tue Dec 6 03:24:44 2011
@@ -19,19 +19,16 @@
package npanday.dao;
import npanday.registry.DataAccessObject;
-
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.artifact.repository.ArtifactRepository;
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 org.apache.maven.model.Model;
import org.openrdf.repository.Repository;
-import java.util.Set;
-import java.util.List;
-import java.io.IOException;
import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
/**
* Provides methods for storing and retreiving project information.
@@ -49,65 +46,38 @@ public interface ProjectDao
/**
* Returns a project that matches the specified parameters.
*
+ *
+ *
+ *
* @param groupId the group id of the project
* @param artifactId the artifact id of the project
* @param version the version of the project
* @param artifactType the type of artifact: library, exe, winexe, netmodule
* @param publicKeyTokenId the public key token id. This should match the token id within the manifest of a signed
* .NET assesmbly. This value may be null.
+ * @param localRepository
+ * @param outputDir
* @return a project that matches the specified parameters
* @throws ProjectDaoException if there was a problem retrieving the project
*/
Project getProjectFor( String groupId, String artifactId, String version, String artifactType,
- String publicKeyTokenId )
+ String publicKeyTokenId, File localRepository, File outputDir )
throws ProjectDaoException;
/**
- * Returns a project that matches the information contained within the specified maven project.
- *
- * @param mavenProject the maven project used in finding the returned project
- * @return a project that matches the information contained within the specified maven project
- * @throws ProjectDaoException if there was a problem retrieving the project
- */
- Project getProjectFor( MavenProject mavenProject )
- throws ProjectDaoException;
-
- /**
- * Method not implemented.
- *
- * @param project
- * @param localRepository
- * @param artifactRepositories
- * @throws ProjectDaoException
- */
- void storeProject( Project project, File localRepository, List<ArtifactRepository> artifactRepositories )
- throws ProjectDaoException;
-
- /**
* Stores the specified project and resolves and stores the project's dependencies.
*
+ *
* @param project the project to store
* @param localRepository the local artifact repository
* @param artifactRepositories the remote artifact repositories used in resolving dependencies
+ * @param outputDir
* @return a set of artifacts, including the project and its dependencies
* @throws IOException if there was a problem in storing or resolving the artifacts
+ * @throws ProjectDaoException if there was a problem in resolving the artifacts
*/
Set<Artifact> storeProjectAndResolveDependencies( Project project, File localRepository,
- List<ArtifactRepository> artifactRepositories )
- throws IOException, ProjectDaoException;
-
- /**
- * Stores the project object model and resolves and stores the model's dependencies.
- *
- * @param model the project object model
- * @param pomFileDirectory the directory containing the pom file
- * @param localArtifactRepository the local repository
- * @param artifactRepositories the remote artifact repositories used in resolving dependencies
- * @return a set of artifacts, including the model and its dependencies
- * @throws IOException if there was a problem in storing or resolving the artifacts
- */
- Set<Artifact> storeModelAndResolveDependencies( Model model, File pomFileDirectory, File localArtifactRepository,
- List<ArtifactRepository> artifactRepositories )
+ List<ArtifactRepository> artifactRepositories, File outputDir )
throws IOException, ProjectDaoException;
/**
@@ -117,15 +87,6 @@ public interface ProjectDao
*@param artifactResolver for snapshot artifact
*/
void init( ArtifactFactory artifactFactory, ArtifactResolver artifactResolver );
-
- /**
- * Returns all projects.
- *
- * @return all projects
- * @throws ProjectDaoException if there is a problem retrieving the projects
- */
- Set<Project> getAllProjects()
- throws ProjectDaoException;
/**
* Sets the repository for the data access object. This method overrides the data source object set in the
Modified: incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java (original)
+++ incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/ProjectFactory.java Tue Dec 6 03:24:44 2011
@@ -18,7 +18,6 @@
*/
package npanday.dao;
-import npanday.ArtifactType;
import npanday.ArtifactTypeHelper;
import npanday.PathUtil;
import org.apache.maven.artifact.Artifact;
@@ -197,30 +196,6 @@ public final class ProjectFactory
}
/**
- * Creates an artifact using information from the specified project.
- *
- * @param project a project to use as the source of the returned artifact
- * @param artifactFactory artifact factory used to create the artifact
- * @param localRepository the local repository
- * @return an artifact using information from the specified project
- */
- public static Artifact createArtifactFrom( Project project, ArtifactFactory artifactFactory, File localRepository )
- {
- logAndVerifyProjectParameters( project );
-
- Artifact assembly = artifactFactory.createArtifactWithClassifier( project.getGroupId(), project.getArtifactId(),
- project.getVersion(),
- project.getArtifactType(),
- project.getPublicKeyTokenId() );
-
-
- File artifactFile = ( ( ArtifactTypeHelper.isDotnetAnyGac( project.getArtifactType() ) ) ) ? PathUtil.getGlobalAssemblyCacheFileFor( assembly, localRepository) : PathUtil.getDotNetArtifact( assembly, localRepository ) ;
-
- assembly.setFile( artifactFile );
- return assembly;
- }
-
- /**
* Logs missing value if specified project in invalid and returns true if the specified project is valid, otherwise
* returns false.
*
Modified: incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java Tue Dec 6 03:24:44 2011
@@ -34,7 +34,6 @@ import org.apache.maven.artifact.resolve
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
-import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.cli.CommandLineException;
import org.codehaus.plexus.util.cli.CommandLineUtils;
@@ -136,67 +135,6 @@ public final class ProjectDaoImpl
projectQuery = "SELECT * FROM " + this.constructQueryFragmentFor( "{x}", projectUris );
}
- public Set<Project> getAllProjects()
- throws ProjectDaoException {
- Set<Project> projects = new HashSet<Project>();
- TupleQueryResult result = null;
- try
- {
- TupleQuery tupleQuery = repositoryConnection.prepareTupleQuery( QueryLanguage.SERQL, projectQuery );
- result = tupleQuery.evaluate();
- while ( result.hasNext() )
- {
- BindingSet set = result.next();
-
- String groupId = set.getBinding( ProjectUri.GROUP_ID.getObjectBinding() ).getValue().toString();
- String version = set.getBinding( ProjectUri.VERSION.getObjectBinding() ).getValue().toString();
- String artifactId = set.getBinding( ProjectUri.ARTIFACT_ID.getObjectBinding() ).getValue().toString();
- String artifactType =
- set.getBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding() ).getValue().toString();
- String classifier = null;
- if ( set.hasBinding( ProjectUri.CLASSIFIER.getObjectBinding() ) )
- {
- classifier = set.getBinding( ProjectUri.CLASSIFIER.getObjectBinding() ).getValue().toString();
- }
-
- // Project project = getProjectFor( groupId, artifactId, version, artifactType, null );
- /*
- * for ( Iterator<Binding> i = set.iterator(); i.hasNext(); ) { Binding b = i.next();
- * System.out.println( b.getName() + ":" + b.getValue() ); }
- */
- projects.add( getProjectFor( groupId, artifactId, version, artifactType, classifier ) );
- }
- }
- catch ( RepositoryException e )
- {
- throw new ProjectDaoException( "NPANDAY-180-000: Message = " + e.getMessage(), e );
- }
- catch ( MalformedQueryException e )
- {
- throw new ProjectDaoException( "NPANDAY-180-001: Message = " + e.getMessage(), e );
- }
- catch ( QueryEvaluationException e )
- {
- throw new ProjectDaoException( "NPANDAY-180-002: Message = " + e.getMessage(), e );
- }
- finally
- {
- if ( result != null )
- {
- try
- {
- result.close();
- }
- catch ( QueryEvaluationException e )
- {
-
- }
- }
- }
-
- return projects;
- }
-
public void setRdfRepository( Repository repository )
{
this.rdfRepository = repository;
@@ -252,7 +190,7 @@ public final class ProjectDaoImpl
}
public Project getProjectFor( String groupId, String artifactId, String version, String artifactType,
- String publicKeyTokenId )
+ String publicKeyTokenId, File localRepository, File outputDir )
throws ProjectDaoException {
long startTime = System.currentTimeMillis();
@@ -292,7 +230,7 @@ public final class ProjectDaoImpl
if ( artifactType != null )
{
- Artifact artifact = createArtifactFrom( project, artifactFactory );
+ Artifact artifact = createArtifactFrom( project, artifactFactory, localRepository, outputDir );
if ( !artifact.getFile().exists() )
{
@@ -375,19 +313,6 @@ public final class ProjectDaoImpl
return project;
}
- public Project getProjectFor( MavenProject mavenProject )
- throws ProjectDaoException
- {
- return getProjectFor( mavenProject.getGroupId(), mavenProject.getArtifactId(), mavenProject.getVersion(),
- mavenProject.getArtifact().getType(), mavenProject.getArtifact().getClassifier() );
- }
-
- public void storeProject( Project project, File localRepository, List<ArtifactRepository> artifactRepositories )
- throws ProjectDaoException
- {
-
- }
-
/**
* Generates the system path for gac dependencies.
*/
@@ -401,16 +326,17 @@ public final class ProjectDaoImpl
}
public Set<Artifact> storeProjectAndResolveDependencies( Project project, File localRepository,
- List<ArtifactRepository> artifactRepositories )
+ List<ArtifactRepository> artifactRepositories,
+ File outputDir )
throws IOException, IllegalArgumentException, ProjectDaoException
{
return storeProjectAndResolveDependencies( project, localRepository, artifactRepositories,
- new HashMap<String, Set<Artifact>>() );
+ new HashMap<String, Set<Artifact>>(), outputDir );
}
public Set<Artifact> storeProjectAndResolveDependencies( Project project, File localRepository,
List<ArtifactRepository> artifactRepositories,
- Map<String, Set<Artifact>> cache )
+ Map<String, Set<Artifact>> cache, File outputDir )
throws IOException, IllegalArgumentException, ProjectDaoException {
String key = getKey( project );
if ( cache.containsKey( key ) )
@@ -479,12 +405,12 @@ public final class ProjectDaoImpl
+ parentProject.getVersion() + ":" + project.getArtifactType() );
repositoryConnection.add( id, parent, pid );
artifactDependencies.addAll( storeProjectAndResolveDependencies( parentProject, null,
- artifactRepositories, cache ) );
+ artifactRepositories, cache, outputDir ) );
}
for ( ProjectDependency projectDependency : project.getProjectDependencies() )
{
- Artifact assembly = createArtifactFrom( projectDependency, artifactFactory );
+ Artifact assembly = createArtifactFrom( projectDependency, artifactFactory, localRepository, outputDir );
snapshotVersion = null;
@@ -525,7 +451,7 @@ public final class ProjectDaoImpl
projectDependency.setSystemPath( generateDependencySystemPath( projectDependency ) );
}
- File dependencyFile = PathUtil.getDotNetArtifact( assembly , localRepository );
+ File dependencyFile = PathUtil.getDotNetArtifact( assembly , localRepository, outputDir );
if ( !dependencyFile.exists() )
{
@@ -641,7 +567,7 @@ public final class ProjectDaoImpl
this.getProjectFor( projectDependency.getGroupId(), projectDependency.getArtifactId(),
projectDependency.getVersion(),
projectDependency.getArtifactType(),
- projectDependency.getPublicKeyTokenId() );
+ projectDependency.getPublicKeyTokenId(), localRepository, outputDir );
if ( dep.isResolved() )
{
projectDependency = (ProjectDependency) dep;
@@ -649,7 +575,7 @@ public final class ProjectDaoImpl
Set<Artifact> deps = this.storeProjectAndResolveDependencies( projectDependency,
localRepository,
artifactRepositories,
- cache );
+ cache, outputDir );
artifactDependencies.addAll( deps );
}
}
@@ -771,7 +697,7 @@ public final class ProjectDaoImpl
assembly.setVersion( snapshotVersion );
}
- File dotnetFile = PathUtil.getDotNetArtifact( assembly , localRepository );
+ File dotnetFile = PathUtil.getDotNetArtifact( assembly , localRepository, outputDir );
logger.warning( "NPANDAY-180-018: Not found in local repository, now retrieving artifact from wagon:"
+ assembly.getId()
@@ -858,7 +784,7 @@ public final class ProjectDaoImpl
// System.out.println( "Storing dependency: Artifact Id = " + model.getArtifactId() );
Project projectModel = ProjectFactory.createProjectFrom( model, null );
artifactDependencies.addAll( storeProjectAndResolveDependencies( projectModel, localRepository,
- artifactRepositories, cache ) );
+ artifactRepositories, cache, outputDir ) );
}
logger.finest( "NPANDAY-180-022: ProjectDao.storeProjectAndResolveDependencies - Artifact Id = "
+ project.getArtifactId() + ", Time = " + ( System.currentTimeMillis() - startTime ) + ", Count = "
@@ -874,14 +800,6 @@ public final class ProjectDaoImpl
return project.getGroupId() + ":" + project.getArtifactId() + ":" + project.getVersion();
}
- public Set<Artifact> storeModelAndResolveDependencies( Model model, File pomFileDirectory,
- File localArtifactRepository,
- List<ArtifactRepository> artifactRepositories )
- throws IOException, ProjectDaoException {
- return storeProjectAndResolveDependencies( ProjectFactory.createProjectFrom( model, pomFileDirectory ),
- localArtifactRepository, artifactRepositories );
- }
-
public String getClassName()
{
return className;
@@ -1279,11 +1197,16 @@ public final class ProjectDaoImpl
/**
* Creates an artifact using information from the specified project dependency.
*
+ *
+ *
* @param projectDependency a project dependency to use as the source of the returned artifact
* @param artifactFactory artifact factory used to create the artifact
+ * @param localRepository
+ * @param outputDir
* @return an artifact using information from the specified project dependency
*/
- private static Artifact createArtifactFrom( ProjectDependency projectDependency, ArtifactFactory artifactFactory )
+ private static Artifact createArtifactFrom( ProjectDependency projectDependency, ArtifactFactory artifactFactory,
+ File localRepository, File outputDir )
{
String groupId = projectDependency.getGroupId();
String artifactId = projectDependency.getArtifactId();
@@ -1331,8 +1254,8 @@ public final class ProjectDaoImpl
}
else
{
- artifactFile = PathUtil.getUserAssemblyCacheFileFor( assembly, new File( System.getProperty( "user.home" ),
- File.separator + ".m2" + File.separator + "repository") );
+ // looks in the local repository, and copies to the target directory
+ artifactFile = PathUtil.getPrivateApplicationBaseFileFor( assembly, localRepository, outputDir );
}
assembly.setFile( artifactFile );
Modified: incubator/npanday/trunk/components/dotnet-dao-project/src/test/java/npanday/dao/impl/ProjectDaoImplTest.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/test/java/npanday/dao/impl/ProjectDaoImplTest.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-dao-project/src/test/java/npanday/dao/impl/ProjectDaoImplTest.java (original)
+++ incubator/npanday/trunk/components/dotnet-dao-project/src/test/java/npanday/dao/impl/ProjectDaoImplTest.java Tue Dec 6 03:24:44 2011
@@ -19,7 +19,12 @@
package npanday.dao.impl;
import junit.framework.TestCase;
-import npanday.dao.*;
+import npanday.dao.Project;
+import npanday.dao.ProjectDao;
+import npanday.dao.ProjectDaoException;
+import npanday.dao.ProjectDependency;
+import npanday.dao.ProjectUri;
+import npanday.dao.Requirement;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolver;
@@ -54,6 +59,8 @@ public class ProjectDaoImplTest
private File dataDir;
+ private File outputDir;
+
public void testBogus()
{
@@ -61,6 +68,7 @@ public class ProjectDaoImplTest
private ProjectDao createProjectDao()
{
+ outputDir = new File( basedir, "target/pab" );
dataDir = new File( basedir, ( "/target/rdf-repos/rdf-repo-" + System.currentTimeMillis() ) );
rdfRepository = new SailRepository( new MemoryStoreRDFSInferencer( new MemoryStore( dataDir ) ) );
try
@@ -72,13 +80,14 @@ public class ProjectDaoImplTest
return null;
}
ProjectDaoImpl dao = new ProjectDaoImpl();
- ArtifactResolver stub = mock(ArtifactResolver.class);
+ ArtifactResolver stub = mock( ArtifactResolver.class );
dao.initForUnitTest( rdfRepository, "", "", stub, new ArtifactFactoryTestStub() );
dao.openConnection();
return dao;
}
public void testStore_WithGacDependencies()
+ throws ProjectDaoException, IOException
{
ProjectDao dao = this.createProjectDao();
@@ -87,74 +96,16 @@ public class ProjectDaoImplTest
project.setArtifactId( "NPanday.Test5" );
project.setVersion( "1.0.0" );
project.setArtifactType( "library" );
- ProjectDependency test2 =
- createProjectDependency( "Microsoft.Build.Conversion", "Microsoft.Build.Conversion", "2.0.0.0", "gac_msil",
- "31bf3856ad364e35" );
+ ProjectDependency test2 = createProjectDependency( "Microsoft.Build.Conversion", "Microsoft.Build.Conversion",
+ "2.0.0.0", "gac_msil", "31bf3856ad364e35" );
project.addProjectDependency( test2 );
- try
- {
- dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>() );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "Could not store the project: " + e.getMessage() );
- }
-
- Set<Project> projects = null;
- try
- {
- projects = dao.getAllProjects();
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "Could not retrieve the project: " + e.getMessage() );
- }
-
- dao.closeConnection();
- }
-
- public void testGetAllProjects()
- {
- ProjectDao dao = this.createProjectDao();
-
- Project project = new Project();
- project.setGroupId( "NPanday" );
- project.setArtifactId( "NPanday.Test5" );
- project.setVersion( "1.0.0" );
- project.setArtifactType( "library" );
- ProjectDependency test2 =
- createProjectDependency( "Microsoft.VisualBasic", "Microsoft.VisualBasic", "8.0.0.0", "gac_msil",
- "31bf3856ad364e35" );
- project.addProjectDependency( test2 );
-
- try
- {
- dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>() );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "Could not store the project: " + e.getMessage() );
- }
-
- Set<Project> projects = null;
- try
- {
- projects = dao.getAllProjects();
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "Could not retrieve the project: " + e.getMessage() );
- }
-
- dao.closeConnection();
+ dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>(),
+ outputDir );
}
public void testStore_WithRequirements()
+ throws ProjectDaoException, IOException
{
ProjectDao dao = this.createProjectDao();
@@ -167,13 +118,10 @@ public class ProjectDaoImplTest
Set<Requirement> requirements = new HashSet<Requirement>();
try
{
- requirements.add( Requirement.Factory.createDefaultRequirement(
- new URI( ProjectUri.VENDOR.getPredicate() ),
+ requirements.add( Requirement.Factory.createDefaultRequirement( new URI( ProjectUri.VENDOR.getPredicate() ),
"MICROSOFT" ) );
- requirements.add( Requirement.Factory.createDefaultRequirement(
- new URI(
- ProjectUri.FRAMEWORK_VERSION.getPredicate() ),
- "2.0" ) );
+ requirements.add( Requirement.Factory.createDefaultRequirement( new URI(
+ ProjectUri.FRAMEWORK_VERSION.getPredicate() ), "2.0" ) );
}
catch ( Exception e )
{
@@ -181,22 +129,14 @@ public class ProjectDaoImplTest
}
project.setRequirements( requirements );
- Set<Artifact> artifacts = null;
- try
- {
- artifacts =
- dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>() );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "Could not store the project: " + e.getMessage() );
- }
+ dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>(),
+ outputDir );
Project proj = null;
try
{
- proj = dao.getProjectFor( "NPanday.Model", "NPanday.Model.Pom", "0.14.0.0", "library", null );
+ proj = dao.getProjectFor( "NPanday.Model", "NPanday.Model.Pom", "0.14.0.0", "library", null,
+ localRepository, outputDir );
}
catch ( Exception e )
{
@@ -207,8 +147,8 @@ public class ProjectDaoImplTest
requirements = proj.getRequirements();
assertEquals( "Incorrect number of requirements.", 2, requirements.size() );
- assertTrue( "Could not find framework requirement",
- hasRequirement( ProjectUri.FRAMEWORK_VERSION.getPredicate(), "2.0", requirements ) );
+ assertTrue( "Could not find framework requirement", hasRequirement( ProjectUri.FRAMEWORK_VERSION.getPredicate(),
+ "2.0", requirements ) );
assertTrue( "Could not find vendor requirement", hasRequirement( ProjectUri.VENDOR.getPredicate(), "MICROSOFT",
requirements ) );
dao.closeConnection();
@@ -231,9 +171,8 @@ public class ProjectDaoImplTest
{
for ( ProjectDependency projectDependency : projectDependencies )
{
- if ( projectDependency.getGroupId().equals( groupId )
- && projectDependency.getArtifactId().equals( artifactId )
- && projectDependency.getVersion().equals( version ) )
+ if ( projectDependency.getGroupId().equals( groupId ) && projectDependency.getArtifactId().equals(
+ artifactId ) && projectDependency.getVersion().equals( version ) )
{
return true;
}
@@ -255,8 +194,8 @@ public class ProjectDaoImplTest
Set<Artifact> artifacts = null;
try
{
- artifacts =
- dao.storeProjectAndResolveDependencies( project1, localRepository, new ArrayList<ArtifactRepository>() );
+ artifacts = dao.storeProjectAndResolveDependencies( project1, localRepository,
+ new ArrayList<ArtifactRepository>(), outputDir );
}
catch ( Exception e )
{
@@ -274,7 +213,8 @@ public class ProjectDaoImplTest
Project testProject = null;
try
{
- testProject = dao.getProjectFor( "NPanday", "NPanday.Plugin", "0.14.0.0", "library", null );
+ testProject = dao.getProjectFor( "NPanday", "NPanday.Plugin", "0.14.0.0", "library", null, localRepository,
+ outputDir );
}
catch ( Exception e )
{
@@ -287,9 +227,11 @@ public class ProjectDaoImplTest
Set<ProjectDependency> projectDependencies = testProject.getProjectDependencies();
assertEquals( "Incorrect number of dependencies", 1, projectDependencies.size() );
ProjectDependency projectDependency = (ProjectDependency) projectDependencies.toArray()[0];
- assertTrue( "Could not find required dependency. Found Dependency: GroupId = " + projectDependency.getGroupId()
- + ", Artifact Id = " + projectDependency.getArtifactId(), this.hasDependency( "NPanday", "NPanday.Test4",
- "1.0.0", projectDependencies ) );
+ assertTrue(
+ "Could not find required dependency. Found Dependency: GroupId = " + projectDependency.getGroupId() +
+ ", Artifact Id = " + projectDependency.getArtifactId(), this.hasDependency( "NPanday", "NPanday.Test4",
+ "1.0.0",
+ projectDependencies ) );
dao.closeConnection();
}
@@ -305,8 +247,8 @@ public class ProjectDaoImplTest
Set<Artifact> artifacts = null;
try
{
- artifacts =
- dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>() );
+ artifacts = dao.storeProjectAndResolveDependencies( project, localRepository,
+ new ArrayList<ArtifactRepository>(), outputDir );
}
catch ( Exception e )
{
@@ -317,7 +259,8 @@ public class ProjectDaoImplTest
Project proj = null;
try
{
- proj = dao.getProjectFor( "NPanday.Model", "NPanday.Model.Pom", "0.14.0.0", "library", null );
+ proj = dao.getProjectFor( "NPanday.Model", "NPanday.Model.Pom", "0.14.0.0", "library", null,
+ localRepository, outputDir );
}
catch ( Exception e )
{
@@ -345,8 +288,8 @@ public class ProjectDaoImplTest
try
{
- dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>() );
-
+ dao.storeProjectAndResolveDependencies( project, localRepository, new ArrayList<ArtifactRepository>(),
+ outputDir );
}
catch ( Exception e )
{
@@ -356,7 +299,8 @@ public class ProjectDaoImplTest
try
{
- dao.getProjectFor( "NPanday.Model", "NPanday.Model.Pom", "0.15.0.0", "library", null );
+ dao.getProjectFor( "NPanday.Model", "NPanday.Model.Pom", "0.15.0.0", "library", null, localRepository,
+ outputDir );
}
catch ( Exception e )
{
Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/NetExecutableFactory.java Tue Dec 6 03:24:44 2011
@@ -65,6 +65,7 @@ public interface NetExecutableFactory
/**
* Returns an executable that resides within a maven repository. These are typically user-implemented executables.
*
+ *
* @param groupId the group ID of the executable artifact (as specified within the maven repo)
* @param artifactId the artifact ID of the executable artifact (as specified within the maven repo)
* @param vendorInfo the additional vendor information used to decide how to execute the net executable
@@ -73,12 +74,13 @@ public interface NetExecutableFactory
* be set to true if the application needs to load up assemblies into another app domain
* and to remotly invoke methods on classes in the other app domain, otherwise it should be
* set to false.
+ * @param targetDir
* @return the executable that resides within a maven repository.
* @throws PlatformUnsupportedException if no executable is found
*/
NetExecutable getNetExecutableFromRepository( String groupId, String artifactId, VendorInfo vendorInfo,
File localRepository, List<String> commands,
- boolean isIsolatedAppDomain )
+ boolean isIsolatedAppDomain, File targetDir )
throws PlatformUnsupportedException;
/**
@@ -110,20 +112,23 @@ public interface NetExecutableFactory
/**
* Returns a plugin loader for loading and executing a .NET plugin.
*
+ *
* @param groupId the group ID of the executable artifact (as specified within the maven repo)
* @param artifactId the artifact ID of the executable artifact (as specified within the maven repo)
* @param vendorInfo the additional vendor information used to decide how to execute the net executable
* @param localRepository the local maven repository where the executable resides.
* @param parameterFile the file containing parameter information to inject into the .NET plugin
* @param mojoName the name of the .NET Mojo implementation
+ * @param targetDir
* @return the plugin loader for executing a .NET plugin
* @throws PlatformUnsupportedException if no executable is found
*/
NetExecutable getPluginLoaderFor( String groupId, String artifactId, VendorInfo vendorInfo, String localRepository,
- File parameterFile, String mojoName )
+ File parameterFile, String mojoName, File targetDir )
throws PlatformUnsupportedException;
- NetExecutable getPluginLoaderFor(Artifact artifact, VendorInfo vendorInfo, String localRepository, File parameterFile, String mojoName) throws PlatformUnsupportedException;
+ NetExecutable getPluginLoaderFor( Artifact artifact, VendorInfo vendorInfo, String localRepository, File parameterFile, String mojoName,
+ File targetDir ) throws PlatformUnsupportedException;
Artifact getArtifactFor(String groupId, String artifactId) throws PlatformUnsupportedException;
}
Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java Tue Dec 6 03:24:44 2011
@@ -90,6 +90,7 @@ public class NetExecutableFactoryImpl
File assemblyPath )
throws PlatformUnsupportedException
{
+ File targetDir = PathUtil.getPrivateApplicationBaseDirectory( project );
VendorInfo vendorInfo = VendorInfo.Factory.createDefaultVendorInfo();
vendorInfo.setVendorVersion( compilerRequirement.getVendorVersion() );
@@ -141,8 +142,9 @@ public class NetExecutableFactoryImpl
Artifact artifact = artifactContext.getArtifactByID( netDependencyId );
if ( artifact != null )
{
- File artifactPath =
- PathUtil.getPrivateApplicationBaseFileFor( artifact, compilerConfig.getLocalRepository() );
+ File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact,
+ compilerConfig.getLocalRepository(),
+ targetDir );
executionPaths.add( artifactPath.getParentFile().getAbsolutePath() );
}
}
@@ -161,32 +163,43 @@ public class NetExecutableFactoryImpl
}
/**
- * @see NetExecutableFactory#getPluginLoaderFor(String,String,npanday.vendor.VendorInfo,String,java.io.File,String)
+ * @see NetExecutableFactory#getPluginLoaderFor(String, String, npanday.vendor.VendorInfo, String, java.io.File, String, java.io.File)
*/
public NetExecutable getPluginLoaderFor( String groupId, String artifactId, VendorInfo vendorInfo,
- String localRepository, File parameterFile, String mojoName )
+ String localRepository, File parameterFile, String mojoName,
+ File targetDir )
throws PlatformUnsupportedException
{
Artifact artifact = getArtifactFor(groupId, artifactId);
- return getPluginLoaderFor(artifact, vendorInfo, localRepository, parameterFile, mojoName);
+ return getPluginLoaderFor(artifact, vendorInfo, localRepository, parameterFile, mojoName, targetDir );
}
- public NetExecutable getPluginLoaderFor(Artifact artifact, VendorInfo vendorInfo, String localRepository, File parameterFile, String mojoName) throws PlatformUnsupportedException {
+ public NetExecutable getPluginLoaderFor( Artifact artifact, VendorInfo vendorInfo, String localRepository, File parameterFile, String mojoName,
+ File targetDir ) throws PlatformUnsupportedException {
//AssemblyRepositoryLayout layout = new AssemblyRepositoryLayout();
- File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, new File( localRepository ) );
+ File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, new File( localRepository ), targetDir );
List<String> commands = new ArrayList<String>();
commands.add( "parameterFile=" + parameterFile.getAbsolutePath() );
commands.add( "assemblyFile=" + artifactPath.getAbsolutePath() );
commands.add( "mojoName=" + mojoName );//ArtifactId = namespace
+ // make sure plugin artifact is present to run with in the application base
+ // TODO: can we do this transitively from the loader or the plugin artifact? Hardcoding the transitive deps here
+ Artifact modelArtifact = artifactContext.getArtifactsFor( "org.apache.npanday", "NPanday.Model.Pom", null,
+ null ).get( 0 );
+ PathUtil.getPrivateApplicationBaseFileFor( modelArtifact, new File( localRepository ), targetDir );
+ Artifact pluginArtifact = artifactContext.getArtifactsFor( "org.apache.npanday.plugins", "NPanday.Plugin", null,
+ null ).get( 0 );
+ PathUtil.getPrivateApplicationBaseFileFor( pluginArtifact, new File( localRepository ), targetDir );
+
Artifact pluginLoaderArtifact =
artifactContext.getArtifactsFor( "org.apache.npanday.plugins", "NPanday.Plugin.Loader", null, null ).get( 0 );
- artifactPath = PathUtil.getPrivateApplicationBaseFileFor( pluginLoaderArtifact, new File( localRepository ) );
+ artifactPath = PathUtil.getPrivateApplicationBaseFileFor( pluginLoaderArtifact, new File( localRepository ), targetDir );
commands.add( "startProcessAssembly=" + artifactPath.getAbsolutePath() );
return getNetExecutableFromRepository( "org.apache.npanday.plugins", "NPanday.Plugin.Runner", vendorInfo,
- new File( localRepository ), commands, false );
+ new File( localRepository ), commands, false, targetDir );
}
public Artifact getArtifactFor(String groupId, String artifactId) throws PlatformUnsupportedException {
@@ -209,7 +222,7 @@ public class NetExecutableFactoryImpl
public NetExecutable getNetExecutableFromRepository( String groupId, String artifactId, VendorInfo vendorInfo,
File localRepository, List<String> commands,
- boolean isIsolatedAppDomain )
+ boolean isIsolatedAppDomain, File targetDir )
throws PlatformUnsupportedException
{
if ( isIsolatedAppDomain )
@@ -229,16 +242,16 @@ public class NetExecutableFactoryImpl
groupId + ", ArtifactId = " + artifactId );
}
- File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, localRepository );
+ File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, localRepository, targetDir );
commands.add( "startProcessAssembly=" + artifactPath.getAbsolutePath() );
//TODO: Replace
String pluginArtifactPath = PathUtil.getPrivateApplicationBaseFileFor(
artifactContext.getArtifactsFor( "org.apache.npanday.plugins", "NPanday.Plugin", null, null ).get( 0 ),
- localRepository ).getAbsolutePath();
+ localRepository, targetDir ).getAbsolutePath();
commands.add( "pluginArtifactPath=" + pluginArtifactPath );
- return getNetExecutableFromRepository( "org.apache.npanday.plugins", "NPanday.Plugin.Runner", vendorInfo, localRepository,
- commands, false );
+ return getNetExecutableFromRepository( "org.apache.npanday.plugins", "NPanday.Plugin.Runner", vendorInfo,
+ localRepository, commands, false, targetDir );
}
if ( commands == null )
@@ -270,7 +283,7 @@ public class NetExecutableFactoryImpl
logger.debug( "NPANDAY-066-003: Found Vendor: " + vendorInfo );
- File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, localRepository );
+ File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, localRepository, targetDir );
List<String> modifiedCommands = new ArrayList<String>();
String exe = null;
if ( vendorInfo.getVendor().equals( Vendor.MONO ) )
Modified: incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java (original)
+++ incubator/npanday/trunk/components/dotnet-plugin/src/main/java/npanday/plugin/AbstractMojo.java Tue Dec 6 03:24:44 2011
@@ -19,11 +19,6 @@
package npanday.plugin;
import npanday.artifact.NPandayArtifactResolutionException;
-import npanday.dao.ProjectDao;
-import npanday.dao.Project;
-import npanday.dao.ProjectDaoException;
-import npanday.dao.ProjectFactory;
-import npanday.dao.ProjectDependency;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;
import npanday.PlatformUnsupportedException;
@@ -154,6 +149,9 @@ public abstract class AbstractMojo
}
}
+ // TODO: should be configurable, but relies on it being passed into everywhere
+ File targetDir = PathUtil.getPrivateApplicationBaseDirectory( getMavenProject() );
+
try
{
VendorInfo vendorInfo = VendorInfo.Factory.createDefaultVendorInfo();
@@ -165,10 +163,10 @@ public abstract class AbstractMojo
vendorInfo.setVendorVersion( getVendorVersion() );
Artifact artifact = getNetExecutableFactory().getArtifactFor(getMojoGroupId(), getMojoArtifactId());
- resolveArtifact(artifact);
+ resolveArtifact(artifact, targetDir );
getNetExecutableFactory().getPluginLoaderFor( artifact, vendorInfo,
getLocalRepository(), paramFile,
- getClassName() ).execute();
+ getClassName(), targetDir ).execute();
}
catch ( PlatformUnsupportedException e )
{
@@ -184,10 +182,10 @@ public abstract class AbstractMojo
postExecute();
}
- private void resolveArtifact(Artifact artifact) throws ComponentLookupException, MojoExecutionException {
+ private void resolveArtifact( Artifact artifact, File targetDir ) throws ComponentLookupException, MojoExecutionException {
File localRepository = new File(getLocalRepository());
- if (PathUtil.getPrivateApplicationBaseFileFor(artifact, localRepository).exists())
+ if (PathUtil.getPrivateApplicationBaseFileFor(artifact, localRepository, targetDir ).exists())
{
return;
}
@@ -219,28 +217,28 @@ public abstract class AbstractMojo
throw new MojoExecutionException( e.getMessage(), e );
}
- ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" );
- dao.openConnection();
- Project project;
-
- try
- {
- project = dao.getProjectFor(dependency.getGroupId(), dependency.getArtifactId(),
- dependency.getVersion(), dependency.getType(),
- dependency.getClassifier());
- }
- catch( ProjectDaoException e )
- {
- throw new MojoExecutionException( e.getMessage(), e );
- }
-
- List<Dependency> sourceArtifactDependencies = new ArrayList<Dependency>();
- for (ProjectDependency projectDependency : project.getProjectDependencies()) {
- sourceArtifactDependencies.add(ProjectFactory.createDependencyFrom(projectDependency));
- }
- artifactContext.getArtifactInstaller().installArtifactAndDependenciesIntoPrivateApplicationBase(localRepository, artifact,
- sourceArtifactDependencies);
- dao.closeConnection();
+// ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" );
+// dao.openConnection();
+// Project project;
+//
+// try
+// {
+// project = dao.getProjectFor(dependency.getGroupId(), dependency.getArtifactId(),
+// dependency.getVersion(), dependency.getType(),
+// dependency.getClassifier());
+// }
+// catch( ProjectDaoException e )
+// {
+// throw new MojoExecutionException( e.getMessage(), e );
+// }
+//
+// List<Dependency> sourceArtifactDependencies = new ArrayList<Dependency>();
+// for (ProjectDependency projectDependency : project.getProjectDependencies()) {
+// sourceArtifactDependencies.add(ProjectFactory.createDependencyFrom(projectDependency));
+// }
+// artifactContext.getArtifactInstaller().installArtifactAndDependenciesIntoPrivateApplicationBase(localRepository, artifact,
+// sourceArtifactDependencies);
+// dao.closeConnection();
}
catch (IOException e) {
throw new MojoExecutionException(e.getMessage(), e);
Modified: incubator/npanday/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/pom.xml?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/components/pom.xml (original)
+++ incubator/npanday/trunk/components/pom.xml Tue Dec 6 03:24:44 2011
@@ -37,7 +37,6 @@ under the License.
<module>dotnet-model</module>
<module>dotnet-plugin</module>
<module>dotnet-registry</module>
- <module>dotnet-repository</module>
<module>dotnet-vendor</module>
</modules>
<reporting>
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Model.Pom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Model.Pom/pom.xml?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Model.Pom/pom.xml (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Model.Pom/pom.xml Tue Dec 6 03:24:44 2011
@@ -69,7 +69,6 @@ under the License.
</executions>
</plugin>
</plugins>
- <!-- TODO: ideally, avoid GAC installation of this artifact -->
<pluginManagement>
<plugins>
<plugin>
@@ -84,9 +83,6 @@ under the License.
<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${bootstrap.npanday.version}</version>
- <configuration>
- <isGacInstall>true</isGacInstall>
- </configuration>
</plugin>
</plugins>
</pluginManagement>
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Loader/src/main/csharp/PluginLoader.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Loader/src/main/csharp/PluginLoader.cs?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Loader/src/main/csharp/PluginLoader.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Loader/src/main/csharp/PluginLoader.cs Tue Dec 6 03:24:44 2011
@@ -48,8 +48,8 @@ namespace NPanday.Plugin.Loader
setup.ApplicationBase = pluginAssemblyFile.DirectoryName;
AppDomain applicationDomain = AppDomain.CreateDomain("Loader", null, setup);
- PluginDomainManager pluginDomainManager = (PluginDomainManager) applicationDomain.DomainManager;
- pluginDomainManager.LoadPlugin(pluginAssemblyFile);
+ string assemblyName = pluginAssemblyFile.Name.Replace(pluginAssemblyFile.Extension,"");
+ applicationDomain.Load(assemblyName);
return applicationDomain;
}
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.MojoGenerator/src/main/csharp/Generator.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.MojoGenerator/src/main/csharp/Generator.cs?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.MojoGenerator/src/main/csharp/Generator.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.MojoGenerator/src/main/csharp/Generator.cs Tue Dec 6 03:24:44 2011
@@ -71,8 +71,8 @@ namespace NPanday.Plugin.MojoGenerator
AppDomain applicationDomain = AppDomain.CreateDomain("Loader", null, setup);
- PluginDomainManager pluginDomainManager = (PluginDomainManager)applicationDomain.DomainManager;
- pluginDomainManager.LoadPlugin(pluginAssemblyFile);
+ string assemblyName = pluginAssemblyFile.Name.Replace(pluginAssemblyFile.Extension,"");
+ applicationDomain.Load(assemblyName);
return applicationDomain;
}
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Runner/src/main/csharp/PluginLauncher.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Runner/src/main/csharp/PluginLauncher.cs?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Runner/src/main/csharp/PluginLauncher.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin.Runner/src/main/csharp/PluginLauncher.cs Tue Dec 6 03:24:44 2011
@@ -54,13 +54,6 @@ namespace NPanday.Plugin.Launcher
new ProcessStartInfo(startProcessAssembly, @flattenArgs(args));
}
- String version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
-
- processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_ASM"]
- = "NPanday.Plugin, Version=" + version + ", PublicKeyToken=4b435f4d76e2f0e6, culture=neutral";
- processStartInfo.EnvironmentVariables["APPDOMAIN_MANAGER_TYPE"]
- = "NPanday.Plugin.PluginDomainManager";
-
processStartInfo.UseShellExecute = false;
Process p = Process.Start(processStartInfo);
p.WaitForExit();
Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin/pom.xml?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin/pom.xml (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.Plugin/pom.xml Tue Dec 6 03:24:44 2011
@@ -78,9 +78,6 @@ under the License.
<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${bootstrap.npanday.version}</version>
- <configuration>
- <isGacInstall>true</isGacInstall>
- </configuration>
</plugin>
</plugins>
</pluginManagement>
Modified: incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/groovy/npanday/plugin/compile/CompileLifecycleMap.groovy
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/groovy/npanday/plugin/compile/CompileLifecycleMap.groovy?rev=1210767&r1=1210766&r2=1210767&view=diff
==============================================================================
--- incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/groovy/npanday/plugin/compile/CompileLifecycleMap.groovy (original)
+++ incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/groovy/npanday/plugin/compile/CompileLifecycleMap.groovy Tue Dec 6 03:24:44 2011
@@ -52,13 +52,12 @@ class CompileLifecycleMap extends Lifecy
def np_compile = "org.apache.npanday.plugins:maven-compile-plugin:$npandayVersion:compile"
def np_test_compile = "org.apache.npanday.plugins:maven-compile-plugin:$npandayVersion:testCompile"
def np_test = "org.apache.npanday.plugins:maven-test-plugin:$npandayVersion:test"
- def np_convert = "org.apache.npanday.plugins:maven-repository-plugin:$npandayVersion:convert-artifact"
def default_validate = [np_compile_init, np_resolve, np_generate_settings]
def default_generate_sources = [np_generate_assemblyinfo]
def default_process_resources = [np_resgen_copy, np_resgen_generate, np_resgen_resx]
def default_process_sources = [np_compile_process_sources, np_compile_process_test_sources]
- def default_install = [np_convert, "org.apache.npanday.plugins:maven-install-plugin:$npandayVersion:install", mv_install]
+ def default_install = ["org.apache.npanday.plugins:maven-install-plugin:$npandayVersion:install", mv_install]
forTypes( [ArtifactType.DOTNET_LIBRARY, ArtifactType.LIBRARY] ) {
LifecycleMappingBuilder b->