문제

I am new to maven. My project requirement is below:

I have a build.xml file which will merge N number of files to create a single file in a target folder. -- This is working perfectly fine when running with ant build.

Now I have to integrate this build.xml file with pom.xml file so that when I will run mvn deploy / install, it will run the build.xml file also to generate the consolidated single file.

Now I tried using maven-antrun-plugin, but it is not working. Could you please help me here?

Please let me know if you need any details from me.

Thanks,

도움이 되었습니까?

해결책

Did you try using the following configuration ? :

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.7</version>
    <executions>
      <execution>
        <phase>process-resources</phase>
        <configuration>
          <target name="runbuild">
            <ant antfile="path/to/build.xml"/>
          </target>
        </configuration>
        <goals>
          <goal>run</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top