Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-566

include non-java files in src/main/java as resources

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.4
    • 1.5
    • Packaging
    • None

    Description

      For resource files that are closely related to a .java file, I often skip src/main/resources and put the file into src/main/java next to its corresponding .java file.

      This requires an easy but fairly boilerplate line of:

      project.resources.from(_('src/main/java')).exclude('*.java')

      In my buildfile. Besides reducing boilerplate, I always forget to add this, so I've got caught by it several times.

      It seems like this would be a reasonable default because, .svn/etc. folders aside, I would think non-java src/main/java files showing up in the jar/war would be expected and desirable more often than not.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stephenh Stephen Haberman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: