forked from yusuke/multilingual-javadoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
113 lines (113 loc) · 3.8 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.homeip.yusuke</groupId>
<artifactId>multilingual-javadoc</artifactId>
<packaging>jar</packaging>
<name>multilingual-javadoc</name>
<version>0.1</version>
<url>http://yusuke.homeip.net/blog/</url>
<licenses>
<license>
<name>Creative Commons - BY</name>
<url>http://creativecommons.org/licenses/by/3.0/</url>
<distribution>manual</distribution>
</license>
</licenses>
<description>A template project illustrates how to localize JavaDoc</description>
<issueManagement>
<system>github</system>
<url>http://github.com/yusuke/multilingual-javadoc/issues</url>
</issueManagement>
<scm>
<connection>git://github.com/yusuke/multilingual-javadoc.git</connection>
<url>git://github.com/yusuke/multilingual-javadoc.git</url>
</scm>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<source>1.5</source>
<target>jsr14</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<stylesheetfile>${basedir}/mystylesheet.css</stylesheetfile>
<charset>UTF-8</charset>
<header><![CDATA[
<script>
function change(){
var supportedLang = ["en", "ja"];
var browserLang;
if(document.all){
browserLang = navigator.browserLanguage;
} else if(document.layers){
browserLang = navigator.language;
} else if(document.getElementById){
browserLang = navigator.language.substr(0,2);
}
var lang = supportedLang[0];
for(var i=0; i < supportedLang.length; i++){
if(supportedLang[i] == browserLang){
lang = browserLang;
break;
}
}
if(document.styleSheets[0]){
var rules = document.styleSheets[0].cssRules;
if(!rules){
rules = document.styleSheets[0].rules;
}
for(var i=0; i< rules.length;i++){
if(rules[i].selectorText.length == 3){
if(rules[i].selectorText == "."+lang){
rules[i].style.display = "block";
}else{
rules[i].style.display = "none";
}
}
}
}
}
window.onload=change;
</script>
]]></header>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>