跳转到: 导航, 搜索

MavenPlugin


方法 1:为 clouddocs-maven-plugin 添加字体。

编辑 clouddocs-maven-plugin

克隆 clouddocs-maven-plugin

$ git clone https://github.com/stackforge/clouddocs-maven-plugin


在以下位置添加字体文件

clouddocs-maven-plugin/src/main/resources/fonts/

我的添加

clouddocs-maven-plugin/src/main/resources/fonts/nanum-font/


编辑
 clouddocs-maven-plugin/src/main/resources/cloud/fo/docbook.xsl

我的编辑 'ko', 'ko_KR'

  <xsl:param name="rackspace.font">
    <xsl:choose>
      <xsl:when test="starts-with(/*/@xml:lang, 'zh')">AR-PL-New-Sung</xsl:when>
      <xsl:when test="starts-with(/*/@xml:lang, 'ja')">TakaoGothic</xsl:when>
      <xsl:when test="starts-with(/*/@xml:lang, 'ko')">NanumGothic</xsl:when>
      <xsl:when test="starts-with(/*/@xml:lang, 'ko_KR')">NanumGothic</xsl:when>
      <xsl:otherwise>CartoGothic Std</xsl:otherwise>
    </xsl:choose>
  </xsl:param>

  <xsl:param name="monospace.font.family">
    <xsl:choose>
      <xsl:when test="starts-with(/*/@xml:lang, 'zh')">AR-PL-New-Sung</xsl:when>
      <xsl:when test="starts-with(/*/@xml:lang, 'ja')">TakaoGothic</xsl:when>
      <xsl:when test="starts-with(/*/@xml:lang, 'ko')">NanumGothicCoding</xsl:when>
      <xsl:when test="starts-with(/*/@xml:lang, 'ko_KR')">NanumGothicCoding</xsl:when>
      <xsl:otherwise>monospace</xsl:otherwise>
    </xsl:choose>
  </xsl:param>


编辑版本名称

clouddocs-maven-plugin/pom.xml
<version>1.9.4-SNAPSHOT-ko</version>


输出

$ mvn clean install


添加 'clouddocs-maven-plugn/target/clouddocs-maven-plugin-1.9.4-SNAPSHOT-ko.pom'

  • 复制 1.9.4-***.pom
  • 编辑 '<version>1.9.4-SNAPSHOT</version>' -> '<version>1.9.4-SNAPSHOT-ko</version>

编辑 OpenStack 文档 'pom.xml'

'os.ujuc.kr' 是我的测试服务器地址。

原始

     <id>Rackspace Research Repositories</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>rackspace-research</id>
          <name>Rackspace Research Repository</name>
          <url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>rackspace-research</id>
          <name>Rackspace Research Repository</name>
          <url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
       </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <build>
    <resources>
      <resource>
        <directory>target/docbkx/pdf</directory>
        <excludes>
          <exclude>**/*.fo</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>

      <plugin>
        <groupId>com.rackspace.cloud.api</groupId>
        <artifactId>clouddocs-maven-plugin</artifactId>
        <version>1.8.1-SNAPSHOT</version>
        <executions>
          <execution>
            <id>goal1</id>
            <goals>


编辑

     <id>Korea team</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>korea-team</id>
          <name>Korea team</name>
          <url>http://os.ujuc.kr/clouddocs-maven-plugin/target/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>korea-team</id>
          <name>Korea team</name>
          <url>http://os.ujuc.kr/clouddocs-maven-plugin/target/</url>
       </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <build>
    <resources>
      <resource>
        <directory>target/docbkx/pdf</directory>
        <excludes>
          <exclude>**/*.fo</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>

      <plugin>
        <groupId>com.rackspace.cloud.api</groupId>
        <artifactId>clouddocs-maven-plugin</artifactId>
        <!-- <version>1.8.1-SNAPSHOT</version> -->
        <version>1.9.4-SNAPSHOT-ko</version>
        <executions>
          <execution>
            <id>goal1</id>
            <goals>

结束 查看韩文字体 PDF 损坏

方法 2:使用本地字体。