There is a fundamental issue here. You're trying to do this the wrong way. * The install goal is not for installing arbitrary files in the repo. For that you should use install-file. But the install-file goal is not intended to be bound to the build lifecycle, but for executing from the command line ("mvn install:install-file ...") * If you want to have a Maven project which installs three artifacts during the build lifecycle you should register the artifacts during the build. In your case where you seem to have some pre-build artifacts you could do this with maven-buildhelper-plugin [1]. Then they will be installed when you execute "mvn install".
But probably the most simple way to do this is to add the artifacts to your company's repo manager just once and then you're done with it. Nexus, for example, provides a GUI interface to do this. [1] http://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html /Anders On Mon, Mar 12, 2018 at 2:51 PM, Zos Rothko <zosrot...@orange.fr> wrote: > Hi > > I have a pom project that is is using the maven-instal-plugin to install 3 > artifacts in my local repository. But when running mvn install, none are > installed. What's wrong with this pom.xml > > > [INFO] Scanning for projects... > > [INFO] > [INFO] ------------------------------------------------------------ > ------------ > [INFO] Building maven 1.0.0 > [INFO] ------------------------------------------------------------ > ------------ > [INFO] > [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ maven > --- > [INFO] Installing C:\Users\fandre\Documents\MXW\MI-4.3\maven\pom.xml to > C:\Users\fandre\.m2\repository\fr\swisslife\archiev3\maven\ > 1.0.0\maven-1.0.0.pom > [INFO] ------------------------------------------------------------ > ------------ > [INFO] BUILD SUCCESS > [INFO] ------------------------------------------------------------ > ------------ > [INFO] Total time: 0.577 s > [INFO] Finished at: 2018-03-12T10:10:17+01:00 > [INFO] Final Memory: 6M/150M > [INFO] ------------------------------------------------------------ > ------------ > > > > <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>fr.swisslife.archiev3</groupId> > <artifactId>maven</artifactId> > <version>1.0.0</version> > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-install-plugin</artifactId> > <version>2.5.2</version> > <executions> > <execution> > <id>archieutils</id> > <goals> > <goal>install</goal> > </goals> > <configuration> > <groupId>fr.swisslife.archiev3</groupId> > <artifactId>archieutils</artifactId> > <version>0.0.1-SNAPSHOT</version> > <file>archieutils-0.0.1-SNAPSHOT.jar</file> > <packaging>jar</packaging> > <generatePom>true</generatePom> > </configuration> > </execution> > <execution> > <id>archiedm</id> > <goals> > <goal>install</goal> > </goals> > <configuration> > <groupId>fr.swisslife.archiev3</groupId> > <artifactId>archiedm</artifactId> > <version>0.0.1-SNAPSHOT</version> > <file>archiedm-0.0.1-SNAPSHOT.jar</file> > <packaging>jar</packaging> > <generatePom>true</generatePom> > </configuration> > </execution> > <execution> > <id>archieft</id> > <goals> > <goal>install</goal> > </goals> > <configuration> > <groupId>fr.swisslife.archiev3</groupId> > <artifactId>archieft</artifactId> > <version>0.0.1-SNAPSHOT</version> > <file>archieft-0.0.1-SNAPSHOT.jar</file> > <packaging>jar</packaging> > <generatePom>true</generatePom> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > <packaging>pom</packaging> > </project> > > >