I am trying to install the node and npm using maven frontend plugin during build.
pom.xml Configuration as below
<properties>
<nodejs.version>v14.15.1</nodejs.version>
<npm.version>6.14.8</npm.version>
<npmRepoUrl> URL </npmRepoUrl>
<nodeRepoUrl> URL </nodeRepoUrl>
</properties>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<nodeDownloadRoot>${nodeRepoUrl}</nodeDownloadRoot>
<npmDownloadRoot>${nodeRepoUrl}</npmDownloadRoot>
<nodeVersion>${nodejs.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
<workingDirectory>src/main/utilities</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<phase>validate</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install test</id>
<phase>validate</phase>
<goals>
<goal>npm</goal>
</goals>
</execution>
</executions>
</plugin>
Using above configuration node and NPM got installed successfully but still gives error that npx command not found for further operations
[INFO] Installing node version v14.15.1
[INFO] Downloading <NODE URL >
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] Unpacking
[INFO] Copying node binary from
[INFO] Installed node locally.
[INFO] Installing npm version 6.14.8
[INFO] Downloading <NPM URL >
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] Unpacking
[INFO] Installed npm locally.
Am I missing any configuration can someone please help ?
I'm trying to execute the following in my local AEM 6.5.12 instance...
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=35 -D appTitle="WKND Sites Project" -D appId="wknd" -D groupId="com.adobe.aem.guides" -D artifactId="aem-guides-wknd" -D package="com.adobe.aem.guides.wknd" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.12"
...but I keep getting errors, such as the following:
[INFO] Reactor Summary for WKND Sites Project 0.0.1-SNAPSHOT:
[INFO]
[INFO] WKND Sites Project ................................. SUCCESS [ 0.457 s]
[INFO] WKND Sites Project - Core .......................... SUCCESS [ 18.337 s]
[INFO] WKND Sites Project - UI Frontend ................... FAILURE [ 1.389 s]
[INFO] WKND Sites Project - Repository Structure Package .. SKIPPED
[INFO] WKND Sites Project - UI apps ....................... SKIPPED
[INFO] WKND Sites Project - UI content .................... SKIPPED
[INFO] WKND Sites Project - UI config ..................... SKIPPED
[INFO] WKND Sites Project - All ........................... SKIPPED
[INFO] WKND Sites Project - Integration Tests ............. SKIPPED
[INFO] WKND Sites Project - Dispatcher .................... SKIPPED
[INFO] WKND Sites Project - UI Tests ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.499 s
[INFO] Finished at: 2022-09-22T11:20:18-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:install-node-and-npm (install node and npm) on project aem-guides-wknd.ui.frontend: Could not download npm: Could not download https://registry.npmjs.org/npm/-/npm-6.17.14.tgz: Unknown host No such host is known (registry.npmjs.org) -> [Help 1]
Here's my root pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<nodeVersion>v12.22.7</nodeVersion>
<npmVersion>6.17.14</npmVersion>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven Jar Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<!-- Maven Clean Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- BND Maven Plugin -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd>
Initially, JAVA HOME was pointing to a JRE folder, but I've since changed it to point to a JDK. Also, there's another discussion where it was suggested to do the following, which worked for several people, but did not work for me:
Change the npm verson of pom.xml in ui folder from 6.4.1 to 3.10.8.
UPDATE: After updating the pom.xml file's npmVersion, I ran Maven again and now get this error:
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project aem-guides-wknd.ui.frontend: Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
I use frontend-maven-plugin to build my spring boot program,but I have an error.
Error Message:
[INFO] --- frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) # monitor-admin ---
[INFO] Node v10.16.0 is already installed.
[INFO] NPM 6.9.0 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm install) # monitor-admin ---
[INFO] Running 'npm install' in /Users/xxx/Program/xxx/monitor-ui
[WARNING] npm WARN eslint-loader#2.2.1 requires a peer of eslint#>=1.6.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
[WARNING] npm WARN sass-loader#10.1.0 requires a peer of node-sass#^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
[WARNING] npm WARN sass-loader#10.1.0 requires a peer of fibers#>= 3.1.0 but none is installed. You must install peer dependencies yourself.
[ERROR]
[INFO] up to date in 4.55s
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm run build) # monitor-admin ---
[INFO] Running 'npm run build:qa' in /Users/xxx/Program/xxx/monitor-ui
[INFO]
[INFO] > monitor#1.0.0 build:qa /Users/xxx/Program/xxx/monitor-ui
[INFO] > vue-cli-service build --mode qa
[INFO]
[INFO]
[ERROR] - Building for qa...
[INFO] WARNING Compiled with 2 warnings5:30:05 PM
[INFO]
[INFO] warning
[INFO]
My pom:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<workingDirectory>${vue.project.root}</workingDirectory>
<downloadRoot>http://npm.taobao.org/mirrors/node/</downloadRoot>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v10.16.0</nodeVersion>
<npmVersion>6.9.0</npmVersion>
</configuration>
</execution>
<!-- Install all project dependencies -->
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<!-- optional: default phase is "generate-resources" -->
<phase>generate-resources</phase>
<!-- Optional configuration which provides for running any npm command -->
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<!-- Build and minify static files -->
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build:${activatedProperties}</arguments>
</configuration>
</execution>
</executions>
</plugin>
The final build was successful.Program also can run.I don't know why this error occurred.All log flows look normal.The error has no details, only one [error].Thank you for your help
Upgrading frontend-maven-plugin from 1.6 to 1.10.0 worked for me
<dependency>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.10.0</version>
</dependency>
It's not clear to me if I'm able to use maven-jaxb2-plugin on a jdk11 maven project.
My pom.xml and mvn are using jdk11.
I know jaxb is not distributed with jdk 11.
I'm trying to generate code from wsdl:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generateDirectory>${project.basedir}/src/main/java/generated-sources/kenexa</generateDirectory>
<generatePackage>com.baeldung.springsoap.client.gen</generatePackage>
<schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
<noFileHeader>true</noFileHeader>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
</configuration>
</plugin>
I'm getting:
$ mvn generate-sources
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< cat.catsalut.hes.visor:hes-visor-api-service >------------
[INFO] Building Visor HES 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-jaxb2-plugin:0.14.0:generate (default) # hes-visor-api-service ---
[INFO] Latest timestamp of the source resources is [2021-01-13 16:40:21.396], earliest timestamp of the target resources is [2021-01-13 16:40:28.828].
[INFO] Sources are up-to-date, XJC will be skipped.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.616 s
[INFO] Finished at: 2021-01-13T16:40:40+01:00
[INFO] ------------------------------------------------------------------------
```
Any ideas?
First i had download Liferay with Eclipse. I had create a Liferay project and i add a service.xml in my portlet (in my project Liferay) to use Service Builder.
When i click on Build Service button (look image) Button Build Service
I have that error :
`
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Net'COFILMO - Pom parent
[INFO] Net'AVEO - Portlets - Pom parent
[INFO] app_chequier
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Net'COFILMO - Pom parent 1.0.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Net'COFILMO - Pom parent ........................... FAILURE [ 0.002 s]
[INFO] Net'AVEO - Portlets - Pom parent ................... SKIPPED
[INFO] app_chequier ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.206 s
[INFO] Finished at: 2017-11-16T14:13:33+01:00
[INFO] Final Memory: 6M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "build-service". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
`
I don't know how i can resolve the problem.
Thanks in advance.
I use the Liferay version 7 and that it's my POM.xml
`<?xml version="1.0"?>
<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>
<groupId>com.utlimate</groupId>
<artifactId>UltimateTesting</artifactId>
<packaging>pom</packaging>
<name>UltimateTesting</name>
<version>1.0.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.portal.tools.service.builder</artifactId>
<version>1.0.175</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>UltimateTesting-portlet</module>
<module>UltimateTesting-portlet-service</module>
</modules>
</project>`