*/
protected void createInstallationLayout( boolean includeWrapperDependencies ) throws MojoFailureException,
IOException
{
// Getting the installation layout and creating directories
InstallationLayout installationLayout = getInstallationLayout();
installationLayout.mkdirs();
// Copying dependencies artifacts to the lib folder of the installation layout
MojoHelperUtils.copyDependencies( mojo, installationLayout, includeWrapperDependencies );
// Copying the LICENSE and NOTICE files
MojoHelperUtils.copyBinaryFile(
getClass().getResourceAsStream( "/org/apache/directory/server/installers/LICENSE" ),
new File( installationLayout.getInstallationDirectory(), "LICENSE" ) );
MojoHelperUtils.copyBinaryFile(
getClass().getResourceAsStream( "/org/apache/directory/server/installers/NOTICE" ),
new File( installationLayout.getInstallationDirectory(),
"NOTICE" ) );
// Copying the 'apacheds' shell script (only for Linux, Solaris or Mac OS X)
if ( target.isOsNameLinux() || target.isOsNameSolaris() || target.isOsNameMacOSX() )
{
MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
getClass().getResourceAsStream( "/org/apache/directory/server/installers/apacheds" ),
new File( installationLayout.getBinDirectory(), "apacheds" ), true );
MojoHelperUtils.exec( new String[]
{ "chmod", "755", "apacheds" }, installationLayout.getBinDirectory(), false );
}
// Copying the wrappers files (native wrapper executable and library [.jnilib, .so, .dll])
copyWrapperFiles();
// Copying the wrapper configuration file
MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
getClass()
.getResourceAsStream( "/org/apache/directory/server/installers/wrapper-installation.conf" ),
new File( installationLayout.getConfDirectory(), "wrapper.conf" ), true );
}