Way mangen.properties is located needs enhancement for Felix produced jar
-------------------------------------------------------------------------

                 Key: FELIX-127
                 URL: http://issues.apache.org/jira/browse/FELIX-127
             Project: Felix
          Issue Type: Bug
          Components: Manifest Generator (mangen)
            Reporter: Rob Walker
            Priority: Minor


Currently, the PropertyManager class tries to locate a default 
mangen.properties file based on searching the classpath for mangen.jar e.g.

    public static void getDefaultProperties(String propFileKey)
    {
        // Determine where mangen.jar is located by looking at the system class 
path.
        String jarLoc = null;
        String classpath = System.getProperty("java.class.path");
        int index = classpath.toLowerCase().indexOf("mangen.jar");

Felix produced jar names have version info in them so this fails.

Workaround for now is to explicitly specify the property file using 
-Dmangen.properties=<file> on the mangen invocation.

Alternative workaround is to rename the produced JAR to not include version 
information.

Two issues should probably be addressed when fixing this issue:

1. a better algorithm for finding mangen JAR directory and using to locate 
properties file

2. default supplied mangen.properties is included in JAR by new maven build, so 
this could also be used as a final default fallback via getResource()

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to