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

Custom config files are not deployed unless clean is run #686

Closed
Azquelt opened this issue Jan 10, 2022 · 10 comments · Fixed by #714
Closed

Custom config files are not deployed unless clean is run #686

Azquelt opened this issue Jan 10, 2022 · 10 comments · Fixed by #714
Assignees

Comments

@Azquelt
Copy link
Member

Azquelt commented Jan 10, 2022

If I add additional files to src/main/liberty/config, they are deployed when I run the libertyStart or libertyCreate tasks.

However, if I make changes to these files, they are not redeployed when I run libertyStart or libertyCreate, unless I first run clean.

If I add the --info option, I can see that gradle is skipping libertyCreate because "it is up-to-date".

@Azquelt
Copy link
Member Author

Azquelt commented Jan 10, 2022

Testing some more, it seems actually like the changed files aren't copied unless I delete the whole server directory.

@cherylking
Copy link
Member

@Azquelt I will check into this, but I would expect dev mode to pick up the changes. As for the other goals, I think it is expected behavior to have to run clean when making changes such as adding config files.

@Azquelt
Copy link
Member Author

Azquelt commented Jan 10, 2022

I'm not using dev mode.

@cherylking
Copy link
Member

@Azquelt I understand that. I was pointing out that behavior would be expected with dev mode (pick up changes), but not without it.

@mattbsox
Copy link
Member

Can you try adding configDirectory = file("src/main/liberty/config") to your server block? Think our current logic passes over the up-to-date check when it defaults the location.

@Azquelt
Copy link
Member Author

Azquelt commented Jan 10, 2022

@cherylking Ah, sorry, I misread.

@mattbsox Yes, adding that line does make it copy the files every time!

@Azquelt
Copy link
Member Author

Azquelt commented Jan 10, 2022

Poking at it some more, without adding adding the line from mattbsox, if the server directory is outside of the project (e.g. by setting installDir), even running clean doesn't cause the files to be copied.

@mattbsox
Copy link
Member

I suspect that there's something similar causing that. Does it work correctly if you delete the installDir or the specific server directory?

@Azquelt
Copy link
Member Author

Azquelt commented Jan 10, 2022

Yes, if I delete the specific server directory it does work (the directory is recreated with the custom config files included).

@mattbsox
Copy link
Member

Okay, probably a similar issue with a null property/default location and an up-to-date check in that case as well. I'll see what I can do about a fix for those problems.

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 a pull request may close this issue.

3 participants