本文整理了Java中org.apache.tools.ant.types.Path.setPath()
方法的一些代码示例,展示了Path.setPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.setPath()
方法的具体详情如下:
包路径:org.apache.tools.ant.types.Path
类名称:Path
方法名:setPath
[英]Parses a path definition and creates single PathElements.
[中]解析路径定义并创建单个PathElements。
代码示例来源:origin: org.apache.ant/ant
containingPath.setPath(attributeValue);
} else if (containingPath != null
&& container instanceof Path && REF_ID.equals(nodeName)) {
containingPath.setPath(attributeValue);
} else if (containingPath != null && container instanceof Path
&& LOCATION.equals(nodeName)) {
代码示例来源:origin: org.patterntesting/patterntesting-tools
* With this method you can add different source dirs for compiling.
*
* @param dirname the name of the directory
* @since 1.0
*/
public void addSrcdir(final String dirname) {
super.createSrc().setPath(dirname);
}
/**
代码示例来源:origin: org.bluestemsoftware.open.maven.tparty/jsp-2.1
public void setExtdirs(String exts) {
Path extdirs = new Path(project);
extdirs.setPath(exts);
javac.setExtdirs(extdirs);
info.append(" extdirs=" + exts+ "\n");
}
代码示例来源:origin: org.tinygroup/org.tinygroup.jspengine
public void setExtdirs(String exts) {
Path extdirs = new Path(project);
extdirs.setPath(exts);
javac.setExtdirs(extdirs);
info.append(" extdirs=" + exts + "\n");
}
代码示例来源:origin: org.apache.maven/maven-script-ant
public Path getPathFromArtifacts( Collection artifacts,
Project antProject )
throws DependencyResolutionRequiredException
{
List list = new ArrayList( artifacts.size() );
for ( Iterator i = artifacts.iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
File file = a.getFile();
if ( file == null )
{
throw new DependencyResolutionRequiredException( a );
}
list.add( file.getPath() );
}
Path p = new Path( antProject );
p.setPath( StringUtils.join( list.iterator(), File.pathSeparator ) );
return p;
}
代码示例来源:origin: org.apache.maven.plugin-tools/maven-script-ant
public Path getPathFromArtifacts( Collection<Artifact> artifacts, Project antProject )
throws DependencyResolutionRequiredException
{
List<String> list = new ArrayList<>( artifacts.size() );
for ( Artifact a : artifacts )
{
File file = a.getFile();
if ( file == null )
{
throw new DependencyResolutionRequiredException( a );
}
list.add( file.getPath() );
}
Path p = new Path( antProject );
p.setPath( StringUtils.join( list.iterator(), File.pathSeparator ) );
return p;
}
代码示例来源:origin: orctom/was-maven-plugin
private static Path getPathFromArtifacts(Collection<Artifact> artifacts, Project antProject)
throws DependencyResolutionRequiredException {
if (artifacts == null) {
return new Path(antProject);
}
List<String> list = new ArrayList<String>(artifacts.size());
for (Artifact a : artifacts) {
File file = a.getFile();
if (file == null) {
throw new DependencyResolutionRequiredException(a);
}
list.add(file.getPath());
}
Path p = new Path(antProject);
p.setPath(StringUtils.join(list.iterator(), File.pathSeparator));
return p;
}
代码示例来源:origin: org.kuali.maven.common/maven-kuali-common
/**
* @param artifacts
* @param antProject
* @return a path
* @throws DependencyResolutionRequiredException
*/
public Path getPathFromArtifacts(Collection<Artifact> artifacts, Project antProject)
throws DependencyResolutionRequiredException {
if (artifacts == null) {
return new Path(antProject);
}
List<String> list = new ArrayList<String>(artifacts.size());
for (Iterator<?> i = artifacts.iterator(); i.hasNext();) {
Artifact a = (Artifact) i.next();
File file = a.getFile();
if (file == null) {
throw new DependencyResolutionRequiredException(a);
}
list.add(file.getPath());
}
Path p = new Path(antProject);
p.setPath(StringUtils.join(list.iterator(), File.pathSeparator));
return p;
}
代码示例来源:origin: org.apache.maven.plugins/maven-antrun-plugin
/**
* @param artifacts {@link Artifact} collection.
* @param antProject {@link Project}
* @return {@link Path}
* @throws DependencyResolutionRequiredException In case of a failure.
*
*/
public Path getPathFromArtifacts( Collection<Artifact> artifacts, Project antProject )
throws DependencyResolutionRequiredException
{
if ( artifacts == null )
{
return new Path( antProject );
}
List<String> list = new ArrayList<String>( artifacts.size() );
for ( Artifact a : artifacts )
{
File file = a.getFile();
if ( file == null )
{
throw new DependencyResolutionRequiredException( a );
}
list.add( file.getPath() );
}
Path p = new Path( antProject );
p.setPath( StringUtils.join( list.iterator(), File.pathSeparator ) );
return p;
}
代码示例来源:origin: org.kuali.maven.common/maven-kuali-common
/**
* Create the Ant equivalent of the Maven classpath's for compile, runtime, test, and for the plugin
*/
public Map<String, Path> getPathRefs(Project ant, MavenProject mvn, List<Artifact> pluginArtifacts)
throws DependencyResolutionRequiredException {
Map<String, Path> pathRefs = new HashMap<String, Path>();
// compile
Path mcp = new Path(ant);
mcp.setPath(StringUtils.join(mvn.getCompileClasspathElements().iterator(), File.pathSeparator));
pathRefs.put(MVN_COMPILE_CLASSPATH_KEY, mcp);
// runtime
Path mrp = new Path(ant);
mrp.setPath(StringUtils.join(mvn.getRuntimeClasspathElements().iterator(), File.pathSeparator));
pathRefs.put(MVN_RUNTIME_CLASSPATH_KEY, mrp);
// test
Path mtp = new Path(ant);
mtp.setPath(StringUtils.join(mvn.getTestClasspathElements().iterator(), File.pathSeparator));
pathRefs.put(MVN_TEST_CLASSPATH_KEY, mtp);
// plugin
Path mpp = getPathFromArtifacts(pluginArtifacts, ant);
pathRefs.put(MVN_PLUGIN_CLASSPATH_KEY, mpp);
return pathRefs;
}
代码示例来源:origin: org.codehaus.groovy/groovy-ant
if (classpath != null) {
path = super.createClasspath();
path.setPath(classpath.toString());
path.setPath(System.getProperty("java.class.path"));
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
if (classpath != null) {
path = super.createClasspath();
path.setPath(classpath.toString());
path.setPath(System.getProperty("java.class.path"));
代码示例来源:origin: org.kohsuke.droovy/groovy
if (classpath != null) {
path = super.createClasspath();
path.setPath(classpath.toString());
path.setPath(System.getProperty("java.class.path"));
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
if (classpath != null) {
path = super.createClasspath();
path.setPath(classpath.toString());
path.setPath(System.getProperty("java.class.path"));
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
if (classpath != null) {
path = super.createClasspath();
path.setPath(classpath.toString());
path.setPath(System.getProperty("java.class.path"));
代码示例来源:origin: net.sourceforge.cobertura/cobertura
String classpath = ((AntClassLoader) getClass()
.getClassLoader()).getClasspath();
createClasspath().setPath(
StringUtil.replaceAll(classpath, "%20", " "));
} else if (getClass().getClassLoader() instanceof URLClassLoader) {
String classpath = (new File(earls[i].getFile()))
.getAbsolutePath();
createClasspath().setPath(
StringUtil.replaceAll(classpath, "%20", " "));
代码示例来源:origin: stackoverflow.com
fbtask.setAuxClasspath(task.getClasspath());
Path destPath = new Path( task.getProject() );
destPath.setPath(task.getDestdir().getAbsolutePath());
fbtask.setAuxAnalyzepath(destPath);
fbtask.setOutputFile(getFileName(task.getProject()));
代码示例来源:origin: orctom/was-maven-plugin
p.setPath(StringUtils.join(project.getCompileClasspathElements().iterator(), File.pathSeparator));
p.setPath(StringUtils.join(project.getRuntimeClasspathElements().iterator(), File.pathSeparator));
antProject.addReference("maven.runtime.classpath", p);
p.setPath(StringUtils.join(project.getTestClasspathElements().iterator(), File.pathSeparator));
antProject.addReference("maven.test.classpath", p);
代码示例来源:origin: maven/maven
/**
* Initialize Ant.
* @param project a Maven project
* @param context the maven context whose properties will be available to the Ant Project
* @return an Ant project
*/
public static GrantProject build( final Project project, final MavenJellyContext context )
{
// Create the build listener.
JellyBuildListener buildListener = new JellyBuildListener( context.getXMLOutput() );
buildListener.setDebug( context.getDebugOn().booleanValue() );
buildListener.setEmacsMode( context.getEmacsModeOn().booleanValue() );
// Create our ant project.
GrantProject antProject = new GrantProject();
antProject.setPropsHandler( new JellyPropsHandler( context ) );
antProject.init();
antProject.setBaseDir( project.getFile().getParentFile().getAbsoluteFile() );
antProject.addBuildListener( buildListener );
context.setAntProject( antProject );
AntTagLibrary.setProject( context, antProject );
Path p = new Path( antProject );
p.setPath( project.getDependencyClasspath() );
antProject.addReference( MavenConstants.DEPENDENCY_CLASSPATH, p );
return antProject;
}
}
代码示例来源:origin: org.codehaus.castor/castor-testsuite-xml-framework
classpath.setPath(System.getProperty("java.class.path"));
classpath.add(new Path(project, destDir.getAbsolutePath()));
compiler.setClasspath(classpath);
内容来源于网络,如有侵权,请联系作者删除!