userBuildProperties,
projectBuildProperties,
projectProperties,
driverProperties } );
MavenJellyContext context = new MavenJellyContext();
context.setVariable( "basedir", basedir );
MavenUtils.integrateMapInContext( result, context );
// Values that should be taken from systemProperties.
assertEquals( "/projects/maven", (String) context.getVariable( "maven.foo" ) );
// Values that should be taken from userBuildProperties.
assertEquals( "/opt/maven/repository", (String) context.getVariable( "maven.repo.local" ) );
assertEquals( "false", (String) context.getVariable( "maven.repo.remote.enabled" ) );
assertEquals( "jvanzyl", (String) context.getVariable( "maven.username" ) );
// Values take from projectBuildProperties.
assertEquals( "maven", (String) context.getVariable( "maven.final.name" ) );
// Values take from projectProperties.
assertEquals( mavenRepoRemote, (String) context.getVariable( "maven.repo.remote" ) );
// Values taken from driver properties.
assertEquals( basedir + "/target", (String) context.getVariable( "maven.build.dir" ) );
assertEquals( basedir + "/src", (String) context.getVariable( "maven.build.src" ) );
assertEquals( basedir + "/target/classes", (String) context.getVariable( "maven.build.dest" ) );
System.setProperty( "basedir", oldBasedir );
}