public NetExecutable getPluginLoaderFor(Artifact artifact, VendorInfo vendorInfo, String localRepository, File parameterFile, String mojoName) throws PlatformUnsupportedException { //AssemblyRepositoryLayout layout = new AssemblyRepositoryLayout(); File artifactPath = PathUtil.getPrivateApplicationBaseFileFor( artifact, new File( localRepository ) ); List<String> commands = new ArrayList<String>(); commands.add( "parameterFile=" + parameterFile.getAbsolutePath() ); commands.add( "assemblyFile=" + artifactPath.getAbsolutePath() ); commands.add( "mojoName=" + mojoName );//ArtifactId = namespace Artifact pluginLoaderArtifact = artifactContext.getArtifactsFor( "org.apache.npanday.plugins", "NPanday.Plugin.Loader", null, null ).get( 0 ); artifactPath = PathUtil.getPrivateApplicationBaseFileFor( pluginLoaderArtifact, new File( localRepository ) ); commands.add( "startProcessAssembly=" + artifactPath.getAbsolutePath() ); return getNetExecutableFromRepository( "org.apache.npanday.plugins", "NPanday.Plugin.Runner", vendorInfo, new File( localRepository ), commands, false ); }
public List<Artifact> getDirectModuleDependencies() { List<Artifact> artifacts; try { artifacts = artifactContext.getNetModulesFor( project.getArtifact() ); } catch ( ArtifactException e ) { logger.error( "NPANDAY-061-000: Improper Initialization of the Net Modules", e ); return new ArrayList<Artifact>(); //TODO: How to handle this: usually implies improper init of ArtifactContext } if ( config.isTestCompile() && ArtifactTypeHelper.isDotnetModule( config.getArtifactType() ) ) { artifacts.add( project.getArtifact() ); } if ( config.isTestCompile() && ArtifactTypeHelper.isDotnetModule( project.getArtifact().getType() ) && project.getArtifact().getFile() != null && project.getArtifact().getFile().exists() ) { artifacts.add( project.getArtifact() ); } return artifacts; }
"net-dependencies" ); artifactContext.init( null, mavenProject.getRemoteArtifactRepositories(), new File( localRepository ) ); Map<String, ArtifactHandler> map = new HashMap<String, ArtifactHandler>(); artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( "VisualStudio2005", null, null ); for ( Dependency dependency : gacInstallDependencies ) List<Artifact> artifacts = artifactContext.getArtifactsFor( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), dependency.getType() );
public void execute() throws MojoExecutionException, MojoFailureException { if ( localRepository == null ) { localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" ); } org.openrdf.repository.Repository rdfRepository = new SailRepository( new MemoryStore( localRepository ) ); try { rdfRepository.initialize(); } catch ( RepositoryException e ) { throw new MojoExecutionException( "NPANDAY-1700-007: Message = " + e.getMessage() ); } artifactContext.init( project, project.getRemoteArtifactRepositories(), localRepository ); List<Dependency> netDependencies = new ArrayList<Dependency>(); for ( Dependency dependency : (List<Dependency>) project.getDependencies() ) { netDependencies.add( dependency ); } assemblyRepository( netDependencies, new DefaultRepositoryLayout() ); }
sourceArtifactDependencies.add(ProjectFactory.createDependencyFrom(projectDependency)); artifactContext.getArtifactInstaller().installArtifactAndDependenciesIntoPrivateApplicationBase(localRepository, artifact, sourceArtifactDependencies); dao.closeConnection();
ApplicationConfig applicationConfig = artifactContext.getApplicationConfigFor( artifact );
Artifact artifact = artifactContext.getArtifactByID( netDependencyId ); if ( artifact != null )
artifactContext.init( project, project.getRemoteArtifactRepositories(), localRepository ); if ( !new File( localRepository, "npanday.artifacts.resolved" ).exists() ) //performance optimization artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( profile, dependencies, null ); for ( Dependency dependency : gacInstallDependencies ) List<Artifact> artifacts = artifactContext.getArtifactsFor( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(),
directLibraries = new ArrayList<Artifact>(); modules = new ArrayList<Artifact>(); artifactContext.init( project, project.getRemoteArtifactRepositories(), config.getLocalRepository() );
public Artifact getArtifactFor(String groupId, String artifactId) throws PlatformUnsupportedException { List<Artifact> artifacts = artifactContext.getArtifactsFor( groupId, artifactId, null, null ); if ( artifacts.size() == 0 ) { throw new PlatformUnsupportedException( "NPANDAY-066-023: Could not locate the plugin - missing entry in the net-dependencies.xml file: GroupId = " + groupId + ", ArtifactId = " + artifactId ); } Artifact artifact = artifacts.get( 0 ); if ( artifact == null ) { throw new PlatformUnsupportedException( "NPANDAY-066-021: Could not locate the plugin: GroupId = " + groupId + ", ArtifactId = " + artifactId ); } return artifact; }
List<Artifact> artifacts = artifactContext.getArtifactsFor( groupId, artifactId, null, null ); if ( artifacts.size() == 0 ) artifactContext.getArtifactsFor( "org.apache.npanday.plugins", "NPanday.Plugin", null, null ).get( 0 ), localRepository ).getAbsolutePath(); List<Artifact> artifacts = artifactContext.getArtifactsFor( groupId, artifactId, null, null ); if ( artifacts.size() == 0 )