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

FilesMojoV2 should resolve and use absolute paths for extra directories #1660

Closed
TadCordle opened this issue Apr 23, 2019 · 4 comments · Fixed by #1686
Closed

FilesMojoV2 should resolve and use absolute paths for extra directories #1660

TadCordle opened this issue Apr 23, 2019 · 4 comments · Fixed by #1686
Assignees
Milestone

Comments

@TadCordle
Copy link
Contributor

FilesMojo resolves/prints the absolute paths of the extra directories, but FilesMojoV2 does not. Is this intended?

@chanseokoh
Copy link
Member

chanseokoh commented Apr 23, 2019

Looking at the docs and samples, the plugin usage of <extraDirectories> is to set absolute paths, so I think in practice this shouldn't matter.

I'd say we remove File::getAbsoluteFile() from V1 to be consistent with V2 and RawConfigurations, and add validation somewhere that the paths should end up absolute.

UPDATE: see comments below.

@TadCordle
Copy link
Contributor Author

Good point. I also checked FilesTask and FilesTaskV2, and it seems neither of those uses explicit absolute paths. FilesMojo is the odd one out at the moment.

@chanseokoh
Copy link
Member

Hmm... actually, I tested specifying a non-absolute path (such as src/main/java/example) for normal Jib build (not the skaffold-files goal) in both Maven and Gradle, and they all work.

@chanseokoh
Copy link
Member

Project-relative path works with the properties too. Since they have been working fine, perhaps we should make FileMojo and FileMojoV2 handle project-relative paths correctly.

@chanseokoh chanseokoh added this to the v1.2.0 milestone Apr 23, 2019
@loosebazooka loosebazooka changed the title FilesMojoV2 does not use absolute paths for extra directories FilesMojoV2 should resolve and use absolute paths for extra directories May 2, 2019
@loosebazooka loosebazooka changed the title FilesMojoV2 should resolve and use absolute paths for extra directories FilesMojoV2 should resolve and use absolute paths for extra directories (but should) May 2, 2019
@loosebazooka loosebazooka self-assigned this May 2, 2019
@loosebazooka loosebazooka changed the title FilesMojoV2 should resolve and use absolute paths for extra directories (but should) FilesMojoV2 should resolve and use absolute paths for extra directories May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants