in jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/handler/Parser.java [83:111]
public Parser(final String path) throws MalformedURLException {
if (path == null || path.trim().length() == 0) {
throw new MalformedURLException("Path cannot be null or empty. Syntax " + SYNTAX);
}
if (path.startsWith(INSTRUCTIONS_SEPARATOR) || path.endsWith(INSTRUCTIONS_SEPARATOR)) {
throw new MalformedURLException(
"Path cannot start or end with " + INSTRUCTIONS_SEPARATOR + ". Syntax " + SYNTAX
);
}
jbiProperties = new Properties();
Matcher matcher = SYNTAX_JAR_BND_INSTR.matcher(path);
if (matcher.matches()) {
// we have all the parts
jbiJarURL = new URL(matcher.group(1));
parseInstructionsFile(new URL(matcher.group(2)));
jbiProperties.putAll(parseInstructions(matcher.group(3)));
} else if ((matcher = SYNTAX_JAR_INSTR.matcher(path)).matches()) {
// we have a wrapped jar and instructions
jbiJarURL = new URL(matcher.group(1));
jbiProperties.putAll(parseInstructions(matcher.group(2)));
} else if ((matcher = SYNTAX_JAR_BND.matcher(path)).matches()) {
// we have a wraped jar and a wrapping instructions file
jbiJarURL = new URL(matcher.group(1));
parseInstructionsFile(new URL(matcher.group(2)));
} else {
//we have only a wrapped jar
jbiJarURL = new URL(path);
}
}