-
Notifications
You must be signed in to change notification settings - Fork 3
/
extra-pom.xml
163 lines (155 loc) · 11.2 KB
/
extra-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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.civilizer</groupId>
<artifactId>cvz-extra</artifactId>
<version>1.0.0.CI-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<java-version>1.7</java-version>
<app-name>civilizer</app-name>
<src-dir>src/extra/java</src-dir>
<wa-dir>src/main/webapp</wa-dir>
<build-dir>target</build-dir>
<war-dir>${build-dir}/${app-name}-${project.version}</war-dir>
<dep-classes-dir>${build-dir}/classes</dep-classes-dir>
<dep-lib-dir>${war-dir}/WEB-INF/lib</dep-lib-dir>
<output-dir>${build-dir}/extra</output-dir>
<compressor>tools/compressor/yuicompressor-2.4.8.jar</compressor>
<min-css>${wa-dir}/styles/compressed.css</min-css>
<min-js>${wa-dir}/js/compressed.js</min-js>
</properties>
<build>
<plugins>
<plugin> <!-- disable default compilations -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution><!-- build EXTRA module using Ant commands -->
<id>compile-extra</id>
<phase>compile</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${output-dir}/lib"/>
<path id="classpath">
<dirset dir="${dep-classes-dir}"/>
<fileset dir="${dep-lib-dir}"
includes="*.jar"/>
<fileset dir="extra/lib" includes="*.jar"/>
</path>
<!-- <property name="myclasspath" refid="classpath"/> -->
<!-- <echo message="Classpath = ${myclasspath}"/> -->
<echo message="compiling source files in src/extra/java..."/>
<javac
compiler="extjavac"
executable="javac"
source="${java-version}"
srcdir="${src-dir}"
destdir="${output-dir}"
classpathref="classpath">
</javac>
<echo message="copying extra/lib/*.jar files to the final output directory..."/>
<copy todir="${output-dir}/lib">
<fileset dir="extra/lib" includes="*.jar"/>
</copy>
</target>
</configuration>
</execution>
<execution><!-- compress CSS, JS files -->
<id>compress-css-js</id>
<phase>compile</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<delete file="${min-css}"/>
<echo message="compressing CSS files..."/>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/vendors/blueprint/screen.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/vendors/markitup/markitup.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/vendors/dndx/dndx.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/app/layout.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/app/home.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/app/fragment-container.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/app/fragment-content.css"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-css}">
<arg line="--type css ${wa-dir}/styles/app/custom-markup-rules.css"/></java>
<copy file="${min-css}" todir="${war-dir}/styles"/>
<delete file="${min-js}"/>
<echo message="compressing JS files..."/>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/jquery-ui/jquery-ui.min.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/marked/marked.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/markitup/jquery.markitup.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/markitup/sets/markdown/set.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/watermark/jquery.watermark.min.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/lightbox_me/jquery.lightbox_me.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/moment/moment-with-locales.min.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/textarea-caret-position/index.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/vendors/dndx/dndx.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/utils.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/home.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/header.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/fragment-editor.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/fragment-content.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/bookmark.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/tag-palette.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/selection-box.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/file-box.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/contextmenu.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/search.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/dnd.js"/></java>
<java jar="${compressor}" fork="true" append="true" output="${min-js}">
<arg line="--type js ${wa-dir}/js/app/home/document-ready.js"/></java>
<copy file="${min-js}" todir="${war-dir}/js"/>
<propertyfile file="${war-dir}/WEB-INF/classes/app-options.properties">
<entry key="civilizer.use_compressed_css_js" value="true" operation="+"/>
</propertyfile>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>