/** * @see npanday.vendor.VendorInfoRepository#exists() */ public boolean exists() { return ( repositoryRegistry.find( "npanday-settings" ) != null ); }
public Repository find( String repositoryName ) throws RepositoryNotFoundException { Repository repository = repositoryRegistry.find( repositoryName ); if ( repository == null ) { throw new RepositoryNotFoundException( "NPANDAY-064-000: Could not find repository: Name = " + repositoryName ); } return repository; }
public Repository find( String repositoryName ) throws RepositoryNotFoundException { Repository repository = repositoryRegistry.find( repositoryName ); if ( repository == null ) { throw new RepositoryNotFoundException( "NPANDAY-064-000: Could not find repository: Name = " + repositoryName ); } return repository; }
public Repository find( String repositoryName ) throws RepositoryNotFoundException { Repository repository = repositoryRegistry.find( repositoryName ); if ( repository == null ) { throw new RepositoryNotFoundException( "NPANDAY-061-002: Could not find repository: Name = " + repositoryName ); } return repository; }
/** * @see AssemblerContext#init(org.apache.maven.project.MavenProject) */ public void init( MavenProject mavenProject ) throws InitializationException { this.mavenProject = mavenProject; repository = (AssemblyPluginsRepository) repositoryRegistry.find( "assembly-plugins" ); if ( repository == null ) { throw new InitializationException( "NPANDAY-020-005: Unable to find the assembly-plugins.xml file" ); } } }
/** * Return the registered settings, or creates them from the given path or file. * @param repositoryRegistry The registry. * @param settingsPathOrFile If a path, 'npanday-settings.xml' is added. * @return The current, or just created SettingsRepository * @throws SettingsException If anything goes wrong reading or registering the settings */ public static SettingsRepository getOrPopulateSettingsRepository( RepositoryRegistry repositoryRegistry, String settingsPathOrFile ) throws SettingsException { SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); if (settingsRepository == null){ return populateSettingsRepository( repositoryRegistry, settingsPathOrFile); } return settingsRepository; }
/** * @see ArtifactContext#getArtifactByID(String) */ public Artifact getArtifactByID( String id ) { NetDependenciesRepositoryImpl repository = (NetDependenciesRepositoryImpl) repositoryRegistry.find( "net-dependencies" ); repository.init( artifactFactory ); return repository.getArtifactByID( id ); }
/** * Returns all platform capabilities (as defined in the compiler-plugins.xml file). This is more than the platform * capabilities for the invoking platform. * * @return all platform capabilities (as defined in the compiler-plugins.xml file). */ private List<ExecutableCapability> getExecutableCapabilities() throws PlatformUnsupportedException { ExecutablePluginsRepository pluginsRepository = (ExecutablePluginsRepository) repositoryRegistry.find( "executable-plugins" ); ExecutablePluginsRepository pluginsRepositoryExt = (ExecutablePluginsRepository) repositoryRegistry.find( "executable-plugins-ext" ); List<ExecutableCapability> primary = new ArrayList<ExecutableCapability>(); if ( pluginsRepository != null ) { primary = pluginsRepository.getCapabilities(); } if ( pluginsRepositoryExt != null ) { primary.addAll( pluginsRepositoryExt.getCapabilities() ); } if ( primary.isEmpty() ) { throw new PlatformUnsupportedException( "NPANDAY-065-004: No executable capabilities configured" ); } return primary; }
/** * Returns all platform capabilities (as defined in the compiler-plugins.xml file). This is more than the platform * capabilities for the invoking platform. * * @return all platform capabilities (as defined in the compiler-plugins.xml file). */ private List<ExecutableCapability> getCompilerCapabilities() throws PlatformUnsupportedException { CompilerPluginsRepository pluginsRepository = (CompilerPluginsRepository) repositoryRegistry.find( "compiler-plugins" ); CompilerPluginsRepository pluginsRepositoryExt = (CompilerPluginsRepository) repositoryRegistry.find( "compiler-plugins-ext" ); List<ExecutableCapability> primary = new ArrayList<ExecutableCapability>(); if ( pluginsRepository != null ) { primary = pluginsRepository.getCompilerCapabilities(); } if ( pluginsRepositoryExt != null ) { primary.addAll( pluginsRepositoryExt.getCompilerCapabilities() ); } if ( primary.isEmpty() ) { throw new PlatformUnsupportedException( "NPANDAY-065-003: No compiler capabilities configured" ); } return primary; }
public ConfigurationAppender getConfigurationAppenderFor( Field field ) (ConfigurationAppendersRepository) repositoryRegistry.find( "configuration-appenders" ); Set<Class> appenderClasses = repository.getAppenderClasses(); for ( Class c : appenderClasses )
Repository repository = repositoryRegistry.find( name ); if ( repository instanceof ConnectionsRepository )
public void postExecute() throws MojoExecutionException, MojoFailureException { try { RepositoryRegistry repositoryRegistry = (RepositoryRegistry) container.lookup( RepositoryRegistry.ROLE ); SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); if ( settingsRepository != null ) { settingsRepository.reload(); } } catch ( ComponentLookupException e ) { e.printStackTrace(); } catch ( IOException e ) { e.printStackTrace(); } catch( NPandayRepositoryException e ) { e.printStackTrace(); } } }
Repository repository = repositoryRegistry.find( name ); if ( repository instanceof ConnectionsRepository )
Repository repository = repositoryRegistry.find( name ); if ( repository instanceof ConnectionsRepository )
private File getSdkInstallRootFor( VendorInfo vendorInfo ) throws PlatformUnsupportedException { SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); return settingsRepository.getSdkInstallRootFor( vendorInfo.getVendor().getVendorName(), vendorInfo.getVendorVersion(), vendorInfo.getFrameworkVersion() ); }
private File getInstallRootFor( VendorInfo vendorInfo ) throws PlatformUnsupportedException { SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); return settingsRepository.getInstallRootFor( vendorInfo.getVendor().getVendorName(), vendorInfo.getVendorVersion(), vendorInfo.getFrameworkVersion() ); }
(NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" ); List<NetDependencyMatchPolicy> matchPolicies = new ArrayList<NetDependencyMatchPolicy>(); matchPolicies.add( new ProfileMatchPolicy( profile ) );
try settingsRepository = ( SettingsRepository) repositoryRegistry.find( "npanday-settings" );
/** * @see ArtifactContext#getArtifactsFor(String, String, String, String) */ public List<Artifact> getArtifactsFor( String groupId, String artifactId, String version, String type ) { NetDependenciesRepositoryImpl repository = (NetDependenciesRepositoryImpl) repositoryRegistry.find( "net-dependencies" ); if ( repository == null ) { logger.warn( "NPANDAY-000-001: Could not locate artifact (net dependencies repository not found): Group ID = " + groupId + ", Artifact ID = " + artifactId + ", Version = " + version + ", Type = " + type ); return new ArrayList<Artifact>(); } repository.init( artifactFactory ); List<Artifact> artifacts = repository.getArtifactsFor( groupId, artifactId, version, type ); for ( Artifact artifact : artifacts ) { logger.debug("NPANDAY-000-002: set file"); artifact.setFile( PathUtil.getUserAssemblyCacheFileFor( artifact, getLocalRepository() ) ); } return artifacts; }
private List<VendorInfo> getVendorInfos() SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" );