Skip to content

Commit 25daa24

Browse files
committed
java-manta-client javadoc and sources fix
1 parent fce6e5d commit 25daa24

3 files changed

Lines changed: 132 additions & 24 deletions

File tree

java-manta-client/pom.xml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,112 @@
171171
</execution>
172172
</executions>
173173
</plugin>
174+
<plugin>
175+
<artifactId>maven-clean-plugin</artifactId>
176+
<executions>
177+
<!--
178+
Remove src after use. This is for tidyness but not correctness.
179+
SOMETHING in maven allows the sources jar to be built during the package phase
180+
even though they've been deleted as early as the process-resources phase
181+
while still allowing us to avoid the shade "define overlapping classes" warning.
182+
-->
183+
<execution>
184+
<id>clean-client-shade-workaround-source-post</id>
185+
<phase>process-resources</phase>
186+
<goals>
187+
<goal>clean</goal>
188+
</goals>
189+
<configuration>
190+
<excludeDefaultDirectories>true</excludeDefaultDirectories>
191+
<verbose>true</verbose>
192+
<filesets>
193+
<fileset>
194+
<directory>src</directory>
195+
</fileset>
196+
</filesets>
197+
</configuration>
198+
</execution>
199+
<!--
200+
Ensure that src is *always*
201+
removed before a compile phase runs. This is
202+
for correctness.
203+
-->
204+
<execution>
205+
<id>clean-client-shade-workaround-source-pre</id>
206+
<phase>deploy</phase>
207+
<goals>
208+
<goal>clean</goal>
209+
</goals>
210+
<configuration>
211+
<excludeDefaultDirectories>true</excludeDefaultDirectories>
212+
<verbose>true</verbose>
213+
<filesets>
214+
<fileset>
215+
<directory>src</directory>
216+
</fileset>
217+
</filesets>
218+
</configuration>
219+
</execution>
220+
</executions>
221+
</plugin>
174222
</plugins>
175223
</build>
224+
225+
<profiles>
226+
<profile>
227+
<id>release</id>
228+
<build>
229+
<plugins>
230+
231+
<plugin>
232+
<artifactId>maven-resources-plugin</artifactId>
233+
<version>${maven-maven-resources-plugin.version}</version>
234+
<executions>
235+
<execution>
236+
<id>copy-shade-source-workaround-src</id>
237+
<phase>generate-sources</phase>
238+
<goals>
239+
<goal>copy-resources</goal>
240+
</goals>
241+
</execution>
242+
</executions>
243+
<configuration>
244+
<outputDirectory>src/shade-source-workaround</outputDirectory>
245+
<resources>
246+
<resource>
247+
<directory>${multi.module.root}/java-manta-client-unshaded/src/main/java</directory>
248+
</resource>
249+
</resources>
250+
</configuration>
251+
</plugin>
252+
253+
<plugin>
254+
<groupId>org.codehaus.mojo</groupId>
255+
<artifactId>build-helper-maven-plugin</artifactId>
256+
<version>${maven-build-helper-maven-plugin.version}</version>
257+
<executions>
258+
<execution>
259+
<id>add-shade-source-workaround-src</id>
260+
<phase>process-sources</phase>
261+
<goals>
262+
<goal>add-source</goal>
263+
</goals>
264+
<configuration>
265+
<sources>
266+
<source>${project.basedir}/src/shade-source-workaround</source>
267+
</sources>
268+
</configuration>
269+
</execution>
270+
</executions>
271+
</plugin>
272+
273+
<!--
274+
For SOME reason Maven can build a sources JAR for this module based on the above workaround
275+
*and still* deleting the source files during process-resources in order to avoid the shade plugin
276+
detecting overlapping classes.
277+
-->
278+
</plugins>
279+
</build>
280+
</profile>
281+
</profiles>
176282
</project>

java-manta-it/pom.xml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -142,30 +142,6 @@
142142
in this integration test module.
143143
-->
144144
<plugins>
145-
<plugin>
146-
<!-- This property is generated so we can refer to
147-
another module in a multi-module project without
148-
brittle relative paths. -->
149-
<groupId>org.commonjava.maven.plugins</groupId>
150-
<artifactId>directory-maven-plugin</artifactId>
151-
<version>${maven-directory-maven-plugin.version}</version>
152-
<executions>
153-
<execution>
154-
<id>directory-of-property</id>
155-
<goals>
156-
<goal>directory-of</goal>
157-
</goals>
158-
<phase>initialize</phase>
159-
<configuration>
160-
<property>multi.module.root</property>
161-
<project>
162-
<groupId>com.joyent.manta</groupId>
163-
<artifactId>java-manta</artifactId>
164-
</project>
165-
</configuration>
166-
</execution>
167-
</executions>
168-
</plugin>
169145
<plugin>
170146
<artifactId>maven-clean-plugin</artifactId>
171147
<executions>

pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,32 @@
208208

209209
<build>
210210
<plugins>
211+
212+
<plugin>
213+
<!-- This property is generated so we can refer to
214+
another module in a multi-module project without
215+
brittle relative paths. -->
216+
<groupId>org.commonjava.maven.plugins</groupId>
217+
<artifactId>directory-maven-plugin</artifactId>
218+
<version>${maven-directory-maven-plugin.version}</version>
219+
<executions>
220+
<execution>
221+
<id>directory-of-property</id>
222+
<goals>
223+
<goal>directory-of</goal>
224+
</goals>
225+
<phase>initialize</phase>
226+
<configuration>
227+
<property>multi.module.root</property>
228+
<project>
229+
<groupId>com.joyent.manta</groupId>
230+
<artifactId>java-manta</artifactId>
231+
</project>
232+
</configuration>
233+
</execution>
234+
</executions>
235+
</plugin>
236+
211237
<plugin>
212238
<groupId>org.apache.maven.plugins</groupId>
213239
<artifactId>maven-checkstyle-plugin</artifactId>

0 commit comments

Comments
 (0)