-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing packaging for plugins #194
Conversation
…veloping plugins is much easier
Is it complete functional? |
It works for me and the demo has the expected output and it loads all the plugins. Go ahead and try it out. I'm working on a more production ready setup using the maven shade plugin to always exclude slf4j and some others because that has been causing me some issues when starting up, but I'll include that as another pull request if this gets merged. |
I tested and it's work. |
I see a little duplication in demo, we defined the plugin's metadata in both places: plugin.properties and pom.xml (the "properties" section). In the past "properties-maven-plugin" (Maven plugin) injected properties from plugin.properties file in pom.
|
I think having properties in the pom is simpler because they can be inherited from a parent pom and there's no dependency on having an extra file somewhere. I have another example that I'll submit in another pull request to demonstrate. I think it makes building plugins even easier. |
Can you show me the code or give me some info (eventually snippet/pseudo code)? |
Take a look at https://github.com/tower-hawk/tower-hawk/tree/master-refactor-plugin/plugins |
@tylerhawkes
The approach with keep plugin's metadata in MANIFEST.MF (pom.xml) looks nice because you have some defaults/variables (artifactId, version, ...) and inheritance support from Maven. My only problem with this approach is that I cannot run the whole application (including all plugins) from IDE (IDEA InteliJ in my case). It's very useful for me, in development phase, to run the whole application using the |
If the plugin supported multiple directories then that could also solve the problem. In development mode it could look for something like plugins//target/-plugin.jar and load all of them. Then there would be nothing special required to get it to run and debug with an IDE and the pom's would look clean. |
Yes, but the jar file is created on |
@tylerhawkes Did you see my previous comment? Can you explain me how you run your plugins in the development phase? |
For now I've just been having Intellij run |
Exactly. Thanks for your explanation! |
Changing packaging to jar and greatly simplifying the poms so that developing plugins is much easier. I don't necessarily expect this to be merged, however, after looking around and doing some testing - this looks like a much easier way to setup the pom structure as an example. It really requires no configuration in the individual plugins, just a reference to the parent pom. Since .jar extensions are fully supported and don't require unzipping on the file system I think they're the preferred plugin to keep sizes small in containers and not require writes at runtime.
This doesn't address any existing issues. I just wanted to start a discussion on how to make using this framework as easy as possible.