我正尝试通过readme.md
pom.xml
)的jar
我希望导出的jar看起来像这样:
我尝试使用maven jar plugin
,如下所示。但是,我得到一个java文件,但里面没有readme.md
。
这是我的插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classesDirectory>src</classesDirectory>
<includes>
<include>**/*dummy/Dummy*</include>
<include>**/*.md</include>
</includes>
<finalName>mydummyjar</finalName>
</configuration>
</execution>
</executions>
我的文件系统如下所示:
我如何得到上图中的结构?
提前致谢。
感谢Veselin Davidov,下一个代码对我有用:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classesDirectory>/</classesDirectory>
<includes>
<include>**/*dummy/Dummy*</include>
<include>readme.md</include>
</includes>
<finalName>mydummyjar</finalName>
</configuration>
</execution>
</executions>