Bonjour,

j'utilise le plugin exec-maven-plugin de la manière suivante

Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
			<plugin>
			  <artifactId>exec-maven-plugin</artifactId>
			  <groupId>org.codehaus.mojo</groupId>
			  <version>1.6.0</version>
			  <executions>
			    <execution>
			      <id>npm install</id>
			      <goals>
			        <goal>exec</goal>
			      </goals>
			      <phase>generate-sources</phase>
			      <configuration>
			        <executable>${npm.executable}</executable>
			        <arguments>
			          <argument>install</argument>
			        </arguments>
			        <workingDirectory>${basedir}/target/angular5/tourism</workingDirectory>
			        <target>
			          <echo message="Npm install" />
			        </target>
			      </configuration>
			    </execution>
			  </executions>
			</plugin>

et j'ai l'erreur suivante

java.io.IOException: Cannot run program "npm" (in directory "/Users/admin/Application-Marwen/workspace/Tourism/Tourism-Web/target/angular5/tourism"): error=2, No such file or directory
pourtant le répertoire "/Users/admin/Application-Marwen/workspace/Tourism/Tourism-Web/target/angular5/tourism" existe bien (j'ai vérifié) et la commande npm install dans ce repertoire fonctionne bien dans une fenêtre de commande. Merci d'avance pour votre réponse