Idea bundles non-osgi bundles for an osgi client unnecessarily

Hi,

Just pointing out a performance degrade I noticed in thie wonderful product.

Basically, I was trying to run a web services client in a OSGI based project. Of course the client doesn't need any osgi bundles to run correctly. But when a client is ran (Shift + F10) idea says "Bundling non-OSGI bundles for project ... - ~/.m2/repository/..." I think it tries to bundles all the packages in my m2 repo or all transitive dependencies I specified in the pom. The process is taking enourmous time, and I can NOT stop it also. When clicked on the 'x' button, the dialog box says "Stopping Bundling non-OSGI...", but I think this doesn't stop the process.

After several minutes, the build finishes with compilation erros 500+ which are apparently for jars in m2 rpeo. Like the following.

Class in different directory than declared. Path from class name is org/apache/xml/resolver/readers/ExtendedXMLCatalogReader.class but the path in the jar is 1.0/org/apache/xml/resolver/readers/ExtendedXMLCatalogReader.class from Jar:jaxb-xjc-2.1.7
Class in different directory than declared. Path from class name is org/apache/xml/resolver/readers/OASISXMLCatalogReader.class but the path in the jar is 1.0/org/apache/xml/resolver/readers/OASISXMLCatalogReader.class from Jar:jaxb-xjc-2.1.7
Class in different directory than declared. Path from class name is org/apache/xml/resolver/tools/ResolvingXMLFilter.class but the path in the jar is 1.0/org/apache/xml/resolver/tools/ResolvingXMLFilter.class from Jar:jaxb-xjc-2.1.7
----

This question is probably vague, so just ask what you need.

0
2 comments

Hi,

the OSGi plugin will try to bundle non-OSGi libraries but only if they are referenced by a module with an OSGi facet. It also doesn't handle any transitive dependencies. So actually it should not try to OSGify your whole .m2 repo unless you got the whole repo in the dependencies of one of your modules. There could be a bug in this though, so could you please attach a minimal sample project that produces the behaviour you observed? This would help a lot in tracking the issue down. Thank you very much.

Kind regards,
Jan

0

This happens only once at the start of the project, so I don't have the log anymore. The bundling of dependencies happens only for one package. May be it has hundreds of dependencies, I'm not sure. The whole project is big, so this package could be big as well, but without transitive dependencies it's unlikely. Either way, I believe this should be fixed. Moreover, what I ASK is to fix the unnecesary time (in minutes) it takes when I click on the stop button. Why can't it just stop? That'll be much helpful rather than having to waiting until it stops when I start work early in the morning.

Creating a minimal sample project would take some time though. I'm not sure whether it's possible.

0

Please sign in to leave a comment.