views:

99

answers:

1

Greetings

I have an ear artifact with a finalName tag in its build definition in the POM.

<artifactId>application-app</artifactId>
...
<build>
 <finalName>application</finalName>

This results in me getting the artifact application-app as the file application.ear when building. It is important that the ear file is named like this due to some heavy legacy integration with other solutions.

The problem is that we have several specific build projects, which all include this ear as a provided dependency. Since the actual artifact name is application-app it comes out as application-app.ear -> runtime crash.

Changing the artifact ID from application-app to application is not an option.

Do you know of a way to implement a finalName like operation on provided dependecies (I guess in the package phase...)?

A: 

Try configuring the Maven EAR plugin:

<project>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <artifactId>maven-ear-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <finalName>application</finalName>
        </configuration>
      </plugin>
      ...
</project>
Péter Török
Unfortunatly, I dont even have a maven-ear-plugin in the specific projects.application.app gets built in the main project. But for modular customer specific packages the artifact is a provided dependecy. So there is no buildtime on application-app.
Elijah