Skip to content

Commit 2046037

Browse files
eolivelliEnrico Olivelli
authored andcommitted
Enhance Mavenized Make C client
1 parent 68c2198 commit 2046037

1 file changed

Lines changed: 58 additions & 60 deletions

File tree

  • zookeeper-client/zookeeper-client-c

zookeeper-client/zookeeper-client-c/pom.xml

Lines changed: 58 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -35,52 +35,13 @@
3535

3636
<build>
3737
<plugins>
38-
<plugin>
39-
<groupId>org.apache.maven.plugins</groupId>
40-
<artifactId>maven-antrun-plugin</artifactId>
41-
<executions>
42-
<execution>
43-
<id>generate-sources</id>
44-
<phase>generate-sources</phase>
45-
<configuration>
46-
<tasks>
47-
<mkdir dir="target/c" />
48-
</tasks>
49-
</configuration>
50-
<goals>
51-
<goal>run</goal>
52-
</goals>
53-
</execution>
54-
<execution>
55-
<id>test-cppunit</id>
56-
<phase>test</phase>
57-
<configuration>
58-
<!-- do not run cpp tests if tests are globally skipped -->
59-
<skip>${skipTests}</skip>
60-
<tasks>
61-
<exec dir="${basedir}/target/c" executable="make" failonerror="true">
62-
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH};/usr/lib" />
63-
<env key="PATH" path="${env.PATH};${basedir};" />
64-
<env key="CALLER" value="ANT" />
65-
<env key="CLOVER_HOME" value="${basedir}/../../zookeeper-server/target" />
66-
<env key="base_dir" value="${basedir}/../.." />
67-
<arg line="clean check" />
68-
</exec>
69-
</tasks>
70-
</configuration>
71-
<goals>
72-
<goal>run</goal>
73-
</goals>
74-
</execution>
75-
</executions>
76-
</plugin>
77-
<plugin>
38+
<plugin>
7839
<groupId>org.codehaus.mojo</groupId>
7940
<artifactId>exec-maven-plugin</artifactId>
8041
<executions>
8142
<execution>
8243
<id>autoreconf</id>
83-
<phase>test-compile</phase>
44+
<phase>process-sources</phase>
8445
<goals>
8546
<goal>exec</goal>
8647
</goals>
@@ -97,7 +58,7 @@
9758
</execution>
9859
<execution>
9960
<id>configure</id>
100-
<phase>test-compile</phase>
61+
<phase>process-sources</phase>
10162
<goals>
10263
<goal>exec</goal>
10364
</goals>
@@ -114,30 +75,67 @@
11475
</arguments>
11576
</configuration>
11677
</execution>
117-
<!--execution> TODO: Why is this not working?!
118-
<id>test-cppunit</id>
119-
<phase>test</phase>
78+
</executions>
79+
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-antrun-plugin</artifactId>
83+
<executions>
84+
<execution>
85+
<id>generate-sources</id>
86+
<phase>generate-sources</phase>
87+
<configuration>
88+
<tasks>
89+
<mkdir dir="target/c" />
90+
</tasks>
91+
</configuration>
12092
<goals>
121-
<goal>exec</goal>
93+
<goal>run</goal>
12294
</goals>
95+
</execution>
96+
<execution>
97+
<id>build-c-client</id>
98+
<phase>compile</phase>
12399
<configuration>
124-
<workingDirectory>${project.build.directory}/c</workingDirectory>
125-
<executable>make</executable>
126-
<environmentVariables>
127-
<LD_LIBRARY_PATH>${env.LD_LIBRARY_PATH};/usr/lib</LD_LIBRARY_PATH>
128-
<PATH>${env.PATH};${project.basedir};</PATH>
129-
<CALLER>ANT</CALLER>
130-
<CLOVER_HOME></CLOVER_HOME>
131-
<base_dir>${project.basedir}/../..</base_dir>
132-
</environmentVariables>
133-
<arguments>
134-
<argument>clean check</argument>
135-
</arguments>
100+
<tasks>
101+
<exec dir="${basedir}/target/c" executable="make" failonerror="true">
102+
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH};/usr/lib" />
103+
<env key="PATH" path="${env.PATH};${basedir};" />
104+
<env key="CALLER" value="ANT" />
105+
<env key="CLOVER_HOME" value="${basedir}/../../zookeeper-server/target" />
106+
<env key="base_dir" value="${basedir}/../.." />
107+
<arg line="clean install" />
108+
</exec>
109+
</tasks>
110+
</configuration>
111+
<goals>
112+
<goal>run</goal>
113+
</goals>
114+
</execution>
115+
<execution>
116+
<id>test-cppunit</id>
117+
<phase>test</phase>
118+
<configuration>
119+
<!-- do not run cpp tests if tests are globally skipped -->
120+
<skip>${skipTests}</skip>
121+
<tasks>
122+
<exec dir="${basedir}/target/c" executable="make" failonerror="true">
123+
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH};/usr/lib" />
124+
<env key="PATH" path="${env.PATH};${basedir};" />
125+
<env key="CALLER" value="ANT" />
126+
<env key="CLOVER_HOME" value="${basedir}/../../zookeeper-server/target" />
127+
<env key="base_dir" value="${basedir}/../.." />
128+
<arg line="check" />
129+
</exec>
130+
</tasks>
136131
</configuration>
137-
</execution-->
132+
<goals>
133+
<goal>run</goal>
134+
</goals>
135+
</execution>
138136
</executions>
139137
</plugin>
140138
</plugins>
141139
</build>
142140

143-
</project>
141+
</project>

0 commit comments

Comments
 (0)