Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRELEASE-1148] Release Manage pulls in transitive dependencies #219

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private Scm createReleaseScm(Scm scm, ScmTranslator scmTranslator, ReleaseDescri

private List<Dependency> createReleaseDependencies(ReleaseDescriptor releaseDescriptor, MavenProject project)
throws ReleaseFailureException {
Set<Artifact> artifacts = project.getArtifacts();
Set<Artifact> artifacts = project.getDependencyArtifacts();

List<Dependency> releaseDependencies = null;

Expand All @@ -471,6 +471,12 @@ private List<Dependency> createReleaseDependencies(ReleaseDescriptor releaseDesc
releaseDependencies = new ArrayList<>();

for (Artifact artifact : orderedArtifacts) {
if (artifact.getVersion() == null) {
artifact.setVersion(project.getArtifactMap()
.get(ArtifactUtils.versionlessKey(artifact))
.getVersion());
}

Dependency releaseDependency = new Dependency();

releaseDependency.setGroupId(artifact.getGroupId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ under the License.
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>subproject1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>subproject2</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ under the License.
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>subproject1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>subproject2</artifactId>
Expand Down