|
33 | 33 | <name>Apache ZooKeeper - Client - C</name> |
34 | 34 | <description>ZooKeeper c client</description> |
35 | 35 |
|
| 36 | + <profiles> |
| 37 | + <profile> |
| 38 | + <id>c-test-coverage</id> |
| 39 | + <properties> |
| 40 | + <c-test-coverage-arg>--enable-gcov</c-test-coverage-arg> |
| 41 | + </properties> |
| 42 | + </profile> |
| 43 | + <profile> |
| 44 | + <id>no-c-test-coverage</id> |
| 45 | + <activation> |
| 46 | + <activeByDefault>true</activeByDefault> |
| 47 | + </activation> |
| 48 | + <properties> |
| 49 | + <c-test-coverage-arg> </c-test-coverage-arg> |
| 50 | + </properties> |
| 51 | + </profile> |
| 52 | + </profiles> |
| 53 | + |
36 | 54 | <build> |
37 | 55 | <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> |
| 56 | + <plugin> |
78 | 57 | <groupId>org.codehaus.mojo</groupId> |
79 | 58 | <artifactId>exec-maven-plugin</artifactId> |
80 | 59 | <executions> |
81 | 60 | <execution> |
82 | 61 | <id>autoreconf</id> |
83 | | - <phase>test-compile</phase> |
| 62 | + <phase>process-sources</phase> |
84 | 63 | <goals> |
85 | 64 | <goal>exec</goal> |
86 | 65 | </goals> |
|
97 | 76 | </execution> |
98 | 77 | <execution> |
99 | 78 | <id>configure</id> |
100 | | - <phase>test-compile</phase> |
| 79 | + <phase>process-sources</phase> |
101 | 80 | <goals> |
102 | 81 | <goal>exec</goal> |
103 | 82 | </goals> |
|
111 | 90 | <arguments> |
112 | 91 | <argument>--with-openssl=/usr/include/openssl/</argument> |
113 | 92 | <argument>--prefix=${project.build.directory}/c</argument> |
114 | | - <argument>--enable-gcov</argument> |
| 93 | + <argument>${c-test-coverage-arg}</argument> |
115 | 94 | </arguments> |
116 | 95 | </configuration> |
117 | 96 | </execution> |
118 | | - <!--execution> TODO: Why is this not working?! |
119 | | - <id>test-cppunit</id> |
120 | | - <phase>test</phase> |
| 97 | + </executions> |
| 98 | + </plugin> |
| 99 | + <plugin> |
| 100 | + <groupId>org.apache.maven.plugins</groupId> |
| 101 | + <artifactId>maven-antrun-plugin</artifactId> |
| 102 | + <executions> |
| 103 | + <execution> |
| 104 | + <id>generate-sources</id> |
| 105 | + <phase>generate-sources</phase> |
| 106 | + <configuration> |
| 107 | + <tasks> |
| 108 | + <mkdir dir="target/c" /> |
| 109 | + </tasks> |
| 110 | + </configuration> |
121 | 111 | <goals> |
122 | | - <goal>exec</goal> |
| 112 | + <goal>run</goal> |
123 | 113 | </goals> |
| 114 | + </execution> |
| 115 | + <execution> |
| 116 | + <id>build-c-client</id> |
| 117 | + <phase>compile</phase> |
124 | 118 | <configuration> |
125 | | - <workingDirectory>${project.build.directory}/c</workingDirectory> |
126 | | - <executable>make</executable> |
127 | | - <environmentVariables> |
128 | | - <LD_LIBRARY_PATH>${env.LD_LIBRARY_PATH};/usr/lib</LD_LIBRARY_PATH> |
129 | | - <PATH>${env.PATH};${project.basedir};</PATH> |
130 | | - <CALLER>ANT</CALLER> |
131 | | - <CLOVER_HOME></CLOVER_HOME> |
132 | | - <base_dir>${project.basedir}/../..</base_dir> |
133 | | - </environmentVariables> |
134 | | - <arguments> |
135 | | - <argument>clean check</argument> |
136 | | - </arguments> |
| 119 | + <tasks> |
| 120 | + <exec dir="${basedir}/target/c" executable="make" failonerror="true"> |
| 121 | + <env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH};/usr/lib" /> |
| 122 | + <env key="PATH" path="${env.PATH};${basedir};" /> |
| 123 | + <env key="CALLER" value="ANT" /> |
| 124 | + <env key="CLOVER_HOME" value="${basedir}/../../zookeeper-server/target" /> |
| 125 | + <env key="base_dir" value="${basedir}/../.." /> |
| 126 | + <arg line="clean install" /> |
| 127 | + </exec> |
| 128 | + </tasks> |
| 129 | + </configuration> |
| 130 | + <goals> |
| 131 | + <goal>run</goal> |
| 132 | + </goals> |
| 133 | + </execution> |
| 134 | + <execution> |
| 135 | + <id>test-cppunit</id> |
| 136 | + <phase>test</phase> |
| 137 | + <configuration> |
| 138 | + <!-- do not run cpp tests if tests are globally skipped --> |
| 139 | + <skip>${skipTests}</skip> |
| 140 | + <tasks> |
| 141 | + <exec dir="${basedir}/target/c" executable="make" failonerror="true"> |
| 142 | + <env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH};/usr/lib" /> |
| 143 | + <env key="PATH" path="${env.PATH};${basedir};" /> |
| 144 | + <env key="CALLER" value="ANT" /> |
| 145 | + <env key="CLOVER_HOME" value="${basedir}/../../zookeeper-server/target" /> |
| 146 | + <env key="base_dir" value="${basedir}/../.." /> |
| 147 | + <arg line="check" /> |
| 148 | + </exec> |
| 149 | + </tasks> |
137 | 150 | </configuration> |
138 | | - </execution--> |
| 151 | + <goals> |
| 152 | + <goal>run</goal> |
| 153 | + </goals> |
| 154 | + </execution> |
139 | 155 | </executions> |
140 | 156 | </plugin> |
141 | 157 | </plugins> |
|
0 commit comments