Skip to content

Commit 9b48c18

Browse files
committed
Flatten the published POM
This has mainly 2 advantages for us: - It removes all the built-time profile/property settings, which could make the pom appear more complicated than it is for people looking to use MMCoreJ as a dependency. So flatten it to what a dependency resolver (Maven/Gradle) will actually see. - It can allow parameterizing essential values, such as version, by templating them and passing them in on the `mvn` command line.
1 parent 43d7b1c commit 9b48c18

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

MMCoreJ_wrap/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.wraplock
22
/target/
3+
.flattened-pom.xml

MMCoreJ_wrap/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,33 @@ Run the Meson build first:
327327
</execution>
328328
</executions>
329329
</plugin>
330+
331+
<!-- Remove build-specific elements from published POM (probably
332+
less confusing to consumers) -->
333+
<plugin>
334+
<groupId>org.codehaus.mojo</groupId>
335+
<artifactId>flatten-maven-plugin</artifactId>
336+
<version>1.7.3</version>
337+
<configuration>
338+
<flattenMode>oss</flattenMode>
339+
</configuration>
340+
<executions>
341+
<execution>
342+
<id>flatten</id>
343+
<phase>process-resources</phase>
344+
<goals>
345+
<goal>flatten</goal>
346+
</goals>
347+
</execution>
348+
<execution>
349+
<id>flatten-clean</id>
350+
<phase>clean</phase>
351+
<goals>
352+
<goal>clean</goal>
353+
</goals>
354+
</execution>
355+
</executions>
356+
</plugin>
330357
</plugins>
331358
</build>
332359

0 commit comments

Comments
 (0)