如何在Java中将差异输出转换为HTML?

如何在Java中将差异输出转换为HTML?,java,diff,Java,Diff,是否有任何库(Maven Central中提供)可以将diff输出转换为HTML?或者,也许更好,比较两个文本并生成它们的差异的HTML输出。检查演示,看看它是否适合您。将此存储库添加到您的pom.xml: <repository> <id>google-diff-patch-match</id> <name>google-diff-patch-match</name> <url>https://google-d

是否有任何库(Maven Central中提供)可以将
diff
输出转换为HTML?或者,也许更好,比较两个文本并生成它们的差异的HTML输出。

检查演示,看看它是否适合您。

将此存储库添加到您的
pom.xml

<repository>
  <id>google-diff-patch-match</id>
  <name>google-diff-patch-match</name>
  <url>https://google-diff-match-patch.googlecode.com/svn/trunk/maven/</url>
</repository>

谷歌差异补丁匹配
谷歌差异补丁匹配
https://google-diff-match-patch.googlecode.com/svn/trunk/maven/

我在想如何使我的项目可用时遇到了很多麻烦

通过在pom.xml中添加以下行,我终于实现了这一点:

<project.. >
  ..
  <repositories>
    ..
    <repository>
      <id>google-diff-patch-match</id>
      <name>google-diff-patch-match</name>
      <url>https://google-diff-match-patch.googlecode.com/svn/trunk/maven/</url>
    </repository>
  </repositories>
  ..
  <dependencies>
    ..
    <dependency>
      <groupId>diff_match_patch</groupId>
      <artifactId>diff_match_patch</artifactId>
      <version>current</version>
    </dependency>

..
..
谷歌差异补丁匹配
谷歌差异补丁匹配
https://google-diff-match-patch.googlecode.com/svn/trunk/maven/
..
..
差异匹配补丁
差异匹配补丁
现在的

据我所知,它不在Maven Central中:(@yegor256似乎不在。不过,你可以在你的公司中部署。我找到了google diff补丁匹配。但是如何生成html报告?我找不到与html相关的代码。