Skip to content

Allow non-standard build directory. - #1855

Open
jdelker wants to merge 2 commits into
fabric8io:masterfrom
jdelker:patch-1
Open

Allow non-standard build directory.#1855
jdelker wants to merge 2 commits into
fabric8io:masterfrom
jdelker:patch-1

Conversation

@jdelker

@jdelker jdelker commented Feb 24, 2025

Copy link
Copy Markdown

Currently, the general outputDirectory has a fixed default of target/docker, which breaks projects with a diverting ${project.build.directory}.
This change simply adjusts the default, so this aligns correctly.

@rohanKanojia

Copy link
Copy Markdown
Member

@jdelker : Thanks, could you please add an entry to doc/changelog.md regarding this change?

@sonarqubecloud

Copy link
Copy Markdown

@rohanKanojia

Copy link
Copy Markdown
Member

@jdelker : E2E tests seem to be failing. Could you please take a look?

@jdelker

jdelker commented Feb 24, 2025

Copy link
Copy Markdown
Author

@jdelker : E2E tests seem to be failing. Could you please take a look?

Well, I'm lacking insight about what really happens in those integration tests to find the source of that failure.
The change is tiny, but it does effectively change the outputDir to contain an absolute path, rather than a relative.
From my understanding that should be perfectly fine, so I would assume that some parts do have problematic code not handling this correctly.

@sonarqubecloud

Copy link
Copy Markdown

Fixed docker.target.directory for non-standard build directories.
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Jul 19, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Jul 25, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Jul 25, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Aug 12, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Aug 23, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Aug 23, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Marukome0743 added a commit to Marukome0743/docker-maven-plugin that referenced this pull request Aug 26, 2026
## Summary
- Derive the default Docker output directory from `${project.build.directory}` instead of the fixed `target/docker`.
- Preserve explicit `docker.target.dir` and `<outputDirectory>` overrides.
- Add path-level and Maven integration coverage, plus documentation and changelog updates.

## Problem
Projects that customize Maven’s build directory still default Docker Maven Plugin working files to `target/docker`. The static default ignores `${project.build.directory}` and separates plugin output from the project’s configured build tree.

## Compatibility
The public configuration format is unchanged. Projects using Maven’s standard `target` directory continue to resolve to `target/docker`, while explicit output directory settings retain precedence.

## Verification
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -Dtest=BuildDirsTest test` — 3 tests, 0 failures
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp clean install -Pjacoco` — 972 tests, 0 failures, 0 errors, 6 skipped
- `mise exec java@temurin-11 -- ./mvnw -B -C -V -ntp -f it/custom-build-directory/pom.xml clean verify` — Docker-free source archive generated below the custom Maven build directory

This reimplements fabric8io#1855 against the current master branch. Thanks to @jdelker for the original report and implementation.

Signed-off-by: Marukome0743 <jambalaya.pyoncafe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants