- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.palantir.gradle.circlestyle.XmlUtils
类的一些代码示例,展示了XmlUtils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtils
类的具体详情如下:
包路径:com.palantir.gradle.circlestyle.XmlUtils
类名称:XmlUtils
暂无
代码示例来源:origin: gradle.plugin.com.palantir/gradle-circle-style
@Override
public void execute(BuildResult result) {
String name = (container != null) ? "container " + container : "gradle";
Report report = new Report.Builder()
.name(name)
.subname(name)
.elapsedTimeNanos(System.nanoTime() - startTimeNanos)
.addAllTestCases(failureListener.getTestCases())
.build();
Document xml = reportToXml(report);
targetFile.getParentFile().mkdirs();
try (FileWriter writer = new FileWriter(targetFile)) {
XmlUtils.write(writer, xml);
} catch (IOException | TransformerException e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: palantir/gradle-baseline
@Override
public List<Failure> getFailures() throws IOException {
File sourceReport = reporting.getReports().findByName("xml").getDestination();
return XmlUtils.parseXml(reportHandler, new FileInputStream(sourceReport)).failures();
}
代码示例来源:origin: palantir/gradle-circle-style
@Override
public void execute(BuildResult result) {
String name = (container != null) ? "container " + container : "gradle";
Report report = new Report.Builder()
.name(name)
.subname(name)
.elapsedTimeNanos(System.nanoTime() - startTimeNanos)
.addAllTestCases(failureListener.getTestCases())
.build();
Document xml = reportToXml(report);
targetFile.getParentFile().mkdirs();
try (FileWriter writer = new FileWriter(targetFile)) {
XmlUtils.write(writer, xml);
} catch (IOException | TransformerException e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: palantir/gradle-circle-style
@Override
public List<Failure> getFailures() throws IOException {
File sourceReport = reporting.getReports().findByName("xml").getDestination();
return parseXml(reportHandler, new FileInputStream(sourceReport)).failures();
}
}
代码示例来源:origin: com.palantir.baseline/gradle-circle-style
@Override
public void execute(BuildResult result) {
String name = (container != null) ? "container " + container : "gradle";
Report report = new Report.Builder()
.name(name)
.subname(name)
.elapsedTimeNanos(System.nanoTime() - startTimeNanos)
.addAllTestCases(failureListener.getTestCases())
.build();
Document xml = JUnitReportCreator.reportToXml(report);
try {
Files.createDirectories(targetFile.getParent());
} catch (IOException e) {
throw new RuntimeException(e);
}
try (Writer writer = Files.newBufferedWriter(targetFile, StandardCharsets.UTF_8)) {
XmlUtils.write(writer, xml);
} catch (IOException | TransformerException e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: com.palantir.baseline/gradle-circle-style
@Override
public List<Failure> getFailures() throws IOException {
File sourceReport = reporting.getReports().findByName("xml").getDestination();
return XmlUtils.parseXml(reportHandler, new FileInputStream(sourceReport)).failures();
}
代码示例来源:origin: palantir/gradle-baseline
@Override
public void execute(BuildResult result) {
String name = (container != null) ? "container " + container : "gradle";
Report report = new Report.Builder()
.name(name)
.subname(name)
.elapsedTimeNanos(System.nanoTime() - startTimeNanos)
.addAllTestCases(failureListener.getTestCases())
.build();
Document xml = JUnitReportCreator.reportToXml(report);
try {
Files.createDirectories(targetFile.getParent());
} catch (IOException e) {
throw new RuntimeException(e);
}
try (Writer writer = Files.newBufferedWriter(targetFile, StandardCharsets.UTF_8)) {
XmlUtils.write(writer, xml);
} catch (IOException | TransformerException e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: palantir/gradle-circle-style
@Test
public void testNoErrors() throws IOException {
List<Failure> failures =
parseXml(new CheckstyleReportHandler(), testFile("no-failures-checkstyle.xml").openStream())
.failures();
assertThat(failures).isEmpty();
}
代码示例来源:origin: palantir/gradle-baseline
@Test
public void testTwoErrors() throws TransformerException {
Document junitReport = reportToXml(REPORT);
String xml = XmlUtils.write(new StringWriter(), junitReport).toString()
.replaceAll("\\p{Blank}*(?=<)", "");
assertThat(xml).isEqualTo(readTestFile("two-namecheck-failures-checkstyle-report.xml"));
}
}
代码示例来源:origin: palantir/gradle-baseline
@Test
public void testNoErrors() throws IOException {
List<Failure> failures =
parseXml(new CheckstyleReportHandler(), testFile("no-failures-checkstyle.xml").openStream())
.failures();
assertThat(failures).isEmpty();
}
代码示例来源:origin: palantir/gradle-circle-style
@Test
public void testTwoErrors() throws TransformerException {
Document junitReport = reportToXml(REPORT);
String xml = XmlUtils.write(new StringWriter(), junitReport).toString();
assertThat(xml).isEqualTo(readTestFile("two-namecheck-failures-checkstyle-report.xml"));
}
}
代码示例来源:origin: palantir/gradle-circle-style
@Test
public void testNoErrors() throws IOException {
List<Failure> failures =
parseXml(new FindBugsReportHandler(), testFile("no-errors-findbugs.xml").openStream()).failures();
assertThat(failures).isEmpty();
}
代码示例来源:origin: palantir/gradle-circle-style
@TaskAction
public void createCircleReport() throws IOException, TransformerException {
if (!styleTask.getDidWork()) {
setDidWork(false);
return;
}
File rootDir = getProject().getRootProject().getProjectDir();
String projectName = getProject().getName();
List<Failure> failures = failuresSupplier.getFailures();
long taskTimeNanos = styleTaskTimer.getTaskTimeNanos(styleTask);
Document report = reportToXml(failuresReport(
rootDir, projectName, styleTask.getName(), taskTimeNanos, failures));
targetFile.getParentFile().mkdirs();
try (FileWriter writer = new FileWriter(targetFile)) {
XmlUtils.write(writer, report);
}
}
}
代码示例来源:origin: palantir/gradle-circle-style
/** @see <a href="https://github.com/palantir/gradle-circle-style/issues/7">Issue 7</a> */
@Test
public void testSyntheticSourceLine() throws IOException {
parseXml(new FindBugsReportHandler(), testFile("synthetic-sourceline-findbugs.xml").openStream());
}
}
代码示例来源:origin: gradle.plugin.com.palantir/gradle-circle-style
@TaskAction
public void createCircleReport() throws IOException, TransformerException {
if (!styleTask.getDidWork()) {
setDidWork(false);
return;
}
File rootDir = getProject().getRootProject().getProjectDir();
String projectName = getProject().getName();
File sourceReport = reporting.getReports().findByName("xml").getDestination();
List<Failure> failures = reportParser.loadFailures(new FileInputStream(sourceReport));
long taskTimeNanos = styleTaskTimer.getTaskTimeNanos(styleTask);
Document report = reportToXml(failuresReport(
rootDir, projectName, styleTask.getName(), taskTimeNanos, failures));
targetFile.getParentFile().mkdirs();
try (FileWriter writer = new FileWriter(targetFile)) {
XmlUtils.write(writer, report);
}
}
}
代码示例来源:origin: palantir/gradle-circle-style
@Test
public void testTwoErrors() throws IOException {
List<Failure> failures =
parseXml(new CheckstyleReportHandler(), testFile("two-namecheck-failures-checkstyle.xml").openStream())
.failures();
assertThat(failures).containsExactlyElementsOf(CHECKSTYLE_FAILURES);
}
}
代码示例来源:origin: palantir/gradle-baseline
targetFile.getParentFile().mkdirs();
try (Writer writer = Files.newBufferedWriter(targetFile.toPath(), StandardCharsets.UTF_8)) {
XmlUtils.write(writer, report);
代码示例来源:origin: palantir/gradle-baseline
@Test
public void testTwoErrors() throws IOException {
List<Failure> failures =
parseXml(new CheckstyleReportHandler(), testFile("two-namecheck-failures-checkstyle.xml").openStream())
.failures();
assertThat(failures).containsExactlyElementsOf(CHECKSTYLE_FAILURES);
}
}
代码示例来源:origin: com.palantir.baseline/gradle-circle-style
targetFile.getParentFile().mkdirs();
try (Writer writer = Files.newBufferedWriter(targetFile.toPath(), StandardCharsets.UTF_8)) {
XmlUtils.write(writer, report);
代码示例来源:origin: palantir/gradle-circle-style
@Test
public void testTwoErrors() throws IOException {
List<Failure> failures =
parseXml(new FindBugsReportHandler(), testFile("two-exit-errors-findbugs.xml").openStream()).failures();
assertThat(failures).containsExactlyElementsOf(FINDBUGS_FAILURES);
}
无法弄清楚为什么 XMLUtils.outputDOM 没有输出任何内容 import org.apache.xml.security.utils.XMLUtils; DocumentBuilderF
我正在使用 XmlUtils 解析并提取列表中 id 属性的值,但它返回空。 我哪里出错了?请推荐 XML:
本文整理了Java中org.metawidget.util.XmlUtils.getSiblingWithAttribute()方法的一些代码示例,展示了XmlUtils.getSiblingWith
本文整理了Java中org.metawidget.util.XmlUtils.inspectionResultToJsonSchema()方法的一些代码示例,展示了XmlUtils.inspectio
本文整理了Java中org.metawidget.util.XmlUtils.getChildWithAttributeValue()方法的一些代码示例,展示了XmlUtils.getChildWit
本文整理了Java中org.metawidget.util.XmlUtils.newDocument()方法的一些代码示例,展示了XmlUtils.newDocument()的具体用法。这些代码示例主
本文整理了Java中org.metawidget.util.XmlUtils.setMapAsAttributes()方法的一些代码示例,展示了XmlUtils.setMapAsAttributes(
本文整理了Java中org.metawidget.util.XmlUtils.getFirstChildElement()方法的一些代码示例,展示了XmlUtils.getFirstChildElem
本文整理了Java中org.metawidget.util.XmlUtils.getNextSiblingElement()方法的一些代码示例,展示了XmlUtils.getNextSiblingEl
本文整理了Java中org.metawidget.util.XmlUtils.arrayToJsonSchema()方法的一些代码示例,展示了XmlUtils.arrayToJsonSchema()的
本文整理了Java中org.metawidget.util.XmlUtils.escapeForXml()方法的一些代码示例,展示了XmlUtils.escapeForXml()的具体用法。这些代码示
本文整理了Java中org.metawidget.util.XmlUtils.getLocalName()方法的一些代码示例,展示了XmlUtils.getLocalName()的具体用法。这些代码示
本文整理了Java中org.metawidget.util.XmlUtils.getChildWithAttribute()方法的一些代码示例,展示了XmlUtils.getChildWithAttr
本文整理了Java中org.metawidget.util.XmlUtils.importElement()方法的一些代码示例,展示了XmlUtils.importElement()的具体用法。这些代
本文整理了Java中org.metawidget.util.XmlUtils.combineElements()方法的一些代码示例,展示了XmlUtils.combineElements()的具体用法
本文整理了Java中org.metawidget.util.XmlUtils.getAttributesAsMap()方法的一些代码示例,展示了XmlUtils.getAttributesAsMap(
本文整理了Java中org.metawidget.util.XmlUtils.documentFromString()方法的一些代码示例,展示了XmlUtils.documentFromString(
本文整理了Java中org.metawidget.util.XmlUtils.documentToString()方法的一些代码示例,展示了XmlUtils.documentToString()的具体
本文整理了Java中org.intermine.util.XmlUtil.getFragmentFromURI()方法的一些代码示例,展示了XmlUtil.getFragmentFromURI()的具
本文整理了Java中org.intermine.util.XmlUtil.writeIndentation()方法的一些代码示例,展示了XmlUtil.writeIndentation()的具体用法。
我是一名优秀的程序员,十分优秀!