Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2576

Possibility to reduce classpath scanning to a parent-package

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.1.3
    • None
    • Plugin - Convention
    • None

    Description

      Right now, there is a constant named "struts.convention.exclude.packages"
      I had to add "oracle.toplink.*" in order to get the plugin working.

      It would be nice to have the possibility to configure a top level package (my.project.** ) that will be scanned instead of excluding everything else.

      After looking at the source I came to the conclusion that the convention
      plugin is designed to exclude a whole bunch of packages from classpath
      scanning. For my feeling that is not the best way to go because you can never
      be sure what is on your classpath. Worst case the application stops working
      because the admin adds some jars to the classpath of the appserver, the ear
      is extended with some lib or whatever. In an enterprise environment this
      behaviour is IMHO a no-no.

      Anyway, I do understand that there are usecases where this approach is needed.

      To solve this, I thought about an option like "scanPath" that defaults
      to "*" (or "^(.)$")  In my case, I would set it to something
      like "com.project.*" or "^com\.myproject\.(.)$"

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            psartini Piero Sartini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: