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

[#18] Support logicalVersion in create/edit manifest mojos #19

Merged
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 @@ -20,6 +20,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;
Expand Down Expand Up @@ -62,6 +63,12 @@ public class CreateManifestMojo extends AbstractMojo {
@Parameter(name="manifestDescription", property = "manifestDescription")
private String manifestDescription;

/**
* Optional logicalVersion of the generated manifest.
*/
@Parameter(name="manifestLogicalVersion", property = "manifestLogicalVersion")
private String manifestLogicalVersion;

@Inject
private MavenProject project;

Expand Down Expand Up @@ -125,7 +132,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
}


final ChannelManifest channelManifest = new ChannelManifest(manifestName, manifestId, manifestDescription, streams);
final ChannelManifest channelManifest = new ChannelManifest(manifestName, manifestId, manifestLogicalVersion, manifestDescription, Collections.emptyList(), streams);

try {
final String yaml = ChannelManifestMapper.toYaml(channelManifest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ public class EditManifestMojo extends AbstractMojo {
@Parameter(name="manifestRequirements")
private List<Requirement> manifestRequirements;

/**
* Optional logicalVersion of the generated manifest.
*/
@Parameter(name="manifestLogicalVersion")
private String manifestLogicalVersion;

@Override
public void execute() throws MojoExecutionException {
final Path streamsManifestFile = Path.of(manifestPath);
Expand Down Expand Up @@ -88,6 +94,7 @@ public void execute() throws MojoExecutionException {
final ChannelManifest combinedManifest = new ChannelManifest(source.getSchemaVersion(),
manifestName,
manifestId,
manifestLogicalVersion,
manifestDescription,
requirements,
source.getStreams());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<maven.version>3.6.3</maven.version> <!-- Note that PME depends on 3.5.0 -->
<maven-resolver.version>1.6.2</maven-resolver.version>
<pme.version>4.7</pme.version>
<channel.version>1.1.0.Final</channel.version>
<channel.version>1.2.1.Final</channel.version>
<jupiter.version>5.7.2</jupiter.version>
<assertj.version>3.22.0</assertj.version>
<itf.version>0.13.1</itf.version>
Expand Down
Loading