Skip to content

Commit

Permalink
Merge pull request #38 from netceler/master
Browse files Browse the repository at this point in the history
[MRELEASE-1038] releaseProfiles get overriden by exec.pomFileName
  • Loading branch information
olamy committed Mar 12, 2020
2 parents a4fac6d + 9fade49 commit 0db7d7a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static void copyPropertiesToReleaseDescriptor( Properties properties, Rel
}
if ( properties.containsKey( "exec.activateProfiles" ) )
{
builder.setActivateProfiles( Arrays.asList( properties.getProperty( "exec.pomFileName" ).split( "," ) ) );
builder.setActivateProfiles( Arrays.asList( properties.getProperty( "exec.activateProfiles" ).split( "," ) ) );
}
if ( properties.containsKey( "preparationGoals" ) )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Properties;

/**
Expand Down Expand Up @@ -249,6 +250,17 @@ public void testSystemPropertyStartingWithDependency()
properties.setProperty( "dependency.locations.enabled", "false" );
ReleaseUtils.copyPropertiesToReleaseDescriptor( properties, new ReleaseDescriptorBuilder() );
}

// MRELEASE-1038
public void testActiveProfilesProperty()
{
ReleaseDescriptorBuilder builder = new ReleaseDescriptorBuilder();
Properties properties = new Properties();
properties.setProperty( "exec.activateProfiles", "aProfile,anotherOne" );
ReleaseUtils.copyPropertiesToReleaseDescriptor( properties, builder );

assertEquals( Arrays.asList("aProfile", "anotherOne"), builder.build().getActivateProfiles() );
}

private static ReleaseDescriptorBuilder copyReleaseDescriptor( ReleaseDescriptor originalReleaseDescriptor )
{
Expand Down

0 comments on commit 0db7d7a

Please sign in to comment.