[Lutinutil-commits] r1223 - maven-license-switcher-plugin/trunk/src/main/java/org/codelutin/license/plugin
Author: tchemit Date: 2008-10-15 13:01:44 +0000 (Wed, 15 Oct 2008) New Revision: 1223 Modified: maven-license-switcher-plugin/trunk/src/main/java/org/codelutin/license/plugin/SwitchLicenseMojo.java Log: skip this goal for site and pom packaging Modified: maven-license-switcher-plugin/trunk/src/main/java/org/codelutin/license/plugin/SwitchLicenseMojo.java =================================================================== --- maven-license-switcher-plugin/trunk/src/main/java/org/codelutin/license/plugin/SwitchLicenseMojo.java 2008-10-15 12:59:09 UTC (rev 1222) +++ maven-license-switcher-plugin/trunk/src/main/java/org/codelutin/license/plugin/SwitchLicenseMojo.java 2008-10-15 13:01:44 UTC (rev 1223) @@ -113,8 +113,16 @@ protected long timestamp; + protected boolean skip; + protected void init() throws IOException { + if ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging())) { + // nothing to be done for this type of packaging + skip=true; + return; + } + timestamp = System.nanoTime(); // obtain all java source files to be treated @@ -143,6 +151,11 @@ super.execute(); + if (skip) { + getLog().info("skip switch goal for packaging " + project.getPackaging()); + return; + } + if (javaFilesToTreate.isEmpty()) { getLog().warn("no java source files found to be treated."); return;
participants (1)
-
tchemit@users.labs.libre-entreprise.org