Exclude folder from src

Is there a way to have a folder in the src folder and have that excluded from compiling. I would like to have an example folder in my src folder, but I never can build the jar file that way.

Answers

  • Block comment around the source? This way, one can easily copy & paste or remove the comments.

    Alternatively, just have an examples folder just next your src folder; that's what most libraries do.

  • I would like to have an example folder in my src folder

    Alternatively, just have an examples folder just next your src folder; that's what most libraries do.

    If you are using the library template then there is already a folder called `examples' which is used to store example sketches to be included in the distribution, so is used during the build. By all means have a folder alongside the src folder but make sure it is called something unique to the project e.g. example_work

  • If i have it in the src folder then the icon looks like this: Screen Shot 2014-07-18 at 11.57.15 AM

    And I can run it. If i have it in a other folder then the src folder then it looks like this:

    Screen Shot 2014-07-18 at 11.57.30 AM

    And i'm not able to run the main method. That's kind of the problem.

  • Create a separate package inside src and exclude it in the build.xml file in resources.

  • Thanks.

    In case someone wants to know: I changed line 195 to this:

            <path id="src.contents"><fileset dir="${project.tmp}/${project.name}/src" includes="**/*.java" excludes="${project.tmp}/${project.name}/src/exclude" /></path>
    
  • It works a little. But i still get errors now:

    /Users/doekewartena/IdeaProjects/problessing/tmp/Problessing/src/exclude/examples/ProblessingBasics_01.java (5:1) package processing.pdf does not exist

    can someone help?

Sign In or Register to comment.