我正在运行 Maven 3.0.3。我有一个不属于任何在线存储库的 JAR。我将它保存在我项目的 lib/quickbase.jar 中。理想情况下,在构建项目时,我希望将其自动安装到本地存储库,而不必先运行“mvn install:install-file”。我找到了这个并将其包含在我的 pom.xml 中......
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-quickbase-jar</id>
<phase>compile</phase>
<configuration>
<file>${basedir}/lib/quickbase.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>quickbase</groupId>
<artifactId>quickbase</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
我的 pom 中的依赖是
<dependency>
<groupId>quickbase</groupId>
<artifactId>quickbase</artifactId>
<version>1.0</version>
</dependency>
但是,运行 Maven 会导致
mvn clean test
...
[ERROR] Failed to execute goal on project didoclient: Could not resolve dependencies for project org.mainco.myco:didoclient:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: quickbase:quickbase:jar:1.0,
是否可以即时安装此依赖项,如果可以,我该如何调整上述内容?