/html-to-xhtml-maven-plugin

A maven plugin converting HTML file to XHTML file

Primary LanguageJavaMIT LicenseMIT

Maven Central Latest CI

HTML To XHTML Maven Plugin

<build>
  <plugins>
    <plugin>
      <groupId>com.cosium.html</groupId>
      <artifactId>html-to-xhtml-maven-plugin</artifactId>
      <version>${html-to-xhtml-maven-plugin.version}</version>
      <executions>
        <!-- On Maven generate-resources phase, convert ${project.basedir}/example.html to  ${project.build.outputDirectory}/example.xhtml -->
        <execution>
          <id>convert-html-to-xhtml</id>
          <goals>
            <goal>html-to-xhtml</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <conversions>
          <conversion>
            <htmlInputFilePath>${project.basedir}/example.html</htmlInputFilePath>
            <xhtmlOutputFilePath>${project.build.outputDirectory}/example.xhtml</xhtmlOutputFilePath>
            <!--Optional-->
            <encoding>UTF-8</encoding>
            <tagElementToWrapDocumentIn>div</tagElementToWrapDocumentIn>
          </conversion>
        </conversions>
      </configuration>
    </plugin>
  </plugins>
</build>