Skip to content

Commit fc453f3

Browse files
committed
add bank schema enum generation to maven validation phase
1 parent fb80af9 commit fc453f3

File tree

1 file changed

+40
-16
lines changed

1 file changed

+40
-16
lines changed

pom.xml

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,30 @@
263263

264264
<plugins> <!-- plugins inherited by all child POMs -->
265265

266+
<!-- generate bank shcema enums -->
267+
<plugin>
268+
<groupId>org.apache.maven.plugins</groupId>
269+
<artifactId>maven-antrun-plugin</artifactId>
270+
<version>3.1.0</version>
271+
<executions>
272+
<execution>
273+
<id>bank-schema-enums</id>
274+
<phase>validate</phase>
275+
<goals>
276+
<goal>run</goal>
277+
</goals>
278+
<inherited>false</inherited> <!-- make this one NOT inherited -->
279+
<configuration>
280+
<target>
281+
<exec executable="python3">
282+
<arg value="libexec/bank-schema-enums"/>
283+
</exec>
284+
</target>
285+
</configuration>
286+
</execution>
287+
</executions>
288+
</plugin>
289+
266290
<!-- static analysis -->
267291
<plugin>
268292
<groupId>com.github.spotbugs</groupId>
@@ -428,6 +452,22 @@
428452
<pluginManagement>
429453
<plugins> <!-- plugin configurations (unused in child POMs unless declared) -->
430454

455+
<!-- delete auto-generated bank schema enums during clean phase -->
456+
<plugin>
457+
<artifactId>maven-clean-plugin</artifactId>
458+
<version>3.4.0</version>
459+
<configuration>
460+
<filesets>
461+
<fileset>
462+
<directory>common-tools/clas-io/src/main/java/org/jlab/io/banks</directory>
463+
<includes>
464+
<include>**/*.java</include>
465+
</includes>
466+
</fileset>
467+
</filesets>
468+
</configuration>
469+
</plugin>
470+
431471
<!-- generate minimal POM files for deployment, containing GAV (groupID, artifactId, version) -->
432472
<plugin>
433473
<groupId>org.codehaus.mojo</groupId>
@@ -447,22 +487,6 @@
447487
</executions>
448488
</plugin>
449489

450-
<!-- delete auto-generated bank schema enums -->
451-
<plugin>
452-
<artifactId>maven-clean-plugin</artifactId>
453-
<version>3.4.0</version>
454-
<configuration>
455-
<filesets>
456-
<fileset>
457-
<directory>common-tools/clas-io/src/main/java/org/jlab/io/banks</directory>
458-
<includes>
459-
<include>**/*.java</include>
460-
</includes>
461-
</fileset>
462-
</filesets>
463-
</configuration>
464-
</plugin>
465-
466490
<!-- deployment configuration -->
467491
<plugin>
468492
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)