Skip to content

Commit d7ad473

Browse files
committed
Added contract profile, to only build API.
Local profile now builds frontend
1 parent 01aa8ab commit d7ad473

File tree

2 files changed

+64
-44
lines changed

2 files changed

+64
-44
lines changed

api/pom.xml

Lines changed: 55 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,65 @@
399399
</execution>
400400
</executions>
401401
</plugin>
402+
<plugin>
403+
<groupId>com.github.eirslett</groupId>
404+
<artifactId>frontend-maven-plugin</artifactId>
405+
<version>${frontend-maven-plugin.version}</version>
406+
<configuration>
407+
<skip>${skipUIBuild}</skip>
408+
<workingDirectory>../frontend</workingDirectory>
409+
<environmentVariables>
410+
<VITE_TAG>${project.version}</VITE_TAG>
411+
<VITE_COMMIT>${git.commit.id.abbrev}</VITE_COMMIT>
412+
</environmentVariables>
413+
</configuration>
414+
<executions>
415+
<execution>
416+
<id>install node and pnpm</id>
417+
<goals>
418+
<goal>install-node-and-pnpm</goal>
419+
</goals>
420+
<configuration>
421+
<nodeVersion>${node.version}</nodeVersion>
422+
<pnpmVersion>${pnpm.version}</pnpmVersion>
423+
</configuration>
424+
</execution>
425+
<execution>
426+
<id>pnpm install</id>
427+
<goals>
428+
<goal>pnpm</goal>
429+
</goals>
430+
<configuration>
431+
<arguments>install</arguments>
432+
</configuration>
433+
</execution>
434+
<execution>
435+
<id>pnpm build</id>
436+
<goals>
437+
<goal>pnpm</goal>
438+
</goals>
439+
<configuration>
440+
<arguments>build</arguments>
441+
</configuration>
442+
</execution>
443+
</executions>
444+
</plugin>
402445
</plugins>
403446
</build>
404447

405448
<profiles>
449+
<profile>
450+
<id>!local</id>
451+
<properties>
452+
<skipUIBuild>true</skipUIBuild>
453+
</properties>
454+
</profile>
455+
<profile>
456+
<id>!prod</id>
457+
<properties>
458+
<skipUIBuild>true</skipUIBuild>
459+
</properties>
460+
</profile>
406461
<profile>
407462
<id>prod</id>
408463
<build>
@@ -450,49 +505,6 @@
450505
</execution>
451506
</executions>
452507
</plugin>
453-
<plugin>
454-
<groupId>com.github.eirslett</groupId>
455-
<artifactId>frontend-maven-plugin</artifactId>
456-
<version>${frontend-maven-plugin.version}</version>
457-
<configuration>
458-
<skip>${skipUIBuild}</skip>
459-
<workingDirectory>../frontend</workingDirectory>
460-
<environmentVariables>
461-
<VITE_TAG>${project.version}</VITE_TAG>
462-
<VITE_COMMIT>${git.commit.id.abbrev}</VITE_COMMIT>
463-
</environmentVariables>
464-
</configuration>
465-
<executions>
466-
<execution>
467-
<id>install node and pnpm</id>
468-
<goals>
469-
<goal>install-node-and-pnpm</goal>
470-
</goals>
471-
<configuration>
472-
<nodeVersion>${node.version}</nodeVersion>
473-
<pnpmVersion>${pnpm.version}</pnpmVersion>
474-
</configuration>
475-
</execution>
476-
<execution>
477-
<id>pnpm install</id>
478-
<goals>
479-
<goal>pnpm</goal>
480-
</goals>
481-
<configuration>
482-
<arguments>install</arguments>
483-
</configuration>
484-
</execution>
485-
<execution>
486-
<id>pnpm build</id>
487-
<goals>
488-
<goal>pnpm</goal>
489-
</goals>
490-
<configuration>
491-
<arguments>build</arguments>
492-
</configuration>
493-
</execution>
494-
</executions>
495-
</plugin>
496508
<plugin>
497509
<groupId>io.fabric8</groupId>
498510
<artifactId>docker-maven-plugin</artifactId>
@@ -525,5 +537,4 @@
525537
</build>
526538
</profile>
527539
</profiles>
528-
529540
</project>

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,13 @@
193193
</pluginManagement>
194194
</build>
195195

196+
<profiles>
197+
<profile>
198+
<id>contract</id>
199+
<modules>
200+
<module>contract</module>
201+
</modules>
202+
</profile>
203+
</profiles>
204+
196205
</project>

0 commit comments

Comments
 (0)