package org.jenkinsci.plugins.jobprofiles;


import hudson.Extension;
import hudson.util.FormValidation;
import jenkins.model.GlobalConfiguration;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;

import java.net.URI;
import java.net.URISyntaxException;

@Extension
@Slf4j
@Getter
@Setter
public class JobProfilesConfiguration extends GlobalConfiguration {

    private static final String SOFTWARE_INDEX_FILE_DEFAULT = "svn:https://github.com/maxbraun/job-profiles/trunk/src/main/resources/softreg.xml";
    //"svn:https://svn.1and1.org/svn/PFX/devel/ypcache/trunk/src/ypcache.xml";
    private static final String PROFILE_ROOT_DIR_DEFAULT = "https://github.com/maxbraun/job-profiles-examles.git";
    //"https://svn.1and1.org/svn/PFX/devel/jenkins/marvin/branches/newWorld/src/main/resources/profiles;
    //;

    private String softwareIndexFile;
    private String profileRootDir;

    public JobProfilesConfiguration() {
        softwareIndexFile = softwareIndexFile == null ? SOFTWARE_INDEX_FILE_DEFAULT : softwareIndexFile;
        profileRootDir = profileRootDir == null ? PROFILE_ROOT_DIR_DEFAULT : profileRootDir;
    }

    @DataBoundConstructor
    public JobProfilesConfiguration(String softwareIndexFile, String profileRootDir) {
        this.softwareIndexFile = softwareIndexFile;
        this.profileRootDir = profileRootDir;
    }

    @Override
    public boolean configure(final StaplerRequest request, final JSONObject json)
            throws FormException {
        request.bindJSON(this, json);
        save();
        return true;
    }

    public static JobProfilesConfiguration get() {
        return GlobalConfiguration.all().get(JobProfilesConfiguration.class);
    }

    @Override
    public String getDisplayName() {
        return "Job Profiles";
    }

    public FormValidation doCheckValidUri(@QueryParameter String value) {
        try {
            new URI(value);
        } catch (URISyntaxException e) {
            return FormValidation.error("Validation failed.");
        }
        return FormValidation.ok();
    }
}

@@ -546,24 +546,25 @@
 tion %7B%0A%0A    
+ 
 private stat
@@ -626,152 +626,152 @@
 s://
-github.com/maxbraun/job-profiles/trunk/src/main/resources/softreg.xml%22;%0A    //%22svn:https://svn.1and1.org/svn/PFX/devel/ypcache/trunk/src/ypcache
+svn.1and1.org/svn/PFX/devel/ypcache/trunk/src/ypcache.xml%22;%0A    //%22svn:https://github.com/maxbraun/job-profiles/trunk/src/main/resources/softreg
 .xml
@@ -836,70 +836,8 @@
 T = 
-%22https://github.com/maxbraun/job-profiles-examles.git%22;%0A    //
 %22htt
@@ -929,24 +929,25 @@
 profiles
+%22
 ;%0A    //
 ;%0A%0A    p
@@ -938,16 +938,70 @@
 ;%0A    //
+%22https://github.com/maxbraun/job-profiles-examles.git%22
 ;%0A%0A    p

Update JobProfilesConfiguration.java