-
Notifications
You must be signed in to change notification settings - Fork 21
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
Duplicate source files issue in Intellij #11
Comments
This location is what is being suggested by the Sbt documentation, unfortunately Maven Java source generating plugins do this differently, resulting in lots of confusion among people and tools used to work with the default Maven structure, on top of that there seems to be some confusion in the Sbt camp and there are some Sbt plugins that do not adhere to what the documentation prescribes, resulting in this very problem. I'd be inclined to say the problem is with Sbt adding the "main" subdirectory to "src_managed" and I'd be in favour of getting rid of that (at the Sbt side). I feel that removing the "cxf" subdirectory in the plugin will only lead to problems down the road. Either way, some standard needs to be decided on at Sbt's side and plugins (and IDEs) need to be updated accordingly (see sbt/sbt#1664). As long as the Sbt people don't make up their minds I'd argue that sticking to what's documented is the safest thing to do. (and as a result I'd argue that IDEA adding "main" as a source directory for an Sbt project is wrong based on what is currently in the Sbt documentation). Also be aware that one of Sbt's developers has pointed out that the directory structure currently used by sbt-cxf-wsdl2java is a good idea (see sbt/sbt-xjc#15 the comment made by @eed3si9n on 9 September 2015) |
What about doing a workaround until a better solution is found by following this advice: That is, add the directory in crossTarget instead of sourceManaged directory. As it is now, enabling autoimport from sbt in IntelliJ makes it unusable. |
…short term. Closes ebiznext#11. See sbt/sbt#1664 (comment)
I can confirm that this works around the problem and appears to be working in IDEA at least. It's also unlikely to conflict with whatever is decided on the Sbt side later, which is a nice bonus imho. I'll see if I can find the time to test this solution with Eclipse. |
Great. I see no reason it should not work in Eclipse. Also not sure if it breaks in Eclipse as with IntelliJ as it was. |
Neither did I, but it felt safer to check and I can confirm it works in Eclipse as well. |
Working with a project that uses this plugin in Intellij causes duplicate source files issue. It seems to be caused by both
[project]/target/scala-2.11/src_managed/main and
[project]/target/scala-2.11/src_managed/main/cxf
being in the managed source directories.
Is there a need to have it inside the cxf directory? Apparently the problem is solved by outcommenting this line:
sourceManaged in CxfConfig := sourceManaged.value / "cxf",
The text was updated successfully, but these errors were encountered: