1

Since maven 3 it is no longer recommended to include property variable in maven pom root artifactId section.

User will be prompted to remove it with this warning:

[WARNING] 'artifactId' contains an expression but should be a constant.

This causes severe incompatibility problem with cross-built scala project, which should always include _${scala.binary.version} in their artifactId. (the exact version interpolation of the published artifact can be handled by flatten-maven-plugin, not a big deal)

I've tried several possible replacement to overcome this, including:

  1. override build/finalName

  2. override build/plugins/plugin/maven-jar-plugin/configuration/finalName

  3. override build/plugins/plugin/maven-install-plugin/configuration/artifactId.

Turns out that none of them works. What is the best way to deal with this situation?

tribbloid
  • 4,026
  • 14
  • 64
  • 103

0 Answers0