Details
Description
I develop on Glassfish with a blank admin password.
org.codehaus.cargo.util.CargoException: password needs to be 8 characters or longer
at org.codehaus.cargo.container.glassfish.GlassFishStandaloneLocalConfiguration.getPasswordFile(GlassFishStandaloneLocalConfiguration.java:93)
at org.codehaus.cargo.container.glassfish.GlassFishInstalledLocalDeployer.addConnectOptions(GlassFishInstalledLocalDeployer.java:198)
at org.codehaus.cargo.container.glassfish.GlassFishInstalledLocalDeployer.doDeploy(GlassFishInstalledLocalDeployer.java:118)
at org.codehaus.cargo.container.glassfish.GlassFishInstalledLocalDeployer.redeploy(GlassFishInstalledLocalDeployer.java:95)
at org.codehaus.cargo.maven2.DeployerRedeployMojo.performDeployerActionOnSingleDeployable(DeployerRedeployMojo.java:40)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:112)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:55)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
// ...
String password = getPropertyValue(RemotePropertySet.PASSWORD);
if(password.length()<8)
throw new CargoException("password needs to be 8 characters or longer");
try {
File f = new File(getHome(), "password.properties");
if(!f.exists()) {
getFileHandler().mkdirs(getHome());
FileWriter w = new FileWriter(f);
// somehow glassfish uses both. Brain-dead.
w.write("AS_ADMIN_PASSWORD="+password+"\n");
w.write("AS_ADMIN_ADMINPASSWORD="+password+"\n");
w.close();
}
return f;
// ...
Oh yes, when system property with password is set, then it's validated (ekhm...) against length. When properties come from /tmp/cargo/conf/password.properties - not. This weird validation should be removed.
A workaround for now is to keep the blank password in /tmp/cargo/conf/password.properties...
s/with a blank password admin/with a blank admin password/
s/black password/blank password/
Why can't edit the issue I have created?