Applying patch 835896(classpathref support for Ant task)
This commit is contained in:
parent
154df915b9
commit
ec70b77765
|
|
@ -106,6 +106,13 @@ then you will need the following <code>taskdef</code> declaration:</p>
|
|||
<td class="required">No</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>classpathref</td>
|
||||
<td>The classpath to use when looking up classes, given as a reference
|
||||
to a path defined elsewhere.</td>
|
||||
<td class="required">No</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@
|
|||
<li class="body">Added caseSensitive property to ImportOrder check
|
||||
(bug 842604).</li>
|
||||
|
||||
<li class="body">Added classpathref property to ant task
|
||||
(patch 835896, from Ville Skytta (scop)).</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="body">
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import org.apache.tools.ant.taskdefs.LogOutputStream;
|
|||
import org.apache.tools.ant.types.EnumeratedAttribute;
|
||||
import org.apache.tools.ant.types.FileSet;
|
||||
import org.apache.tools.ant.types.Path;
|
||||
import org.apache.tools.ant.types.Reference;
|
||||
|
||||
/**
|
||||
* An implementation of a ANT task for calling checkstyle. See the documentation
|
||||
|
|
@ -141,7 +142,21 @@ public class CheckStyleTask
|
|||
*/
|
||||
public void setClasspath(Path aClasspath)
|
||||
{
|
||||
mClasspath = aClasspath;
|
||||
if (mClasspath == null) {
|
||||
mClasspath = aClasspath;
|
||||
}
|
||||
else {
|
||||
mClasspath.append(aClasspath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the class path from a reference defined elsewhere.
|
||||
* @param aClasspathRef the reference to an instance defining the classpath
|
||||
*/
|
||||
public void setClasspathRef(Reference aClasspathRef)
|
||||
{
|
||||
createClasspath().setRefid(aClasspathRef);
|
||||
}
|
||||
|
||||
/** @return a created path for locating classes */
|
||||
|
|
|
|||
Loading…
Reference in New Issue