We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pom 文件中引用本地 jar 包,可以不进行 install 操作,可以避免 污染 本地库?
污染
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>2.5.2</version> <executions> <execution> <id>install-taobao-sdk-auto</id> <phase>clean</phase> <configuration> <file>lib/taobao-sdk-java-auto.jar</file> <groupId>com.taobao</groupId> <artifactId>taobao-sdk-java-auto</artifactId> <version>1.0.0</version> <packaging>jar</packaging> <generatePom>true</generatePom> </configuration> <goals> <goal>install-file</goal> </goals> </execution>
在引用 本地 jar 包时,举例
<dependency> <groupId>com.taobao</groupId> <artifactId>taobao-sdk-java-auto</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${basedir}/lib/taobao-sdk-java-auto.jar</systemPath> </dependency>
这样操作的话,需要将本地 jar 包所在的目录添加到 <resources> 标签中,这样打包也就会自动打进去了。
<resources>
<build> <resources> <resource> <directory>src/main/resources</directory> </resource> <resource> <directory>lib</directory> <targetPath>libs</targetPath> <!--这行有没有不影响,只是为了打出来的 jar 里面的内容没那么乱 --> </resource> </resources> </build>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
pom 文件引用本地 jar 的一点儿小建议
pom 文件中引用本地 jar 包,可以不进行 install 操作,可以避免
污染
本地库?在引用 本地 jar 包时,举例
这样操作的话,需要将本地 jar 包所在的目录添加到
<resources>
标签中,这样打包也就会自动打进去了。The text was updated successfully, but these errors were encountered: