mirror of https://github.com/apache/maven.git
Fix templates processing for windows.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163296 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
668ecf8165
commit
2ab584b37d
|
@ -39,6 +39,7 @@ import org.apache.velocity.VelocityContext;
|
|||
import org.apache.velocity.context.Context;
|
||||
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.velocity.VelocityComponent;
|
||||
|
||||
/**
|
||||
|
@ -202,13 +203,17 @@ public class DefaultArchetype
|
|||
{
|
||||
File f;
|
||||
|
||||
template = StringUtils.replace( template, "\\", "/" );
|
||||
|
||||
if ( packageInFileName && packageName != null )
|
||||
{
|
||||
String templateFileName = StringUtils.replace( template, "/", File.separator );
|
||||
|
||||
String path = packageName.replace( '.', '/' );
|
||||
|
||||
String filename = FileUtils.filename( template );
|
||||
String filename = FileUtils.filename( templateFileName );
|
||||
|
||||
String dirname = FileUtils.dirname( template );
|
||||
String dirname = FileUtils.dirname( templateFileName );
|
||||
|
||||
f = new File( new File( new File( outputDirectory, dirname ), path ), filename );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue