I have the following records in my projects's .classpath
file:
<classpathentry kind="src" path="src/main/webapp"
output="build/webapp"/>
<classpathentry kind="src" path="src/main/java"
output="build/webapp/WEB-INF/classes"/>
<classpathentry kind="src" path="src/main/resources"
output="build/webapp/WEB-INF/classes"/>
My intention is
src/main/webapp
into build/webapp
src/main/java
into build/webapp/WEB-INF/classes
src/main/resources
into build/webapp/WEB-INF/classes
However the result is actually,
src/main/webapp
into build/webapp
build/webapp/WEB-INF/classes
from ever existing, but maintain the exact copy between src/main/webapp
and build/webapp
Which means build/webapp/WEB-INF/classes
can never be created and steps 2 & 3 never successful.
I even tried modifying step 1 to
<classpathentry kind="src" path="src/main/webapp" output="build/webapp"
excluding="WEB-INF/classes/**"/>
which did not help at all.
The order of the classpathentry records are inconsequential.
Q1. Please help advise how I should write my classpathentry records to hierarchically combine them into the same output directory, so that a classpathentry of a higher folder hierarchy would not nullify a classpathentry of a lower folder hierarchy.
Q2.
BTW, I cannot find any document specification for the xml tags and tag-attributes for eclipse .classpath
file. I have tried googling "eclipse classpathentry" to no avail. Could someone also point me to a document?
First of all, .classpath is not intended to be edited manually. This file is configuration file of JDT. Files with names starting with "." are intended to hidden from User. If you edited this file manually, in some cases, there will be broken synchronization with actual configuration object (JDT is okay, since configurations are automatically synchronized in JDT)
Open Properties Dialog of your project, select "Java Build Path". Then you can see GUI editor for that file. That GUI will answer what you asked. It allows to manage src to output mapping, re-ordering and etc. But it will not help you nest output the way you asked.
An output folder cannot be hierarchically nested under another other output folder. Because there may cause conflicts. I am sure syntax will not help you. It will not let you do what you intend.
This file is just derived stored data. If your needs are strong, you should have to consider custom build script, or hire some eclipse engineer to make builder extension for your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With