You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ryan Schmitt <rs...@apache.org> on 2026/01/17 20:42:48 UTC

Re: Of Blonds vs Brunettes; Re: Event-driven, asynchronous JSON message processor module

What's the best way to build core and client in a single Maven reactor? I
set up a pom.xml that lists them both as modules, so the directory
structure is:

- hc <-- :aggregator
- hc/core <-- :httpcore5-parent
- hc/client <-- :httpclient5-parent

This mostly works, but it has two problems. The first is that when I just
build core or client, Maven emits a warning saying that my project is
malformed, because it's expecting `hc/` to contain `httpcomponents-parent`,
rather than my aggregator POM. The second issue is that I need to pass
`-Dhttpcore.version=5.5-alpha1-SNAPSHOT` in order to link the httpclient5
projects to the reactor build of httpcore5.

For now, I'm ignoring the warnings, and I have a `.mvn/maven.config` file
with the following contents:

--threads=2C
-Drat.skip
-Dcheckstyle.skip
-Dhttpcore.version=5.5-alpha1-SNAPSHOT

Like I said, this works pretty well (it builds and tests all of
httpcomponents in 45 seconds), but it feels hacky. It's also not directly
reusable by other contributors. Is there a better way of doing this?

On Sun, Dec 28, 2025 at 5:48 AM Ryan Schmitt <rs...@apache.org> wrote:

> On Sun, Dec 28, 2025 at 8:23 AM Oleg Kalnichevski <ol...@apache.org>
> wrote:
>
>> When creating a release tag in Git I need to make sure it matches the
>> version information in POM metadata. With Maven that basically means
>> updating project and modules pom.xml.
>>
>>
>> https://github.com/ok2c/httpcomponents-release-tools/blob/master/release-lib/src/main/kotlin/com/github/ok2c/hc/release/HCReleasePlugin.kt#L217
>>
>> I would need to do something similar for Gradle which should not be hard
>> given it involves updating a single file. Still, it is an extra chore,
>> an extra moving part that can break or fail.
>>
>> Oleg
>
>
> Yeah, I think we can write a Gradle build that obtains all that
> information from the pom.xml in order to avoid duplication. I used `gradle
> init` and Codex to throw together a quick prototype:
>
> https://github.com/rschmitt/httpcomponents-core/tree/gradle
>
> With a warm daemon and configuration cache, it runs the entire test suite
> on my machine in just 17 seconds! (`./gradlew test`) This is nearly 50%
> faster than `./mvnw verify`.
>

Re: Of Blonds vs Brunettes; Re: Event-driven, asynchronous JSON message processor module

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sat, 2026-01-17 at 12:42 -0800, Ryan Schmitt wrote:
> What's the best way to build core and client in a single Maven
> reactor? I
> set up a pom.xml that lists them both as modules, so the directory
> structure is:
> 
> - hc <-- :aggregator
> - hc/core <-- :httpcore5-parent
> - hc/client <-- :httpclient5-parent
> 
> This mostly works, but it has two problems. The first is that when I
> just
> build core or client, Maven emits a warning saying that my project is
> malformed, because it's expecting `hc/` to contain `httpcomponents-
> parent`,
> rather than my aggregator POM. The second issue is that I need to
> pass
> `-Dhttpcore.version=5.5-alpha1-SNAPSHOT` in order to link the
> httpclient5
> projects to the reactor build of httpcore5.
> 
> For now, I'm ignoring the warnings, and I have a `.mvn/maven.config`
> file
> with the following contents:
> 
> --threads=2C
> -Drat.skip
> -Dcheckstyle.skip
> -Dhttpcore.version=5.5-alpha1-SNAPSHOT
> 
> Like I said, this works pretty well (it builds and tests all of
> httpcomponents in 45 seconds), but it feels hacky. It's also not
> directly
> reusable by other contributors. Is there a better way of doing this?
> 

Honestly I cannot say much here. Whenever I encountered a situation
when I needed to run a snapshot of client with a snapshot of core, I
just imported them both into IntelliJ and ran my tests there.

Oleg 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org