Skip to content

Commit d693576

Browse files
committed
Wrap gradle catalog+platform logic in a profile
We don't want it being triggered in downstream projects that extend pom-scijava -- only in the pom-scijava build itself.
1 parent fbfa5cb commit d693576

File tree

1 file changed

+64
-53
lines changed

1 file changed

+64
-53
lines changed

pom.xml

Lines changed: 64 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6871,57 +6871,68 @@
68716871
</dependency>
68726872
</dependencies>
68736873
</dependencyManagement>
6874-
<build>
6875-
<plugins>
6876-
<plugin>
6877-
<groupId>org.codehaus.mojo</groupId>
6878-
<artifactId>exec-maven-plugin</artifactId>
6879-
<executions>
6880-
<execution>
6881-
<id>generate-gradle-catalog-and-platform</id>
6882-
<phase>generate-sources</phase>
6883-
<goals>
6884-
<!-- https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html -->
6885-
<goal>exec</goal>
6886-
</goals>
6887-
<configuration>
6888-
<executable>./gradlew</executable>
6889-
<workingDirectory>${basedir}/gradle-scijava</workingDirectory>
6890-
<arguments>
6891-
<argument>--project-cache-dir</argument>
6892-
<argument>../target/gradle/build</argument>
6893-
<argument>generateCatalogAndPlatform</argument>
6894-
</arguments>
6895-
</configuration>
6896-
</execution>
6897-
</executions>
6898-
</plugin>
6899-
<plugin>
6900-
<groupId>org.codehaus.mojo</groupId>
6901-
<artifactId>build-helper-maven-plugin</artifactId>
6902-
<executions>
6903-
<execution>
6904-
<id>attach-gradle-catalog-and-platform</id>
6905-
<goals>
6906-
<!-- https://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html -->
6907-
<goal>attach-artifact</goal>
6908-
</goals>
6909-
<configuration>
6910-
<artifacts>
6911-
<artifact>
6912-
<file>target/gradle/version-catalog/libs.versions.toml</file>
6913-
<type>toml</type>
6914-
</artifact>
6915-
<artifact>
6916-
<file>target/gradle/publications/pomScijava/module.json</file>
6917-
<!-- it should be published with the `.module` extension -->
6918-
<type>module</type>
6919-
</artifact>
6920-
</artifacts>
6921-
</configuration>
6922-
</execution>
6923-
</executions>
6924-
</plugin>
6925-
</plugins>
6926-
</build>
6874+
6875+
<profiles>
6876+
<profile>
6877+
<id>scijava-gradle-catalog-and-platform</id>
6878+
<activation>
6879+
<file>
6880+
<exists>${basedir}/gradle-scijava</exists>
6881+
</file>
6882+
</activation>
6883+
<build>
6884+
<plugins>
6885+
<plugin>
6886+
<groupId>org.codehaus.mojo</groupId>
6887+
<artifactId>exec-maven-plugin</artifactId>
6888+
<executions>
6889+
<execution>
6890+
<id>generate-gradle-catalog-and-platform</id>
6891+
<phase>generate-sources</phase>
6892+
<goals>
6893+
<!-- https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html -->
6894+
<goal>exec</goal>
6895+
</goals>
6896+
<configuration>
6897+
<executable>./gradlew</executable>
6898+
<workingDirectory>${basedir}/gradle-scijava</workingDirectory>
6899+
<arguments>
6900+
<argument>--project-cache-dir</argument>
6901+
<argument>../target/gradle/build</argument>
6902+
<argument>generateCatalogAndPlatform</argument>
6903+
</arguments>
6904+
</configuration>
6905+
</execution>
6906+
</executions>
6907+
</plugin>
6908+
<plugin>
6909+
<groupId>org.codehaus.mojo</groupId>
6910+
<artifactId>build-helper-maven-plugin</artifactId>
6911+
<executions>
6912+
<execution>
6913+
<id>attach-gradle-catalog-and-platform</id>
6914+
<goals>
6915+
<!-- https://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html -->
6916+
<goal>attach-artifact</goal>
6917+
</goals>
6918+
<configuration>
6919+
<artifacts>
6920+
<artifact>
6921+
<file>target/gradle/version-catalog/libs.versions.toml</file>
6922+
<type>toml</type>
6923+
</artifact>
6924+
<artifact>
6925+
<file>target/gradle/publications/pomScijava/module.json</file>
6926+
<!-- it should be published with the `.module` extension -->
6927+
<type>module</type>
6928+
</artifact>
6929+
</artifacts>
6930+
</configuration>
6931+
</execution>
6932+
</executions>
6933+
</plugin>
6934+
</plugins>
6935+
</build>
6936+
</profile>
6937+
</profiles>
69276938
</project>

0 commit comments

Comments
 (0)