From b6db4d80fd09e5ecc7489998e1c405ce8c66b998 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Sun, 9 Oct 2005 03:06:24 +0000 Subject: [PATCH] PR: MNG-749 Submitted by: Edwin Punzalan Reviewed by: Brett Porter make directories in ant plugin for repository files git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307350 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/plugin/ant/AntBuildWriter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/maven-plugins/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java b/maven-plugins/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java index 118b669d5b..10f7e511e3 100644 --- a/maven-plugins/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java +++ b/maven-plugins/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java @@ -409,6 +409,14 @@ public class AntBuildWriter // TODO: should the artifacthandler be used instead? String path = toRelative( localRepository, artifact.getFile().getPath() ); + File parentDirs = new File( path ).getParentFile(); + if ( parentDirs != null ) + { + writer.startElement( "mkdir" ); + writer.addAttribute( "dir", parentDirs.getAbsolutePath() ); + writer.endElement(); // mkdir + } + for ( Iterator j = project.getRepositories().iterator(); j.hasNext(); ) { Repository repository = (Repository) j.next();