Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/it/projects/active-profiles/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
def buildLog = new File(basedir, 'build.log');

def buildLog = new File(basedir, 'build.log')

assert buildLog.exists()

assert 1 == buildLog.text.count( ' - it-repo (source: external)' )
assert 1 == buildLog.text.count(' - it-repo (source: external)')
10 changes: 5 additions & 5 deletions src/it/projects/active-profiles_multimodule/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* under the License.
*/

def buildLog = new File( basedir, 'build.log' );
def buildLog = new File(basedir, 'build.log')
assert buildLog.exists()

assert 2 == buildLog.text.count( ' - mph79 (source: org.apache.maven.its.help:active-profiles_multimodule:1.0-SNAPSHOT)' )
assert 1 == buildLog.text.count( ' - mph79-child (source: org.apache.maven.its.help:active-profiles_multimodule-module:1.0-SNAPSHOT)' )
assert 0 == buildLog.text.count( ' - mph79-child-inactive' )
assert 2 == buildLog.text.count( ' - it-repo (source: external)' )
assert 2 == buildLog.text.count(' - mph79 (source: org.apache.maven.its.help:active-profiles_multimodule:1.0-SNAPSHOT)')
assert 1 == buildLog.text.count(' - mph79-child (source: org.apache.maven.its.help:active-profiles_multimodule-module:1.0-SNAPSHOT)')
assert 0 == buildLog.text.count(' - mph79-child-inactive')
assert 2 == buildLog.text.count(' - it-repo (source: external)')
14 changes: 7 additions & 7 deletions src/it/projects/all-profiles-parent-pom/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
* under the License.
*/

def buildLog = new File( basedir, 'build.log' );
def buildLog = new File(basedir, 'build.log')
assert buildLog.exists()

// 2 = parent + child
assert 2 == buildLog.text.count( ' Profile Id: it-repo (Active: true, Source: settings.xml)' )
assert !buildLog.text.contains( ' Profile Id: it-repo (Active: true, Source: pom)' )
assert 2 == buildLog.text.count( ' Profile Id: profile-active-from-parent-pom (Active: true, Source: pom)' )
assert 2 == buildLog.text.count( ' Profile Id: profile-inactive-from-parent-pom (Active: false, Source: pom)' )
assert 1 == buildLog.text.count( ' Profile Id: profile-active-from-child-pom (Active: true, Source: pom)' )
assert 1 == buildLog.text.count( ' Profile Id: profile-inactive-from-child-pom (Active: false, Source: pom)' )
assert 2 == buildLog.text.count(' Profile Id: it-repo (Active: true, Source: settings.xml)')
assert !buildLog.text.contains(' Profile Id: it-repo (Active: true, Source: pom)')
assert 2 == buildLog.text.count(' Profile Id: profile-active-from-parent-pom (Active: true, Source: pom)')
assert 2 == buildLog.text.count(' Profile Id: profile-inactive-from-parent-pom (Active: false, Source: pom)')
assert 1 == buildLog.text.count(' Profile Id: profile-active-from-child-pom (Active: true, Source: pom)')
assert 1 == buildLog.text.count(' Profile Id: profile-inactive-from-child-pom (Active: false, Source: pom)')
8 changes: 4 additions & 4 deletions src/it/projects/all-profiles/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
def buildLog = new File( basedir, 'build.log' );
def buildLog = new File(basedir, 'build.log')
assert buildLog.exists()

assert 1 == buildLog.text.count( ' Profile Id: it-repo (Active: true, Source: settings.xml)' )
assert 1 == buildLog.text.count( ' Profile Id: profile-active-from-pom (Active: true, Source: pom)' )
assert 1 == buildLog.text.count( ' Profile Id: profile-inactive-from-pom (Active: false, Source: pom)' )
assert 1 == buildLog.text.count(' Profile Id: it-repo (Active: true, Source: settings.xml)')
assert 1 == buildLog.text.count(' Profile Id: profile-active-from-pom (Active: true, Source: pom)')
assert 1 == buildLog.text.count(' Profile Id: profile-inactive-from-pom (Active: false, Source: pom)')
12 changes: 6 additions & 6 deletions src/it/projects/describe-cmd-with-goal-report/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
def buildLog = new File(basedir, 'changes.log');
def buildLog = new File(basedir, 'changes.log')
assert buildLog.exists()
assert buildLog.text.contains('Note: This goal should be used as a Maven report.');
assert buildLog.text.contains('Note: This goal should be used as a Maven report.')

buildLog = new File(basedir, 'javadoc.log');
buildLog = new File(basedir, 'javadoc.log')
assert buildLog.exists()
assert buildLog.text.contains('Note: This goal should be used as a Maven report.');
assert buildLog.text.contains('Note: This goal should be used as a Maven report.')

buildLog = new File(basedir, 'assembly.log');
buildLog = new File(basedir, 'assembly.log')
assert buildLog.exists()
assert !buildLog.text.contains('Note: This goal should be used as a Maven report.');
assert !buildLog.text.contains('Note: This goal should be used as a Maven report.')
12 changes: 6 additions & 6 deletions src/it/projects/describe-cmd-with-goal/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
* under the License.
*/

def result = new File(basedir, 'result.txt').text;
def result = new File(basedir, 'result.txt').text

def ls = System.lineSeparator();
def ls = System.lineSeparator()

assert result.contains("'deploy:deploy' is a plugin goal (aka mojo)." + ls +
"Mojo: 'deploy:deploy'" + ls +
"deploy:deploy" + ls +
" Description:")
"Mojo: 'deploy:deploy'" + ls +
"deploy:deploy" + ls +
" Description:")

return true;
return true
10 changes: 5 additions & 5 deletions src/it/projects/describe-cmd/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
* under the License.
*/

def result = new File(basedir, 'result-deploy.txt').text;
def result = new File(basedir, 'result-deploy.txt').text

def ls = System.lineSeparator();
def ls = System.lineSeparator()

assert result.contains("'deploy' is a phase corresponding to this plugin:" + ls +
"org.apache.maven.plugins:maven-deploy-plugin")
"org.apache.maven.plugins:maven-deploy-plugin")

result = new File(basedir, 'result-site.txt').text;
result = new File(basedir, 'result-site.txt').text

assert result.contains("'site' is a phase within the 'site' lifecycle, which has the following phases:")

return true;
return true
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
* under the License.
*/

def result = new File(basedir, 'result.txt').text;
def ls = System.lineSeparator();
def result = new File(basedir, 'result.txt').text
def ls = System.lineSeparator()

assert result.contains(
"Group Id: org.apache.maven.plugins" + ls +
"Artifact Id: maven-surefire-plugin" + ls +
"Version: " + surefireversion + ls +
"Goal Prefix: surefire"
"Group Id: org.apache.maven.plugins" + ls +
"Artifact Id: maven-surefire-plugin" + ls +
"Version: " + surefireversion + ls +
"Goal Prefix: surefire"
)

return true;
return true
14 changes: 7 additions & 7 deletions src/it/projects/describe-plugin-without-name/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
* under the License.
*/

def result = new File(basedir, 'result.txt').text;
def result = new File(basedir, 'result.txt').text

def ls = System.lineSeparator();
def ls = System.lineSeparator()

assert result.contains( "Name: Maven Help Plugin" )
assert result.contains("Name: Maven Help Plugin")

assert result.contains( "Group Id: org.apache.maven.plugins" + ls +
"Artifact Id: maven-help-plugin" + ls +
"Version: 2.0" )
assert result.contains("Group Id: org.apache.maven.plugins" + ls +
"Artifact Id: maven-help-plugin" + ls +
"Version: 2.0")

return true;
return true
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
*/

content = new File(basedir, 'build.log').text
assert content.indexOf( "NullPointerException" ) < 0
assert content.indexOf("NullPointerException") < 0
4 changes: 2 additions & 2 deletions src/it/projects/effective-pom-artifact/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
def result = new File(basedir, 'result.txt');
def result = new File(basedir, 'result.txt')
assert result.exists()

def LS = System.lineSeparator()
def LS = System.lineSeparator()
assert result.text.find('(?s)' +
' <groupId>org.apache.maven.plugins</groupId>' + LS +
' <artifactId>maven-help-plugin</artifactId>'
Expand Down
16 changes: 8 additions & 8 deletions src/it/projects/effective-pom-from-lifecycle/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
* under the License.
*/

String content = new File( basedir, "result.txt" ).text
String content = new File(basedir, "result.txt").text

assert content.contains( "<projects>" )
assert content.contains( "org.apache.maven.its.help:test:pom:1.0" )
assert content.contains( "org.apache.maven.its.help:module:pom:1.0" )
assert content.contains("<projects>")
assert content.contains("org.apache.maven.its.help:test:pom:1.0")
assert content.contains("org.apache.maven.its.help:module:pom:1.0")

content = new File( basedir, "module/result.txt" ).text
content = new File(basedir, "module/result.txt").text

assert !content.contains( "<projects>" )
assert !content.contains( "org.apache.maven.its.help:test:pom:1.0" )
assert content.contains( "org.apache.maven.its.help:module:pom:1.0" )
assert !content.contains("<projects>")
assert !content.contains("org.apache.maven.its.help:test:pom:1.0")
assert content.contains("org.apache.maven.its.help:module:pom:1.0")
10 changes: 5 additions & 5 deletions src/it/projects/effective-pom-multimodule-artifact/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
* under the License.
*/

String content = new File( basedir, "build.log" ).text
assert content.indexOf( "<projects>" ) == -1
String content = new File(basedir, "build.log").text
assert content.indexOf("<projects>") == -1

def result = new File(basedir, 'result.txt');
def result = new File(basedir, 'result.txt')
assert result.exists()

def LS = System.lineSeparator()
assert result.text.find('(?s)' +
' <groupId>org.apache.maven.plugins</groupId>' + LS +
' <artifactId>maven-help-plugin</artifactId>'
' <groupId>org.apache.maven.plugins</groupId>' + LS +
' <artifactId>maven-help-plugin</artifactId>'
) != null
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
* under the License.
*/

String content = new File( basedir, "build.log" ).text
assert content.indexOf( "<projects>" ) != -1
String content = new File(basedir, "build.log").text
assert content.indexOf("<projects>") != -1
4 changes: 2 additions & 2 deletions src/it/projects/effective-pom-multimodule/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
* under the License.
*/

String content = new File( basedir, "build.log" ).text
assert content.indexOf( "<projects>" ) != -1
String content = new File(basedir, "build.log").text
assert content.indexOf("<projects>") != -1
6 changes: 3 additions & 3 deletions src/it/projects/effective-pom-verbose/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/

String content = new File( basedir, "build.log" ).text
String content = new File(basedir, "build.log").text

// comments in the same line
assert content.contains( "<groupId>org.apache.maven.its.help</groupId> <!-- org.apache.maven.its.help:test:1.0-SNAPSHOT," )
assert content.contains( "<url>https://maven.apache.org/plugins/test/</url> <!-- org.apache.maven.plugins:maven-plugins:33, line 37 -->" )
assert content.contains("<groupId>org.apache.maven.its.help</groupId> <!-- org.apache.maven.its.help:test:1.0-SNAPSHOT,")
assert content.contains("<url>https://maven.apache.org/plugins/test/</url> <!-- org.apache.maven.plugins:maven-plugins:33, line 37 -->")
26 changes: 13 additions & 13 deletions src/it/projects/effective-pom_properties/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@
* specific language governing permissions and limitations
* under the License.
*/
def buildLog = new File(basedir, 'build.log');
def buildLog = new File(basedir, 'build.log')
assert buildLog.exists()

def LS = System.lineSeparator()
if (mavenVersion.startsWith('4.')) {
// with Maven 4, order of properties is reversed from original pom.xml
assert buildLog.text.find(
'(?s)' +
' <properties>' + LS +
' <maven\\.compiler\\.target>1\\.8</maven\\.compiler\\.target>' + LS +
' <maven\\.compiler\\.source>1\\.8</maven\\.compiler\\.source>' + LS +
'.*' +
' </properties>') != null
'(?s)' +
' <properties>' + LS +
' <maven\\.compiler\\.target>1\\.8</maven\\.compiler\\.target>' + LS +
' <maven\\.compiler\\.source>1\\.8</maven\\.compiler\\.source>' + LS +
'.*' +
' </properties>') != null
} else {
assert buildLog.text.find(
'(?s)' +
' <properties>' + LS +
' <maven\\.compiler\\.source>1\\.8</maven\\.compiler\\.source>' + LS +
' <maven\\.compiler\\.target>1\\.8</maven\\.compiler\\.target>' + LS +
'.*' +
' </properties>') != null
'(?s)' +
' <properties>' + LS +
' <maven\\.compiler\\.source>1\\.8</maven\\.compiler\\.source>' + LS +
' <maven\\.compiler\\.target>1\\.8</maven\\.compiler\\.target>' + LS +
'.*' +
' </properties>') != null
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def buildLog = new File(basedir, 'build.log')
assert buildLog.exists()

assert buildLog.text.find(
'(?s)' +
'\\s*<repositoryOrigins>.' +
'\\s*<repositoryOrigin>https://clone1.maven.apache.org/repository/</repositoryOrigin>.' +
'\\s*<repositoryOrigin>https://clone2.maven.apache.org/repository/</repositoryOrigin>.' +
'\\s*</repositoryOrigins>') != null
'(?s)' +
'\\s*<repositoryOrigins>.' +
'\\s*<repositoryOrigin>https://clone1.maven.apache.org/repository/</repositoryOrigin>.' +
'\\s*<repositoryOrigin>https://clone2.maven.apache.org/repository/</repositoryOrigin>.' +
'\\s*</repositoryOrigins>') != null
4 changes: 2 additions & 2 deletions src/it/projects/effective-settings_deep-clone/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
def buildLog = new File(basedir, 'build.log');
def buildLog = new File(basedir, 'build.log')
assert buildLog.exists()

// for effective-settings call
// maven.version (3.0,3.0.4] are missing the proxies?! > assert = 2
// maven.version (,2.2.1) correct > assert = 3
// assert 3 == buildLog.text.count('***')
assert (2..4).contains( buildLog.text.count('***') )
assert (2..4).contains(buildLog.text.count('***'))

// for evaluate calls
assert buildLog.text.contains('proxy-password')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

def result = new File(basedir, 'result.txt').text;
def result = new File(basedir, 'result.txt').text
assert result == 'Apache Maven Help Plugin'

return true;
return true
12 changes: 9 additions & 3 deletions src/it/projects/evaluate-model-collections-maven4/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
* under the License.
*/

assert !new File(basedir, 'build.log').readLines().any { it.startsWith('[ERROR]') }
assert !new File(basedir, 'build.log').readLines().any {
it.startsWith('[ERROR]')
}

def parse = { name -> new groovy.xml.XmlSlurper().parse(new File(basedir, name)) }
def parse = { name ->
new groovy.xml.XmlSlurper().parse(new File(basedir, name))
}
def checkResource = { resource ->
assert resource.name() == 'resource'
assert resource.directory.text() == new File(basedir, 'src/main/resources').absolutePath
Expand Down Expand Up @@ -67,7 +71,9 @@ assert profiles.profile.properties.'profile.key'.text() == 'profile value'
it.name() in ['delegate', 'locations', 'importedFrom', 'pluginMap', 'reportSetMap', 'managementKey']
}.isEmpty()
// no implementation classes of the immutable collections and no XStream back references
assert nodes.findAll { [email protected]() > 0 || [email protected]() > 0 }.isEmpty()
assert nodes.findAll {
[email protected]() > 0 || [email protected]() > 0
}.isEmpty()
}

return true
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

def result = new File(basedir, 'result.txt').text;
def result = new File(basedir, 'result.txt').text
assert result == 'null object or invalid expression'

return true;
return true
6 changes: 3 additions & 3 deletions src/it/projects/evaluate-null-object/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

def result = new File(basedir, 'build.log').text;
assert result.contains( 'null object or invalid expression' )
def result = new File(basedir, 'build.log').text
assert result.contains('null object or invalid expression')

return true;
return true
Loading
Loading