Doug Palmer created MSHARED-345:
-----------------------------------
Summary: MapperUtil cannot load mapper.properties (and then can't
create mapper)
Key: MSHARED-345
URL: https://jira.codehaus.org/browse/MSHARED-345
Project: Maven Shared Components
Issue Type: Bug
Components: file-management
Affects Versions: file-management-1.2.1
Reporter: Doug Palmer
Priority: Minor
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.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)