private String decryptServerPassword ( Server server ) throws SecDispatcherException { //CSOFF: LineLength //The following fix was copied from: // https://github.com/bsorrentino/maven-confluence-plugin/blob/master/maven-confluence-reporting-plugin/src/main/java/org/bsc/maven/confluence/plugin/AbstractBaseConfluenceMojo.java // // FIX to resolve // org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException: // java.io.FileNotFoundException: ~/.settings-security.xml (No such file or directory) // //CSON: LineLength if ( securityDispatcher instanceof DefaultSecDispatcher ) { ( ( DefaultSecDispatcher ) securityDispatcher ) . setConfigurationFile ( "~/.m2/settings-security.xml" ) ; } return securityDispatcher . decrypt ( server . getPassword ( ) ) ; }
Obtains the configured password for the given server .