【发布时间】:2012-07-17 10:54:04
【问题描述】:
我是Maven的新手...
尝试创建一个简单的applet。
-
包括
applet的依赖项。 为此我已经尝试过:<repository> <id>lib</id> <name>lib</name> <releases> <enabled>true</enabled> <checksumPolicy>ignore</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> <url>file://${project.basedir}/lib</url> </repository>我将这些文件包含在我的项目结构下的
lib文件夹中。 这个库包含几个jar文件和一个JNI dll,我需要在我的applet中使用它们。 有没有比上面创建repository更好的选择,欢迎分享? -
使用依赖项打包小程序
jar。 为此我已经尝试过:<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>jar-with-dependencies</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration>
我希望以上内容能够将我的依赖项包装到一个 jar 中,但事实并非如此。
生成的jar 文件大小不包含依赖关系jar 文件。(我可以说因为jar 文件的size 对于jars 有和没有依赖关系都保持不变)
我使用Maven 做事的方式是否正确?
【问题讨论】:
标签: maven maven-2 jar-signing