JAXB and IntelliJ
Hey guys,
in our company we are currently looking for an alternative for our Java IDE Netbeans. Of course IntelliJ is also on the list as a possible option. For this we have downloaded the 30 day trial version and are now "playing".
We generate code from a .xsd automatically via the jaxb maven plugin. And this is where we have the problem. It just does not work. We have already tried the following solutions:
* Plugin JAXB 2.0 XJC generator installed
* Settings > Build, Execution, Deployment > Build Tools > Maven > Importing > "Phase to be used for folders update" set to "generate-sources"
* Re-imports Maven resources multiple times and also tries the "generate sources..." button
We also work with OpenJDK v1.8, which is Java8. So the Java EE problem is not really relevant.
Under Netbeans the current configuration runs without problems. mvn compile runs accordingly.
Do you have an idea what we can try?
-Florian
Please sign in to leave a comment.
Hello Florian,
Could you please clarify what exactly doesn't work? Generated code?
Hey Yaroslav,
right. The methods from the .xsd are simply not generated when building the project using IntelliJ. So the build fails with over 100 errors.
Florian,
Is it possible to reproduce this issue with any sample project?
Hi,
unfortunately, yes. The problem occurs with every project where we use JAXB.
Florian,
Please share one for investigation.
Hi,
I'm afraid that this could be a little difficult. Even if we could release the project this way, which I doubt will be granted, you won't have access to our nexus. Is there another way?
Hi Florian,
Could you try to generate sources from the command line using "mvn compile -e" command?
For my work environment jaxb2-maven-plugin works fine with the following setup:
Generated classes are located here: https://prnt.sc/rn6u24
If the files are generated from the command line without any problems, please send us an example of your .xsd and pom.xml files and compressed IDE logs folder to reproduce the problem. Also, try to check it with the files from my setup.
Files can be uploaded via FTP or HTTPS. (do not forget to specify the file names).
If the files are not generated even from the command line check that you have correctly configured your pom.xml to work with the plugin.