本文整理了Java中org.apache.tools.ant.Project.addTarget()
方法的一些代码示例,展示了Project.addTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.addTarget()
方法的具体详情如下:
包路径:org.apache.tools.ant.Project
类名称:Project
方法名:addTarget
[英]Add a new target to the project.
[中]将新目标添加到项目中。
代码示例来源:origin: org.apache.ant/ant
/**
* Add a <em>new</em> target to the project.
*
* @param target The target to be added to the project.
* Must not be <code>null</code>.
*
* @exception BuildException if the target already exists in the project
*
* @see Project#addOrReplaceTarget(Target)
*/
public void addTarget(final Target target) throws BuildException {
addTarget(target.getName(), target);
}
代码示例来源:origin: org.apache.ant/ant
helperImpl.project.addTarget("", helperImpl.implicitTarget);
代码示例来源:origin: org.apache.ant/ant
target.setUnless(unlessCond);
target.setDescription(description);
helperImpl.project.addTarget(name, target);
代码示例来源:origin: org.apache.ant/ant
project.addTarget("", context.getImplicitTarget());
context.setCurrentTarget(context.getImplicitTarget());
代码示例来源:origin: stackoverflow.com
Project project = new Project();
project.setName("myproject");
project.init();
Target target = new Target();
target.setName("junitreport");
project.addTarget(target);
FileSet fs = new FileSet();
fs.setDir(new File("./junitreports"));
fs.createInclude().setName("*.xml");
XMLResultAggregator aggregator = new XMLResultAggregator();
aggregator.setProject(project);
aggregator.addFileSet(fs);
AggregateTransformer transformer = aggregator.createReport();
transformer.setTodir(new File("./testreport"));
target.addTask(aggregator);
project.executeTarget("junitreport");
代码示例来源:origin: stackoverflow.com
target.setName("ziptarget");
target.addTask(zip);
project.addTarget(target);
project.executeTarget("ziptarget");
代码示例来源:origin: org.gosu-lang.aardvark/aardvark-core
camelcaseTarget.setName(rawTargetName);
camelcaseTarget.addDependency(hyphenatedTargetName);
project.addTarget(camelcaseTarget);
project.addTarget(target);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui
@Override
public void onStartElement(String uri, String tag, String qname, Attributes attrs, AntXMLContext context) {
try {
super.onStartElement(uri, tag, qname, attrs, context);
}
catch (SAXParseException e) {
getAntModel().error(e);
}
catch (BuildException be) {
getAntModel().error(be);
}
if (context.getCurrentTarget() == null) {
// exception occurred creating the project
context.getProject().addTarget(IAntCoreConstants.EMPTY_STRING, context.getImplicitTarget());
context.setCurrentTarget(context.getImplicitTarget());
}
if (currentImportStackSize == 1) {
Locator locator = context.getLocator();
getAntModel().addProject(context.getProject(), locator.getLineNumber(), locator.getColumnNumber());
}
}
代码示例来源:origin: org.codehaus.izpack/izpack-event
antProj.addTarget(target);
System.setOut(new PrintStream(new DemuxOutputStream(antProj, false)));
System.setErr(new PrintStream(new DemuxOutputStream(antProj, true)));
代码示例来源:origin: stackoverflow.com
target.addTask(task);
target.setProject(p);
p.addTarget(target);
内容来源于网络,如有侵权,请联系作者删除!