Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,6 @@ public boolean enforceVersion(String requiredVersionRange, ArtifactVersion actua
return vr.containsVersion(actualVersion);
}

@Test
void testOrder0() {
// assertTrue( new DefaultArtifactVersion( "1.0-alpha10" ).compareTo( new DefaultArtifactVersion( "1.0-alpha1" )
// ) > 0 );
}

@Test
void testCache() throws InvalidVersionSpecificationException {
VersionRange range = VersionRange.createFromVersionSpec("[1.0,1.2]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

/**
* Listens to the resolution process and handles events.
*
*/
@Deprecated
public interface ResolutionListener {
Expand Down Expand Up @@ -77,13 +76,8 @@ public interface ResolutionListener {
@Deprecated
void manageArtifact(Artifact artifact, Artifact replacement);

// TODO Use the following two instead of manageArtifact
// TODO Remove ResolutionListenerDM interface

// void manageArtifactVersion( Artifact artifact, Artifact replacement );

// void manageArtifactScope( Artifact artifact, Artifact replacement );

void omitForCycle(Artifact artifact);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,6 @@ private boolean isQualifiedForInterpolation(Field field, Class<?> fieldType) {
return false;
}

// if ( fieldType.isPrimitive() )
// {
// return false;
// }

return !"parent".equals(field.getName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ public String render(String indentation) {
}

StringBuilder message = new StringBuilder();

// if ( messages.size() == 1 )
// {
// message.append( "There was 1 validation error: " );
// }
// else
// {
// message.append( "There was " + messages.size() + " validation errors: " + LS );
// }
//
for (int i = 0; i < messages.size(); i++) {
message.append(indentation)
.append('[')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,22 +331,6 @@ public ArtifactResolutionResult resolve(ArtifactResolutionRequest request) {
return artifactResolver.resolve(request);
}

// public void addProxy( String protocol, String host, int port, String username, String password,
// String nonProxyHosts )
// {
// ProxyInfo proxyInfo = new ProxyInfo();
// proxyInfo.setHost( host );
// proxyInfo.setType( protocol );
// proxyInfo.setPort( port );
// proxyInfo.setNonProxyHosts( nonProxyHosts );
// proxyInfo.setUserName( username );
// proxyInfo.setPassword( password );
//
// proxies.put( protocol, proxyInfo );
//
// wagonManager.addProxy( protocol, host, port, username, password, nonProxyHosts );
// }

public List<ArtifactRepository> getEffectiveRepositories(List<ArtifactRepository> repositories) {
if (repositories == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,27 +169,7 @@ public ArtifactMetadata(
error);
}

public ArtifactMetadata(Artifact af) {
/*
if ( af != null )
{
init( af );
}
*/
}
// ------------------------------------------------------------------
// public void init( ArtifactMetadata af )
// {
// setGroupId( af.getGroupId() );
// setArtifactId( af.getArtifactId() );
// setVersion( af.getVersion() );
// setType( af.getType() );
// setScope( af.getScope() );
// setClassifier( af.getClassifier() );
// //setUri( af.getDownloadUrl() );
//
// this.resolved = af.isResolved();
// }
public ArtifactMetadata(Artifact af) {}

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,6 @@ protected void visit(MetadataGraphVertex node) // , String version, String artif
}

cpc.add(md);
//
// TreeSet<MetadataGraphEdge> deps = new TreeSet<MetadataGraphEdge>(
// new Comparator<MetadataGraphEdge>()
// {
// public int compare( MetadataGraphEdge e1
// , MetadataGraphEdge e2
// )
// {
// if( e1.getDepth() == e2.getDepth() )
// {
// if( e2.getPomOrder() == e1.getPomOrder() )
// return
// e1.getTarget().toString().compareTo(e2.getTarget().toString() );
//
// return e2.getPomOrder() - e1.getPomOrder();
// }
//
// return e2.getDepth() - e1.getDepth();
// }
// }
// );

List<MetadataGraphEdge> exits = graph.getExcidentEdges(node);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,8 @@ public MetadataGraph resolveConflicts(MetadataGraph graph, ArtifactScopeEnum sco
if (entry.equals(v)) { // unless it's an entry point.
// currently processing the entry point - it should not have any entry incident edges
res.getEntry().getMd().setWhy("This is a graph entry point. No links.");
} else {
// System.out.println("--->"+v.getMd().toDomainString()
// +" has been terminated on this entry set\n-------------------\n"
// +ins
// +"\n-------------------\n"
// );
}
} else {
// System.out.println("+++>"+v.getMd().toDomainString()+" still has "+edge.toString() );
// fill in domain md with actual version data
ArtifactMetadata md = v.getMd();
ArtifactMetadata newMd = new ArtifactMetadata(
Expand All @@ -126,10 +119,6 @@ public MetadataGraph resolveConflicts(MetadataGraph graph, ArtifactScopeEnum sco
res.addEdge(sourceV, newV, edge);
}
}
// System.err.println("Original graph("+graph.getVertices().size()+"):\n"+graph.toString());
// System.err.println("Cleaned("+requestedScope+") graph("+res.getVertices().size()+"):\n"+res.toString());
// System.err.println("Linked("+requestedScope+")
// subgraph("+linkedRes.getVertices().size()+"):\n"+linkedRes.toString());
return findLinkedSubgraph(res);
} catch (MetadataResolutionException e) {
throw new GraphConflictResolutionException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,5 @@ public int hashCode() {
}

return hashString.toString().hashCode();

// BASE64Encoder b64 = new BASE64Encoder();
// return b64.encode( hashString.toString().getBytes() ).hashCode();
}

// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ private File getFile(String pathPattern, String basedirSysProp, String altLocati
// basedirSysProp is non regexp and basedir too
path = pathPattern.replace("${" + basedirSysProp + "}", basedir);
path = path.replace("\\", "/");
// ---------------------------------------------------------------------------------
// I'm not sure if this last regexp was really intended to disallow the usage of
// network paths as user.home directory. Unfortunately it did. I removed it and
// have not detected any problems yet.
// ---------------------------------------------------------------------------------
// path = path.replaceAll( "//", "/" );

}
return new File(path).getAbsoluteFile();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,4 @@
* @deprecated Use {@link org.apache.maven.api.JavaToolchain} instead.
*/
@Deprecated(since = "4.0.0")
Comment thread
gnodet marked this conversation as resolved.
public interface JavaToolchain extends Toolchain {
// /**
// * Returns a list of {@link java.io.File}s which represents the bootstrap libraries for the
// * runtime environment. The Bootstrap libraries include libraries in JRE's
// * extension directory, if there are any.
// *
// * @return List
// */
// List getBootstrapLibraries();
//
// /**
// * Returns a list of {@link java.io.File}s which represent the libraries recognized by
// * default by the platform. Usually it corresponds to contents of CLASSPATH
// * environment variable.
// *
// * @return List
// */
// List getStandardLibraries();
//
// /**
// * Returns a {@link java.io.File}s which represent the locations of the source of the JDK,
// * or an empty collection when the location is not set or is invalid.
// *
// * @return List
// */
// List getSourceDirectories();
//
// /**
// * Returns a {@link java.io.File}s which represent the locations of the Javadoc for this platform,
// * or empty collection if the location is not set or invalid
// *
// * @return List
// */
// List getJavadocDirectories();
}
public interface JavaToolchain extends Toolchain {}
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,6 @@ protected String getProjectsDirectory() {
return "src/test/projects/project-dependencies-resolver";
}

/*
@Test
public void testExclusionsInDependencies()
throws Exception
{
MavenSession session = createMavenSession( null );
MavenProject project = session.getCurrentProject();

Exclusion exclusion = new Exclusion();
exclusion.setGroupId( "org.apache.maven.its" );
exclusion.setArtifactId( "a" );

new ProjectBuilder( project ).addDependency( "org.apache.maven.its", "b", "0.1", Artifact.SCOPE_RUNTIME,
exclusion );

Set<Artifact> artifactDependencies =
resolver.resolve( project, Collections.singleton( Artifact.SCOPE_COMPILE ), session );
assertEquals( 0, artifactDependencies.size() );

artifactDependencies = resolver.resolve( project, Collections.singleton( Artifact.SCOPE_RUNTIME ), session );
assertEquals( 1, artifactDependencies.size() );
assertEquals( "b", artifactDependencies.iterator().next().getArtifactId() );
}
*/

@Test
void testSystemScopeDependencies() throws Exception {
MavenSession session = createMavenSession(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.maven.profiles.ProfileManager;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.testing.PlexusTest;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -200,35 +199,4 @@ void testShouldOverrideAndDeactivateActiveProfile() throws Exception {
assertNotNull(active);
assertEquals(0, active.size());
}

@Test
@Disabled
void testOsActivationProfile() throws Exception {
/*
Profile osActivated = new Profile();
osActivated.setId( "os-profile" );

Activation osActivation = new Activation();

ActivationOS activationOS = new ActivationOS();

activationOS.setName( "!dddd" );

osActivation.setOs( activationOS );

osActivated.setActivation( osActivation );

Properties props = System.getProperties();
ProfileActivationContext ctx = new ProfileActivationContext( props, false );

ProfileManager profileManager = new DefaultProfileManager( getContainer(), props );

profileManager.addProfile( osActivated );

List active = profileManager.getActiveProfiles( null );

assertNotNull( active );
assertEquals( 1, active.size() );
*/
}
}
Loading