Skip to content

Change default output directory#9

Open
willhains wants to merge 1 commit into
bohnman:masterfrom
willhains:issues/#7
Open

Change default output directory#9
willhains wants to merge 1 commit into
bohnman:masterfrom
willhains:issues/#7

Conversation

@willhains
Copy link
Copy Markdown

...to ${project.build.directory}/generated-sources/package-info,
since this is where Maven and IDEs expect generated sources to be.

Resolves #7

...to ${project.build.directory}/generated-sources/package-info,
since this is where Maven and IDEs expect generated sources to be.

Resolves bohnman#7
@neiser
Copy link
Copy Markdown

neiser commented Sep 9, 2022

@willhains I think the output directory must not include the trailing /package-info, otherwise the generated sources are not in the correct package (all preceded with package-info then) and are also not picked up by IntelliJ correctly. I've set it manually now via

<outputDirectory>${project.basedir}/target/generated-sources</outputDirectory>

and now IntelliJ is able to pick @NonNull annotations there.

@willhains
Copy link
Copy Markdown
Author

willhains commented Sep 10, 2022

@neiser This PR has not been merged. Are you using the plugin with this PR applied?

Please note that @bohnman is no longer maintaining this project (see discussion in #6), so with his permission I created a fork with these changes applied, and published it to Central.

Can you try changing your groupId to io.github.willhains? If it still doesn't work, please create an issue in my fork.

Fwiw, I'm using the forked version of this plugin in my project UDTopia, and it works as expected. Both Maven and IntelliJ are picking up the generated sources.

@willhains
Copy link
Copy Markdown
Author

@neiser Postscript on above: There is a related change in #8 which tells Maven (and therefore IntelliJ) to treat the generated package-info directory as a source root. Perhaps this is the issue you are facing.

Both #8 and #9 are included in my fork.

Hope this helps! :)

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.

Suggest changing the default output directory

2 participants