The first online solution IntelliJ How to publish the source and resource files simultaneously, the Java files are compiled to the output folder, and the resource is copied to the outputs Folder__intellij
Source: Internet
Author: User
Disclaimer: This strategy is for IntelliJ idea Version 2016.2.5: Many coder are familiar with eclipse, but when IntelliJ is reused, a problem is found in eclipse, in source fold The file under ER, if it is a Java file, will be compiled into a class bytecode file in the output folder of the project setting, and if it is an XML properties file, it will be copied intact to the location of the output Folde of the project settings. When the transition to IntelliJ, you will find that the source folder inside the Java file, can be like Eclipse, compiled output into bytecode files into output folder but the XML inside the source folder The properties file, which is not copied to the output folder as it is, IntelliJ compiler directly ignores these files. If you need to copy the configuration file to output, you must create a new folder and right-click the folder-->mark Directory as-->resources Root, so that you can copy to output folder inside the search for some of the current domestic blog, most of us are so understanding, if you want to use IntelliJ, you have to separate source code and resource files management, The benefits are: clear management, similar to MAVEN's project management model, and a combination of resource files and source code, because many programmers used eclipse before, and used to put the configuration file and source together, especially the Hibernate mapping file, The name of the class name and the XML file if the same, put together very intuitive then the question is, does IntelliJ have to manage source and resource files in such a separate way? No, IntelliJ can also like eclipse as the source and resource into porridge, below to introduce how to do here need to pay attention, IntelliJ idea Version 2016.2.5 is a bug, sometimes, Source files can be copied to the destination folder, sometimes ignored. The problem that this article solves is, when your IntelliJ no longer help you to copy the resource file, how do you use the operation to let IntelliJ automatically help you copy the resource file to the output folder I checkout a project directly from the friend server
Do some configuration for this project, like the output folder, the location of the library, and the deployment of Tomcat.
After the point is run, you can see that the classes file can be compiled successfully, but the configuration file is not
This can be done after the setting inside to do the following settings-These two steps can completely solve the problem
First open the setting build--> Compiler-->!? *.java the inside of the!*.java to cut into the bottom of the tick
The configuration file will be here.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.