Skip to content

Commit 9cd9000

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 431ebf9 commit 9cd9000

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
@@ -6820,57 +6820,68 @@
68206820
</dependency>
68216821
</dependencies>
68226822
</dependencyManagement>
6823-
<build>
6824-
<plugins>
6825-
<plugin>
6826-
<groupId>org.codehaus.mojo</groupId>
6827-
<artifactId>exec-maven-plugin</artifactId>
6828-
<executions>
6829-
<execution>
6830-
<id>generate-gradle-catalog-and-platform</id>
6831-
<phase>generate-sources</phase>
6832-
<goals>
6833-
<!-- https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html -->
6834-
<goal>exec</goal>
6835-
</goals>
6836-
<configuration>
6837-
<executable>./gradlew</executable>
6838-
<workingDirectory>${basedir}/gradle-scijava</workingDirectory>
6839-
<arguments>
6840-
<argument>--project-cache-dir</argument>
6841-
<argument>../target/gradle/build</argument>
6842-
<argument>generateCatalogAndPlatform</argument>
6843-
</arguments>
6844-
</configuration>
6845-
</execution>
6846-
</executions>
6847-
</plugin>
6848-
<plugin>
6849-
<groupId>org.codehaus.mojo</groupId>
6850-
<artifactId>build-helper-maven-plugin</artifactId>
6851-
<executions>
6852-
<execution>
6853-
<id>attach-gradle-catalog-and-platform</id>
6854-
<goals>
6855-
<!-- https://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html -->
6856-
<goal>attach-artifact</goal>
6857-
</goals>
6858-
<configuration>
6859-
<artifacts>
6860-
<artifact>
6861-
<file>target/gradle/version-catalog/libs.versions.toml</file>
6862-
<type>toml</type>
6863-
</artifact>
6864-
<artifact>
6865-
<file>target/gradle/publications/pomScijava/module.json</file>
6866-
<!-- it should be published with the `.module` extension -->
6867-
<type>module</type>
6868-
</artifact>
6869-
</artifacts>
6870-
</configuration>
6871-
</execution>
6872-
</executions>
6873-
</plugin>
6874-
</plugins>
6875-
</build>
6823+
6824+
<profiles>
6825+
<profile>
6826+
<id>scijava-gradle-catalog-and-platform</id>
6827+
<activation>
6828+
<file>
6829+
<exists>${basedir}/gradle-scijava</exists>
6830+
</file>
6831+
</activation>
6832+
<build>
6833+
<plugins>
6834+
<plugin>
6835+
<groupId>org.codehaus.mojo</groupId>
6836+
<artifactId>exec-maven-plugin</artifactId>
6837+
<executions>
6838+
<execution>
6839+
<id>generate-gradle-catalog-and-platform</id>
6840+
<phase>generate-sources</phase>
6841+
<goals>
6842+
<!-- https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html -->
6843+
<goal>exec</goal>
6844+
</goals>
6845+
<configuration>
6846+
<executable>./gradlew</executable>
6847+
<workingDirectory>${basedir}/gradle-scijava</workingDirectory>
6848+
<arguments>
6849+
<argument>--project-cache-dir</argument>
6850+
<argument>../target/gradle/build</argument>
6851+
<argument>generateCatalogAndPlatform</argument>
6852+
</arguments>
6853+
</configuration>
6854+
</execution>
6855+
</executions>
6856+
</plugin>
6857+
<plugin>
6858+
<groupId>org.codehaus.mojo</groupId>
6859+
<artifactId>build-helper-maven-plugin</artifactId>
6860+
<executions>
6861+
<execution>
6862+
<id>attach-gradle-catalog-and-platform</id>
6863+
<goals>
6864+
<!-- https://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html -->
6865+
<goal>attach-artifact</goal>
6866+
</goals>
6867+
<configuration>
6868+
<artifacts>
6869+
<artifact>
6870+
<file>target/gradle/version-catalog/libs.versions.toml</file>
6871+
<type>toml</type>
6872+
</artifact>
6873+
<artifact>
6874+
<file>target/gradle/publications/pomScijava/module.json</file>
6875+
<!-- it should be published with the `.module` extension -->
6876+
<type>module</type>
6877+
</artifact>
6878+
</artifacts>
6879+
</configuration>
6880+
</execution>
6881+
</executions>
6882+
</plugin>
6883+
</plugins>
6884+
</build>
6885+
</profile>
6886+
</profiles>
68766887
</project>

0 commit comments

Comments
 (0)