Skip to content

Commit 01fc4b1

Browse files
committed
[refactor] Simplify Maven Resources plugin config
1 parent 2851297 commit 01fc4b1

2 files changed

Lines changed: 30 additions & 31 deletions

File tree

pom.xml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,33 @@
8282

8383
<build>
8484

85+
<resources>
86+
<resource>
87+
<directory>src/main/xar-resources</directory>
88+
<filtering>false</filtering>
89+
<excludes>
90+
<exclude>modules/git-sync.xql</exclude>
91+
<exclude>services/git-commit.xql</exclude>
92+
</excludes>
93+
<targetPath>xar-resources</targetPath>
94+
</resource>
95+
<resource>
96+
<directory>src/main/xar-resources</directory>
97+
<filtering>true</filtering>
98+
<includes>
99+
<include>modules/git-sync.xql</include>
100+
<include>services/git-commit.xql</include>
101+
</includes>
102+
<targetPath>xar-resources</targetPath>
103+
</resource>
104+
<resource>
105+
<!-- NOTE(AR): the templates are also needed at runtime by the generated forms -->
106+
<directory>src/main/formGenerator/templates</directory>
107+
<filtering>false</filtering>
108+
<targetPath>xar-resources/forms/templates</targetPath>
109+
</resource>
110+
</resources>
111+
85112
<pluginManagement>
86113
<plugins>
87114
<plugin>
@@ -96,40 +123,12 @@
96123
<plugin>
97124
<groupId>org.apache.maven.plugins</groupId>
98125
<artifactId>maven-resources-plugin</artifactId>
99-
<version>3.3.1</version>
100126
<executions>
101127
<execution>
102-
<id>copy-xar-resources</id>
103-
<phase>process-resources</phase>
104-
<goals>
105-
<goal>copy-resources</goal>
106-
</goals>
107-
<configuration>
108-
<resources>
109-
<resource>
110-
<directory>src/main/xar-resources</directory>
111-
<filtering>false</filtering>
112-
</resource>
113-
</resources>
114-
<outputDirectory>${project.build.directory}/xar-resources</outputDirectory>
115-
</configuration>
116-
</execution>
117-
<execution>
118-
<id>copy-formGenerator-templates</id>
119128
<phase>process-resources</phase>
120129
<goals>
121-
<goal>copy-resources</goal>
130+
<goal>resources</goal>
122131
</goals>
123-
<configuration>
124-
<resources>
125-
<!-- NOTE(AR): the templates are also needed at runtime by the generated forms -->
126-
<resource>
127-
<directory>src/main/formGenerator/templates</directory>
128-
<filtering>false</filtering>
129-
</resource>
130-
</resources>
131-
<outputDirectory>${project.build.directory}/xar-resources/forms/templates</outputDirectory>
132-
</configuration>
133132
</execution>
134133
</executions>
135134
</plugin>

xar-assembly.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
<nav-base>/exist/apps/manuForma</nav-base>
3434
<login-domain>org.exist.login</login-domain>
3535

36-
<!-- includes everything in target/xar-resources and target/generated-xar-resources -->
36+
<!-- includes everything in target/classes/xar-resources and target/generated-xar-resources -->
3737
<fileSets>
3838
<fileSet>
39-
<directory>${project.build.directory}/xar-resources</directory>
39+
<directory>${project.build.outputDirectory}/xar-resources</directory>
4040
</fileSet>
4141
<fileSet>
4242
<directory>${project.build.directory}/generated-xar-resources</directory>

0 commit comments

Comments
 (0)