You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by ev...@apache.org on 2004/07/19 11:51:15 UTC

cvs commit: maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar AbstractJarMojo.java

evenisse    2004/07/19 02:51:15

  Modified:    maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar
                        AbstractJarMojo.java
  Log:
  Create output directory if it doesn't exist.
  
  Revision  Changes    Path
  1.2       +6 -1      maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java
  
  Index: AbstractJarMojo.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractJarMojo.java	7 Jul 2004 07:18:10 -0000	1.1
  +++ AbstractJarMojo.java	19 Jul 2004 09:51:15 -0000	1.2
  @@ -148,6 +148,11 @@
        * @throws IOException if there is a problem writing the archive or reading the sources
        */
       protected void createJar(File jarFile, Map includes) throws IOException {
  +        File parentJarFile = jarFile.getParentFile();
  +        if ( !parentJarFile.exists() )
  +        {
  +            parentJarFile.mkdirs();
  +        }
           JarOutputStream jos = createJar(jarFile, createManifest());
           try {
               addEntries(jos, includes);