Add new dependency

16 views
Skip to first unread message

alexander...@qaware.de

unread,
Apr 22, 2015, 6:31:31 AM4/22/15
to scmma...@googlegroups.com
Hey there,

I'm trying to build a new SVN plugin for SCM manager with read permissions generated form mod-authz-svn configuration files. As base I'm using the SVN core-plugin from SCM-Manager.

Therefore I want to use the class org.ini4j.ConfigParser and added it as dependency to my pom.xml. When compiling everything works fine until I place the .jar in the webapp/WEB-INF/lib directory to overwrite the existing SVN plugin. Since I can't install the plugin from the frontend (look here: https://bitbucket.org/sdorra/scm-manager/issue/705/pluginxml-not-found) I have to drop it directly into the lib directory.

I get an "java.lang.NoClassDefFoundError: org/ini4j/ConfigParser" exception then.

Any ideas how to solve this? It seems that the dependency is not packaged correctly.

Kind regards
Alexander Kammerer

Sebastian Sdorra

unread,
Apr 24, 2015, 10:20:33 AM4/24/15
to scmma...@googlegroups.com
Hi,
Plugins are simple jar files in scm-manager 1.x, that means that they not ship their dependencies. If you want to introduce a new dependency you have to ship it by yourself.

But you should consider to go another way, which should be much more comfortable. For development you don't have to copy your plugin to /WEB-INF/lib, you can just run mvn scmp:run. The maven goal starts scm-manager an instance which has you plugin pre-installed. The only problem is that you are using a copy of an existing core plugin which leads to class conflicts. So you could refactor your plugin to avoid these class conflicts (rename the package). 

But copying code is never a good way. I think the best way for getting read permissions in scm-manager is to introduce an api to the core of scm-manager which can be used in a plugin.

Sebastian


--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages