Hi, I am having a problem with the following scenario - I'm attempting to use the *maven-install-plugin* to install a jar in my local repository. I am binding the *install-file* goal to the *validate* phase (very early on), so that the jar would be installed before anything else, and so that the build process will have it available. However, that doesn't seem to work as expected - the dependency I'm trying to install is for some reason required even earlier, and so I get: *[ERROR] Failed to execute goal on project my-project: Could not resolve dependencies for project org:my-project:jar:0.16-SNAPSHOT: Could not find artifact org:new-dep:jar:0.16-SNAPSHOT in jboss-public-repository-group ( https://repository.jboss.org/nexus/content/repositories/central/) -> [Help 1]* With debug mode on - it looks like the default plugins are executed, and the first thing they require is the full dependency tree to be OK: [ERROR] Failed to execute goal on project launchpad-touchdata-api: Could not resolve dependencies for project org:launchpad-touchdata-api:jar:0.16-SNAPSHOT: The repository system is offline but the artifact org:launchpad-security-api:jar:0.16-SNAPSHOT is not available in the local repository. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project launchpad-touchdata-api: Could not resolve dependencies for project org:launchpad-touchdata-api:jar:0.16-SNAPSHOT: The repository system is offline but the artifact org:launchpad-security-api:jar:0.16-SNAPSHOT is not available in the local repository. at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210) at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Is that correct? If so, is there no way to use maven-install-plugin to install the local dependency before the build will actually require the dependency? I will mention that, if the jar is installed like this, but it's not required by this project directly as a dependency - it gets installed just fine. Any help is appreciated. Thanks. Eugen. -- Eugen Paraschiv Senior Java Programmer, Optaros Mobile: +40728896170 Blog: www.baeldung.com Twitter: https://twitter.com/baeldung