java.lang.Object
org.apache.maven.plugin.AbstractMojo
de.uni_mannheim.informatik.dws.melt.matching_maven_plugin.PrepareHobbitGitlab
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="prepareHobbitGitlab", defaultPhase=VERIFY) public class PrepareHobbitGitlab extends org.apache.maven.plugin.AbstractMojo
This Mojo will: 1. create a project (if not already existent) in gitlab with the name of the artifactId 2. create or update a system.ttl file which describes the matching system so that version and implementing benchmarks are updated 3. set the maven property ${hobbit.imageURL} to the correct value which is normally "git.project-hobbit.eu:4567/${username}/${artifactId}:${project.version}
  • Field Details

    • NEWLINE

      private static final String NEWLINE
    • authConfig

      @Parameter(property="authConfig") private AuthConfig authConfig
    • giturl

      @Parameter(property="giturl", defaultValue="https://git.project-hobbit.eu") private String giturl
    • registryPort

      @Parameter(property="registryPort", defaultValue="4567") private String registryPort
    • defaultbranch

      @Parameter(property="defaultbranch", defaultValue="master") private String defaultbranch
    • benchmarks

      @Parameter(property="benchmarks", defaultValue="") private String[] benchmarks
    • projectArtifactId

      @Parameter(defaultValue="${project.artifactId}", readonly=true) private String projectArtifactId
    • projectVersion

      @Parameter(defaultValue="${project.version}", readonly=true) private String projectVersion
    • projectDescription

      @Parameter(defaultValue="${project.description}", readonly=true) private String projectDescription
    • mavenProject

      @Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject mavenProject
    • settings

      @Parameter(defaultValue="${settings}", readonly=true) private org.apache.maven.settings.Settings settings
  • Constructor Details

    • PrepareHobbitGitlab

      public PrepareHobbitGitlab()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • setImageURLProperty

      private String setImageURLProperty(org.gitlab4j.api.models.Project p, String gitHost)
    • makeGitLabConnection

      private org.gitlab4j.api.GitLabApi makeGitLabConnection(String gitHost) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • checkConnection

      private org.gitlab4j.api.GitLabApi checkConnection(String user, String password)
    • getHost

      private String getHost(String url)
    • getOrCreateProject

      private org.gitlab4j.api.models.Project getOrCreateProject(org.gitlab4j.api.ProjectApi projectApi) throws org.gitlab4j.api.GitLabApiException
      Throws:
      org.gitlab4j.api.GitLabApiException
    • createOrUpdateFile

      private void createOrUpdateFile(org.gitlab4j.api.models.Project project, org.gitlab4j.api.RepositoryFileApi fileApi, String imageUrl) throws org.gitlab4j.api.GitLabApiException
      Throws:
      org.gitlab4j.api.GitLabApiException
    • checkSystemTtlContent

      private String checkSystemTtlContent(String content, String imageUrl)
    • getSystemTtlContent

      private String getSystemTtlContent(String imageUrl)
    • getSystemInstanceLines

      private String getSystemInstanceLines(String imageUrl)
    • getImplementsLines

      private String getImplementsLines()