Class PrepareHobbitGitlab
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 Summary
Modifier and TypeFieldDescriptionprivate AuthConfig
private String[]
private String
private String
private org.apache.maven.project.MavenProject
private static final String
private String
private String
private String
private String
private org.apache.maven.settings.Settings
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate org.gitlab4j.api.GitLabApi
checkConnection
(String user, String password) private String
checkSystemTtlContent
(String content, String imageUrl) private void
createOrUpdateFile
(org.gitlab4j.api.models.Project project, org.gitlab4j.api.RepositoryFileApi fileApi, String imageUrl) void
execute()
private String
private String
private org.gitlab4j.api.models.Project
getOrCreateProject
(org.gitlab4j.api.ProjectApi projectApi) private String
getSystemInstanceLines
(String imageUrl) private String
getSystemTtlContent
(String imageUrl) private org.gitlab4j.api.GitLabApi
makeGitLabConnection
(String gitHost) private String
setImageURLProperty
(org.gitlab4j.api.models.Project p, String gitHost) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
NEWLINE
-
authConfig
-
giturl
-
registryPort
-
defaultbranch
-
benchmarks
-
projectArtifactId
-
projectVersion
-
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
-
makeGitLabConnection
private org.gitlab4j.api.GitLabApi makeGitLabConnection(String gitHost) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
checkConnection
-
getHost
-
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
-
getSystemTtlContent
-
getSystemInstanceLines
-
getImplementsLines
-