volkertb / autoproxy-maven-plugin

Tired of having to manually edit your Maven proxy settings as you move between corporate networks? Now there's a way to handle it automatically. Introducing the Autoproxy Maven plugin.
Other
9 stars 2 forks source link

Implememtation using EventSpy #4

Open lodimas opened 7 years ago

lodimas commented 7 years ago

After some testing with your plugin, I found that it seems that it doesn’t work exactly as expected. The main problem is that, for this plugin to be really useful, you need to make sure that it is executed before trying to connect anywhere to resolve and download artifacts. The mojo approach does not solve this problem, at least for the latest versions of Maven. Using your base code, I made a reimplementation through EventSpy standard Maven interface. I am attaching the code in case you want to consider this new approach. autoproxy.Java.zip extensions.zip

To use it, just “clean install” the autoproxy project, and then place the attached extensions.xml file inside a .mvn folder at the root of your project.

This is an initial rough working version, but many improvements are possible. Please, let me know if, using this approach, you would like me to contribute in your project.

Please, note that I am using the latest proxy-evol version as in Maven Central.

Thank you for the initial idea and implementation!

volkertb commented 7 years ago

Thank you for sharing this @lodimas! I haven't worked on this project in a while, but I intend to look at your solution and hopefully I'll get around to integrating it in my project. Good to see that @MarkusBernhardt took over the maintainance proxy-vole, improved on it and published it to Maven Central. I'll have a look at his work as well.

volkertb commented 7 years ago

By the way, pull requests are always welcome! 😄