mirror of https://github.com/apache/maven.git
make algo more visible
This commit is contained in:
parent
bdf5770f95
commit
36d746789d
|
@ -24,6 +24,7 @@ import java.util.Map.Entry;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.apache.maven.toolchain.MisconfiguredToolchainException;
|
import org.apache.maven.toolchain.MisconfiguredToolchainException;
|
||||||
|
import org.apache.maven.toolchain.RequirementMatcher;
|
||||||
import org.apache.maven.toolchain.RequirementMatcherFactory;
|
import org.apache.maven.toolchain.RequirementMatcherFactory;
|
||||||
import org.apache.maven.toolchain.ToolchainFactory;
|
import org.apache.maven.toolchain.ToolchainFactory;
|
||||||
import org.apache.maven.toolchain.ToolchainPrivate;
|
import org.apache.maven.toolchain.ToolchainPrivate;
|
||||||
|
@ -73,14 +74,17 @@ public class JavaToolchainFactory
|
||||||
"Provides token '" + key + "' doesn't have any value configured." );
|
"Provides token '" + key + "' doesn't have any value configured." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RequirementMatcher matcher;
|
||||||
if ( "version".equals( key ) )
|
if ( "version".equals( key ) )
|
||||||
{
|
{
|
||||||
jtc.addProvideToken( key, RequirementMatcherFactory.createVersionMatcher( value ) );
|
matcher = RequirementMatcherFactory.createVersionMatcher( value );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jtc.addProvideToken( key, RequirementMatcherFactory.createExactMatcher( value ) );
|
matcher = RequirementMatcherFactory.createExactMatcher( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jtc.addProvideToken( key, matcher );
|
||||||
}
|
}
|
||||||
|
|
||||||
// populate the configuration section
|
// populate the configuration section
|
||||||
|
|
Loading…
Reference in New Issue