[英]Make jar library from web project (netbeans, maven, web)
I'm using Netbeans 8 in my maven web application. 我在我的Maven Web应用程序中使用Netbeans 8。
I need to export a jar library from my web application with only my own custom classes (not dependencies etc). 我只需要使用自己的自定义类(而不是依赖项等)从Web应用程序导出jar库。
How can I achieve that in a neat way. 我如何以一种整洁的方式实现这一目标。 The IDE only generates a .war, I need that custom .jar also to be used elsewhere. IDE只生成一个.war,我还需要该自定义.jar才能在其他地方使用。
thx. 谢谢。
Well, I found a solution and worked: 好吧,我找到了解决方案并工作:
Adding this in pom.xml inside /project/build/plugins 在/ project / build / plugins中的pom.xml中添加它
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<attachClasses>true</attachClasses>
<classesClassifier>classes</classesClassifier>
</configuration>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.