| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| --> |
| <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/maven-v4_0_0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| <parent> |
| <groupId>org.apache.myfaces.tobago</groupId> |
| <artifactId>tobago</artifactId> |
| <version>5.0.0-SNAPSHOT</version> |
| </parent> |
| <packaging>pom</packaging> |
| <name>Tobago Themes</name> |
| <artifactId>tobago-theme</artifactId> |
| |
| <properties> |
| <theme.name>undefined-theme-name</theme.name> |
| <frontend.skip>true</frontend.skip> |
| </properties> |
| |
| <modules> |
| <module>tobago-theme-standard</module> |
| <module>tobago-theme-scarborough</module> |
| <module>tobago-theme-speyside</module> |
| <module>tobago-theme-roxborough</module> |
| <module>tobago-theme-charlotteville</module> |
| </modules> |
| |
| <build> |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <includes> |
| <include>META-INF/tobago-config.xml</include> |
| </includes> |
| <filtering>true</filtering> |
| </resource> |
| <resource> |
| <directory>src/main/resources/META-INF/resources/tobago/${theme.name}</directory> |
| <excludes> |
| <exclude>**/tobago-bootstrap/_version/**</exclude> |
| </excludes> |
| <filtering>false</filtering> |
| <targetPath>META-INF/resources/tobago/${theme.name}</targetPath> |
| </resource> |
| <resource> |
| <directory>src/main/resources/META-INF/resources/tobago/${theme.name}/tobago-bootstrap/_version</directory> |
| <filtering>false</filtering> |
| <targetPath>META-INF/resources/tobago/${theme.name}/tobago-bootstrap/${project.version}</targetPath> |
| </resource> |
| </resources> |
| |
| <plugins> |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>2.7</version> |
| <executions> |
| <execution> |
| <!-- copy customization to target/bootstrap --> |
| <id>step #1: copy-custom</id> |
| <phase>generate-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/npm</outputDirectory> |
| <resources> |
| <resource> |
| <directory>src/main/npm</directory> |
| <includes> |
| <include>js/*.js</include> |
| <include>ts/*.ts</include> |
| <include>jest.config.js</include> |
| <include>package.json</include> |
| <include>package-lock.json</include> |
| <include>postcss.config.js</include> |
| <include>rollup.config.js</include> |
| <include>tsconfig.json</include> |
| <include>tslint.json</include> |
| <include>.babelrc</include> |
| <include>.browserslistrc</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>src/main</directory> |
| <includes> |
| <include>scss/*</include> |
| </includes> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| <execution> |
| <!-- copy the lock to src to be under source control --> |
| <id>step #6: copy-bootstrap-dist to src</id> |
| <phase>process-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory> |
| ${basedir}/src/main/npm |
| </outputDirectory> |
| <resources> |
| <resource> |
| <directory>${project.build.directory}/npm</directory> |
| <includes> |
| <include>package-lock.json</include> |
| </includes> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| <execution> |
| <!-- copy the result to target/classes --> |
| <id>step #7: copy-bootstrap-dist to target</id> |
| <phase>process-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory> |
| ${project.build.outputDirectory}/META-INF/resources/tobago/${theme.name}/tobago-bootstrap/${project.version} |
| </outputDirectory> |
| <resources> |
| <resource> |
| <directory>${project.build.directory}/npm</directory> |
| <includes> |
| <include>css/tobago.css</include> |
| <include>css/tobago.min.css</include> |
| <include>css/tobago.css.map</include> |
| <include>css/tobago.min.css.map</include> |
| <include>js/test.js</include> |
| <include>js/test.js.map</include> |
| <include>js/ext*.js</include> |
| <include>js/ext*.js.map</include> |
| <include>ts/ext*.ts</include> |
| <include>js/tobago*.js</include> |
| <include>js/tobago*.js.map</include> |
| <include>ts/tobago*.ts</include> |
| <include>ts/test.ts</include> |
| <!-- todo: check a better way for polyfill --> |
| <include>node_modules/@babel/polyfill/dist/polyfill.js</include> |
| </includes> |
| </resource> |
| </resources> |
| <!-- overwrite, because the default maven-resources-plugin step copies an older version to here --> |
| <overwrite>true</overwrite> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <version>3.1.1</version> |
| <executions> |
| <execution> |
| <!-- copy customization to target/bootstrap --> |
| <id>step #2: unpack-custom</id> |
| <phase>generate-resources</phase> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/npm</outputDirectory> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.myfaces.tobago</groupId> |
| <artifactId>tobago-core</artifactId> |
| <version>${project.version}</version> |
| </artifactItem> |
| </artifactItems> |
| <includes>**/*.scss</includes> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>com.github.eirslett</groupId> |
| <artifactId>frontend-maven-plugin</artifactId> |
| <version>1.7.6</version> |
| |
| <!-- optional --> |
| <configuration> |
| <nodeVersion>v10.15.3</nodeVersion> <!-- contains npm 6.4.1 --> |
| |
| <!-- optional: Where to download Node.js binary from. Defaults to http://nodejs.org/dist/ --> |
| <!--<nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>--> |
| |
| <!-- optional: Where to download NPM binary from. Defaults to http://registry.npmjs.org/npm/-/ --> |
| <!--<npmDownloadRoot>https://registry.npmjs.org/npm/-/</npmDownloadRoot>--> |
| |
| <!-- optional: Registry override, passed as the registry option during npm install if set. --> |
| <!--<npmRegistryURL>https://registry.npmjs.org/</npmRegistryURL>--> |
| |
| <!-- optional: where to install node and npm. Defaults to the working directory --> |
| <installDirectory>${project.build.directory}/npm</installDirectory> |
| <workingDirectory>${project.build.directory}/npm</workingDirectory> |
| <skip>${frontend.skip}</skip> |
| </configuration> |
| |
| <executions> |
| |
| <execution> |
| <!-- install "node" and "npm" --> |
| <id>step #3: install node and npm</id> |
| <goals> |
| <goal>install-node-and-npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| </execution> |
| |
| <execution> |
| <!-- install all other required stuff for "bootstrap" --> |
| <id>step #4: npm install</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| <configuration> |
| <!--<arguments>install jquery popper.js ajv-keywords eslint-plugin-compat ajv eslint</arguments>--> |
| <arguments>install</arguments> |
| </configuration> |
| </execution> |
| |
| <execution> |
| <!-- build "Tobago with Bootstrap" --> |
| <id>step #5: npm run css</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| <configuration> |
| <arguments>run css</arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>step #5a: test</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| <configuration> |
| <arguments>run test</arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>step #5b: ts-lint + ts-compile</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| <configuration> |
| <arguments>run ts</arguments> |
| </configuration> |
| </execution> |
| |
| <!-- XXX remove it |
| <execution> |
| <id>step #5c: es6 to es5</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| <configuration> |
| <arguments>run js-transpile</arguments> |
| </configuration> |
| </execution> |
| --> |
| |
| <!-- |
| <execution> |
| <id>step #5d: minify</id> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| <configuration> |
| <arguments>run js-minify</arguments> |
| </configuration> |
| </execution> |
| --> |
| </executions> |
| </plugin> |
| |
| </plugins> |
| </build> |
| |
| </project> |