Package org.apache.maven.shared.verifier
Class Verifier
- java.lang.Object
-
- org.apache.maven.shared.verifier.Verifier
-
@Deprecated public class Verifier extends java.lang.ObjectDeprecated.This project is deprecated and will be retired soon. Use maven-executor (org.apache.maven.executor:maven-executor) instead. See Migration Guide.Maven test harness for integration tests.DEPRECATION NOTICE: This class is deprecated and this project will be retired soon. Please migrate to maven-executor (
org.apache.maven.executor:maven-executor), which provides a unified, modern API for programmatic Maven execution with support for both Maven 3.9+ and Maven 4+.Benefits of maven-executor:
- Unified API that doesn't require updates when Maven CLI changes
- Support for both forked and embedded execution modes
- Dependency-less design
- Better environment isolation
- Transparent support for Maven 3.9+ and Maven 4+
Migration example:
// Old (maven-verifier): Verifier verifier = new Verifier("/path/to/project"); verifier.addCliArgument("package"); verifier.execute(); verifier.verifyErrorFreeLog(); // New (maven-executor) ? groupId: org.apache.maven.executor, artifactId: maven-executor: Path mavenHome = Paths.get(System.getProperty("maven.home")); try (ExecutorHelper executor = ExecutorHelper.forMavenInstallation(mavenHome, ExecutorHelper.Mode.AUTO)) { ExecutorRequest request = ExecutorRequest.mavenBuilder() .cwd(Paths.get("/path/to/project")) .arguments("package") .build(); ExecutorResult result = executor.execute(request); assertTrue(result.success()); }- Author:
- Jason van Zyl, Brett Porter
- See Also:
- Migration Guide, maven-executor
-
-
Field Summary
Fields Modifier and Type Field Description static java.io.FileDEFAULT_GLOBAL_SETTINGS_FILEDeprecated.static java.io.FileDEFAULT_USER_SETTINGS_FILEDeprecated.static java.lang.StringUSER_HOMEDeprecated.static java.io.FileUSER_MAVEN_CONFIGURATION_HOMEDeprecated.
-
Constructor Summary
Constructors Constructor Description Verifier(java.lang.String basedir)Deprecated.Verifier(java.lang.String basedir, boolean debug)Deprecated.to be removed useVerifier(String basedir)Verifier(java.lang.String basedir, java.lang.String settingsFile)Deprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings fileVerifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug)Deprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings fileVerifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, boolean forkJvm)Deprecated.to be removed useVerifier(String)setSettingsFile(String)to set settings filesetForkJvm(boolean)to set forkJvm statusVerifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, boolean forkJvm, java.lang.String[] defaultCliArguments)Deprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetForkJvm(boolean)to set forkJvm status andsetDefaultCliArguments(String[] defaultCliArguments)to set settings fileVerifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, java.lang.String mavenHome)Deprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetMavenHome(String mavenHome)to set maven homeVerifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, java.lang.String[] defaultCliArguments)Deprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetDefaultCliArguments(String[] defaultCliArguments)to set default cliArgumentsVerifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, java.lang.String mavenHome, java.lang.String[] defaultCliArguments)Deprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetMavenHome(String mavenHome)to set maven homesetDefaultCliArguments(String[] defaultCliArguments)to set settings file
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddCliArgument(java.lang.String cliArgument)Deprecated.Add a command line argument, each argument must be set separately one by one.voidaddCliArguments(java.lang.String... cliArguments)Deprecated.Add a command line arguments, each argument must be set separately one by one.voidaddCliOption(java.lang.String option)Deprecated.please useaddCliArgument(String)voiddeleteArtifact(java.lang.String org, java.lang.String name, java.lang.String version, java.lang.String ext)Deprecated.voiddeleteArtifacts(java.lang.String gid)Deprecated.Deletes all artifacts in the specified group id from the local repository.voiddeleteArtifacts(java.lang.String gid, java.lang.String aid, java.lang.String version)Deprecated.Deletes all artifacts in the specified g:a:v from the local repository.voiddeleteDirectory(java.lang.String path)Deprecated.Deletes the specified directory.voiddisplayStreamBuffers()Deprecated.will be removed without replacementvoidexecute()Deprecated.Execute Maven.voidexecuteGoal(java.lang.String goal)Deprecated.will be removed.voidexecuteGoal(java.lang.String goal, java.util.Map<java.lang.String,java.lang.String> envVars)Deprecated.will be removed.voidexecuteGoals(java.util.List<java.lang.String> goals)Deprecated.will be removedvoidexecuteGoals(java.util.List<java.lang.String> goals, java.util.Map<java.lang.String,java.lang.String> envVars)Deprecated.will be removedjava.io.FilefilterFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String fileEncoding)Deprecated.Filters a text file by replacing some user-defined tokens.java.io.FilefilterFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String fileEncoding, java.util.Map<java.lang.String,java.lang.String> filterMap)Deprecated.Filters a text file by replacing some user-defined tokens.java.io.FilefilterFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String fileEncoding, java.util.Properties filterProperties)Deprecated.java.util.List<java.lang.String>getArtifactFileNameList(java.lang.String org, java.lang.String name, java.lang.String version, java.lang.String ext)Deprecated.java.lang.StringgetArtifactMetadataPath(java.lang.String gid, java.lang.String aid)Deprecated.Gets the path to the local artifact metadata.java.lang.StringgetArtifactMetadataPath(java.lang.String gid, java.lang.String aid, java.lang.String version)Deprecated.Gets the path to the local artifact metadata.java.lang.StringgetArtifactMetadataPath(java.lang.String gid, java.lang.String aid, java.lang.String version, java.lang.String filename)Deprecated.Gets the path to a file in the local artifact directory.java.lang.StringgetArtifactPath(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext)Deprecated.java.lang.StringgetArtifactPath(java.lang.String gid, java.lang.String aid, java.lang.String version, java.lang.String ext, java.lang.String classifier)Deprecated.Returns the absolute path to the artifact denoted by groupId, artifactId, version, extension and classifier.java.lang.StringgetBasedir()Deprecated.java.util.List<java.lang.String>getCliOptions()Deprecated.will be removed without replacement, for arguments adding please useaddCliArgument(String),addCliArguments(String...)java.util.Map<java.lang.String,java.lang.String>getEnvironmentVariables()Deprecated.java.lang.StringgetExecutable()Deprecated.java.lang.StringgetLocalRepoLayout()Deprecated.java.lang.StringgetLocalRepository()Deprecated.java.io.FilegetLogFile()Deprecated.java.lang.StringgetLogFileName()Deprecated.Gets the name of the file used to log build output.protected org.apache.maven.shared.verifier.MavenLaunchergetMavenLauncher(java.util.Map<java.lang.String,java.lang.String> envVars)Deprecated.java.lang.StringgetMavenVersion()Deprecated.java.util.PropertiesgetSystemProperties()Deprecated.java.util.PropertiesgetVerifierProperties()Deprecated.booleanisAutoclean()Deprecated.booleanisDebugJvm()Deprecated.booleanisMavenDebug()Deprecated.will be removed without replacementjava.util.List<java.lang.String>loadFile(java.io.File file, boolean hasCommand)Deprecated.java.util.List<java.lang.String>loadFile(java.lang.String basedir, java.lang.String filename, boolean hasCommand)Deprecated.java.util.List<java.lang.String>loadLines(java.lang.String filename, java.lang.String encoding)Deprecated.Loads the (non-empty) lines of the specified text file.java.util.PropertiesloadProperties(java.lang.String filename)Deprecated.java.util.Map<java.lang.String,java.lang.String>newDefaultFilterMap()Deprecated.Gets a new copy of the default filter map.java.util.PropertiesnewDefaultFilterProperties()Deprecated.voidresetStreams()Deprecated.will be removed without replacementvoidsetAutoclean(boolean autoclean)Deprecated.Clean project before execution by addingCLEAN_CLI_ARGUMENTto command line.voidsetCliOptions(java.util.List<java.lang.String> cliOptions)Deprecated.will be removedvoidsetDebug(boolean debug)Deprecated.will be removed without replacementvoidsetDebugJvm(boolean debugJvm)Deprecated.voidsetDefaultCliArguments(java.lang.String[] defaultCliArguments)Deprecated.voidsetEnvironmentVariable(java.lang.String key, java.lang.String value)Deprecated.voidsetEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)Deprecated.voidsetForkJvm(boolean forkJvm)Deprecated.voidsetForkMode(java.lang.String forkMode)Deprecated.voidsetLocalRepo(java.lang.String localRepo)Deprecated.voidsetLocalRepoLayout(java.lang.String localRepoLayout)Deprecated.voidsetLogFile(java.io.File logFile)Deprecated.voidsetLogFileName(java.lang.String logFileName)Deprecated.Sets the name of the file used to log build output.voidsetMavenDebug(boolean mavenDebug)Deprecated.will be removed without replacement.voidsetMavenHome(java.lang.String mavenHome)Deprecated.voidsetSettingsFile(java.lang.String settingsFile)Deprecated.voidsetSystemProperties(java.util.Properties systemProperties)Deprecated.voidsetSystemProperty(java.lang.String key, java.lang.String value)Deprecated.voidsetUseWrapper(boolean useWrapper)Deprecated.voidsetVerifierProperties(java.util.Properties verifierProperties)Deprecated.static java.lang.StringstripAnsi(java.lang.String msg)Deprecated.voidverify(boolean chokeOnErrorOutput)Deprecated.voidverifyArtifactContent(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext, java.lang.String content)Deprecated.Verifies that the artifact given by its Maven coordinates exists and contains the given content.voidverifyArtifactNotPresent(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext)Deprecated.Verifies that the artifact given through its Maven coordinates does not exist.voidverifyArtifactPresent(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext)Deprecated.Verifies that the artifact given through its Maven coordinates exists.voidverifyErrorFreeLog()Deprecated.voidverifyFileContentMatches(java.lang.String file, java.lang.String regex)Deprecated.Verifies the given file's content matches an regular expression.voidverifyFileNotPresent(java.lang.String file)Deprecated.Verifies that the given file does not exist.voidverifyFilePresent(java.lang.String file)Deprecated.Verifies that the given file exists.voidverifyTextInLog(java.lang.String text)Deprecated.Throws an exception if the text is not present in the log.voidwriteFile(java.lang.String path, java.lang.String contents)Deprecated.Writes a text file with the specified contents.
-
-
-
Field Detail
-
USER_HOME
public static final java.lang.String USER_HOME
Deprecated.
-
USER_MAVEN_CONFIGURATION_HOME
public static final java.io.File USER_MAVEN_CONFIGURATION_HOME
Deprecated.
-
DEFAULT_USER_SETTINGS_FILE
public static final java.io.File DEFAULT_USER_SETTINGS_FILE
Deprecated.
-
DEFAULT_GLOBAL_SETTINGS_FILE
public static final java.io.File DEFAULT_GLOBAL_SETTINGS_FILE
Deprecated.
-
-
Constructor Detail
-
Verifier
public Verifier(java.lang.String basedir) throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, boolean debug) throws VerificationExceptionDeprecated.to be removed use- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile) throws VerificationExceptionDeprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings file
- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug) throws VerificationExceptionDeprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings file
- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, java.lang.String[] defaultCliArguments) throws VerificationExceptionDeprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetDefaultCliArguments(String[] defaultCliArguments)to set default cliArguments
- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, boolean forkJvm) throws VerificationExceptionDeprecated.to be removed useVerifier(String)setSettingsFile(String)to set settings filesetForkJvm(boolean)to set forkJvm status
- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, boolean forkJvm, java.lang.String[] defaultCliArguments) throws VerificationExceptionDeprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetForkJvm(boolean)to set forkJvm status andsetDefaultCliArguments(String[] defaultCliArguments)to set settings file
- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, java.lang.String mavenHome) throws VerificationExceptionDeprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetMavenHome(String mavenHome)to set maven home
- Throws:
VerificationException
-
Verifier
@Deprecated public Verifier(java.lang.String basedir, java.lang.String settingsFile, boolean debug, java.lang.String mavenHome, java.lang.String[] defaultCliArguments) throws VerificationExceptionDeprecated.to be removed useVerifier(String basedir)setSettingsFile(String settingsFile)to set settings filesetMavenHome(String mavenHome)to set maven homesetDefaultCliArguments(String[] defaultCliArguments)to set settings file
- Throws:
VerificationException
-
-
Method Detail
-
setLocalRepo
public void setLocalRepo(java.lang.String localRepo)
Deprecated.
-
resetStreams
@Deprecated public void resetStreams()
Deprecated.will be removed without replacement
-
displayStreamBuffers
@Deprecated public void displayStreamBuffers()
Deprecated.will be removed without replacement
-
verify
public void verify(boolean chokeOnErrorOutput) throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
verifyErrorFreeLog
public void verifyErrorFreeLog() throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
verifyTextInLog
public void verifyTextInLog(java.lang.String text) throws VerificationExceptionDeprecated.Throws an exception if the text is not present in the log.- Parameters:
text- the text to assert present- Throws:
VerificationException- if text is not found in log
-
stripAnsi
public static java.lang.String stripAnsi(java.lang.String msg)
Deprecated.
-
loadProperties
public java.util.Properties loadProperties(java.lang.String filename) throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
loadLines
public java.util.List<java.lang.String> loadLines(java.lang.String filename, java.lang.String encoding) throws java.io.IOExceptionDeprecated.Loads the (non-empty) lines of the specified text file.- Parameters:
filename- The path to the text file to load, relative to the base directory, must not benull.encoding- The character encoding of the file, may benullor empty to use the platform default encoding.- Returns:
- The list of (non-empty) lines from the text file, can be empty but never
null. - Throws:
java.io.IOException- If the file could not be loaded.- Since:
- 1.2
-
loadFile
public java.util.List<java.lang.String> loadFile(java.lang.String basedir, java.lang.String filename, boolean hasCommand) throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
loadFile
public java.util.List<java.lang.String> loadFile(java.io.File file, boolean hasCommand) throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
getArtifactPath
public java.lang.String getArtifactPath(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext)Deprecated.
-
getArtifactPath
public java.lang.String getArtifactPath(java.lang.String gid, java.lang.String aid, java.lang.String version, java.lang.String ext, java.lang.String classifier)Deprecated.Returns the absolute path to the artifact denoted by groupId, artifactId, version, extension and classifier.- Parameters:
gid- The groupId, must not be null.aid- The artifactId, must not be null.version- The version, must not be null.ext- The extension, must not be null.classifier- The classifier, may be null to be omitted.- Returns:
- the absolute path to the artifact denoted by groupId, artifactId, version, extension and classifier, never null.
-
getArtifactFileNameList
public java.util.List<java.lang.String> getArtifactFileNameList(java.lang.String org, java.lang.String name, java.lang.String version, java.lang.String ext)Deprecated.
-
getArtifactMetadataPath
public java.lang.String getArtifactMetadataPath(java.lang.String gid, java.lang.String aid, java.lang.String version)Deprecated.Gets the path to the local artifact metadata. Note that the method does not check whether the returned path actually points to existing metadata.- Parameters:
gid- The group id, must not benull.aid- The artifact id, must not benull.version- The artifact version, may benull.- Returns:
- The (absolute) path to the local artifact metadata, never
null.
-
getArtifactMetadataPath
public java.lang.String getArtifactMetadataPath(java.lang.String gid, java.lang.String aid, java.lang.String version, java.lang.String filename)Deprecated.Gets the path to a file in the local artifact directory. Note that the method does not check whether the returned path actually points to an existing file.- Parameters:
gid- The group id, must not benull.aid- The artifact id, may benull.version- The artifact version, may benull.filename- The filename to use, must not benull.- Returns:
- The (absolute) path to the local artifact metadata, never
null.
-
getArtifactMetadataPath
public java.lang.String getArtifactMetadataPath(java.lang.String gid, java.lang.String aid)Deprecated.Gets the path to the local artifact metadata. Note that the method does not check whether the returned path actually points to existing metadata.- Parameters:
gid- The group id, must not benull.aid- The artifact id, must not benull.- Returns:
- The (absolute) path to the local artifact metadata, never
null.
-
deleteArtifact
public void deleteArtifact(java.lang.String org, java.lang.String name, java.lang.String version, java.lang.String ext) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
deleteArtifacts
public void deleteArtifacts(java.lang.String gid) throws java.io.IOExceptionDeprecated.Deletes all artifacts in the specified group id from the local repository.- Parameters:
gid- The group id whose artifacts should be deleted, must not benull.- Throws:
java.io.IOException- If the artifacts could not be deleted.- Since:
- 1.2
-
deleteArtifacts
public void deleteArtifacts(java.lang.String gid, java.lang.String aid, java.lang.String version) throws java.io.IOExceptionDeprecated.Deletes all artifacts in the specified g:a:v from the local repository.- Parameters:
gid- The group id whose artifacts should be deleted, must not benull.aid- The artifact id whose artifacts should be deleted, must not benull.version- The (base) version whose artifacts should be deleted, must not benull.- Throws:
java.io.IOException- If the artifacts could not be deleted.- Since:
- 1.3
-
deleteDirectory
public void deleteDirectory(java.lang.String path) throws java.io.IOExceptionDeprecated.Deletes the specified directory.- Parameters:
path- The path to the directory to delete, relative to the base directory, must not benull.- Throws:
java.io.IOException- If the directory could not be deleted.- Since:
- 1.2
-
writeFile
public void writeFile(java.lang.String path, java.lang.String contents) throws java.io.IOExceptionDeprecated.Writes a text file with the specified contents. The contents will be encoded using UTF-8.- Parameters:
path- The path to the file, relative to the base directory, must not benull.contents- The contents to write, must not benull.- Throws:
java.io.IOException- If the file could not be written.- Since:
- 1.2
-
filterFile
public java.io.File filterFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String fileEncoding) throws java.io.IOExceptionDeprecated.Filters a text file by replacing some user-defined tokens. This method is equivalent to:filterFile( srcPath, dstPath, fileEncoding, verifier.newDefaultFilterMap() )- Parameters:
srcPath- The path to the input file, relative to the base directory, must not benull.dstPath- The path to the output file, relative to the base directory and possibly equal to the input file, must not benull.fileEncoding- The file encoding to use, may benullor empty to use the platform's default encoding.- Returns:
- The path to the filtered output file, never
null. - Throws:
java.io.IOException- If the file could not be filtered.- Since:
- 2.0
-
filterFile
public java.io.File filterFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String fileEncoding, java.util.Map<java.lang.String,java.lang.String> filterMap) throws java.io.IOExceptionDeprecated.Filters a text file by replacing some user-defined tokens.- Parameters:
srcPath- The path to the input file, relative to the base directory, must not benull.dstPath- The path to the output file, relative to the base directory and possibly equal to the input file, must not benull.fileEncoding- The file encoding to use, may benullor empty to use the platform's default encoding.filterMap- The mapping from tokens to replacement values, must not benull.- Returns:
- The path to the filtered output file, never
null. - Throws:
java.io.IOException- If the file could not be filtered.- Since:
- 1.2
-
filterFile
@Deprecated public java.io.File filterFile(java.lang.String srcPath, java.lang.String dstPath, java.lang.String fileEncoding, java.util.Properties filterProperties) throws java.io.IOExceptionDeprecated.There are 226 references to this method in Maven core ITs. In most (all?) cases it is used together withnewDefaultFilterProperties(). Need to remove both methods and update all clients eventually/- Parameters:
srcPath- The path to the input file, relative to the base directory, must not benull.dstPath- The path to the output file, relative to the base directory and possibly equal to the input file, must not benull.fileEncoding- The file encoding to use, may benullor empty to use the platform's default encoding.filterProperties- The mapping from tokens to replacement values, must not benull.- Returns:
- The path to the filtered output file, never
null. - Throws:
java.io.IOException- If the file could not be filtered.
-
newDefaultFilterProperties
@Deprecated public java.util.Properties newDefaultFilterProperties()
Deprecated.Gets a new copy of the default filter properties. These default filter properties map the tokens "@basedir@" and "@baseurl@" to the test's base directory and its basefile:URL, respectively.- Returns:
- The (modifiable) map with the default filter properties, never
null. - Since:
- 1.2
-
newDefaultFilterMap
public java.util.Map<java.lang.String,java.lang.String> newDefaultFilterMap()
Deprecated.Gets a new copy of the default filter map. These default filter map, contains the tokens "@basedir@" and "@baseurl@" to the test's base directory and its basefile:URL, respectively.- Returns:
- The (modifiable) map with the default filter map, never
null. - Since:
- 2.0
-
verifyFilePresent
public void verifyFilePresent(java.lang.String file) throws VerificationExceptionDeprecated.Verifies that the given file exists.- Parameters:
file- the path of the file to check- Throws:
VerificationException- in case the given file does not exist
-
verifyFileContentMatches
public void verifyFileContentMatches(java.lang.String file, java.lang.String regex) throws VerificationExceptionDeprecated.Verifies the given file's content matches an regular expression. Note this method also checks that the file exists and is readable.- Parameters:
file- the path of the file to checkregex- a regular expression- Throws:
VerificationException- in case the file was not found or its content does not match the given pattern- See Also:
Pattern
-
verifyFileNotPresent
public void verifyFileNotPresent(java.lang.String file) throws VerificationExceptionDeprecated.Verifies that the given file does not exist.- Parameters:
file- the path of the file to check- Throws:
VerificationException- if the given file exists
-
verifyArtifactPresent
public void verifyArtifactPresent(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext) throws VerificationExceptionDeprecated.Verifies that the artifact given through its Maven coordinates exists.- Parameters:
groupId- the groupId of the artifact (must not be null)artifactId- the artifactId of the artifact (must not be null)version- the version of the artifact (must not be null)ext- the extension of the artifact (must not be null)- Throws:
VerificationException- if the given artifact does not exist
-
verifyArtifactNotPresent
public void verifyArtifactNotPresent(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext) throws VerificationExceptionDeprecated.Verifies that the artifact given through its Maven coordinates does not exist.- Parameters:
groupId- the groupId of the artifact (must not be null)artifactId- the artifactId of the artifact (must not be null)version- the version of the artifact (must not be null)ext- the extension of the artifact (must not be null)- Throws:
VerificationException- if the given artifact exists
-
executeGoal
@Deprecated public void executeGoal(java.lang.String goal) throws VerificationExceptionDeprecated.will be removed.For replacement please use:
verifier.addCliArgument( "goal" ); verifier.execute();
Execute Maven.- Throws:
VerificationException
-
executeGoal
@Deprecated public void executeGoal(java.lang.String goal, java.util.Map<java.lang.String,java.lang.String> envVars) throws VerificationExceptionDeprecated.will be removed.For replacement please use:
verifier.addCliArgument( "goal" ); verifier.setEnvironmentVariable( "key1", "value1" ); verifier.setEnvironmentVariable( "key2", "value2" ); verifier.execute();
Execute Maven.- Throws:
VerificationException
-
executeGoals
@Deprecated public void executeGoals(java.util.List<java.lang.String> goals) throws VerificationExceptionDeprecated.will be removedFor replacement please use:
verifier.addCliArguments( "goal1", "goal2" ); verifier.execute();
Execute Maven.- Throws:
VerificationException
-
getExecutable
public java.lang.String getExecutable()
Deprecated.
-
executeGoals
@Deprecated public void executeGoals(java.util.List<java.lang.String> goals, java.util.Map<java.lang.String,java.lang.String> envVars) throws VerificationExceptionDeprecated.will be removedFor replacement please use:
verifier.addCliArguments( "goal1", "goal2" ); verifier.setEnvironmentVariable( "key1", "value1" ); verifier.setEnvironmentVariable( "key2", "value2" ); verifier.execute();
Execute Maven.- Throws:
VerificationException
-
execute
public void execute() throws VerificationExceptionDeprecated.Execute Maven.- Throws:
VerificationException
-
getMavenLauncher
protected org.apache.maven.shared.verifier.MavenLauncher getMavenLauncher(java.util.Map<java.lang.String,java.lang.String> envVars) throws org.apache.maven.shared.verifier.LauncherExceptionDeprecated.- Throws:
org.apache.maven.shared.verifier.LauncherException
-
getMavenVersion
public java.lang.String getMavenVersion() throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
verifyArtifactContent
public void verifyArtifactContent(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String ext, java.lang.String content) throws java.io.IOException, VerificationExceptionDeprecated.Verifies that the artifact given by its Maven coordinates exists and contains the given content.- Parameters:
groupId- the groupId of the artifact (must not be null)artifactId- the artifactId of the artifact (must not be null)version- the version of the artifact (must not be null)ext- the extension of the artifact (must not be null)content- the expected content- Throws:
java.io.IOException- if reading from the artifact failsVerificationException- if the content of the artifact differs
-
getCliOptions
@Deprecated public java.util.List<java.lang.String> getCliOptions()
Deprecated.will be removed without replacement, for arguments adding please useaddCliArgument(String),addCliArguments(String...)
-
setCliOptions
@Deprecated public void setCliOptions(java.util.List<java.lang.String> cliOptions)
Deprecated.will be removed
-
addCliOption
@Deprecated public void addCliOption(java.lang.String option)
Deprecated.please useaddCliArgument(String)Add a command line argument, each argument must be set separately one by one.${basedir}in argument will be replaced by value ofgetBasedir()during execution.- Parameters:
option- an argument to add
-
addCliArgument
public void addCliArgument(java.lang.String cliArgument)
Deprecated.Add a command line argument, each argument must be set separately one by one.${basedir}in argument will be replaced by value ofgetBasedir()during execution.- Parameters:
cliArgument- an argument to add
-
addCliArguments
public void addCliArguments(java.lang.String... cliArguments)
Deprecated.Add a command line arguments, each argument must be set separately one by one.${basedir}in argument will be replaced by value ofgetBasedir()during execution.- Parameters:
cliArguments- an arguments list to add
-
getSystemProperties
public java.util.Properties getSystemProperties()
Deprecated.
-
setSystemProperties
public void setSystemProperties(java.util.Properties systemProperties)
Deprecated.
-
setSystemProperty
public void setSystemProperty(java.lang.String key, java.lang.String value)Deprecated.
-
getEnvironmentVariables
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
Deprecated.
-
setEnvironmentVariables
public void setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Deprecated.
-
setEnvironmentVariable
public void setEnvironmentVariable(java.lang.String key, java.lang.String value)Deprecated.
-
getVerifierProperties
public java.util.Properties getVerifierProperties()
Deprecated.
-
setVerifierProperties
public void setVerifierProperties(java.util.Properties verifierProperties)
Deprecated.
-
isAutoclean
public boolean isAutoclean()
Deprecated.
-
setAutoclean
public void setAutoclean(boolean autoclean)
Deprecated.Clean project before execution by addingCLEAN_CLI_ARGUMENTto command line.By default, options is enabled.
- Parameters:
autoclean- indicate if option is enabled
-
getBasedir
public java.lang.String getBasedir()
Deprecated.
-
getLogFileName
public java.lang.String getLogFileName()
Deprecated.Gets the name of the file used to log build output.- Returns:
- The name of the log file, relative to the base directory, never
null. - Since:
- 1.2
-
setLogFileName
public void setLogFileName(java.lang.String logFileName)
Deprecated.Sets the name of the file used to log build output.- Parameters:
logFileName- The name of the log file, relative to the base directory, must not be empty ornull.- Since:
- 1.2
-
setLogFile
public void setLogFile(java.io.File logFile)
Deprecated.- Parameters:
logFile- configure the log file used to log build output- Since:
- 2.0 ish (not really sure if this will be this)
-
getLogFile
public java.io.File getLogFile()
Deprecated.- Returns:
- The log file used to log build output
- Since:
- 2.0 ish (not really sure if this will be this)
-
setDebug
@Deprecated public void setDebug(boolean debug)
Deprecated.will be removed without replacement
-
isMavenDebug
@Deprecated public boolean isMavenDebug()
Deprecated.will be removed without replacement
-
setMavenDebug
@Deprecated public void setMavenDebug(boolean mavenDebug)
Deprecated.will be removed without replacement.For replacement please use:verifier.addCliArgument( "-X" );
-
setForkJvm
public void setForkJvm(boolean forkJvm)
Deprecated.
-
isDebugJvm
public boolean isDebugJvm()
Deprecated.
-
setDebugJvm
public void setDebugJvm(boolean debugJvm)
Deprecated.
-
getLocalRepoLayout
public java.lang.String getLocalRepoLayout()
Deprecated.
-
setLocalRepoLayout
public void setLocalRepoLayout(java.lang.String localRepoLayout)
Deprecated.
-
getLocalRepository
public java.lang.String getLocalRepository()
Deprecated.
-
setMavenHome
public void setMavenHome(java.lang.String mavenHome)
Deprecated.
-
setForkMode
public void setForkMode(java.lang.String forkMode)
Deprecated.
-
setUseWrapper
public void setUseWrapper(boolean useWrapper)
Deprecated.
-
setSettingsFile
public void setSettingsFile(java.lang.String settingsFile) throws VerificationExceptionDeprecated.- Throws:
VerificationException
-
setDefaultCliArguments
public void setDefaultCliArguments(java.lang.String[] defaultCliArguments)
Deprecated.
-
-