protobuf-maven-plugin
protobuf-maven-plugin copied to clipboard
[Feature]: Add src/main/proto as default source location
Brief description
The fact that the default is different in this plugin than others (in particular the Gradle plugin from Google) is kind of irritating. The configuration for source directories appears to be broken too (I can raise a separate issue if you prefer), but wouldn't it be simpler if we just harmonized the defaults. To avoid breaking existing projects we can just add the other directory instead of removing the old one?
Aims and goals
Convenience and simple conventions
Workarounds
No response
Would you like to contribute to this feature?
- [ ] Yes, I'd like to contribute this change myself!
Sounds good to me.
The default right now is to consider the source input directories instead unless none are provided. In this case, we fall back on the default setting. This can be updated to check both paths if that makes life easier.
Regarding the other issue, what sort of issues have you seen? Happy to discuss here or on a separate issue/discussion. Whatever works for you.
what sort of issues have you seen
I'm not really sure what the problem is. If you try to set the source directory in a project that isn't the top-level it breaks though. Something to do with the the way it checks for the existence of the path breaks (you get that "Ignoring..." message from the link you posted above). Is it assuming the wrong current working directory?
Ah I can see the issue. This should be an easy fix, I'll try and raise something today for that.
Looks like a regression after we supported Path natively in the Sisu/Plexus converters in v3.1.3.
Thanks for flagging that, sorry for the hassle it is causing. For now, if you prefix the path with ${project.basedir}/ then it should work around this problem as it should be explicitly scoped to relative directories.
I'll raise a new issue for this.
ETA: see GH-689.