o Fixed basedir alignment

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@764913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-04-14 18:23:39 +00:00
parent 100a91456b
commit c236be0b5a
1 changed files with 35 additions and 35 deletions

View File

@ -319,43 +319,43 @@ public class ProcessorContext
* Post-processes the paths of build directories by aligning relative paths to the project directory and normalizing
* file separators to the platform-specific separator.
*
* @param modelProperties The model properties to process, must not be {@code null}.
* @param model The model to process, must not be {@code null}.
* @param basedir The project directory, must not be {@code null}.
* @return The updated model properties, never {@code null}.
*/
private static void alignPaths( Model model, File basedir )
{
Build build = model.getBuild();
if(build != null)
if ( build != null )
{
build.setDirectory(getAlignedPathFor(build.getDirectory(), basedir));
build.setOutputDirectory(getAlignedPathFor(build.getOutputDirectory(), basedir));
build.setTestOutputDirectory(getAlignedPathFor(build.getTestOutputDirectory(), basedir));
build.setSourceDirectory(getAlignedPathFor(build.getSourceDirectory(), basedir));
build.setScriptSourceDirectory(getAlignedPathFor(build.getScriptSourceDirectory(), basedir));
build.setDirectory( getAlignedPathFor( build.getDirectory(), basedir ) );
build.setOutputDirectory( getAlignedPathFor( build.getOutputDirectory(), basedir ) );
build.setTestOutputDirectory( getAlignedPathFor( build.getTestOutputDirectory(), basedir ) );
build.setSourceDirectory( getAlignedPathFor( build.getSourceDirectory(), basedir ) );
build.setTestSourceDirectory( getAlignedPathFor( build.getTestSourceDirectory(), basedir ) );
build.setScriptSourceDirectory( getAlignedPathFor( build.getScriptSourceDirectory(), basedir ) );
for( Resource r : build.getResources() )
for ( Resource r : build.getResources() )
{
r.setDirectory(getAlignedPathFor(r.getDirectory(), basedir));
r.setDirectory( getAlignedPathFor( r.getDirectory(), basedir ) );
}
for( Resource r : build.getTestResources() )
for ( Resource r : build.getTestResources() )
{
r.setDirectory(getAlignedPathFor(r.getDirectory(), basedir));
r.setDirectory( getAlignedPathFor( r.getDirectory(), basedir ) );
}
List<String> filters = new ArrayList<String>();
for( String f : build.getFilters() )
for ( String f : build.getFilters() )
{
filters.add(getAlignedPathFor(f, basedir));
filters.add( getAlignedPathFor( f, basedir ) );
}
build.setFilters(filters);
build.setFilters( filters );
}
Reporting reporting = model.getReporting();
if(reporting != null)
if ( reporting != null )
{
reporting.setOutputDirectory(getAlignedPathFor(reporting.getOutputDirectory(), basedir));
reporting.setOutputDirectory( getAlignedPathFor( reporting.getOutputDirectory(), basedir ) );
}
}