Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-345

MapperUtil cannot load mapper.properties (and then can't create mapper)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Auto Closed
    • file-management-1.2.1
    • None
    • file-management
    • None

    Description

      Attempting to run a test case for a mojo that uses file-management, with a mapper defined by <type>regexp</type> I get the exception

      java.lang.IllegalStateException: Cannot find classpath resource: mapper.properties
      at org.apache.maven.shared.model.fileset.mappers.MapperUtil.initializeBuiltIns(MapperUtil.java:64)
      at org.apache.maven.shared.model.fileset.mappers.MapperUtil.getFileNameMapper(MapperUtil.java:98)
      at org.apache.maven.shared.model.fileset.util.FileSetManager.mapIncludedFiles(FileSetManager.java:162)
      ... 26 more

      Looking at file-management-1.2.1.jar I can see a file called mappers.properties but no mapper.properties. Copying the file into my own project and changing the file name means that this exception no longer occurs.

      Instead, there is a NullPointerException caused by the implementations variable not being set during initializeBuiltins()

      Changing to the classname property and setting the type to null (since it is otherwise intialised to "identity") could be a workaround. However, the RegexpPatternMapper seems to be missing from the .jar

      The mappings provided by mapping.properties refer to classes in the org.apache.maven.plugin.assembly.mappers package, which doesn't appear to be anywhere.

      Attachments

        Activity

          People

            Unassigned Unassigned
            charvolant Doug Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: