- This topic has 8 replies, 5 voices, and was last updated 18 years, 8 months 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!
LarryAugust 2, 2004 at 9:16 am #211302
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.
August 2, 2004 at 6:14 pm #211356
Larry D. WilsonMemberThanks
October 3, 2006 at 1:46 am #259762
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?
October 4, 2006 at 4:18 pm #259865
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?October 7, 2006 at 6:30 am #260031
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= . 🙂
October 9, 2006 at 2:27 pm #260088
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.
November 7, 2006 at 12:13 pm #261440
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 …..
November 7, 2006 at 1:06 pm #261442
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