[BUILD-1112] Provide our own release profile Created: 26/Jul/23  Updated: 26/Jul/23

Status: Open
Project: Build
Component/s: Poms
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Mikaël Geljić Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

As mentioned in the Maven Release plugin docs

sdfs

Maven 3 (and previously 2) provides a default release profile named release-profile that builds and attaches source and javadoc jar: this is defined in the super POM. This profile is activated by default during release:perform with Maven Release Plugin 2.x, unless deactivated by configuring useReleaseProfile parameter to false.

[...]

In order to prepare for Maven 4, each project will instead require to define their own release profile that they'll be able to customise to match their needs.

Turns out that profile in Maven's Super POM didn't do anything too fancy re: sources and javadoc, but just these:

<profiles>
  <!-- NOTE: The release profile will be removed from future versions of the super POM -->
  <profile>
    <id>release-profile</id>
    <build>
      <plugins>
        <plugin>
          <inherited>true</inherited>
          <artifactId>maven-source-plugin</artifactId>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <inherited>true</inherited>
          <artifactId>maven-javadoc-plugin</artifactId>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

Generated at Sun Feb 11 23:48:15 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.