Skip to content

Commit

Permalink
SkipTests für maven-tasks hinzugefügt. (#6)
Browse files Browse the repository at this point in the history
Skip executing tests / skip compilation tests added
  • Loading branch information
kingofdisasterr authored Aug 28, 2023
1 parent 945371c commit ccf1dd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gttools/mvn.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ type MvnRunSettings struct {
Settings string
Version bool
ShowVersion bool
// skips executing the tests
SkipTests bool
// skips compiling the tests
MavenTestSkip bool
}

// Run runs mvn according to the settings.
Expand All @@ -50,6 +54,8 @@ func (tool *MvnTool) Run(settings MvnRunSettings) error {
args = goext.AppendIf(args, settings.Settings != "", "--settings", settings.Settings)
args = goext.AppendIf(args, settings.Version, "--version")
args = goext.AppendIf(args, settings.ShowVersion, "--show-version")
args = goext.AppendIf(args, settings.SkipTests, "-DskipTests")
args = goext.AppendIf(args, settings.MavenTestSkip, "-Dmaven.test.skip")
args = append(args, settings.CustomArguments...)

cmd := exec.Command("mvn", args...)
Expand Down

0 comments on commit ccf1dd3

Please sign in to comment.