In 2018.1.2 version, Problem to compile xml files of web project.
Answered
Hi, a problem is found in IntelliJ new version.. so post about it.
My IntelliJ App version is 2018.1.2.
I compiled a web project developed with ibatis, but the xml files were not created in the output folder.
When I opened the project in the previous IntelliJ version without changing the state, the xml files were compiled normally and created under the output folder.
Please check why the xml files are not created under the output folder.
Please sign in to leave a comment.
What do you mean by "compiling xml files", may be you are talking about some file generation? How do you generate them: do you use Maven/Gradle some other 3rd plugins? If you are using MyBatis plugin for xml file generation, please report the issue to the plugin vendor: https://www.codesmagic.com/support
Thanks to your comment.
I didn't use 3rd Build Plugins (Maven/Gradle), but only IntelliJ Build.
"xml files" means "ibatis mapper file" as follows..
Also, "Compiling xml files" means "java compiling ibatis mapper xml files with IntelliJ Build Project Function" as follows..
If compile web project including ibatis mapper files in new IntelliJ version, mapper files were not created in the output folder.
[image1] setting about output path
[image2] Mapper file not created in ouput folder
How exactly the mapper files are supposed to be created via the build action? As I understand there should be some kind of rule for this, could you clarify? Also please clarify do you use MyBais plugin? Please provide idea.log and build.log files after IDE restart and reproducing.
Check that you did not configure any excludes in Compiler Excludes settings.
Thanks for your comment:)
There are no special rules for build actions.
I specify the folder that contains the source as the 'source folder', and specify the 'output folder' where the build files for the source will be created.
The basic build action in IDE is..
- configures the folder structure under the 'output folder' like under the 'source folder'.
- compiles the files in the 'source folder' (convert java file into class file and not convert xml file)
- save compile files in ouput folder keeping the source folder structure.
I don't use and do not need the special mybatis/ibatis plugin.
With default build, the files in the specified source folder are built and created in the output file. But now the class file is created properly in the output folder, but not the xml file. 'Excludes' are also not set.
Ah, so you mean that the xml files from source folders are not copied to the module's compiler output folder? Thanks for clarifications.
Where the xml files are located initially? Please also provide idea.log and build.log files after IDE restart and reproducing the problem I need to check them. Thank you.
Thank you for quick comment^^
As you said, it means that xml files do not copy to the output folder.
● idea.log and build.log
I cleared the intellij cache, restarted intellij, emptied the output folder, and started building.
Below is the log from the beginning of the build to the end of the build.
I do not think there is anything wrong.
- idea.log
- build.log
● Where the xml files are located initially?
The xml files are located at each /dao/ibatis/maps/oracle/... under each packages in the source folder.
For example.. as follows..
Normally, xml files should also be created in the output folder. as follows.
But, the problem is that it is not actually created(or copied) . as follows..
↑ update my comment. check contents one more.
The project setup seems strange to me. Why do you set module output directory to WEB-INF/classes? Normally you should create the web artifact which you then deploy to the application server (in Deployments tab or Run/Debug Configuration). You build the artifact on Build | Build Artifacts... action - which should create web package for deployment to an application server. Please check Exploring an artifact configuration.
If issue remains, please upload somewhere build.log and idea.log as complete files after IDE restart and reproducing or if possible a sample project to check, that would speed up troubleshooting a log. You can use our ftp: https://intellij-support.jetbrains.com/hc/en-us/articles/206869619 or any other file sharing service. The files will be used only internally. You can sensor sensitive data (like paths) if needed. Thanks.
Thank you.
Unfortunately, the structure of my project may seem unfamiliar to you.
It is a very old style, but it is not a problem.
Because.. I build the project without any problems in the previous version of intellij.
The location of the output folder can be changed at any time. So, I think its position should be independent of the build result wherever it is.
And, I think the attached log image might not be enough for you.
So I uploaded the log file using https service. The uploaded file name is ssosso_180511.zip.
Thanks :)
Thank you. Please check that you did not configure any patterns in Exclude files text field in Project Structure | Modules | <module name> | Sources tab. Also try to check with these plugins disabled temporarily:
If issue remains please upload your project configuration files zipped, representing your project structure, I'll check the project structure. Thanks.
Check also if other resource files (e.g. simple text files) are copied into output directory.