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

Address the issue #796 #798

Merged
merged 1 commit into from
Oct 22, 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
4 changes: 4 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this dependency needed to process the new use of the @BaselineIgnore annotation in the source code.

The annotation has retention CLASS (not RUNTIME) so there is no runtime detection of the annotation.

Perhaps, therefore, this dependency should have scope provided to avoid the plug-in bleeding into the runtime class path of anything that depends on the MP Metrics API component.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cloned Emily's fork and tried to push a commit to the fix branch to add <scope>provided</scope> but I do not have permission to write.

</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public abstract class Snapshot {
*
* @return an array of {@link HistogramBucket} if it is available or an empty array if not available
*/
public abstract HistogramBucket[] bucketValues();
@aQute.bnd.annotation.baseline.BaselineIgnore("5.2")
Copy link
Contributor

@tjquinno tjquinno Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake. the "5.2" is also a reasonable future version of MP Metrics to specify.

Why is the baseline package version "5.2" in the annotation?

I know that is the version of the plug-in being used, but the Javadoc for the value attribute for the annotation states

Baseline package version.
The version must be a valid OSGi version string.

That doesn't clarify much, but It seems that this value is intended to reflect the version of the component being produced, not the version of the bnd baseline plug-in being used.

public HistogramBucket[] bucketValues() {
return new HistogramBucket[0];
};

/**
* Writes the values of the snapshot to the given stream.
Expand Down
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<properties>
<version.osgi.versioning>1.1.0</version.osgi.versioning>
<version.bnd>7.0.0</version.bnd>
<inceptionYear>2017</inceptionYear>
<autorelease>false</autorelease>
<version.microprofile.tck.bom>3.2</version.microprofile.tck.bom>
Expand Down Expand Up @@ -79,7 +80,7 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
<version>1.1.0</version>
<version>${version.osgi.versioning}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -88,6 +89,11 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
<version>${version.bnd}</version>
</dependency>

</dependencies>
</dependencyManagement>
Expand Down