chonton / exists-maven-plugin

Check if artifact exists in remote maven repository
Apache License 2.0
47 stars 18 forks source link

Authentication not passed properly into wagon when using encryption in settings.xml #21

Closed mir333 closed 4 years ago

mir333 commented 4 years ago

The way how the authentication is passed to the wagon was changed from 0.0.6 to 0.0.7. The new code does not take care of the encrypted password and assumes that settings object holds the plain text password.

The code can be rolled back to get the authentication from wagonManager as in 0.0.6

wagonManager.getAuthenticationInfo(repository.getId()))

or the code would need to be adjusted to check for the encryption and use the maven functionality to get the actual password

securityDispatcher.decrypt( server.getPassword() ) 

https://github.com/mojohaus/sql-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/sql/SqlExecMojo.java