- This topic has 8 replies, 5 voices, and was last updated 18 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
Larry D. WilsonMemberSilly question, most likely.
I have some flash, image png files, etc. I use for the website design, which I’d like to keep in the /src/graphics directory (for easier backup, project isolation, etc). And since they’re not part of the deployment, exclude them from the build.
What’s the best way to exclude these from the deployment?
Or – is this the best “topography” for a website development project?
I’ve not found a “best practices” document, and haven’t exactly located the best way to exclude certain files from deployment. I’d like to hear some opinions on the best way to manage this.
Using:
Eclipse 3.0.0
MyEclipseIDE 3.7.2Thanks!
Larry
Scott AndersonParticipantLarry,
Anything in the source hierarchy that isn’t Java source is automatically copied to the output directory, which in the case of a web project is WEB-INF/classes. This has advantages since your non-Java files that are part of the deployment, like .properties files, will be placed on the classpath automatically.
In your case, I’d suggest creating just a simple folder, not a source folder, to hold your non-deployable content. Java source folders are really for Java source, not “any” source. Placing your other artifacts in another top-level folder will still allow you to version control it, but will exclude it from deployment.
Larry D. WilsonMemberThanks
anderssvMemberBut then you have the problem with test-sources. Because I run my unittests in Eclipse i need to define src/main/resources as a source folder to get it’s content on the classpath. This then contains a log4j.properties, but so does also my web-project. This means that when my project gets included in the Web deployment, it’s log4j.properties will also be included. Then the classloader will get the latest file that was modified because it will be copied over the other one.
Any ideas?
Riyad KallaMemberanderssv,
I had a hard time following what you are asking, do you just want to exclude a specific file at deployment time but not at development time?
anderssvMemberYeah. 🙂 Test classes/resources should naturally not be included in runtime deployment. The problem is that Eclipse doesn’t distinguish between runtime and test sources. This is the same issue as https://www.genuitec.com/forums/topic/exclude-files-directories-like-svn-from-deployment/&highlight= . 🙂
Riyad KallaMemberAhh deployment exclusion filters are on our TODO list, we had a long meeting about that and the validation exclusion filtering that we are working on now.
lriMember>Ahh deployment exclusion filters are on our TODO list, we had a long meeting about that and the validation exclusion filtering that we are working on now.
Any news on this ? It’s really annoying, f.e. with log4j.properties …..
Riyad KallaMemberValidation exclusion is done and will be in 5.1, deployment exclusion is quite complex and has not been targetted for a release yet.
-
AuthorPosts