summaryrefslogtreecommitdiffstats
blob: 6a3ff85265c291c5042a05f4b00115f558d4e655 (plain)
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
114
115
116
117
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>org.eclipse.mylyn.docs-parent</artifactId>
    <groupId>org.eclipse.mylyn.docs</groupId>
    <version>2.3.0-SNAPSHOT</version>
  </parent>
  <artifactId>org.eclipse.mylyn.wikitext.help.ui</artifactId>
  <version>2.3.0-SNAPSHOT</version>
  <packaging>eclipse-plugin</packaging>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <configuration>
              <target>
              
                <!-- Generate help docs -->

                <taskdef resource="org/eclipse/mylyn/wikitext/core/ant/tasks.properties" />

                <wikitext-to-eclipse-help markupLanguage="org.eclipse.mylyn.wikitext.textile.core.TextileLanguage" 
                                          multipleOutputFiles="true"
                                          navigationImages="true"
                                          helpPrefix="help">
                  <fileset dir="help" includes="**/*.textile"/>
                  <stylesheet url="book.css"/>
                  <stylesheet file="${basedir}/help/styles/main.css"/>
                </wikitext-to-eclipse-help>

                <!-- Verify generated docs -->

                <echo level="info">
                  Validating help content XML and HTML files: The Eclipse help system expects well-formed XML
                  
                  If validation fails it is because either:
                  
                  * the userguide source code is poorly formed, or
                  * the WikiText MediaWiki parser has a bug
                  
                  Problems with userguide source are usually caused by improper use of HTML markup in the MediaWiki source,
                  or inadvertently starting a line with a space character (in MediaWiki this starts a preformatted block)
                </echo>

                <!-- 
                   Don't bother with DTD validation: we only care if the files are well-formed.
                   We therefore provide an empty DTD 
                  -->
                <mkdir dir="__tmp"/>
                <echo file="__tmp/__empty.dtd" message=""/>
                <xmlvalidate lenient="true">
                  <fileset dir="help">
                    <include name="**/*.xml"/>
                  </fileset>
                  <fileset dir="help">
                    <include name="**/*.html"/>
                  </fileset>
                  <dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${basedir}/__tmp/__empty.dtd"/>
                </xmlvalidate>
                <delete dir="__tmp"/>

                <!-- Generate New & Noteworthy -->

                <xslt style="docs/new/new.xsl" destdir="docs/new" basedir="docs/new" includes="new*.xml"/>
                
            </target>
          </configuration>
          <goals>
            <goal>run</goal>
          </goals>
        </execution>
      </executions>
      <dependencies>
        <dependency>
          <groupId>org.eclipse.mylyn.docs</groupId>
          <artifactId>org.eclipse.mylyn.wikitext.core</artifactId>
          <version>2.3.0-SNAPSHOT</version>
        </dependency>
        <dependency>
          <groupId>org.eclipse.mylyn.docs</groupId>
          <artifactId>org.eclipse.mylyn.wikitext.core.ant</artifactId>
          <version>2.3.0-SNAPSHOT</version>
        </dependency>
        <dependency>
          <groupId>org.eclipse.mylyn.docs</groupId>
          <artifactId>org.eclipse.mylyn.wikitext.textile.core</artifactId>
          <version>2.3.0-SNAPSHOT</version>
        </dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>12.0</version>
		</dependency>
      </dependencies>
    </plugin>
    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>tycho-source-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>findbugs-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-pmd-plugin</artifactId>
    </plugin>
  </plugins>
</build>
</project>