所以我使用的是 WAS8.5,我需要在我的项目中包含 WAS 库。我试过这个...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
</manifest>
<manifestEntries>
<Class-Path>C:\Program Files (x86)\IBM\WebSphere\AppServer\plugins</Class-Path>
<Class-Path>C:\Program Files (x86)\IBM\WebSphere\AppServer\java\jre\lib</Class-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
但我仍然看到...
错误:包 javax.jms 不存在
尽管...
二进制文件 ./plugins/javax.j2ee.jms.jar 匹配
但这似乎不适用于 mvn 包,所以我的问题是 2 折
1.)我应该使用 mvn package 还是 mvn jar:jar 因为后者似乎无法识别我的类的存储位置。如果我应该使用 jar 如何包含源目录。
2.) 如果我使用包,如何在类路径中包含该文件夹?