/**
 * (C) Copyright IBM Corporation 2014, 2017.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.wasdev.wlp.maven.plugins.server;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;

/**
 * Install a liberty server
 */
@Mojo(name = "install-server", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
public class InstallServerMojo extends PluginConfigSupport {

    protected void doExecute() throws Exception {
        if (skip) {
            return;
        }
        installServerAssembly();
    }
}

@@ -646,16 +646,193 @@
 erver;%0A%0A
+import java.io.File;%0Aimport java.io.IOException;%0Aimport java.text.MessageFormat;%0A%0Aimport org.apache.commons.io.FileUtils;%0Aimport org.apache.maven.plugin.MojoExecutionException;%0A
 import o
@@ -873,16 +873,71 @@
 s.Mojo;%0A
+import org.apache.maven.plugins.annotations.Parameter;%0A
 import o
@@ -1196,136 +1196,1481 @@
     
-protected void doExecute() throws Exception %7B%0A        if (skip) %7B%0A            return;%0A        %7D%0A        installServerAssembly();
+/**%0A     * Directory of custom configuration files%0A     */%0A    @Parameter(property = %22libertySettingsFolder%22, defaultValue = %22$%7Bbasedir%7D/src/main/resources/etc%22)%0A    private File libertySettingsFolder;%0A%0A    @Override%0A    protected void doExecute() throws Exception %7B%0A        if (skip) %7B%0A            return;%0A        %7D%0A        log.info(MessageFormat.format(messages.getString(%22info.variable.set%22), %22libertySettingsFolder%22, libertySettingsFolder));%0A%0A        copyLibertySettings();%0A%0A        installServerAssembly();%0A    %7D%0A%0A    private void copyLibertySettings() throws MojoExecutionException, IOException %7B%0A        if (libertySettingsFolder.isDirectory()) %7B%0A            File%5B%5D files = libertySettingsFolder.listFiles();%0A            if (files != null && files.length %3E 0) %7B%0A                File installDir = new File(installDirectory + %22/etc%22);%0A%0A                if (!installDir.exists()) %7B%0A                    installDir.mkdirs();%0A                %7D%0A%0A                log.info(%22Copying %22 + files.length + %22 file%22 + ((files.length == 1) ? %22%22:%22s%22) + %22 to %22 + installDir.getCanonicalPath());%0A%0A                FileUtils.copyDirectory(libertySettingsFolder, installDir);%0A            %7D else %7B%0A                log.info(%22No custom Liberty configuration files found.%22);%0A            %7D%0A        %7D else %7B%0A            throw new MojoExecutionException(%22The Liberty configuration %3ClibertySettingsFolder%3E must be an existing directory. Value found: %22 + libertySettingsFolder.toString());%0A        %7D
 %0A   

Add configuration parameter to copy settings files to install dir /etc