In the pom.xml
of my Maven project I have a list of items which I use for a loop through the iterator-maven-plugin
. The list of items looks like:
<items>
<item>Script1.sql<item>
<item>Script2.sql<item>
...
<item>Scriptn.sql<item>
</items>
However, instead of having the long set of items inside my pom.xml
, I would like to read them from an xml file as it will make it easier to update. I've seen that in the documentation of the iterator这是一种使用folders的方式,但我还没有找到将它们用于我的目的的方法:从外部文本文件中读取我的项目列表(可以是xml,txt,逗号分隔等)。如果您知道更好的方法,请告诉我。
项目的结构是:
.
│ pom.xml
│
├───db
│ │ list.xml
│ └───migration
│ script1.sql
│ script2.sql
│ script3.sql
│ script4.sql
├───src
│ ├───main
│ │ └───java
│ │ └───com
│ │ └───example
│ │ └───app
│ │ App.java
│ │
│ └───test
│ └───java
│ └───com
│ └───example
│ └───app
│ AppTest.java