Skip to content

Releases of multi-module projects fail without additional undocumented release plugin configuration. #71

@michaeljfazio

Description

@michaeljfazio

I have multi-module project with various inter-dependencies between nar modules. Under normal circumstances, the maven "install" goal is set as the default goal for each nar project. This ensures that dependency headers are available during native code compilation to dependent modules. If a "mvn compile" were to run, the multi-module build would fail.

When performing a release, the above still holds true. However, the "work around" is a little different, requiring undocumented configuration (as far as I can tell). In order for a release to work, the release plugin must have additional configuration applied so as to execute the "clean install" goals during release preparation:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.4.1</version>
  <configuration>
    <preparationGoals>clean install</preparationGoals>
  </configuration>
</plugin>

Although this might not be considered a bug, as I see it there are at least two options that might be taken to help others better deal with the release scenario:

  1. If possible, use plugin extensions to automatically ensure clean install is run during a release preparation.
  2. At the very least, add appropriate documentation to the plugin site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions