diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-01 12:08:03 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-01 12:08:03 +0100 |
commit | a18df54301d3c988c167506b832323fec973a936 (patch) | |
tree | e5ab728b2441ae5f2ac9bd0d3cead8f364c0f7cf /src/main/java/org/apache/maven/plugin/nar/Compiler.java | |
parent | b833ebdbbe47d3a4190612e95fd5e7fc250445bd (diff) | |
download | maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.tar.gz maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.tar.bz2 maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.tar.xz maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.zip |
Fixed NAR-55 and NAR-113
Diffstat (limited to 'src/main/java/org/apache/maven/plugin/nar/Compiler.java')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/Compiler.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/Compiler.java b/src/main/java/org/apache/maven/plugin/nar/Compiler.java index 0c71aa2..33c0a8f 100644 --- a/src/main/java/org/apache/maven/plugin/nar/Compiler.java +++ b/src/main/java/org/apache/maven/plugin/nar/Compiler.java @@ -37,6 +37,7 @@ import net.sf.antcontrib.cpptasks.types.ConditionalFileSet; import net.sf.antcontrib.cpptasks.types.DefineArgument; import net.sf.antcontrib.cpptasks.types.DefineSet; +import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.StringUtils; @@ -228,14 +229,15 @@ public abstract class Compiler private AbstractCompileMojo mojo; - private static final String TEST = "test"; + public static final String MAIN = "main"; + public static final String TEST = "test"; protected Compiler() { } - private String getName() - throws MojoFailureException + public String getName() + throws MojoFailureException, MojoExecutionException { // adjust default values if ( name == null ) @@ -331,13 +333,13 @@ public abstract class Compiler } public final Set getIncludes() - throws MojoFailureException + throws MojoFailureException, MojoExecutionException { return getIncludes( "main" ); } protected final Set getIncludes( String type ) - throws MojoFailureException + throws MojoFailureException, MojoExecutionException { Set result = new HashSet(); if ( !type.equals( TEST ) && !includes.isEmpty() ) @@ -360,7 +362,7 @@ public abstract class Compiler } protected final Set getExcludes() - throws MojoFailureException + throws MojoFailureException, MojoExecutionException { Set result = new HashSet(); @@ -386,13 +388,13 @@ public abstract class Compiler } protected final String getPrefix() - throws MojoFailureException + throws MojoFailureException, MojoExecutionException { return mojo.getAOL().getKey() + "." + getLanguage() + "."; } public final CompilerDef getCompiler( String type, String output ) - throws MojoFailureException + throws MojoFailureException, MojoExecutionException { String name = getName(); if (name == null) return null; |