apache / apache/pulsar

[Bug][build] maven package -Dmaven.test.skip is broken

Open
#22,724 2 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Read release policy

- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

### Version

Current java version is 17,
```
OpenJDK Runtime Environment Corretto-17.0.11.9.1 (build 17.0.11+9-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.11.9.1 (build 17.0.11+9-LTS, mixed mode, sharing)
```
OS: Macos 13, M1 chip
Pulsar version: 3.4.0-SNAPSHOT

### Minimal reproduce step

I called the command
```
mvn package -Dmaven.test.skip
```

### What did you expect to see?

I was expecting that `pulsar-opentelemetry` would install
```
[INFO] pulsar-opentelemetry ............................... FAILURE [ 0.050 s]
```

### What did you see instead?

```
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.411 s
[INFO] Finished at: 2024-05-16T13:56:31+05:30
[INFO] ------------------------------------------------------------------------
[INFO] 0 goals, 0 executed
[ERROR] Failed to execute goal on project pulsar-opentelemetry: Could not resolve dependencies for project
org.apache.pulsar:pulsar-opentelemetry:jar:3.4.0-SNAPSHOT: The following artifacts could not be resolved:
org.apache.pulsar:pulsar-broker-common:jar:tests:3.4.0-SNAPSHOT (absent): org.apache.pulsar:pulsar-broker-
common:jar:tests:3.4.0-SNAPSHOT was not found in https://repository.apache.org/snapshots during a previous attempt. This
failure was cached in the local repository and resolution is not reattempted until the update interval of apache.snapshots has
elapsed or updates are forced -> [Help 1]
```

### Anything else?

_No response_

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by running `mvn package -Dmaven.test.skip` on Pulsar 3.4.0-SNAPSHOT and inspect the `pulsar-opentelemetry` module's dependency resolution. Trace why `pulsar-broker-common:jar:tests` is still required when tests are skipped. Done means the package command succeeds and `pulsar-opentelemetry` installs without the unresolved test artifact failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.