Uploaded image for project: 'Buildmetadata Maven Plugin'
  1. Buildmetadata Maven Plugin
  2. BMMP-69

Location for build.properties determined by project's packaging

    XMLWordPrintable

Details

    Description

      The build.properties for JAR files are usually written to
      ${project.build.directory}/buildmetadata.properties

      For EARs, WARs, etc. the location is
      ${project.build.directory}/${project.build.finalName}/META-INF/build.properties

      It is cumbersome to specify this property for every project in a multi project. Therefore we provide a configuration to specify the location by the packaging type to be specified in the parent POM.

      For simple projects the property @propertiesOutputFile@ is still used. For multi projects the following construct is more convenient (the example shows the default values):

      <propertyOutputFileMapping>
      <fileMapping>
      <packaging>ear</packaging>
      <outputFile>${project.build.directory}/${project.build.finalName}/META-INF/build.properties</outputFile>
      </fileMapping>
      <fileMapping>
      <packaging>war</packaging>
      <outputFile>${project.build.directory}/${project.build.finalName}/META-INF/build.properties</outputFile>
      </fileMapping>
      <fileMapping>
      <packaging>sar</packaging>
      <outputFile>${project.build.directory}/${project.build.finalName}/META-INF/build.properties</outputFile>
      </fileMapping>
      </propertyOutputFileMapping>

      For packagings not mentioned, the output file defaults to @propertiesOutputFile@.

      If the default mapping of @propertyOutputFileMapping@ should not be used, it can be deactivated by the boolean property @deactivatePropertyOutputFileMapping@.

      Attachments

        Activity

          People

            robert.reiner Robert Reiner
            robert.reiner Robert Reiner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: