// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/AppVersion.java
// public class AppVersion implements Serializable {
//     private static final String SNAPSHOT = "SNAPSHOT";
//     private final int major;
//     private final int minor;
//     private final String original;
// 
//     private int build;
//     private final boolean isSnapshot;
//     public static final AppVersion EmptyVersion = new AppVersion(0, 0, 0, false, "");
// 
//     public static AppVersion parse(String versionString) {
//         String[] parts = versionString.split("[\\.-]");
// 
//         int major = Integer.parseInt(parts[0]);
//         int minor = Integer.parseInt(parts[1]);
// 
//         int build = -1;
//         boolean isSnapshot = false;
// 
//         if (parts.length == 3) {
//             if (parts[2].equals(SNAPSHOT)) {
//                 isSnapshot = true;
//             } else {
//                 build = Integer.parseInt(parts[2]);
//             }
//         } else if (parts.length == 4) {
//             build = Integer.parseInt(parts[2]);
//             isSnapshot = parts[3].equals(SNAPSHOT);
//         }
// 
//         return new AppVersion(major, minor, build, isSnapshot, versionString);
//     }
// 
//     private AppVersion(int major, int minor, int build, boolean isSnapshot, String original) {
//         this.major = major;
//         this.minor = minor;
// 
//         this.isSnapshot = isSnapshot;
//         this.build = build;
//         this.original = original;
//     }
// 
//     public int getMajor() {
//         return major;
//     }
// 
//     public int getMinor() {
//         return minor;
//     }
// 
//     public String getOriginal() {
//         return this.original;
//     }
// 
//     public boolean isSnapshot() {
//         return isSnapshot;
//     }
// 
//     public void setBuild(int build) {
//         this.build = build;
//     }
// 
//     public int getBuild() {
//         return build;
//     }
// 
//     public String toJsonString() {
//         return String.format(
//                 "{ \"major\": %d, \"minor\": %d, \"build\": %d, \"isSnapshot\": %b, \"originalString\": \"%s\" }",
//                 this.major,
//                 this.minor,
//                 this.build,
//                 this.isSnapshot,
//                 this.original);
//     }
// 
//     @Override
//     public String toString() {
//         String version = String.format("%s.%s", major, minor);
//         if(build > -1) {
//             version += "." + build;
//         }
//         if (isSnapshot) {
//             version += "-" + SNAPSHOT;
//         }
//         return version;
//     }
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/Messages.java
// public class Messages {
//     public static final String SEMANTIC_VERSION_FILENAME = ".semanticVersion";
//     public static final String DISPLAY_NAME = "Determine Semantic Version";
//     public static final String SEMANTIC_VERSION_COLUMN_DISPLAY_NAME = "Semantic Version";
//     public static final String UNKNOWN_VERSION = "Unknown";
// 
//     public static class Parsers {
//         public static final String SBT_BUILD_SBT_PARSER = "SBT build.sbt parser";
//         public static final String MAVEN_POM_PARSER = "Maven Pom Parser";
//         public static final String SBT_BUILD_SCALA_PARSER = "SBT Build.scala Parser";
//         public static final String BOWER_JSON_PARSER = "Bower bower.json Parser";
//         public static final String NPM_JSON_PARSER = "NPM package.json Parser";
//         public static final String COMPOSER_JSON_PARSER = "Composer composer.json Parser";
//     }
// 
//     public static class ColumnDisplayStrategies {
//         public static final String LAST_JENKINS_BUILD_NUMBER_STRATEGY = "Show Last Jenkins Build Number";
//         public static final String LAST_SUCCESSFUL_JENKINS_BUILD_NUMBER_STRATEGY = "Show Last Successful Jenkins Build Number";
//         public static final String LAST_SUCCESSFUL_BUILD_VERSION_STRATEGY = "Show Last Successful Semantic Version";
//         public static final String NA_STRATEGY = "Show 'N/A'";
//     }
// 
//     public static class NamingStrategies {
//     	public static final String NOOP_NAMING = "none";
//     	public static final String MAVEN_RELEASE_DEVELOPMENT = "Maven, release and development version";
//     	public static final String UNTOUCHED = "As found";
//     	public static final String UNTOUCHED_SNAPSHOT = "As found (-SNAPSHOT)";
//     }
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/parsing/AbstractSemanticParserDescription.java
// public abstract class AbstractSemanticParserDescription extends hudson.model.Descriptor {
// 	@Override
// 	public abstract String getDisplayName();
// }


import java.io.Serializable;
import java.util.Map;
import java.util.logging.Logger;
import hudson.Extension;
import hudson.model.Descriptor;
import org.jenkinsci.plugins.SemanticVersioning.AppVersion;
import org.jenkinsci.plugins.SemanticVersioning.Messages;
import org.jenkinsci.plugins.SemanticVersioning.parsing.AbstractSemanticParserDescription;
package org.jenkinsci.plugins.SemanticVersioning.naming;




@Extension
public class MavenReleaseNamingStrategy 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.MAVEN_RELEASE_DEVELOPMENT;
			}
		};
	}

	public String exportNames(AppVersion current, Map<String,String> vars, boolean useBuildNumber, int buildNumber) {
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/AppVersion.java
// public class AppVersion implements Serializable {
//     private static final String SNAPSHOT = "SNAPSHOT";
//     private final int major;
//     private final int minor;
//     private final String original;
// 
//     private int build;
//     private final boolean isSnapshot;
//     public static final AppVersion EmptyVersion = new AppVersion(0, 0, 0, false, "");
// 
//     public static AppVersion parse(String versionString) {
//         String[] parts = versionString.split("[\\.-]");
// 
//         int major = Integer.parseInt(parts[0]);
//         int minor = Integer.parseInt(parts[1]);
// 
//         int build = -1;
//         boolean isSnapshot = false;
// 
//         if (parts.length == 3) {
//             if (parts[2].equals(SNAPSHOT)) {
//                 isSnapshot = true;
//             } else {
//                 build = Integer.parseInt(parts[2]);
//             }
//         } else if (parts.length == 4) {
//             build = Integer.parseInt(parts[2]);
//             isSnapshot = parts[3].equals(SNAPSHOT);
//         }
// 
//         return new AppVersion(major, minor, build, isSnapshot, versionString);
//     }
// 
//     private AppVersion(int major, int minor, int build, boolean isSnapshot, String original) {
//         this.major = major;
//         this.minor = minor;
// 
//         this.isSnapshot = isSnapshot;
//         this.build = build;
//         this.original = original;
//     }
// 
//     public int getMajor() {
//         return major;
//     }
// 
//     public int getMinor() {
//         return minor;
//     }
// 
//     public String getOriginal() {
//         return this.original;
//     }
// 
//     public boolean isSnapshot() {
//         return isSnapshot;
//     }
// 
//     public void setBuild(int build) {
//         this.build = build;
//     }
// 
//     public int getBuild() {
//         return build;
//     }
// 
//     public String toJsonString() {
//         return String.format(
//                 "{ \"major\": %d, \"minor\": %d, \"build\": %d, \"isSnapshot\": %b, \"originalString\": \"%s\" }",
//                 this.major,
//                 this.minor,
//                 this.build,
//                 this.isSnapshot,
//                 this.original);
//     }
// 
//     @Override
//     public String toString() {
//         String version = String.format("%s.%s", major, minor);
//         if(build > -1) {
//             version += "." + build;
//         }
//         if (isSnapshot) {
//             version += "-" + SNAPSHOT;
//         }
//         return version;
//     }
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/Messages.java
// public class Messages {
//     public static final String SEMANTIC_VERSION_FILENAME = ".semanticVersion";
//     public static final String DISPLAY_NAME = "Determine Semantic Version";
//     public static final String SEMANTIC_VERSION_COLUMN_DISPLAY_NAME = "Semantic Version";
//     public static final String UNKNOWN_VERSION = "Unknown";
// 
//     public static class Parsers {
//         public static final String SBT_BUILD_SBT_PARSER = "SBT build.sbt parser";
//         public static final String MAVEN_POM_PARSER = "Maven Pom Parser";
//         public static final String SBT_BUILD_SCALA_PARSER = "SBT Build.scala Parser";
//         public static final String BOWER_JSON_PARSER = "Bower bower.json Parser";
//         public static final String NPM_JSON_PARSER = "NPM package.json Parser";
//         public static final String COMPOSER_JSON_PARSER = "Composer composer.json Parser";
//     }
// 
//     public static class ColumnDisplayStrategies {
//         public static final String LAST_JENKINS_BUILD_NUMBER_STRATEGY = "Show Last Jenkins Build Number";
//         public static final String LAST_SUCCESSFUL_JENKINS_BUILD_NUMBER_STRATEGY = "Show Last Successful Jenkins Build Number";
//         public static final String LAST_SUCCESSFUL_BUILD_VERSION_STRATEGY = "Show Last Successful Semantic Version";
//         public static final String NA_STRATEGY = "Show 'N/A'";
//     }
// 
//     public static class NamingStrategies {
//     	public static final String NOOP_NAMING = "none";
//     	public static final String MAVEN_RELEASE_DEVELOPMENT = "Maven, release and development version";
//     	public static final String UNTOUCHED = "As found";
//     	public static final String UNTOUCHED_SNAPSHOT = "As found (-SNAPSHOT)";
//     }
// }
// 
// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/parsing/AbstractSemanticParserDescription.java
// public abstract class AbstractSemanticParserDescription extends hudson.model.Descriptor {
// 	@Override
// 	public abstract String getDisplayName();
// }


// Path: src/main/java/org/jenkinsci/plugins/SemanticVersioning/naming/MavenReleaseNamingStrategy.java
import java.io.Serializable;
import java.util.Map;
import java.util.logging.Logger;
import hudson.Extension;
import hudson.model.Descriptor;
import org.jenkinsci.plugins.SemanticVersioning.AppVersion;
import org.jenkinsci.plugins.SemanticVersioning.Messages;
import org.jenkinsci.plugins.SemanticVersioning.parsing.AbstractSemanticParserDescription;

package org.jenkinsci.plugins.SemanticVersioning.naming;




@Extension
public class MavenReleaseNamingStrategy 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.MAVEN_RELEASE_DEVELOPMENT;
			}
		};
	}

	public String exportNames(AppVersion current, Map<String,String> vars, boolean useBuildNumber, int buildNumber) {
		logger.info("SemanticVersioningProcessor::getAppVersion -> maven naming: " + current.toJsonString());