Package nl.tranquilizedquality.itest.cargo.exception

Examples of nl.tranquilizedquality.itest.cargo.exception.ConfigurationException


            final String msg = dir + " directory does not excist! : " + path;
            if (LOGGER.isErrorEnabled()) {
                LOGGER.error(msg);
            }

            throw new ConfigurationException(msg);
        }

        return path;
    }
View Full Code Here


            final String msg = dir + " directory does not excist! : " + path;
            if (LOGGER.isErrorEnabled()) {
                LOGGER.error(msg);
            }

            throw new ConfigurationException(msg);
        }

        return path;
    }
View Full Code Here

            final String msg = dir + " directory does not excist! : " + path;
            if (LOGGER.isErrorEnabled()) {
                LOGGER.error(msg);
            }

            throw new ConfigurationException(msg);
        }

        return path;
    }
View Full Code Here

            final String msg = dir + " directory does not excist! : " + path;
            if (LOGGER.isErrorEnabled()) {
                LOGGER.error(msg);
            }

            throw new ConfigurationException(msg);
        }

        return path;
    }
View Full Code Here

                if (LOGGER.isErrorEnabled()) {
                    LOGGER.error(
                            "Failed to create the directory: " + containerHome + ". Details: " + exceptionOnMkDir.getMessage(),
                            exceptionOnMkDir);
                }
                throw new ConfigurationException("Failed to create the directory: " + containerHome + ". Details: "
                        + exceptionOnMkDir.getMessage(), exceptionOnMkDir);
            }
        }

        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Installing " + containerName + "...");
            LOGGER.info("Downloading container from: " + remoteLocation);
            LOGGER.info("Container file: " + containerFile);
        }

        /*
         * Download and configure the container.
         */
        String installDir;
        try {
            final URL remoteLocationUrl = new URL(this.remoteLocation + containerFile);
            installDir = StringUtils.substringBeforeLast(StringUtils.chomp(containerHome, "/"), "/");
            final ZipURLInstaller installer = new ZipURLInstaller(remoteLocationUrl, installDir, installDir);
            installer.install();
        } catch (final MalformedURLException e) {
            throw new DeployException("Failed to download container!", e);
        }

        /*
         * Rename the install directory to the container home directory so it
         * doesn't matter what the name is of the zip file and avoid case
         * sensitive issues on Linux.
         */
        final String containerDir = StringUtils.stripEnd(containerFile, ".zip");
        final File installedDir = new File(installDir + "/" + containerDir + "/");
        final File destenationDir = new File(containerHome);

        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Renaming: " + installedDir.getPath());
            LOGGER.info("To: " + destenationDir.getPath());
        }

        final boolean renamed = installedDir.renameTo(destenationDir);

        if (!renamed) {
            final String msg = "Failed to rename container install directory to home directory name!";
            if (LOGGER.isErrorEnabled()) {
                LOGGER.error(msg);
            }

            throw new ConfigurationException(msg);
        }

        /*
         * Setup the system properties.
         */
 
View Full Code Here

            final String msg = dir + " directory does not excist! : " + path;
            if (LOGGER.isErrorEnabled()) {
                LOGGER.error(msg);
            }

            throw new ConfigurationException(msg);
        }

        return path;
    }
View Full Code Here

TOP

Related Classes of nl.tranquilizedquality.itest.cargo.exception.ConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.