Domanda

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,

È stato utile?

Soluzione

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>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top