Add profile to conditionally build account2 theme (#10267)

* Add profile to conditionally build account2 theme

* Use a property for activation instead
This commit is contained in:
Jon Koops 2022-02-17 23:10:41 +01:00 committed by GitHub
parent 323c08c8cc
commit f2ed799b8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,57 +24,12 @@
<artifactId>maven-clean-plugin</artifactId> <artifactId>maven-clean-plugin</artifactId>
<configuration> <configuration>
<filesets> <filesets>
<fileset>
<directory>${dir.account2}/web_modules</directory>
</fileset>
<fileset> <fileset>
<directory>${dir.common}/web_modules</directory> <directory>${dir.common}/web_modules</directory>
</fileset> </fileset>
</filesets> </filesets>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<!-- Download NPM tools -->
<execution>
<id>setup-node</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>initialize</phase>
</execution>
<!-- Compile stuff -->
<execution>
<id>compile-account2</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>${dir.account2}</workingDirectory>
<arguments>run build --scripts-prepend-node-path</arguments>
</configuration>
</execution>
<!-- Download NPM packages -->
<execution>
<id>npm-install-account2</id>
<phase>initialize</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>${dir.account2}</workingDirectory>
<arguments>${args.npm.install}</arguments>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<installDirectory>${project.basedir}</installDirectory>
</configuration>
</plugin>
</plugins> </plugins>
<resources> <resources>
@ -131,6 +86,71 @@
</build> </build>
<profiles> <profiles>
<profile>
<id>account2</id>
<activation>
<property>
<name>!skipAccount2</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${dir.account2}/web_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<!-- Download NPM tools -->
<execution>
<id>setup-node</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>initialize</phase>
</execution>
<!-- Compile stuff -->
<execution>
<id>compile-account2</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>${dir.account2}</workingDirectory>
<arguments>run build --scripts-prepend-node-path</arguments>
</configuration>
</execution>
<!-- Download NPM packages -->
<execution>
<id>npm-install-account2</id>
<phase>initialize</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>${dir.account2}</workingDirectory>
<arguments>${args.npm.install}</arguments>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<installDirectory>${project.basedir}</installDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile> <profile>
<id>admin-preview</id> <id>admin-preview</id>
<dependencies> <dependencies>