forked from stoicflame/enunciate
/
pom.xml
204 lines (188 loc) · 7.77 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
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<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>
<parent>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>enunciate-parent</artifactId>
<version>1.27-SNAPSHOT</version>
</parent>
<artifactId>enunciate-obj-c</artifactId>
<name>Enunciate - Objective C Module</name>
<description>The Enunciate Objective C module generates the Objective C client code for accessing the Enunciate services.</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>require.gcc.or.skip</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>gcc.executable</property>
<message>In order to build the Objective C module, you must have gcc installed along with libxml and gnustep.
Define a profile in your settings.xml file that defines the path to your 'gcc'
executable in the property 'gcc.executable'. Also set a property named 'libxml.config.executable' that
specifies the executable that exposes your libxml compiler flags and library includes.
Also set a property named 'gnustep.config.executable' that specifies the executable that exposes your gnustep compiler flags and library includes.
If you just want to skip the Objective C tests, set the value of the property 'gcc.executable' to be 'true'.
(And don't ask any questions about why that works. Maven mess.)</message>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--
we need to generate some objective C client-side classes for testing purposes.
we'll use the Enunciate ant task to do it.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>enunciate</id>
<phase>generate-test-resources</phase>
<configuration>
<tasks>
<path id="enunciate.classpath">
<path refid="maven.test.classpath" />
<pathelement location="${java.home}/../lib/tools.jar" />
</path>
<taskdef name="enunciate" classname="org.codehaus.enunciate.main.EnunciateTask">
<classpath refid="enunciate.classpath" />
</taskdef>
<mkdir dir="${project.build.directory}/enunciate/gen" />
<mkdir dir="${project.build.directory}/enunciate/compile" />
<mkdir dir="${project.build.directory}/ctests"/>
<enunciate target="compile" basedir="${basedir}/src/test/schema"
generateDir="${project.build.directory}/enunciate/gen"
compileDir="${project.build.directory}/enunciate/compile"
configFile="${project.basedir}/enunciate.xml">
<include name="**/*.java" />
<classpath refid="enunciate.classpath" />
</enunciate>
<copy todir="${project.build.directory}/enunciate/gen/obj-c" file="${project.build.testSourceDirectory}/../obj-c/processxml.m"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>compile-obj-c</id>
<phase>test-compile</phase>
<configuration>
<tasks>
<property name="gcc.executable" value="${gcc.executable}"/>
<property name="libxml.config.executable" value="${libxml.config.executable}"/>
<property name="gnustep.config.executable" value="${gnustep.config.executable}"/>
<property name="project.build.directory" value="${project.build.directory}"/>
<ant antfile="${basedir}/gcc-compile.xml">
<target name="gcc"/>
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<!--compile the C tests using the gcc executable. -->
<executable>${gcc.executable}</executable>
<skip>${gcc.executable}</skip>
<arguments>
<argument>-Wall</argument>
<argument>-Wno-unused-variable</argument>
<argument>-Wno-unused-function</argument>
<argument>-Werror</argument>
<argument>${gcc.libxml.cflags}</argument>
<argument>-I${project.build.directory}/enunciate/gen/obj-c</argument>
<argument>${gcc.libxml.libs}</argument>
<argument>-o</argument>
<argument>${project.build.directory}/enunciate/gen/obj-c/processxml</argument>
<argument>${project.build.directory}/enunciate/gen/obj-c/processxml.m</argument>
</arguments>
<workingDirectory>${project.build.directory}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<property>
<name>skip.objc.tests</name>
<value>${gcc.executable}</value>
</property>
<property>
<name>processxml.exe</name>
<value>${project.build.directory}/enunciate/gen/obj-c/processxml</value>
</property>
<property>
<name>xml.tempdir</name>
<value>${project.build.directory}/ctests</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<!--now we need to add the generated sources we're testing to the test classpath-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/test/schema</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>enunciate-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>enunciate-core</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<!--for testing the xmladapters only-->
<scope>test</scope>
</dependency>
</dependencies>
</project>