[jboss-cvs] JBossAS SVN: r74708 - projects/aop/trunk/aop/src/main/org/jboss/aop/ant.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 17 14:15:09 EDT 2008
Author: flavia.rainone at jboss.com
Date: 2008-06-17 14:15:09 -0400 (Tue, 17 Jun 2008)
New Revision: 74708
Modified:
projects/aop/trunk/aop/src/main/org/jboss/aop/ant/AopC.java
Log:
[JBAOP-595] Added check for mandatory element src and standardized error messages.
Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/ant/AopC.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/ant/AopC.java 2008-06-17 18:11:45 UTC (rev 74707)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/ant/AopC.java 2008-06-17 18:15:09 UTC (rev 74708)
@@ -48,7 +48,7 @@
{
final static String SYS_OPTIMIZED = "jboss.aop.optimized";
final static String SYS_INSTRUMENTOR = "jboss.aop.instrumentor";
-
+ private final static String MSG_PREFIX = "\n[aopc] ";
private static String lSep = System.getProperty("line.separator");
private int maxSrc = 1000;
@@ -306,7 +306,16 @@
throws BuildException
{
CommandlineJava cmd = new CommandlineJava();
-
+ if (compileSourcepath == null)
+ {
+ throw new BuildException(MSG_PREFIX + "'src' path element not found");
+ }
+
+ if (classpath == null)
+ {
+ throw new BuildException(MSG_PREFIX + "classpath undefined (use 'classpath' path elements and/or the 'classpathref' attribute)");
+ }
+
if (verbose)
cmd.createArgument().setValue("-verbose");
if (suppress)
@@ -390,7 +399,7 @@
}
else
{
- throw new BuildException("Error running aopc compiler: ",
+ throw new BuildException(MSG_PREFIX + "error running aopc compiler",
ex, getLocation());
}
}
@@ -415,7 +424,7 @@
File srcDir = getProject().resolveFile(list[i]);
if (!srcDir.exists())
{
- throw new BuildException("srcdir \""
+ throw new BuildException(MSG_PREFIX + "srcdir \""
+ srcDir.getPath()
+ "\" does not exist!", getLocation());
}
More information about the jboss-cvs-commits
mailing list