// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/naming/NamingStrategy.java
// public interface NamingStrategy extends Describable<NamingStrategy>, Serializable {
// 	String exportNames(AppVersion current, Map<String, String> vars, boolean useBuildNumber, int buildNumber);
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/naming/NoopNamingStrategy.java
// @Extension
// public class NoopNamingStrategy implements NamingStrategy, Serializable {
// 
//     private static Logger logger = Logger.getLogger(String.valueOf(AppVersion.class));
// 
//     public Descriptor<NamingStrategy> getDescriptor() {
// 		return new AbstractSemanticParserDescription() {
// 			
// 			@Override
// 			public String getDisplayName() {
// 				
// 				return Messages.NamingStrategies.NOOP_NAMING;
// 			}
// 		};
// 	}
// 
// 	public String exportNames(AppVersion current, Map<String,String> vars, boolean useBuildNumber, int buildNumber) {
// 		// it's called "noop", d'oh!
//         logger.info("SemanticVersioningProcessor::getAppVersion -> not setting anything (NOOP): " + current.toJsonString());
//         return current.toString();
// 	}
// 
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/parsing/BuildDefinitionParser.java
// public interface BuildDefinitionParser extends Describable<BuildDefinitionParser> {
//     AppVersion extractAppVersion(FilePath workspace, PrintStream logger) throws IOException, InvalidBuildFileFormatException;
// }


import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.BuildListener;
import hudson.model.TaskListener;
import hudson.model.AbstractBuild;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.Builder;
import hudson.util.ListBoxModel;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashMap;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.apache.commons.io.FileUtils;
import org.jenkinsci.plugins.SemanticVersioning.naming.NamingStrategy;
import org.jenkinsci.plugins.SemanticVersioning.naming.NoopNamingStrategy;
import org.jenkinsci.plugins.SemanticVersioning.parsing.BuildDefinitionParser;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;
/*
 * The MIT License
 *
 * Copyright (c) 2014, Steve Wagner
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package org.jenkinsci.plugins.SemanticVersioning;





public class SemanticVersioningBuilder extends Builder {

    private BuildDefinitionParser parser;
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/naming/NamingStrategy.java
// public interface NamingStrategy extends Describable<NamingStrategy>, Serializable {
// 	String exportNames(AppVersion current, Map<String, String> vars, boolean useBuildNumber, int buildNumber);
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/naming/NoopNamingStrategy.java
// @Extension
// public class NoopNamingStrategy implements NamingStrategy, Serializable {
// 
//     private static Logger logger = Logger.getLogger(String.valueOf(AppVersion.class));
// 
//     public Descriptor<NamingStrategy> getDescriptor() {
// 		return new AbstractSemanticParserDescription() {
// 			
// 			@Override
// 			public String getDisplayName() {
// 				
// 				return Messages.NamingStrategies.NOOP_NAMING;
// 			}
// 		};
// 	}
// 
// 	public String exportNames(AppVersion current, Map<String,String> vars, boolean useBuildNumber, int buildNumber) {
// 		// it's called "noop", d'oh!
//         logger.info("SemanticVersioningProcessor::getAppVersion -> not setting anything (NOOP): " + current.toJsonString());
//         return current.toString();
// 	}
// 
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/parsing/BuildDefinitionParser.java
// public interface BuildDefinitionParser extends Describable<BuildDefinitionParser> {
//     AppVersion extractAppVersion(FilePath workspace, PrintStream logger) throws IOException, InvalidBuildFileFormatException;
// }


// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/SemanticVersioningBuilder.java
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.BuildListener;
import hudson.model.TaskListener;
import hudson.model.AbstractBuild;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.Builder;
import hudson.util.ListBoxModel;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashMap;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.apache.commons.io.FileUtils;
import org.jenkinsci.plugins.SemanticVersioning.naming.NamingStrategy;
import org.jenkinsci.plugins.SemanticVersioning.naming.NoopNamingStrategy;
import org.jenkinsci.plugins.SemanticVersioning.parsing.BuildDefinitionParser;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;

/*
 * The MIT License
 *
 * Copyright (c) 2014, Steve Wagner
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package org.jenkinsci.plugins.SemanticVersioning;





public class SemanticVersioningBuilder extends Builder {

    private BuildDefinitionParser parser;
    private NamingStrategy namingStrategy = new NoopNamingStrategy();