Maven – Change output directory for apt-maven-plugin

maven-2maven-plugin

I am using apt-maven-plugin to process some Beehive Netui annotations before building a war.

The output of the apt processing is a _pageflow directory which contains struts config files (xml text) and the like. The problem is that it is being output in whatever directory I run maven from, not in the ${project.build.directory}/classes directory which is what I want. I tried setting the outputDirectory and the resourceTargetPath properties, but neither changed this behavior.

Is there another parameter to set that I'm missing?

Here's my current plugin configuration.

<build>
  <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>apt-maven-plugin</artifactId>
      <version>1.0-alpha-3</version>
      <inherited>false</inherited>
      <configuration>
        <outputDirectory>${project.build.directory}/classes</outputDirectory>
        <options>
          <option>web.content.root=${project.build.directory}/classes</option>
        </options>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>process</goal>
          </goals>
        </execution>
      </executions>
      <dependencies>
        <dependency>
          <groupId>weblogic</groupId>
          <artifactId>beehive-netui-compiler</artifactId>
          <version>${weblogic-version}</version>
        </dependency>
      </dependencies>
    </plugin>
  </plugins>
</build>

Best Answer

Your problem really looks like MOJO-1478 (are you using a Mac)? Maybe have a look at the patch (and reopen the issue or create a new one).

PS: Don't you have to configure a factory? I don't get how the beehive-netui-compiler dependency is used here. Is the factory magically picked up from that dependency just because you specified it?

Related Topic