check-compile task checks that all the jars in a path are required to compile your jar.
It will fail the build if a jar doesn't requires some of the indicated compile dependencies.
See 'Type of dependencies' for a documentation of what is a compile dependency.
Attributes | Description | Required |
artefact | The location of the jar file that must be analyzed. | True |
Nested Element | Description | Required |
path | The compile dependency path to check | True |
ignore | Package that doesn't need to be in the provided path. This is useful for packages that are part of the JDK standard library. It always contains 'java', but additional packages can be added. For simplicity all sub-packages are also ignored. | False |
The following example will fail the build if some jar in compile.path are not required to compile ${project.jar}.
The build will also fail if some classes required to compile ${project.jar} can not be found in compile.path (except that classes that are in javax.swing or any subpackage).
<target name="check-deps" depends="jar"> <deco:check-compile artefact="${project.jar}"> <path refid="compile.path"/> <ignore package="javax.swing"/> </deco:check-compile> </target>