1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <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/xsd/maven-4.0.0.xsd"> |
|
3 <parent> |
|
4 <groupId>org.opencoweb</groupId> |
|
5 <artifactId>coweb-java</artifactId> |
|
6 <version>1.0.1-SNAPSHOT</version> |
|
7 </parent> |
|
8 |
|
9 <modelVersion>4.0.0</modelVersion> |
|
10 <groupId>org.opencoweb</groupId> |
|
11 <artifactId>coweb-javascript</artifactId> |
|
12 <name>OpenCoweb :: Java :: JavaScript</name> |
|
13 <packaging>war</packaging> |
|
14 |
|
15 <properties> |
|
16 <i18n-plugin-url>http://requirejs.org/docs/release/1.0.0/minified/i18n.js</i18n-plugin-url> |
|
17 <coweb-jsoe>${project.build.directory}/${project.artifactId}-${project.version}/coweb/jsoe</coweb-jsoe> |
|
18 <coweb-jsoe-src>src/main/webapp/coweb/jsoe</coweb-jsoe-src> |
|
19 </properties> |
|
20 |
|
21 <build> |
|
22 <plugins> |
|
23 <plugin> |
|
24 <groupId>org.apache.maven.plugins</groupId> |
|
25 <artifactId>maven-war-plugin</artifactId> |
|
26 <version>2.2</version> |
|
27 <configuration> |
|
28 <warSourceExcludes>coweb/jsoe/</warSourceExcludes> |
|
29 </configuration> |
|
30 </plugin> |
|
31 <plugin> |
|
32 <groupId>org.apache.maven.plugins</groupId> |
|
33 <artifactId>maven-dependency-plugin</artifactId> |
|
34 <version>2.4</version> |
|
35 <executions> |
|
36 <execution> |
|
37 <id>unpack</id> |
|
38 <phase>compile</phase> |
|
39 <goals><goal>unpack</goal></goals> |
|
40 <configuration> |
|
41 <artifactItems> |
|
42 <artifactItem> |
|
43 <groupId>org.cometd.javascript</groupId> |
|
44 <artifactId>cometd-javascript-common</artifactId> |
|
45 <version>${cometd.version}</version> |
|
46 <type>war</type> |
|
47 <overWrite>false</overWrite> |
|
48 <outputDirectory>${project.build.directory}/tmp</outputDirectory> |
|
49 <includes>**/cometd.js,**/cometd/AckExtension.js</includes> |
|
50 </artifactItem> |
|
51 </artifactItems> |
|
52 <!-- other configurations here --> |
|
53 </configuration> |
|
54 </execution> |
|
55 </executions> |
|
56 |
|
57 </plugin> |
|
58 <plugin> |
|
59 <artifactId>maven-antrun-plugin</artifactId> |
|
60 <executions> |
|
61 <execution> |
|
62 <phase>prepare-package</phase> |
|
63 <configuration> |
|
64 <tasks> |
|
65 <property name="workpath" location="${project.build.directory}/tmp" /> |
|
66 <echo message="HERE *************************** ${workpath}" /> |
|
67 |
|
68 <!-- Pull in cometd. --> |
|
69 <delete dir="${project.build.directory}/${project.artifactId}-${project.version}/org/cometd" /> |
|
70 <copy file="${workpath}/org/cometd.js" |
|
71 tofile="${project.build.directory}/${project.artifactId}-${project.version}/org/cometd.js" /> |
|
72 <copy file="${workpath}/org/cometd/AckExtension.js" |
|
73 tofile="${project.build.directory}/${project.artifactId}-${project.version}/org/cometd/AckExtension.js" /> |
|
74 |
|
75 <!-- Pull in requirejs's i18n library. --> |
|
76 <mkdir dir="${project.build.directory}/${project.artifactId}-${project.version}/org/requirejs"/> |
|
77 <get src="${i18n-plugin-url}" |
|
78 dest="${project.build.directory}/${project.artifactId}-${project.version}/org/requirejs/i18n.js"/> |
|
79 |
|
80 <!-- Use only the relevant coweb-jsoe files. --> |
|
81 <copy todir="${coweb-jsoe}"> |
|
82 <fileset dir="${coweb-jsoe-src}/src/coweb/jsoe"> |
|
83 <include name="*.js" /> |
|
84 <exclude name="OTEngine.js" /> |
|
85 </fileset> |
|
86 </copy> |
|
87 <copy todir="${coweb-jsoe}/nls"> |
|
88 <fileset dir="${coweb-jsoe-src}/src/coweb/jsoe/nls" /> |
|
89 </copy> |
|
90 |
|
91 </tasks> |
|
92 </configuration> |
|
93 <goals> |
|
94 <goal>run</goal> |
|
95 </goals> |
|
96 </execution> |
|
97 </executions> |
|
98 </plugin> |
|
99 </plugins> |
|
100 </build> |
|
101 <dependencies> |
|
102 <dependency> |
|
103 <groupId>org.cometd.javascript</groupId> |
|
104 <artifactId>cometd-javascript-common</artifactId> |
|
105 <version>${cometd-version}</version> |
|
106 <type>war</type> |
|
107 <scope>provided</scope> |
|
108 </dependency> |
|
109 </dependencies> |
|
110 </project> |
|