我有一个Maven项目,其结构如下:
project
-src
--main
---java
----(All my .java files are here in their packages)
---resource
----(All my resources are here)
-database (HSQLDB files)
--db.script
--db.properties
--db.data
-target
--Maven build directory
pom.xml
我希望maven jar插件在构建JAR文件时将其打包到数据库文件夹中。我已尝试按照此处所述的方式进行包含:https://maven.apache.org/plugins/maven-jar-plugin/examples/include-exclude.html,但它无法找到目录“../database”(或../../database或../../../database!),而且现在它也不包括任何类或资源(以前它是包括它们的)。
那么,在maven jar插件的配置中应该包含什么?正确的路径是什么,如何保留以前包括的文件?
谢谢
copy-resources
目标。请参考:https://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html - davidxxx