/** * Determine whether the bootclasspath has been specified, and whether it * shall really be used (build.sysclasspath could be set or the VM may not * support it). * * @param log whether to log a warning if a bootclasspath has been * specified but will be ignored. * @return true if the bootclasspath is to be used. * @since Ant 1.6 */ protected boolean haveBootclasspath(boolean log) { return calculateBootclasspath(log).size() > 0; }
public void execute() throws BuildException { if (taskClasspath==null || taskClasspath.size()==0) { throw new BuildException("no classpath given"); } Project project = getProject(); AntClassLoader loader = new AntClassLoader(makeRoot(),true); project.addReference(name,loader); }
private void addPath(String option, Path path) { if( path.size() == 0 ) return; addArg(option); addArg(path.toString()); } private List phaseopts = new ArrayList();
/** * Fulfill the ResourceCollection contract. * @return number of elements as int. */ @Override public synchronized int size() { if (isReference()) { return ((Path) getCheckedRef()).size(); } dieOnCircularReference(); return union == null ? 0 : assertFilesystemOnly(union).size(); }
if (calculateBootclasspath(true).size() > 0) { size++;
private void doBootPath(final Commandline toExecute) { Path bcp = new Path(getProject()); if (bootclasspath != null) { bcp.append(bootclasspath); } bcp = bcp.concatSystemBootClasspath("ignore"); if (bcp.size() > 0) { toExecute.createArgument().setValue("-bootclasspath"); toExecute.createArgument().setPath(bcp); } }
if (bcp.size() > 0) { listIterator.add("-Xbootclasspath:" + bcp.toString());
private void doDoclet(final Commandline toExecute) { if (doclet != null) { if (doclet.getName() == null) { throw new BuildException("The doclet name must be specified.", getLocation()); } toExecute.createArgument().setValue("-doclet"); toExecute.createArgument().setValue(doclet.getName()); if (doclet.getPath() != null) { final Path docletPath = doclet.getPath().concatSystemClasspath("ignore"); if (docletPath.size() != 0) { toExecute.createArgument().setValue("-docletpath"); toExecute.createArgument().setPath(docletPath); } } for (final DocletParam param : Collections.list(doclet.getParams())) { if (param.getName() == null) { throw new BuildException("Doclet parameters must have a name"); } toExecute.createArgument().setValue(param.getName()); if (param.getValue() != null) { toExecute.createArgument().setValue(param.getValue()); } } } }
if (classpath.size() > 0) { toExecute.createArgument().setValue("-classpath"); toExecute.createArgument().setPath(classpath);
private Commandline setupKaffehCommand(Javah javah) { Commandline cmd = new Commandline(); cmd.setExecutable(JavaEnvUtils.getJdkExecutable("kaffeh")); if (javah.getDestdir() != null) { cmd.createArgument().setValue("-d"); cmd.createArgument().setFile(javah.getDestdir()); } if (javah.getOutputfile() != null) { cmd.createArgument().setValue("-o"); cmd.createArgument().setFile(javah.getOutputfile()); } Path cp = new Path(javah.getProject()); if (javah.getBootclasspath() != null) { cp.append(javah.getBootclasspath()); } cp = cp.concatSystemBootClasspath("ignore"); if (javah.getClasspath() != null) { cp.append(javah.getClasspath()); } if (cp.size() > 0) { cmd.createArgument().setValue("-classpath"); cmd.createArgument().setPath(cp); } if (!javah.getOld()) { cmd.createArgument().setValue("-jni"); } cmd.addArguments(javah.getCurrentArgs()); javah.logAndAddFiles(cmd); return cmd; }
if (bcp.size() > 0) { cmd.createArgument().setValue("-bootclasspath"); cmd.createArgument().setPath(bcp);
private Commandline setupGcjhCommand(Javah javah) { Commandline cmd = new Commandline(); cmd.setExecutable(JavaEnvUtils.getJdkExecutable("gcjh")); if (javah.getDestdir() != null) { cmd.createArgument().setValue("-d"); cmd.createArgument().setFile(javah.getDestdir()); } if (javah.getOutputfile() != null) { cmd.createArgument().setValue("-o"); cmd.createArgument().setFile(javah.getOutputfile()); } Path cp = new Path(javah.getProject()); if (javah.getBootclasspath() != null) { cp.append(javah.getBootclasspath()); } cp = cp.concatSystemBootClasspath("ignore"); if (javah.getClasspath() != null) { cp.append(javah.getClasspath()); } if (cp.size() > 0) { cmd.createArgument().setValue("--classpath"); cmd.createArgument().setPath(cp); } if (!javah.getOld()) { cmd.createArgument().setValue("-jni"); } cmd.addArguments(javah.getCurrentArgs()); javah.logAndAddFiles(cmd); return cmd; }
if (sourcepath.size() > 0) { cmd.createArgument().setValue("-sourcepath"); cmd.createArgument().setPath(sourcepath);
if (t != null || s != null || getBootClassPath().size() > 0) { attributes.log( "Ignoring source, target and bootclasspath as release has been set",
/** * Checks if a path exists and is non empty. * @param path to be checked * @return true if the path is non <code>null</code> and non empty. * @since 1.9.8 */ private static boolean hasPath(final Path path) { return path != null && path.size() > 0; }
public String getFullClasspath() { String cp; if (bootclasspath == null) { cp = utility.getMidpApi(); // was: getEmptyApi() } else { cp = bootclasspath.toString(); } if ((classpath != null) && (classpath.size() > 0)) { cp = cp + File.pathSeparatorChar + classpath; } return cp; }
public void execute() throws BuildException { if (taskClasspath==null || taskClasspath.size()==0) { throw new BuildException("no classpath given"); } Project project = getProject(); AntClassLoader loader = new AntClassLoader(makeRoot(),true); project.addReference(name,loader); }
public void execute() throws BuildException { if (taskClasspath==null || taskClasspath.size()==0) { throw new BuildException("no classpath given"); } Project project = getProject(); AntClassLoader loader = new AntClassLoader(makeRoot(),true); project.addReference(name,loader); }
public void execute() throws BuildException { if (taskClasspath==null || taskClasspath.size()==0) { throw new BuildException("no classpath given"); } Project project = getProject(); AntClassLoader loader = new AntClassLoader(makeRoot(),true); project.addReference(name,loader); }
public void execute() throws BuildException { if (taskClasspath==null || taskClasspath.size()==0) { throw new BuildException("no classpath given"); } Project project = getProject(); AntClassLoader loader = new AntClassLoader(makeRoot(),true); project.addReference(name,loader); }