Closed asautins closed 2 years ago
I am adding some steps to include a react frotend build in my pom.xml file, generally following the example here:
https://www.wissel.net/blog/2021/12/deploying-your-frontend-as-webjar.html
The expected behavior is I add the following rule:
<execution> <id>npm install (clean)</id> <goals> <goal>exec</goal> </goals> <phase>pre-clean</phase> <configuration> <executable>npm</executable> <arguments> <argument>install</argument> </arguments> </configuration> </execution>
That it runs successfully
The actual behavior is the rule fails. When run with the -X flag I see the following error:
npm ERR! errno -36 npm ERR! ENAMETOOLONG: name too long, open
It appears the parent pom defines the following
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> <configuration> <arguments> <argument>-classpath</argument> <classpath/> <argument>-XX:TieredStopAtLevel=1</argument> <argument>-Dcom.sun.management.jmxremote</argument> <argument>${exec.mainClass}</argument> </arguments> </configuration> </plugin>
Which seems to add the classpath and additional variables to the end of exec:exec rules.
execute mvn clean on the following pom will result in a failure.
mvn clean
?xml version="1.0" encoding="UTF-8"?> <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>testproject</artifactId> <version>0.1</version> <packaging>jar</packaging> <parent> <groupId>io.micronaut</groupId> <artifactId>micronaut-parent</artifactId> <version>3.4.3</version> </parent> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>npm install (clean)</id> <goals> <goal>exec</goal> </goals> <phase>pre-clean</phase> <configuration> <executable>npm</executable> <arguments> <argument>install</argument> <argument> </argument> </arguments> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
No response
3.4.3
You need to define your exec-maven-plugin configuration node like this:
exec-maven-plugin
<configuration combine.self="override">
That works great. thank you!
Expected Behavior
I am adding some steps to include a react frotend build in my pom.xml file, generally following the example here:
https://www.wissel.net/blog/2021/12/deploying-your-frontend-as-webjar.html
The expected behavior is I add the following rule:
That it runs successfully
Actual Behaviour
The actual behavior is the rule fails. When run with the -X flag I see the following error:
It appears the parent pom defines the following
Which seems to add the classpath and additional variables to the end of exec:exec rules.
Steps To Reproduce
execute
mvn clean
on the following pom will result in a failure.Environment Information
No response
Example Application
No response
Version
3.4.3