support maven profile for XSLT generation

This commit is contained in:
jstaerk
2022-07-07 13:21:00 +02:00
parent dd94e76e26
commit b0bce94dbb
4 changed files with 36 additions and 62 deletions

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.mustangproject</groupId>
<artifactId>core</artifactId>
@@ -27,7 +28,8 @@
</repositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
<maven.deploy.skip>false
</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
</properties>
<dependencies>
@@ -129,24 +131,7 @@
</plugins>
</pluginManagement>
<plugins>
<!-- be able to generate XSLT from XRechnung Schematron: uncomment this and "mvn generate-resources" if you have 20min to spare
<plugin>
<groupId>com.helger.maven</groupId>
<artifactId>ph-schematron-maven-plugin</artifactId>
<version>5.6.0</version>
<configuration>
<schematronDirectory>${basedir}/src/main/resources/schematron</schematronDirectory>
<xsltDirectory>${basedir}/src/main/resources/xslt</xsltDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>convert</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<!-- allow getImplementationVersion for the pom.xml -->
<plugin>
@@ -225,7 +210,7 @@
</goals>
<configuration>
<artifactSet>
<excludes />
<excludes/>
</artifactSet>
</configuration>
</execution>
@@ -276,4 +261,32 @@
</roles>
</developer>
</developers>
<profiles>
<profile>
<id>generateXSLTFromSchematron</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.helger.maven</groupId>
<artifactId>ph-schematron-maven-plugin</artifactId>
<version>5.6.0</version>
<configuration>
<schematronDirectory>${basedir}/src/main/resources/schematron</schematronDirectory>
<xsltDirectory>${basedir}/src/main/resources/xslt</xsltDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>convert</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>