我与Eclipse和Maven做这个estructure文件夹中的Java项目: enter image description here的.jar与Maven和Eclipse
好吧,当我做一个Maven安装创建的.jar采取这种结构的文件夹:
因此,层次结构是不一样的,并链接到图像和CSS不起作用。
我告诉你的pom.xml的
enter code here
http://maven.apache.org/xsd/maven-4.0.0.xsd“代码> 4.0.0 com.wepall 帕勒 0.4.0 com.thoughtworks.xstream XStream的 com.thoughtworks.xstream XStream的 1.4.9 帕勒
<!-- download source code in Eclipse, best practice -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<!-- Set a compiler level -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<!-- Maven Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- MainClass in mainfest make a executable jar -->
<archive>
<manifest>
<mainClass>com.wepall.palle.MainApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- bind to the packaging phase -->
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
任何想法?
非常感谢! 最好的问候
你能成为一个更具体一点??? –
是的,对不起,mi问题是关于.jar的herarky文件夹, 我解释你, – wepall
当我让.jar没有生成具有该项目的层次结构时,src的原始结构是src \ main \ java \ com \ wepall \ palle和src \ main \ resources ,最后是在java文件夹内,资源文件夹位于同一个文件夹中。 什么时候它必须是一个java的文件夹和一个com文件夹(包含类)和其他资源以及文件夹css,Images,lib,Projects,RobotFiles内部。 – wepall