Skip to content
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
20 changes: 20 additions & 0 deletions dogstatsd-http/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,24 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<!-- Provide stable JPMS name to the artifact.
Causes `mvn test` to fail on with a module error, use `mvn package` instead. -->
<manifestEntries>
<Automatic-Module-Name>com.datadoghq.dogstatsd.http</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>

</project>
15 changes: 15 additions & 0 deletions dogstatsd-http/forwarder/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* Unless explicitly stated otherwise all files in this repository are
* licensed under the Apache 2.0 License.
*
* This product includes software developed at Datadog
* (https://www.datadoghq.com/) Copyright 2026 Datadog, Inc.
*/

/** HTTP forwarder for DogStatsD metrics. */
module com.datadoghq.dogstatsd.http.forwarder {
requires transitive com.datadoghq.dogstatsd.http;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the core module resolvable before package

When the dogstatsd-http reactor is built only through compile/test (for example mvn test), this requires asks javac for com.datadoghq.dogstatsd.http, but that name only exists in the core artifact's packaged JAR manifest via Automatic-Module-Name; before the package phase Maven has only core's target/classes, which has no module descriptor or manifest, so the forwarder compile fails with module not found. This leaves the standard test workflow broken unless developers remember to run a later lifecycle phase first.

Useful? React with 👍 / 👎.

@vickenty vickenty Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The fix for this is to add module-info.java, which is Java 9+ and doesn't work on Java 7. Someday.

requires java.net.http;
requires java.logging;

exports com.datadoghq.dogstatsd.http.forwarder;
}
Loading