@Override public File findArtifact(final Artifact artifact) { File result = foundFileCache.get(artifact); if (result == null) { result = _findArtifact(artifact); foundFileCache.put(artifact, result); } return result; }
@Override public List<String> findVersions(final Artifact artifact) { List<String> result = foundVersionsCache.get(artifact); if (result == null) { result = _findVersions(artifact); foundVersionsCache.put(artifact, result); } return result; }
private Artifact getFoundArtifact(final File pomFile) { Artifact foundArtifact = foundArtifactCache.get(pomFile); if (foundArtifact == null) { foundArtifact = createFoundArtifact(pomFile); foundArtifactCache.put(pomFile, foundArtifact); } return foundArtifact; }
final File file = getClasspathFile(classpathEntry); final File pomFile = getPomFile(file); if (pomFile.isFile()) final Artifact foundArtifact = getFoundArtifact(pomFile); if (pomFile.isFile()) Artifact foundArtifact = getFoundArtifact(pomFile); if (foundArtifact.getGroupId().equals(artifact.getGroupId()) && foundArtifact.getArtifactId().equals(artifact.getArtifactId()) final File file = getClasspathFile(classpathEntry); final File pomFile = getPomFile(file); if (pomFile.isFile()) for (File module : getFoundModules(pomFile)) final Artifact foundArtifact = getFoundArtifact(modulePom); if (foundArtifact.getGroupId().equals(artifact.getGroupId()) && foundArtifact.getArtifactId().equals(artifact.getArtifactId())
for (String classpathEntry : classPathEntries) final File file = getClasspathFile(classpathEntry); final File pomFile = getPomFile(file); if (pomFile.isFile()) final Artifact foundArtifact = getFoundArtifact(pomFile); if (pomFile.isFile()) final Artifact foundArtifact = getFoundArtifact(pomFile);
private List<File> getFoundModules(final File pomFile) { List<File> foundArtifacts = foundModulesCache.get(pomFile); if (foundArtifacts == null) { foundArtifacts = createFoundModules(pomFile); foundModulesCache.put(pomFile, foundArtifacts); } return foundArtifacts; }
public ClasspathWorkspaceReader() { final String classPath = System.getProperty(CLASS_PATH_KEY); final String surefireClassPath = System.getProperty(SUREFIRE_CLASS_PATH_KEY); this.classPathEntries.addAll(getClassPathEntries(surefireClassPath)); this.classPathEntries.addAll(getClassPathEntries(classPath)); }
public DefaultRepositorySystemSession setupRepoSession(final RepositorySystem repoSystem, final Settings settings) { DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession(); session.setOffline(false); Proxy activeProxy = settings.getActiveProxy(); if (activeProxy != null) { DefaultProxySelector dps = new DefaultProxySelector(); dps.add(convertFromMavenProxy(activeProxy), activeProxy.getNonProxyHosts()); session.setProxySelector(dps); } final DefaultMirrorSelector mirrorSelector = createMirrorSelector(settings); final LazyAuthenticationSelector authSelector = createAuthSelector(settings, mirrorSelector); session.setMirrorSelector(mirrorSelector); session.setAuthenticationSelector(authSelector); LocalRepository localRepo = new LocalRepository(new File(settings.getLocalRepository())); session.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(session, localRepo)); session.setChecksumPolicy(RepositoryPolicy.CHECKSUM_POLICY_IGNORE); session.setCache(new DefaultRepositoryCache()); boolean cacheNotFoundArtifacts = true; boolean cacheTransferErrors = true; session.setResolutionErrorPolicy(new SimpleResolutionErrorPolicy(cacheNotFoundArtifacts, cacheTransferErrors)); session.setWorkspaceReader(new ClasspathWorkspaceReader()); if (Boolean.getBoolean("org.apache.maven.log_transfer")) { session.setTransferListener(new JULMavenTransferListener()); } return session; }
result = createFoundModules(parentPom);