Jump to: navigation, search

Difference between revisions of "MavenPlugin"

(Way 1: Add font for clouddocs-maven-plugin.)
(Way 1: Add font for clouddocs-maven-plugin.)
Line 162: Line 162:
  
 
'''End'''
 
'''End'''
[http://os.ujuc.kr/openstack-manuals/generated/ko_KR/basic-install/target/docbkx/webhelp/grizzly/basic-install/apt/openstack-basic-install-apt-grizzly.pdf View Korean font PDF]
+
''[http://os.ujuc.kr/openstack-manuals/generated/ko_KR/basic-install/target/docbkx/webhelp/grizzly/basic-install/apt/openstack-basic-install-apt-grizzly.pdf View Korean font PDF]'' broken
  
 
=== Way 2: Use local font. ===
 
=== Way 2: Use local font. ===

Revision as of 19:05, 21 October 2013


Way 1: Add font for clouddocs-maven-plugin.

Edit clouddocs-maven-plugin

Clone clouddocs-maven-plugin

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


Add font file at

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

My add

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


Edit

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

my edit '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>

Edit version name

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


OutPut

$ mvn clean install


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

Edit OpenStack Document 'pom.xml'

'os.ujuc.kr' is my test server address.

Original

     <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>


Edit

     <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>

End View Korean font PDF broken

Way 2: Use local font.