This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor so test catalog is mostly done with no maven specifics.
Signed-off-by: Mike Cobbett <77053+techcobweb@users.noreply.github.com>
- Loading branch information
1 parent
b9f8e62
commit e7b6b0f
Showing
26 changed files
with
309 additions
and
177 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
galasa-maven-plugin/src/main/java/dev/galasa/maven/plugin/BootstrapLoader.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
galasa-maven-plugin/src/main/java/dev/galasa/maven/plugin/TestCatalogArtifactMavenImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.maven.plugin; | ||
|
||
import java.io.IOException; | ||
import java.io.OutputStream; | ||
|
||
import org.apache.commons.io.FileUtils; | ||
import org.apache.maven.artifact.Artifact; | ||
import org.apache.maven.plugin.MojoExecutionException; | ||
|
||
import dev.galasa.maven.plugin.error.ErrorRaiser; | ||
import dev.galasa.maven.plugin.file.TestCatalogArtifact; | ||
|
||
public class TestCatalogArtifactMavenImpl implements TestCatalogArtifact<MojoExecutionException> { | ||
|
||
private Artifact testCatalogArtifact; | ||
private ErrorRaiser<MojoExecutionException> errorRaiser; | ||
|
||
public TestCatalogArtifactMavenImpl(Artifact testCatalogArtifact, ErrorRaiser<MojoExecutionException> errorRaiser ) { | ||
this.errorRaiser = errorRaiser; | ||
this.testCatalogArtifact = testCatalogArtifact ; | ||
} | ||
|
||
@Override | ||
public void transferTo(OutputStream outputStream) throws MojoExecutionException { | ||
try { | ||
FileUtils.copyFile(this.testCatalogArtifact.getFile(), outputStream); | ||
} catch( IOException ex ) { | ||
errorRaiser.raiseError(ex,ex.toString()); | ||
} | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
galasa-maven-plugin/src/main/java/dev/galasa/maven/plugin/WrappedLogMaven.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package dev.galasa.maven.plugin; | ||
|
||
import org.apache.maven.plugin.logging.Log; | ||
|
||
import dev.galasa.maven.plugin.log.WrappedLog; | ||
|
||
public class WrappedLogMaven implements WrappedLog { | ||
|
||
private Log log ; | ||
|
||
public WrappedLogMaven(Log log) { | ||
this.log = log; | ||
} | ||
|
||
@Override | ||
public void info(String message) { | ||
log.info(message); | ||
} | ||
|
||
@Override | ||
public void error(String message) { | ||
log.error(message); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
galasa-maven-plugin/src/main/java/dev/galasa/maven/plugin/common/BootstrapLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.maven.plugin; | ||
|
||
import java.net.URL; | ||
import java.util.Properties; | ||
|
||
public interface BootstrapLoader<Ex extends Exception> { | ||
public Properties getBootstrapProperties(URL bootstrapUrl) throws Ex ; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
galasa-maven-plugin/src/main/java/dev/galasa/maven/plugin/common/GalasaRestApiMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.galasa.maven.plugin.common; | ||
|
||
public class GalasaRestApiMetadata { | ||
public String getGalasaRestApiVersion() { | ||
return "0.32.0"; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...galasa/maven/plugin/auth/GsonFactory.java → ...lasa/maven/plugin/common/GsonFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
galasa-maven-plugin/src/main/java/dev/galasa/maven/plugin/common/TestCatalogArtifact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.maven.plugin.common; | ||
|
||
import java.io.OutputStream; | ||
|
||
public interface TestCatalogArtifact<Ex extends Exception> { | ||
void transferTo(OutputStream outputStream) throws Ex; | ||
} |
Oops, something went wrong.