You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2020/06/09 13:56:09 UTC

[pdfbox-docs] 01/02: PDFBOX-4848: add frontend-maven-plugin to download and run node.js and npm

This is an automated email from the ASF dual-hosted git repository.

msahyoun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git

commit efd008fe4ca685baede85451e2eb5b8d0b8113bd
Author: Maruan Sahyoun <sa...@fileaffairs.de>
AuthorDate: Tue Jun 9 15:45:27 2020 +0200

    PDFBOX-4848: add frontend-maven-plugin to download and run node.js and npm
---
 .gitignore |  5 +++++
 pom.xml    | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8f09cc8..bcf42a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,13 @@
+node/
+node_modules/
 staging/
 target/
+package-lock.json
 .classpath
 .project
 .sass-cache/
 .settings/
 .jekyll-cache/
 .jekyll-metadata
+.vscode
+
diff --git a/pom.xml b/pom.xml
index ba260af..cb7cbfb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,19 +34,69 @@
             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
             <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
             <git.scmContentUrl>git:https://gitbox.apache.org/repos/asf/pdfbox-docs.git</git.scmContentUrl>
+            <node.version>v10.15.3</node.version>
         </properties>
 
         <build>
-            <!--
-            	Publish to Apache CMS
-            	After completion log in to https://cms.apache.org/pdfbox/publish
-            	and click on the Submit button to commit to production.
-             -->
+            <pluginManagement>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-clean-plugin</artifactId>
+                        <version>3.1.0</version>
+                    </plugin>
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <version>1.7.5</version>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-scm-publish-plugin</artifactId>
+                        <version>1.1</version>
+                    </plugin>
+                </plugins>
+            </pluginManagement>
+
+
             <plugins>
                 <plugin>
+                    <groupId>com.github.eirslett</groupId>
+                    <artifactId>frontend-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>install node and npm</id>
+                            <goals>
+                                <goal>install-node-and-npm</goal>
+                            </goals>
+                            <configuration>
+                                <nodeVersion>${node.version}</nodeVersion>
+                            </configuration>
+                        </execution>
+                        <execution>
+                            <id>npm install</id>
+                            <goals>
+                                <goal>npm</goal>
+                            </goals>
+                            <configuration>
+                                <arguments>install --no-progress</arguments>
+                            </configuration>
+                        </execution>
+                        <execution>
+                            <id>npm build</id>
+                            <goals>
+                                <goal>npm</goal>
+                            </goals>
+                            <configuration>
+                                <arguments>run-script build</arguments>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+    
+                <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-scm-publish-plugin</artifactId>
-                    <version>1.1</version>
                     <configuration>
                         <content>staging</content>
                         <!--