Maven子串函数

时间:2015-02-17 09:07:03

标签: maven subscript

我有一个数组,其元素是" devices-persistence"," events-persistence"和" logs-persistence"。有3个是目录名,每个目录名都有名为" devices"," events"和"记录"。我在我的代码中使用目录和子目录。但是,我不知道如何获得sub-dir的值,例如日志,事件,设备。因为这个我的代码是一半,我被卡住了。我想将zip文件从一个位置复制到另一个位置然后解压缩。我有这么多文件。请建议我如何做到这一点。我是maven的新手因此请给我代码:P。谢谢。请参阅以下代码:

        <plugin>
              <groupId>com.soebes.maven.plugins</groupId>
              <artifactId>iterator-maven-plugin</artifactId>
              <version>0.3</version>
              <executions>
                <execution>
                  <phase>validate</phase>
                  <goals>
                    <goal>iterator</goal>
                  </goals>
                  <configuration>
                    <lists>
                      <list>devices-persistence</list>
                      <list>logs-persistence</list>
                      <list>events-persistence</list>
                    </lists>

                    <pluginExecutors>
                      <pluginExecutor>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <version>1.7</version>
                        </plugin>
                        <goal>run</goal>
                        <configuration>
                          <tasks>
                                <echo message="base dir is ${item}" />
                                <echo message="base dir is ${list}" />
                                <echo message="base dir is ${basedir}." />

                                <copy file="src/main/resources/.config.zip" todir="${user.home}/${dasmo.storage}/devices-persistence/devices/" />
                                <unzip src="${user.home}/${dasmo.storage}/devices-persistence/devices/.config.zip" dest="${user.home}/${dasmo.storage}/devices-persistence/devices/" />
                            </tasks>
                        </configuration>

                      </pluginExecutor>
                    </pluginExecutors>
                  </configuration>
                </execution>
              </executions>
            </plugin>

0 个答案:

没有答案