felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r472012 - /incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
Date Tue, 07 Nov 2006 07:10:49 GMT
Author: rickhall
Date: Mon Nov  6 23:10:48 2006
New Revision: 472012

URL: http://svn.apache.org/viewvc?view=rev&rev=472012
Log:
Applied patch (FELIXM2-10).

Modified:
    incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java

Modified: incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java?view=diff&rev=472012&r1=472011&r2=472012
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
(original)
+++ incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
Mon Nov  6 23:10:48 2006
@@ -105,9 +105,15 @@
    header(properties, Analyzer.BUNDLE_LICENSE, printLicenses(project
      .getLicenses()));
    header(properties, Analyzer.BUNDLE_NAME, project.getName());
-   header(properties, Analyzer.BUNDLE_VENDOR, project
-     .getOrganization());
-   header(properties, Analyzer.INCLUDE_RESOURCE, "src/main/resources/");
+   
+   if (project.getOrganization() != null) {
+     header(properties, Analyzer.BUNDLE_VENDOR, project
+       .getOrganization().getName());
+   }
+     
+   if (new File("src/main/resources").exists()) {
+     header(properties, Analyzer.INCLUDE_RESOURCE, "src/main/resources/");
+   }
  
    properties.putAll(project.getProperties());
    properties.putAll(project.getModel().getProperties());
@@ -144,6 +150,7 @@
     throw new MojoFailureException("Found errors, see log");
    }
    else {
+    jarFile.getParentFile().mkdirs();
     builder.getJar().write(jarFile);
     project.getArtifact().setFile(jarFile);
    }
@@ -226,7 +233,10 @@
   */
  private Jar[] getClasspath() throws ZipException, IOException {
   List list = new ArrayList();
-  list.add(new Jar(".", outputDirectory));
+  
+  if (outputDirectory != null && outputDirectory.exists()) {
+    list.add(new Jar(".", outputDirectory));
+  }
  
   Set artifacts = project.getArtifacts();
   for (Iterator it = artifacts.iterator(); it.hasNext();) {



Mime
View raw message