Maven引本地Jar包并打包插件

将本地Jar包Install到本地的Maven仓库中,之后在dependency中正常引用

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-install-plugin</artifactId>
    <version>2.5.2</version>
    <executions>
        <execution>
            <id>install-external</id>
            <phase>clean</phase>
            <configuration>
                <file>${project.basedir}/src/main/resources/xxxx.jar</file>
                <repositoryLayout>default</repositoryLayout>
                <groupId>com.xxx.xxxx</groupId>
                <artifactId>xxxxx</artifactId>
                <version>1.0-SNAPSHOT</version>
                <packaging>jar</packaging>
                <generatePom>true</generatePom>
            </configuration>
            <goals>
                <goal>install-file</goal>
            </goals>
        </execution>
    </executions>
</plugin>

发表评论

邮箱地址不会被公开。 必填项已用*标注