All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tibco.bw.maven.plugin.build.BuildPropertiesImpl Maven / Gradle / Ivy

Go to download

Plugin Code for Apache Maven and TIBCO BusinessWorks™. This is the Maven Plugin for BW6 and BWCE Build.

There is a newer version: 2.9.9
Show newest version
package com.tibco.bw.maven.plugin.build;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;

public class BuildPropertiesImpl implements BuildProperties {
    private List binIncludes;
    private List binExcludes;
    private List sourceIncludes;
    private List sourceExcludes;

    public BuildPropertiesImpl( Properties properties ) {
    	init(properties);
    }

    public void init( Properties properties ) {
        sourceIncludes = splitAndTrimCommaSeparated(properties.getProperty("src.includes"));
        sourceExcludes = splitAndTrimCommaSeparated(properties.getProperty("src.excludes"));
        binIncludes = splitAndTrimCommaSeparated(properties.getProperty("bin.includes"));
        binExcludes = splitAndTrimCommaSeparated(properties.getProperty("bin.excludes"));
    }

    private static List splitAndTrimCommaSeparated(String rawValue) {
        List result = new ArrayList();
        if (rawValue != null) {
            for (String element : rawValue.split(",")) {
                result.add(element.trim());
            }
        }
        if (result.isEmpty()) {
            return Collections.emptyList();
        }
        return result;
    }

	public List getBinIncludes() {
		return binIncludes;
	}

	public void setBinIncludes(List binIncludes) {
		this.binIncludes = binIncludes;
	}

	public List getBinExcludes() {
		return binExcludes;
	}

	public void setBinExcludes(List binExcludes) {
		this.binExcludes = binExcludes;
	}

	public List getSourceIncludes() {
		return sourceIncludes;
	}

	public void setSourceIncludes(List sourceIncludes) {
		this.sourceIncludes = sourceIncludes;
	}

	public List getSourceExcludes() {
		return sourceExcludes;
	}

	public void setSourceExcludes(List sourceExcludes) {
		this.sourceExcludes = sourceExcludes;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy