1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <project xmlns="http://maven.apache.org/POM/4.0.0"
|
---|
3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
---|
4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
---|
5 | <modelVersion>4.0.0</modelVersion>
|
---|
6 | <groupId>com.example</groupId>
|
---|
7 | <artifactId>sample-theme</artifactId>
|
---|
8 | <version>1.0.0-SNAPSHOT</version>
|
---|
9 | <name>Sample theme</name>
|
---|
10 | <properties>
|
---|
11 | <gxt.version>4.0.0-SNAPSHOT</gxt.version>
|
---|
12 | <phantomjs.version>1.9.2</phantomjs.version>
|
---|
13 | <bin>bin/phantomjs</bin>
|
---|
14 | </properties>
|
---|
15 | <build>
|
---|
16 | <plugins>
|
---|
17 | <!-- First, download the PhantomJS bin that can run locally. See the profiles section for how the right version
|
---|
18 | is selected. If a local version is used instead, this isn't necessary, but each computer that runs this maven
|
---|
19 | script will need a copy of phantom to correctly generate the theme. -->
|
---|
20 | <plugin>
|
---|
21 | <groupId>com.googlecode.maven-download-plugin</groupId>
|
---|
22 | <artifactId>maven-download-plugin</artifactId>
|
---|
23 | <version>1.1.0</version>
|
---|
24 | <executions>
|
---|
25 | <execution>
|
---|
26 | <id>download-phantomjs</id>
|
---|
27 | <phase>generate-resources</phase>
|
---|
28 | <goals>
|
---|
29 | <goal>wget</goal>
|
---|
30 | </goals>
|
---|
31 | <configuration>
|
---|
32 | <url>https://phantomjs.googlecode.com/files/phantomjs-1.9.2-${platform}${archive}</url>
|
---|
33 | <outputDirectory>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/phantomjs</outputDirectory>
|
---|
34 | </configuration>
|
---|
35 | </execution>
|
---|
36 | </executions>
|
---|
37 | <configuration>
|
---|
38 | <unpack>true</unpack>
|
---|
39 | </configuration>
|
---|
40 | </plugin>
|
---|
41 | <!-- Run the themer with the PhantomJS bin downloaded above. Generate classes into target/class. This is done in
|
---|
42 | the prepare-package phase, so that it is ready when a jar is created -->
|
---|
43 | <plugin>
|
---|
44 | <groupId>org.codehaus.mojo</groupId>
|
---|
45 | <artifactId>exec-maven-plugin</artifactId>
|
---|
46 | <version>1.4.0</version>
|
---|
47 | <executions>
|
---|
48 | <execution>
|
---|
49 | <id>generate-theme</id>
|
---|
50 | <phase>prepare-package</phase>
|
---|
51 | <goals>
|
---|
52 | <goal>exec</goal>
|
---|
53 | </goals>
|
---|
54 | <configuration>
|
---|
55 | <executable>/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/bin/java</executable>
|
---|
56 | <arguments>
|
---|
57 | <argument>-classpath</argument>
|
---|
58 | <classpath/>
|
---|
59 | <argument>-DphantomBin=/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/phantomjs/phantomjs-1.9.2-${platform}/${bin}</argument>
|
---|
60 | <argument>com.sencha.gxt.themebuilder.ThemeBuilder</argument>
|
---|
61 | <!-- Build all generated sources into the classes directory so they end up in the final jar -->
|
---|
62 | <argument>-gen</argument>
|
---|
63 | <argument>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/classes</argument>
|
---|
64 | <!-- These next several arguments are optional, and are here to make it easier to debug issues in the theme -->
|
---|
65 | <argument>-imageFile</argument>
|
---|
66 | <argument>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/snapshot.png</argument>
|
---|
67 | <argument>-manifestFile</argument>
|
---|
68 | <argument>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/snapshot.json</argument>
|
---|
69 | <argument>-out</argument>
|
---|
70 | <argument>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/theme.jar</argument>
|
---|
71 | <argument>-warDir</argument>
|
---|
72 | <argument>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/war</argument>
|
---|
73 | <!-- List theme config files here -->
|
---|
74 | <argument>/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/themeDetails.theme</argument>
|
---|
75 | </arguments>
|
---|
76 | </configuration>
|
---|
77 | </execution>
|
---|
78 | </executions>
|
---|
79 | <dependencies>
|
---|
80 | <dependency>
|
---|
81 | <groupId>com.sencha.gxt</groupId>
|
---|
82 | <artifactId>gxt-themebuilder</artifactId>
|
---|
83 | <version>${gxt.version}</version>
|
---|
84 | </dependency>
|
---|
85 | </dependencies>
|
---|
86 | </plugin>
|
---|
87 | </plugins>
|
---|
88 | </build>
|
---|
89 |
|
---|
90 | <!-- These profiles let us pick which version of PhantomJS to download and provide to the themer. This isn't
|
---|
91 | required if phantom is on the path already, or if each machine where this build will be run has some way of
|
---|
92 | specifying the phantomJS build to be used. -->
|
---|
93 | <profiles>
|
---|
94 | <profile>
|
---|
95 | <id>win32</id>
|
---|
96 | <activation>
|
---|
97 | <os>
|
---|
98 | <family>windows</family>
|
---|
99 | </os>
|
---|
100 | </activation>
|
---|
101 | <properties>
|
---|
102 | <platform>windows</platform>
|
---|
103 | <bin>phantomjs.exe</bin>
|
---|
104 | <archive>.zip</archive>
|
---|
105 | </properties>
|
---|
106 | </profile>
|
---|
107 |
|
---|
108 | <profile>
|
---|
109 | <id>mac</id>
|
---|
110 | <activation>
|
---|
111 | <os>
|
---|
112 | <family>mac</family>
|
---|
113 | </os>
|
---|
114 | </activation>
|
---|
115 | <properties>
|
---|
116 | <platform>macosx</platform>
|
---|
117 | <archive>.zip</archive>
|
---|
118 | </properties>
|
---|
119 | </profile>
|
---|
120 | <profile>
|
---|
121 | <id>linux</id>
|
---|
122 | <activation>
|
---|
123 | <os>
|
---|
124 | <family>unix</family>
|
---|
125 | <name>linux</name>
|
---|
126 | </os>
|
---|
127 | </activation>
|
---|
128 | <properties>
|
---|
129 | <platform>linux-i686</platform>
|
---|
130 | <archive>.tar.bz2</archive>
|
---|
131 | </properties>
|
---|
132 | <build>
|
---|
133 | <plugins>
|
---|
134 | <plugin>
|
---|
135 | <groupId>com.googlecode.maven-download-plugin</groupId>
|
---|
136 | <artifactId>maven-download-plugin</artifactId>
|
---|
137 | <configuration>
|
---|
138 | <unpack>false</unpack>
|
---|
139 | </configuration>
|
---|
140 | </plugin>
|
---|
141 | <plugin>
|
---|
142 | <groupId>org.apache.maven.plugins</groupId>
|
---|
143 | <artifactId>maven-antrun-plugin</artifactId>
|
---|
144 | <version>1.7</version>
|
---|
145 | <executions>
|
---|
146 | <execution>
|
---|
147 | <id>unpack-linux</id>
|
---|
148 | <phase>compile</phase>
|
---|
149 | <goals>
|
---|
150 | <goal>run</goal>
|
---|
151 | </goals>
|
---|
152 | <configuration>
|
---|
153 | <failOnError>true</failOnError>
|
---|
154 | <target>
|
---|
155 | <bunzip2 src="/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/phantomjs/phantomjs-1.9.2-${platform}.tar.bz2"/>
|
---|
156 | <untar src="/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/phantomjs/phantomjs-1.9.2-${platform}.tar" dest="/Users/teamcity/buildAgent/work/535f25f759aef5e6/build/target/phantomjs/"/>
|
---|
157 | </target>
|
---|
158 | </configuration>
|
---|
159 | </execution>
|
---|
160 | </executions>
|
---|
161 | </plugin>
|
---|
162 | </plugins>
|
---|
163 | </build>
|
---|
164 | </profile>
|
---|
165 |
|
---|
166 | <profile>
|
---|
167 | <id>lin64</id>
|
---|
168 | <activation>
|
---|
169 | <os>
|
---|
170 | <family>unix</family>
|
---|
171 | <arch>amd64</arch>
|
---|
172 | <name>linux</name>
|
---|
173 | </os>
|
---|
174 | </activation>
|
---|
175 | <properties>
|
---|
176 | <platform>linux-x86_64</platform>
|
---|
177 | </properties>
|
---|
178 | </profile>
|
---|
179 | </profiles>
|
---|
180 | </project>
|
---|