Search in sources :

Example 6 with RegexBasedInterpolator

use of org.codehaus.plexus.interpolation.RegexBasedInterpolator in project spring-boot by spring-projects.

the class RepositoryConfigurationFactory method addActiveProfileRepositories.

private static void addActiveProfileRepositories(List<Profile> activeProfiles, List<RepositoryConfiguration> configurations) {
    for (Profile activeProfile : activeProfiles) {
        Interpolator interpolator = new RegexBasedInterpolator();
        interpolator.addValueSource(new PropertiesBasedValueSource(activeProfile.getProperties()));
        for (Repository repository : activeProfile.getRepositories()) {
            configurations.add(getRepositoryConfiguration(interpolator, repository));
        }
    }
}
Also used : Repository(org.apache.maven.settings.Repository) RegexBasedInterpolator(org.codehaus.plexus.interpolation.RegexBasedInterpolator) Interpolator(org.codehaus.plexus.interpolation.Interpolator) RegexBasedInterpolator(org.codehaus.plexus.interpolation.RegexBasedInterpolator) PropertiesBasedValueSource(org.codehaus.plexus.interpolation.PropertiesBasedValueSource) Profile(org.apache.maven.settings.Profile)

Aggregations

RegexBasedInterpolator (org.codehaus.plexus.interpolation.RegexBasedInterpolator)6 IOException (java.io.IOException)5 InterpolationException (org.codehaus.plexus.interpolation.InterpolationException)5 EnvarBasedValueSource (org.codehaus.plexus.interpolation.EnvarBasedValueSource)4 MapBasedValueSource (org.codehaus.plexus.interpolation.MapBasedValueSource)4 Interpolator (org.codehaus.plexus.interpolation.Interpolator)3 Properties (java.util.Properties)2 Activation (org.apache.maven.model.Activation)2 ActivationFile (org.apache.maven.model.ActivationFile)2 ObjectBasedValueSource (org.codehaus.plexus.interpolation.ObjectBasedValueSource)2 PropertiesBasedValueSource (org.codehaus.plexus.interpolation.PropertiesBasedValueSource)2 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 InputStream (java.io.InputStream)1 Reader (java.io.Reader)1 StringReader (java.io.StringReader)1 MalformedURLException (java.net.MalformedURLException)1 SocketTimeoutException (java.net.SocketTimeoutException)1 DocumentXpp3Reader (org.apache.maven.doxia.document.io.xpp3.DocumentXpp3Reader)1