Hi,
I've been looking into using fileinstall to deploy bundles from
target/classes. For ordinary bundles, that works great. For webapps
(using Pax WAR extender), I figured I'd use mvn war:inplace, and get
fileinstall to watch src/main/webapp. And that *almost* works.
The problem I'm having is that the jar file created by fileinstall
doesn't include directory entries.
The Bundle-ClassPath header in the WAR MANIFEST.MF begins:
Bundle-ClassPath: .,WEB-INF/classes,WEB-INF/lib/jstl-1.1.2.jar,...
Each Bundle-ClassPath entry is passed to
JarContent#getEntryAsContent(String entryName), which reads:
...
ZipEntry ze = m_jarFile.getEntry(entryName);
if ((ze != null) && ze.isDirectory()) {
...
http://svn.apache.org/repos/asf/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarContent.java
The second entry, "WEB-INF/classes/", doesn't exist in the JAR because
fileinstall doesn't create directory entries. Hence, this ClassPath
entry is ignored. However, this means that files that begin with this
path are ignored, which leads to a ClassNotFoundException.
I wondered whether it'd make more sense to change JarContent to handle
the directory even if the jar didn't contain an entry for the
directory specifically, but having read FELIX-1210, I'm not sure it's
so simple: https://issues.apache.org/jira/browse/FELIX-1210
I've attached a patch that modifies fileinstall to create the
directory entries in the JAR, and checked that this is sufficient to
run webapps as described above.
Thoughts?
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]