facebook

[Closed] Exclude image source files?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #211266 Reply

    Silly 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.2

    Thanks!
    Larry

    #211302 Reply

    Scott Anderson
    Participant

    Larry,

    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.

    #211356 Reply

    Thanks

    #259762 Reply

    anderssv
    Member

    But 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?

    #259865 Reply

    Riyad Kalla
    Member

    anderssv,
    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?

    #260031 Reply

    anderssv
    Member

    Yeah. 🙂 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= . 🙂

    #260088 Reply

    Riyad Kalla
    Member

    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.

    #261440 Reply

    lri
    Member

    >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 …..

    #261442 Reply

    Riyad Kalla
    Member

    Validation exclusion is done and will be in 5.1, deployment exclusion is quite complex and has not been targetted for a release yet.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: [Closed] Exclude image source files?

You must be logged in to post in the forum log in