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

Don't add generated folder to srcDirs #107

Open
mfulgo opened this issue Mar 12, 2020 · 0 comments
Open

Don't add generated folder to srcDirs #107

mfulgo opened this issue Mar 12, 2020 · 0 comments

Comments

@mfulgo
Copy link

mfulgo commented Mar 12, 2020

What I ultimately want is to add the generated files to version control so I can track differences in the files over time and customize the classes.

In an earlier version of the plugin, there was the option to output the generated files to a specified folder. That was removed, and now the generated files always go to build/generated/wsdl. The plugin now also adds that folder to the main Java source sets: https://github.com/nilsmagnus/wsdl2java/blob/master/src/main/groovy/no/nils/wsdl2java/Wsdl2JavaPlugin.groovy#L77

However, build directories are generally ephemeral and ignored by git. This means that I have to create a gradle task to copy over the generated files to something like src/main/java-generated and add that to my source sets. But, adding it to the source sets then causes problems because unless I remove the build/generated/wsdl directory, there are duplicated classes.

So, I can see three ways of resolving this:

  1. Re-add the option to specify the output directory and keep the line that adds the output directory to the source sets. Or...
  2. Don't add the output directory to source sets and require the plugin user to move the files around and add the desired director to the source sets on their own. Or...
  3. Re-add the option to specify the output directory and get rid of the line that adds the output directory to the source sets.

Solutions 2 and 3 would also resolve issues #61 and #67.

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

No branches or pull requests

1 participant