-
Notifications
You must be signed in to change notification settings - Fork 145
[MRELEASE-839]: Unable to supply tag to release for release:perform #149
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| invoker.goals = release:clean release:perform |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ Licensed to the Apache Software Foundation (ASF) under one | ||
| ~ or more contributor license agreements. See the NOTICE file | ||
| ~ distributed with this work for additional information | ||
| ~ regarding copyright ownership. The ASF licenses this file | ||
| ~ to you under the Apache License, Version 2.0 (the | ||
| ~ "License"); you may not use this file except in compliance | ||
| ~ with the License. You may obtain a copy of the License at | ||
| ~ | ||
| ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, | ||
| ~ software distributed under the License is distributed on an | ||
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| ~ KIND, either express or implied. See the License for the | ||
| ~ specific language governing permissions and limitations | ||
| ~ under the License. | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <groupId>org.apache.maven.plugin.release.its</groupId> | ||
| <artifactId>mrelease-832</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-release-plugin</artifactId> | ||
| <version>@project.version@</version> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.apache.maven.its.release</groupId> | ||
| <artifactId>maven-scm-provider-dummy</artifactId> | ||
| <version>1.0</version> | ||
| </dependency> | ||
| </dependencies> | ||
| <configuration> | ||
| <connectionUrl>scm:dummy|nul</connectionUrl> | ||
| <tag>test-tag</tag> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| File buildLog = new File( basedir, 'build.log' ) | ||
| assert buildLog.exists() | ||
|
|
||
| assert buildLog.text.contains( "[DEBUG] (f) tag = test-tag" ) | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ | |
| */ | ||
| @Mojo( name = "perform", aggregator = true, requiresProject = false ) | ||
| public class PerformReleaseMojo | ||
| extends AbstractReleaseMojo | ||
| extends AbstractScmReleaseMojo | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see #145 (comment). This exposes a lot more unused parameters, not just tag
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kwin I see your point. What's the best course of action? Wait for 145 to be resolved, implement the changes suggested by 145, or just add tag property to perform release mojo?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @michael-o Please advise how to continue.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| { | ||
| /** | ||
| * A space separated list of goals to execute on release perform. Default value is either <code>deploy</code> or | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -54,6 +54,11 @@ public class PerformReleaseMojoTest | |||
| { | ||||
| private File workingDirectory; | ||||
|
|
||||
| private static void assertTag(ArgumentCaptor<ReleasePerformRequest> argument) { | ||||
| assertEquals( "test-tag", argument.getValue().getReleaseDescriptorBuilder(). | ||||
| build().getScmReleaseLabel() ); | ||||
| } | ||||
|
|
||||
| public void testPerform() | ||||
| throws Exception | ||||
| { | ||||
|
|
@@ -67,7 +72,7 @@ public void testPerform() | |||
|
|
||||
| ReleaseManager mock = mock( ReleaseManager.class ); | ||||
| mojo.setReleaseManager( mock ); | ||||
|
|
||||
| // execute | ||||
| mojo.execute(); | ||||
|
|
||||
|
|
@@ -78,6 +83,8 @@ public void testPerform() | |||
| assertNotNull( argument.getValue().getReleaseEnvironment() ); | ||||
| assertNotNull( argument.getValue().getReactorProjects() ); | ||||
| assertEquals( Boolean.FALSE, argument.getValue().getDryRun() ); | ||||
| assertNotNull( argument.getValue().getReleaseDescriptorBuilder() ); | ||||
|
||||
| assertNotNull( argument.getValue().getReleaseDescriptorBuilder() ); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |||||||
|
|
||||||||
| import org.apache.maven.model.DistributionManagement; | ||||||||
| import org.apache.maven.model.Model; | ||||||||
| import org.apache.maven.model.Scm; | ||||||||
|
|
||||||||
| /** | ||||||||
| * <p>Stub for MavenProject.</p> | ||||||||
|
|
@@ -49,6 +50,26 @@ public Model getModel() | |||||||
| return model; | ||||||||
| } | ||||||||
|
|
||||||||
|
||||||||
| @Override |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method overrides MavenProjectStub.getOriginalModel; it is advisable to add an Override annotation.
| @Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The artifact ID should be
mrelease-839to match the issue number and directory name (MRELEASE-839), but it's currently set tomrelease-832which appears to be a copy-paste error from the MRELEASE-832 test.