sp.createPathElement().setLocation(baseDir); } else { log(baseDir + " doesn\'t contain any packages, dropping it.",
sourcePath.createPathElement().setLocation(baseDir); } else { log.verbose(baseDir + " doesn't contain any packages, dropping it.");
pathElement.setLocation(classgendir);
javac.createSrc().createPathElement().setLocation(genstubs.destdir);
javac.createSrc().createPathElement().setLocation(genstubs.destdir);
path.createPathElement().setLocation((File) iter.next());
java.createClasspath().createPathElement().setLocation(app);
protected void addToPath(Path path, File f) throws Exception { if (!osgi || !f.isDirectory()) { path.createPathElement().setLocation(f); return; } File manifest = new File(f, "META-INF/MANIFEST.MF"); if (!manifest.exists()) { path.createPathElement().setLocation(f); return; } BundleInfo bundleInfo = ManifestParser.parseManifest(manifest); List/* <String> */cp = bundleInfo.getClasspath(); if (cp == null) { path.createPathElement().setLocation(f); return; } for (int i = 0; i < cp.size(); i++) { String p = (String) cp.get(i); if (p.equals(".")) { path.createPathElement().setLocation(f); } else { path.createPathElement().setLocation(new File(f, p)); } } }
private AntJavaExecutorThread execFishEyeCmd(String bootCommand, final Product ctx, boolean useDebugArgs) throws MojoExecutionException { final Map<String, String> properties = mergeSystemProperties(ctx); Java java = javaTaskFactory.newJavaTask( output(ctx.getOutput()). systemProperties(properties). jvmArgs(ctx.getJvmArgs() + (useDebugArgs ? ctx.getDebugArgs() : ""))); addOverridesToJavaTask(ctx, java); Path classpath = java.createClasspath(); classpath.createPathElement().setLocation(new File(getAppDirectory(ctx), "fisheyeboot.jar")); java.setClassname("com.cenqua.fisheye.FishEyeCtl"); java.createArg().setValue(bootCommand); AntJavaExecutorThread javaThread = new AntJavaExecutorThread(java); javaThread.start(); return javaThread; }
/** * {@inheritDoc} */ @Override public void addClasspathEntries(File... paths) { if (paths != null) { Path cp = this.java.createClasspath(); for (File path : paths) { cp.createPathElement().setLocation(path); } } }
private AntJavaExecutorThread execFishEyeCmd(String bootCommand, final Product ctx, boolean useDebugArgs) throws MojoExecutionException { final Map<String, String> properties = mergeSystemProperties(ctx); Java java = javaTaskFactory.newJavaTask( output(ctx.getOutput()). systemProperties(properties). jvmArgs(ctx.getJvmArgs() + (useDebugArgs ? ctx.getDebugArgs() : ""))); addOverridesToJavaTask(ctx, java); Path classpath = java.createClasspath(); classpath.createPathElement().setLocation(new File(getAppDirectory(ctx), "fisheyeboot.jar")); java.setClassname("com.cenqua.fisheye.FishEyeCtl"); java.createArg().setValue(bootCommand); AntJavaExecutorThread javaThread = new AntJavaExecutorThread(java); javaThread.start(); return javaThread; }
protected void appendArtifact(final Path classpath, final Artifact artifact) throws MojoExecutionException { assert classpath != null; assert artifact != null; File file = artifact.getFile(); if (file == null) { throw new MojoExecutionException("Artifact does not have an attached file: " + artifact); } classpath.createPathElement().setLocation(file); }
public void fillPathFromArtifacts(Path path, Collection<Artifact> elements) { if (elements == null || elements.isEmpty()) return; for (Artifact artifact : elements) { File file = artifact.getFile(); if (file != null) path.createPathElement().setLocation(file); } } }
/** * Resolve all files from a given path and simplify its definition. */ private org.apache.tools.ant.types.Path resolveFiles(org.apache.tools.ant.types.Path path) { org.apache.tools.ant.types.Path cloned = new org.apache.tools.ant.types.Path(getProject()); for (String location : path.list()) { cloned.createPathElement().setLocation(new File(location)); } return cloned; }
protected void appendArtifact(final Path classpath, final Artifact artifact) throws MojoExecutionException { assert classpath != null; assert artifact != null; File file = artifact.getFile(); if (file == null) { throw new MojoExecutionException("Artifact does not have an attached file: " + artifact); } classpath.createPathElement().setLocation(file); }
/** * Resolve all files from a given path and simplify its definition. */ private org.apache.tools.ant.types.Path resolveFiles(org.apache.tools.ant.types.Path path) { org.apache.tools.ant.types.Path cloned = new org.apache.tools.ant.types.Path(getProject()); for (String location : path.list()) { cloned.createPathElement().setLocation(new File(location)); } return cloned; }
public void fillPathFromLocations(Path path, Collection<File> elements) { if (elements == null || elements.isEmpty()) return; for (File location : elements) { path.createPathElement().setLocation(location); } }
javac.createSrc().createPathElement().setLocation(genstubs.destdir);
/** * Helper method to retrieve main class which is different from versions. * @param home the javacc home path directory. * @param type the taskdef. * @throws BuildException thrown if the home directory is invalid * or if the archive could not be found despite attempts to do so. * @return the main class for the taskdef. */ protected static String getMainClass(File home, int type) throws BuildException { Path p = new Path(null); p.createPathElement().setLocation(getArchiveFile(home)); p.addJavaRuntime(); return getMainClass(p, type); }
/** * Adds a element definition to the path. * @param location the location of the element to add (must not be * <code>null</code> nor empty. * @throws BuildException on error */ public void setLocation(File location) throws BuildException { checkAttributesAllowed(); createPathElement().setLocation(location); }