Rat (Release Audit Tool) results

The following document contains the results of Rat (Release Audit Tool).

*****************************************************
Summary
-------
Generated at: 2014-06-28T11:44:31+02:00
Notes: 0
Binaries: 0
Archives: 3
Standards: 366

Apache Licensed: 205
Generated Documents: 0

JavaDocs are generated and so license header is optional
Generated files do not required license headers

161 Unknown Licenses

*******************************

Unapproved licenses:

  src/it/clone-clean/invoker.properties
  src/it/clone-clean/setup.bsh
  src/it/clone-clean/verify.bsh
  src/it/fail-build/invoker.properties
  src/it/fail-build/src/it/project/prebuild.bsh
  src/it/fail-build/verify.bsh
  src/it/fail-build-with-verify/invoker.properties
  src/it/fail-build-with-verify/src/it/project/prebuild.bsh
  src/it/fail-build-with-verify/verify.bsh
  src/it/fail-noprojects_run/invoker.properties
  src/it/fail-noprojects_verify/invoker.properties
  src/it/fail-postbuild/invoker.properties
  src/it/fail-postbuild/src/it/project/postbuild.bsh
  src/it/fail-postbuild/src/it/project/prebuild.bsh
  src/it/fail-postbuild/verify.bsh
  src/it/fail-prebuild/invoker.properties
  src/it/fail-prebuild/src/it/project/prebuild.bsh
  src/it/fail-prebuild/verify.bsh
  src/it/install-extra-artifacts/verify.bsh
  src/it/integration-test-never-fails/src/it/project/prebuild.bsh
  src/it/integration-test-never-fails/verify.bsh
  src/it/invocation-cmdline-exclude/test.properties
  src/it/invocation-debug/src/it/minvoker-142/invoker.properties
  src/it/invocation-multiple/src/it/project/invoker.properties
  src/it/invocation-multiple/src/it/project/src/main/java/org/TestMojo.java
  src/it/invocation-multiple/src/it/project/system1.properties
  src/it/invocation-multiple/src/it/project/system2.properties
  src/it/invocation-multiple/verify.bsh
  src/it/invocation-offline/src/it/project/invoker.properties
  src/it/invocation-offline/verify.bsh
  src/it/invocation-project/src/it/project/invoker.properties
  src/it/invocation-project/src/it/project/setup.bsh
  src/it/invocation-project/verify.bsh
  src/it/invocation-reactor-indirect/invoker.properties
  src/it/invocation-reactor-indirect/itests/pom.xml
  src/it/invocation-reactor-indirect/itests/src/it/basic/pom.xml
  src/it/invocation-reactor-indirect/plugin/pom.xml
  src/it/invocation-spaces/src/it projects/project/src/main/resources/test.txt
  src/it/invocation-spaces/verify.bsh
  src/it/invoker-report/invoker.properties
  src/it/invoker-report/src/it/failure-post/invoker.properties
  src/it/invoker-report/src/it/failure-post/verify.bsh
  src/it/invoker-report/src/it/failure-pre/invoker.properties
  src/it/invoker-report/src/it/failure-pre/setup.bsh
  src/it/invoker-report/src/it/skip-jre/invoker.properties
  src/it/invoker-report/src/it/skip-maven/invoker.properties
  src/it/invoker-report/src/it/skip-os/invoker.properties
  src/it/invoker-report/src/it/success/invoker.properties
  src/it/invoker-report/verify.bsh
  src/it/local-repo-default/src/it/project/postbuild.bsh
  src/it/local-repo-default/verify.bsh
  src/it/local-repo-isolated/verify.bsh
  src/it/local-repo-path/verify.bsh
  src/it/pom-filtering/verify.bsh
  src/it/pom-filtering-encoding/verify.bsh
  src/it/pom-filtering-reactor/verify.bsh
  src/it/pom-less-invocation/src/it/no-pom/workaround.txt
  src/it/pom-less-invocation/verify.bsh
  src/it/project-cloning/setup.bsh
  src/it/project-cloning/verify.bsh
  src/it/project-cloning-reactor/verify.bsh
  src/it/project-setup/src/it/project1/invoker.properties
  src/it/project-setup/verify.bsh
  src/it/script-accessibility/invoker.properties
  src/it/script-accessibility/src/it/beanshell/verify.bsh
  src/it/script-accessibility/src/it/groovy/verify.groovy
  src/it/script-accessibility/src/main/java/org/MyClass.java
  src/it/script-additional-vars/src/it/beanshell/postbuild.bsh
  src/it/script-additional-vars/src/it/beanshell/prebuild.bsh
  src/it/script-additional-vars/src/it/beanshell/selector.bsh
  src/it/script-additional-vars/src/it/groovy/postbuild.groovy
  src/it/script-additional-vars/src/it/groovy/prebuild.groovy
  src/it/script-additional-vars/src/it/groovy/selector.groovy
  src/it/script-class-loading/invoker.properties
  src/it/script-class-loading/src/it/beanshell/postbuild.bsh
  src/it/script-class-loading/src/it/beanshell/prebuild.bsh
  src/it/script-class-loading/src/it/groovy/postbuild.groovy
  src/it/script-class-loading/src/it/groovy/prebuild.groovy
  src/it/script-class-loading/src/test/java/org/MyUtils.java
  src/it/script-classpath-duplicates/src/it/beanshell/postbuild.bsh
  src/it/script-classpath-duplicates/src/it/beanshell/prebuild.bsh
  src/it/script-classpath-duplicates/src/it/groovy/postbuild.groovy
  src/it/script-classpath-duplicates/src/it/groovy/prebuild.groovy
  src/it/script-classpath-duplicates/verify.bsh
  src/it/script-context/src/it/beanshell/setup.bsh
  src/it/script-context/src/it/beanshell/verify.bsh
  src/it/script-context/src/it/groovy/setup.groovy
  src/it/script-context/src/it/groovy/verify.groovy
  src/it/script-context/verify.bsh
  src/it/script-errors/src/it/beanshell/setup.bsh
  src/it/script-errors/src/it/groovy/setup.groovy
  src/it/script-errors/verify.bsh
  src/it/script-global-vars/src/it/beanshell/setup.bsh
  src/it/script-global-vars/src/it/beanshell/verify.bsh
  src/it/script-global-vars/src/it/groovy/setup.groovy
  src/it/script-global-vars/src/it/groovy/verify.groovy
  src/it/script-interpreter-detection/src/it/beanshell/postbuild.bsh
  src/it/script-interpreter-detection/src/it/beanshell/prebuild.bsh
  src/it/script-interpreter-detection/src/it/groovy/postbuild.groovy
  src/it/script-interpreter-detection/src/it/groovy/prebuild.groovy
  src/it/script-interpreter-detection/verify.bsh
  src/it/script-verify-xml/verify.groovy
  src/it/selector-conditions/src/it/jre-version-match/invoker.properties
  src/it/selector-conditions/src/it/jre-version-match/postbuild.bsh
  src/it/selector-conditions/src/it/jre-version-mismatch/invoker.properties
  src/it/selector-conditions/src/it/jre-version-mismatch/postbuild.bsh
  src/it/selector-conditions/src/it/maven-version-match/invoker.properties
  src/it/selector-conditions/src/it/maven-version-match/postbuild.bsh
  src/it/selector-conditions/src/it/maven-version-mismatch/invoker.properties
  src/it/selector-conditions/src/it/maven-version-mismatch/postbuild.bsh
  src/it/selector-conditions/src/it/os-family-match/invoker.properties
  src/it/selector-conditions/src/it/os-family-match/postbuild.bsh
  src/it/selector-conditions/src/it/os-family-mismatch/invoker.properties
  src/it/selector-conditions/src/it/os-family-mismatch/postbuild.bsh
  src/it/selector-conditions/verify.bsh
  src/it/selector-scripts/src/it/script-ret-false/postbuild.bsh
  src/it/selector-scripts/src/it/script-ret-false/selector.bsh
  src/it/selector-scripts/src/it/script-ret-other/postbuild.bsh
  src/it/selector-scripts/src/it/script-ret-other/selector.bsh
  src/it/selector-scripts/src/it/script-ret-quiet/postbuild.bsh
  src/it/selector-scripts/src/it/script-ret-quiet/selector.bsh
  src/it/selector-scripts/src/it/script-ret-true/postbuild.bsh
  src/it/selector-scripts/src/it/script-ret-true/selector.bsh
  src/it/selector-scripts/src/it/script-throw/postbuild.bsh
  src/it/selector-scripts/src/it/script-throw/selector.bsh
  src/it/selector-scripts/verify.bsh
  src/it/settings-inherit/invoker.properties
  src/it/settings-merge/invoker.properties
  src/it/settings-merge-multiexecutions/invoker.properties
  src/it/settings-merge-multiexecutions/pom.xml
  src/it/settings-merge-multiexecutions/src/it/minvoker-133/pom.xml
  src/it/settings-merge-multiexecutions/src/it/settings.xml
  src/it/skip-install/test.properties
  src/it/skip-install/verify.bsh
  src/it/skip-run/src/it/project/prebuild.bsh
  src/it/skip-run/test.properties
  src/it/skip-run/verify.bsh
  src/it/staging-dependencies/invoker.properties
  src/it/staging-dependencies/repo/org/apache/maven/its/dep/1.0/dep-1.0.pom
  src/it/staging-dependencies/repo/org/apache/maven/its/dep/2.0/dep-2.0.pom
  src/it/staging-dependencies/repo/org/apache/maven/its/dep/maven-metadata.xml
  src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/maven-metadata.xml
  src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-20081020.164906-1.pom
  src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/maven-metadata.xml
  src/it/staging-dependencies/repo/org/apache/maven/its/parent-a/0.1-SNAPSHOT/maven-metadata.xml
  src/it/staging-dependencies/repo/org/apache/maven/its/parent-a/0.1-SNAPSHOT/parent-a-0.1-20081020.164906-1.pom
  src/it/staging-dependencies/repo/org/apache/maven/its/parent-b/0.1-SNAPSHOT/maven-metadata.xml
  src/it/staging-dependencies/repo/org/apache/maven/its/parent-b/0.1-SNAPSHOT/parent-b-0.1-20081020.164906-1.pom
  src/it/staging-dependencies/repo/org/apache/maven/its/pom/0.3-SNAPSHOT/maven-metadata.xml
  src/it/staging-dependencies/repo/org/apache/maven/its/pom/0.3-SNAPSHOT/pom-0.3-20081020.164906-1.pom
  src/it/staging-dependencies/verify.bsh
  src/it/staging-pom/invoker.properties
  src/it/staging-pom/verify.bsh
  src/it/staging-reactor/invoker.properties
  src/it/staging-reactor/mod2/src/main/resources/main.properties
  src/it/staging-reactor/verify.bsh
  src/test/resources/unit/goals-from-file/goals.txt
  src/test/resources/unit/goals-from-file/validate-goal.txt
  src/test/resources/unit/interpolation/goals.txt
  src/test/resources/unit/profiles-from-file/emptyProfiles.txt
  src/test/resources/unit/profiles-from-file/profiles.txt

*******************************

Archives:

 + src/it/staging-dependencies/repo/org/apache/maven/its/dep/1.0/dep-1.0-tests.jar
 
 + src/it/staging-dependencies/repo/org/apache/maven/its/dep/2.0/dep-2.0.jar
 
 + src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-20081020.164906-1.jar
 
*****************************************************
  Files with Apache License headers will be marked AL
  Binary files (which do not require AL headers) will be marked B
  Compressed archives will be marked A
  Notices, licenses etc will be marked N
  AL    pom.xml
 !????? src/it/clone-clean/invoker.properties
  AL    src/it/clone-clean/pom.xml
 !????? src/it/clone-clean/setup.bsh
  AL    src/it/clone-clean/src/it/clone-clean/pom.xml
 !????? src/it/clone-clean/verify.bsh
 !????? src/it/fail-build/invoker.properties
  AL    src/it/fail-build/pom.xml
  AL    src/it/fail-build/src/it/project/pom.xml
 !????? src/it/fail-build/src/it/project/prebuild.bsh
 !????? src/it/fail-build/verify.bsh
 !????? src/it/fail-build-with-verify/invoker.properties
  AL    src/it/fail-build-with-verify/pom.xml
  AL    src/it/fail-build-with-verify/src/it/project/pom.xml
 !????? src/it/fail-build-with-verify/src/it/project/prebuild.bsh
 !????? src/it/fail-build-with-verify/verify.bsh
  AL    src/it/fail-ignore/pom.xml
  AL    src/it/fail-ignore/src/it/project/pom.xml
  AL    src/it/fail-ignore-with-verify/pom.xml
  AL    src/it/fail-ignore-with-verify/src/it/project/pom.xml
  AL    src/it/fail-noprojects_integration-test/pom.xml
 !????? src/it/fail-noprojects_run/invoker.properties
  AL    src/it/fail-noprojects_run/pom.xml
 !????? src/it/fail-noprojects_verify/invoker.properties
  AL    src/it/fail-noprojects_verify/pom.xml
 !????? src/it/fail-postbuild/invoker.properties
  AL    src/it/fail-postbuild/pom.xml
  AL    src/it/fail-postbuild/src/it/project/pom.xml
 !????? src/it/fail-postbuild/src/it/project/postbuild.bsh
 !????? src/it/fail-postbuild/src/it/project/prebuild.bsh
 !????? src/it/fail-postbuild/verify.bsh
 !????? src/it/fail-prebuild/invoker.properties
  AL    src/it/fail-prebuild/pom.xml
  AL    src/it/fail-prebuild/src/it/project/pom.xml
 !????? src/it/fail-prebuild/src/it/project/prebuild.bsh
 !????? src/it/fail-prebuild/verify.bsh
  AL    src/it/install-extra-artifacts/pom.xml
 !????? src/it/install-extra-artifacts/verify.bsh
  AL    src/it/integration-test-never-fails/pom.xml
  AL    src/it/integration-test-never-fails/src/it/project/pom.xml
 !????? src/it/integration-test-never-fails/src/it/project/prebuild.bsh
 !????? src/it/integration-test-never-fails/verify.bsh
  AL    src/it/invocation-cmdline-exclude/pom.xml
  AL    src/it/invocation-cmdline-exclude/src/it/minvoker-140/pom.xml
 !????? src/it/invocation-cmdline-exclude/test.properties
  AL    src/it/invocation-debug/pom.xml
 !????? src/it/invocation-debug/src/it/minvoker-142/invoker.properties
  AL    src/it/invocation-debug/src/it/minvoker-142/pom.xml
  AL    src/it/invocation-debug/src/it/minvoker-142/verify.groovy
  AL    src/it/invocation-emptyproperty/pom.xml
  AL    src/it/invocation-emptyproperty/src/it/minvoker-118/pom.xml
  AL    src/it/invocation-environmentvariable/pom.xml
  AL    src/it/invocation-environmentvariable/src/it/minvoker-145/pom.xml
  AL    src/it/invocation-multiple/pom.xml
 !????? src/it/invocation-multiple/src/it/project/invoker.properties
  AL    src/it/invocation-multiple/src/it/project/pom.xml
 !????? src/it/invocation-multiple/src/it/project/src/main/java/org/TestMojo.java
 !????? src/it/invocation-multiple/src/it/project/system1.properties
 !????? src/it/invocation-multiple/src/it/project/system2.properties
  AL    src/it/invocation-multiple/src/it/settings.xml
 !????? src/it/invocation-multiple/verify.bsh
  AL    src/it/invocation-offline/pom.xml
 !????? src/it/invocation-offline/src/it/project/invoker.properties
  AL    src/it/invocation-offline/src/it/project/pom.xml
  AL    src/it/invocation-offline/src/it/settings.xml
 !????? src/it/invocation-offline/verify.bsh
  AL    src/it/invocation-project/pom.xml
 !????? src/it/invocation-project/src/it/project/invoker.properties
  AL    src/it/invocation-project/src/it/project/pom.xml
 !????? src/it/invocation-project/src/it/project/setup.bsh
  AL    src/it/invocation-project/src/it/project/sub-1/pom.xml
  AL    src/it/invocation-project/src/it/project/sub-2/pom.xml
  AL    src/it/invocation-project/src/it/project/sub-3/pom.xml
  AL    src/it/invocation-project/src/it/settings.xml
 !????? src/it/invocation-project/verify.bsh
 !????? src/it/invocation-reactor-indirect/invoker.properties
 !????? src/it/invocation-reactor-indirect/itests/pom.xml
 !????? src/it/invocation-reactor-indirect/itests/src/it/basic/pom.xml
 !????? src/it/invocation-reactor-indirect/plugin/pom.xml
  AL    src/it/invocation-reactor-indirect/plugin/src/main/java/org/apache/maven/it/plugins/dummy/MyMojo.java
  AL    src/it/invocation-reactor-indirect/pom.xml
  AL    src/it/invocation-spaces/pom.xml
  AL    src/it/invocation-spaces/src/it projects/project/spacy pom.xml
 !????? src/it/invocation-spaces/src/it projects/project/src/main/resources/test.txt
  AL    src/it/invocation-spaces/src/it projects/settings.xml
 !????? src/it/invocation-spaces/verify.bsh
 !????? src/it/invoker-report/invoker.properties
  AL    src/it/invoker-report/pom.xml
  AL    src/it/invoker-report/src/it/failure-build/pom.xml
 !????? src/it/invoker-report/src/it/failure-post/invoker.properties
  AL    src/it/invoker-report/src/it/failure-post/pom.xml
 !????? src/it/invoker-report/src/it/failure-post/verify.bsh
 !????? src/it/invoker-report/src/it/failure-pre/invoker.properties
  AL    src/it/invoker-report/src/it/failure-pre/pom.xml
 !????? src/it/invoker-report/src/it/failure-pre/setup.bsh
 !????? src/it/invoker-report/src/it/skip-jre/invoker.properties
  AL    src/it/invoker-report/src/it/skip-jre/pom.xml
 !????? src/it/invoker-report/src/it/skip-maven/invoker.properties
  AL    src/it/invoker-report/src/it/skip-maven/pom.xml
 !????? src/it/invoker-report/src/it/skip-os/invoker.properties
  AL    src/it/invoker-report/src/it/skip-os/pom.xml
 !????? src/it/invoker-report/src/it/success/invoker.properties
  AL    src/it/invoker-report/src/it/success/pom.xml
 !????? src/it/invoker-report/verify.bsh
  AL    src/it/local-repo-default/pom.xml
  AL    src/it/local-repo-default/src/it/project/pom.xml
 !????? src/it/local-repo-default/src/it/project/postbuild.bsh
  AL    src/it/local-repo-default/src/it/settings.xml
 !????? src/it/local-repo-default/verify.bsh
  AL    src/it/local-repo-isolated/pom.xml
  AL    src/it/local-repo-isolated/src/it/project/pom.xml
  AL    src/it/local-repo-isolated/src/it/settings.xml
 !????? src/it/local-repo-isolated/verify.bsh
  AL    src/it/local-repo-path/pom.xml
  AL    src/it/local-repo-path/src/it/project/pom.xml
  AL    src/it/local-repo-path/src/it/settings.xml
 !????? src/it/local-repo-path/verify.bsh
  AL    src/it/local-repo-url/pom.xml
  AL    src/it/local-repo-url/src/it/project/pom.xml
  AL    src/it/local-repo-url/src/it/project/postbuild.groovy
  AL    src/it/local-repo-url/src/it/settings.xml
  AL    src/it/local-repo-url/verify.groovy
  AL    src/it/pom-filtering/pom.xml
  AL    src/it/pom-filtering/src/it/project/pom.xml
  AL    src/it/pom-filtering/src/it/settings.xml
 !????? src/it/pom-filtering/verify.bsh
  AL    src/it/pom-filtering-encoding/pom.xml
  AL    src/it/pom-filtering-encoding/src/it/latin-1/pom.xml
  AL    src/it/pom-filtering-encoding/src/it/utf-8/pom.xml
 !????? src/it/pom-filtering-encoding/verify.bsh
  AL    src/it/pom-filtering-reactor/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/mod1/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/mod1/src/it/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/mod1-parent/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/mod2/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/mod3/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/mod3/src/it/pom.xml
  AL    src/it/pom-filtering-reactor/src/it/mod2-parent/pom.xml
 !????? src/it/pom-filtering-reactor/verify.bsh
  AL    src/it/pom-less-invocation/pom.xml
 !????? src/it/pom-less-invocation/src/it/no-pom/workaround.txt
 !????? src/it/pom-less-invocation/verify.bsh
  AL    src/it/project-cloning/pom.xml
 !????? src/it/project-cloning/setup.bsh
  AL    src/it/project-cloning/src/it/module/pom.xml
  AL    src/it/project-cloning/src/it/module-1/pom.xml
  AL    src/it/project-cloning/src/it/module-1/sub-module/pom.xml
 !????? src/it/project-cloning/verify.bsh
  AL    src/it/project-cloning-reactor/pom.xml
  AL    src/it/project-cloning-reactor/src/it/aggregator/pom.xml
  AL    src/it/project-cloning-reactor/src/it/module-a/pom.xml
  AL    src/it/project-cloning-reactor/src/it/module-b/pom.xml
  AL    src/it/project-cloning-reactor/src/it/parent/pom.xml
 !????? src/it/project-cloning-reactor/verify.bsh
  AL    src/it/project-setup/pom.xml
 !????? src/it/project-setup/src/it/project1/invoker.properties
  AL    src/it/project-setup/src/it/project1/pom.xml
  AL    src/it/project-setup/src/it/project2/pom.xml
  AL    src/it/project-setup/src/it/project3/pom.xml
  AL    src/it/project-setup/src/it/project4/pom.xml
  AL    src/it/project-setup/src/it/project5/pom.xml
 !????? src/it/project-setup/verify.bsh
 !????? src/it/script-accessibility/invoker.properties
  AL    src/it/script-accessibility/pom.xml
  AL    src/it/script-accessibility/src/it/beanshell/pom.xml
 !????? src/it/script-accessibility/src/it/beanshell/verify.bsh
  AL    src/it/script-accessibility/src/it/groovy/pom.xml
 !????? src/it/script-accessibility/src/it/groovy/verify.groovy
 !????? src/it/script-accessibility/src/main/java/org/MyClass.java
  AL    src/it/script-additional-vars/pom.xml
  AL    src/it/script-additional-vars/src/it/beanshell/pom.xml
 !????? src/it/script-additional-vars/src/it/beanshell/postbuild.bsh
 !????? src/it/script-additional-vars/src/it/beanshell/prebuild.bsh
 !????? src/it/script-additional-vars/src/it/beanshell/selector.bsh
  AL    src/it/script-additional-vars/src/it/groovy/pom.xml
 !????? src/it/script-additional-vars/src/it/groovy/postbuild.groovy
 !????? src/it/script-additional-vars/src/it/groovy/prebuild.groovy
 !????? src/it/script-additional-vars/src/it/groovy/selector.groovy
 !????? src/it/script-class-loading/invoker.properties
  AL    src/it/script-class-loading/pom.xml
  AL    src/it/script-class-loading/src/it/beanshell/pom.xml
 !????? src/it/script-class-loading/src/it/beanshell/postbuild.bsh
 !????? src/it/script-class-loading/src/it/beanshell/prebuild.bsh
  AL    src/it/script-class-loading/src/it/groovy/pom.xml
 !????? src/it/script-class-loading/src/it/groovy/postbuild.groovy
 !????? src/it/script-class-loading/src/it/groovy/prebuild.groovy
 !????? src/it/script-class-loading/src/test/java/org/MyUtils.java
  AL    src/it/script-classpath-duplicates/pom.xml
  AL    src/it/script-classpath-duplicates/src/it/beanshell/pom.xml
 !????? src/it/script-classpath-duplicates/src/it/beanshell/postbuild.bsh
 !????? src/it/script-classpath-duplicates/src/it/beanshell/prebuild.bsh
  AL    src/it/script-classpath-duplicates/src/it/groovy/pom.xml
 !????? src/it/script-classpath-duplicates/src/it/groovy/postbuild.groovy
 !????? src/it/script-classpath-duplicates/src/it/groovy/prebuild.groovy
 !????? src/it/script-classpath-duplicates/verify.bsh
  AL    src/it/script-context/pom.xml
  AL    src/it/script-context/src/it/beanshell/pom.xml
 !????? src/it/script-context/src/it/beanshell/setup.bsh
 !????? src/it/script-context/src/it/beanshell/verify.bsh
  AL    src/it/script-context/src/it/groovy/pom.xml
 !????? src/it/script-context/src/it/groovy/setup.groovy
 !????? src/it/script-context/src/it/groovy/verify.groovy
 !????? src/it/script-context/verify.bsh
  AL    src/it/script-errors/pom.xml
  AL    src/it/script-errors/src/it/beanshell/pom.xml
 !????? src/it/script-errors/src/it/beanshell/setup.bsh
  AL    src/it/script-errors/src/it/groovy/pom.xml
 !????? src/it/script-errors/src/it/groovy/setup.groovy
 !????? src/it/script-errors/verify.bsh
  AL    src/it/script-global-vars/pom.xml
  AL    src/it/script-global-vars/src/it/beanshell/pom.xml
 !????? src/it/script-global-vars/src/it/beanshell/setup.bsh
 !????? src/it/script-global-vars/src/it/beanshell/verify.bsh
  AL    src/it/script-global-vars/src/it/groovy/pom.xml
 !????? src/it/script-global-vars/src/it/groovy/setup.groovy
 !????? src/it/script-global-vars/src/it/groovy/verify.groovy
  AL    src/it/script-interpreter-detection/pom.xml
  AL    src/it/script-interpreter-detection/src/it/beanshell/pom.xml
 !????? src/it/script-interpreter-detection/src/it/beanshell/postbuild.bsh
 !????? src/it/script-interpreter-detection/src/it/beanshell/prebuild.bsh
  AL    src/it/script-interpreter-detection/src/it/groovy/pom.xml
 !????? src/it/script-interpreter-detection/src/it/groovy/postbuild.groovy
 !????? src/it/script-interpreter-detection/src/it/groovy/prebuild.groovy
 !????? src/it/script-interpreter-detection/verify.bsh
  AL    src/it/script-verify-xml/pom.xml
  AL    src/it/script-verify-xml/src/it/minvoker-138/pom.xml
 !????? src/it/script-verify-xml/verify.groovy
  AL    src/it/selector-conditions/pom.xml
 !????? src/it/selector-conditions/src/it/jre-version-match/invoker.properties
  AL    src/it/selector-conditions/src/it/jre-version-match/pom.xml
 !????? src/it/selector-conditions/src/it/jre-version-match/postbuild.bsh
 !????? src/it/selector-conditions/src/it/jre-version-mismatch/invoker.properties
  AL    src/it/selector-conditions/src/it/jre-version-mismatch/pom.xml
 !????? src/it/selector-conditions/src/it/jre-version-mismatch/postbuild.bsh
 !????? src/it/selector-conditions/src/it/maven-version-match/invoker.properties
  AL    src/it/selector-conditions/src/it/maven-version-match/pom.xml
 !????? src/it/selector-conditions/src/it/maven-version-match/postbuild.bsh
 !????? src/it/selector-conditions/src/it/maven-version-mismatch/invoker.properties
  AL    src/it/selector-conditions/src/it/maven-version-mismatch/pom.xml
 !????? src/it/selector-conditions/src/it/maven-version-mismatch/postbuild.bsh
 !????? src/it/selector-conditions/src/it/os-family-match/invoker.properties
  AL    src/it/selector-conditions/src/it/os-family-match/pom.xml
 !????? src/it/selector-conditions/src/it/os-family-match/postbuild.bsh
 !????? src/it/selector-conditions/src/it/os-family-mismatch/invoker.properties
  AL    src/it/selector-conditions/src/it/os-family-mismatch/pom.xml
 !????? src/it/selector-conditions/src/it/os-family-mismatch/postbuild.bsh
 !????? src/it/selector-conditions/verify.bsh
  AL    src/it/selector-scripts/pom.xml
  AL    src/it/selector-scripts/src/it/script-ret-false/pom.xml
 !????? src/it/selector-scripts/src/it/script-ret-false/postbuild.bsh
 !????? src/it/selector-scripts/src/it/script-ret-false/selector.bsh
  AL    src/it/selector-scripts/src/it/script-ret-other/pom.xml
 !????? src/it/selector-scripts/src/it/script-ret-other/postbuild.bsh
 !????? src/it/selector-scripts/src/it/script-ret-other/selector.bsh
  AL    src/it/selector-scripts/src/it/script-ret-quiet/pom.xml
 !????? src/it/selector-scripts/src/it/script-ret-quiet/postbuild.bsh
 !????? src/it/selector-scripts/src/it/script-ret-quiet/selector.bsh
  AL    src/it/selector-scripts/src/it/script-ret-true/pom.xml
 !????? src/it/selector-scripts/src/it/script-ret-true/postbuild.bsh
 !????? src/it/selector-scripts/src/it/script-ret-true/selector.bsh
  AL    src/it/selector-scripts/src/it/script-throw/pom.xml
 !????? src/it/selector-scripts/src/it/script-throw/postbuild.bsh
 !????? src/it/selector-scripts/src/it/script-throw/selector.bsh
 !????? src/it/selector-scripts/verify.bsh
  AL    src/it/settings-auto-exclude/pom.xml
  AL    src/it/settings-auto-exclude/src/it/project/pom.xml
  AL    src/it/settings-auto-exclude/src/it/settings.xml
 !????? src/it/settings-inherit/invoker.properties
  AL    src/it/settings-inherit/pom.xml
  AL    src/it/settings-inherit/src/it/project/pom.xml
 !????? src/it/settings-merge/invoker.properties
  AL    src/it/settings-merge/pom.xml
  AL    src/it/settings-merge/src/it/project/pom.xml
  AL    src/it/settings-merge/src/it/settings.xml
 !????? src/it/settings-merge-multiexecutions/invoker.properties
 !????? src/it/settings-merge-multiexecutions/pom.xml
 !????? src/it/settings-merge-multiexecutions/src/it/minvoker-133/pom.xml
 !????? src/it/settings-merge-multiexecutions/src/it/settings.xml
  AL    src/it/settings.xml
  AL    src/it/skip-install/pom.xml
 !????? src/it/skip-install/test.properties
 !????? src/it/skip-install/verify.bsh
  AL    src/it/skip-run/pom.xml
  AL    src/it/skip-run/src/it/project/pom.xml
 !????? src/it/skip-run/src/it/project/prebuild.bsh
 !????? src/it/skip-run/test.properties
 !????? src/it/skip-run/verify.bsh
 !????? src/it/staging-dependencies/invoker.properties
  AL    src/it/staging-dependencies/pom.xml
  A     src/it/staging-dependencies/repo/org/apache/maven/its/dep/1.0/dep-1.0-tests.jar
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/dep/1.0/dep-1.0.pom
  A     src/it/staging-dependencies/repo/org/apache/maven/its/dep/2.0/dep-2.0.jar
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/dep/2.0/dep-2.0.pom
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/dep/maven-metadata.xml
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/maven-metadata.xml
  A     src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-20081020.164906-1.jar
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-20081020.164906-1.pom
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/maven-metadata.xml
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/parent-a/0.1-SNAPSHOT/maven-metadata.xml
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/parent-a/0.1-SNAPSHOT/parent-a-0.1-20081020.164906-1.pom
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/parent-b/0.1-SNAPSHOT/maven-metadata.xml
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/parent-b/0.1-SNAPSHOT/parent-b-0.1-20081020.164906-1.pom
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/pom/0.3-SNAPSHOT/maven-metadata.xml
 !????? src/it/staging-dependencies/repo/org/apache/maven/its/pom/0.3-SNAPSHOT/pom-0.3-20081020.164906-1.pom
 !????? src/it/staging-dependencies/verify.bsh
 !????? src/it/staging-pom/invoker.properties
  AL    src/it/staging-pom/pom.xml
  AL    src/it/staging-pom/src/site/site.xml
 !????? src/it/staging-pom/verify.bsh
 !????? src/it/staging-reactor/invoker.properties
  AL    src/it/staging-reactor/mod1/pom.xml
  AL    src/it/staging-reactor/mod1-parent/pom.xml
  AL    src/it/staging-reactor/mod2/pom.xml
 !????? src/it/staging-reactor/mod2/src/main/resources/main.properties
  AL    src/it/staging-reactor/pom.xml
  AL    src/it/staging-reactor/src/site/site.xml
 !????? src/it/staging-reactor/verify.bsh
  AL    src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java
  AL    src/main/java/org/apache/maven/plugin/invoker/CompositeMap.java
  AL    src/main/java/org/apache/maven/plugin/invoker/FileLogger.java
  AL    src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java
  AL    src/main/java/org/apache/maven/plugin/invoker/IntegrationTestMojo.java
  AL    src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
  AL    src/main/java/org/apache/maven/plugin/invoker/InvokerProperties.java
  AL    src/main/java/org/apache/maven/plugin/invoker/InvokerReport.java
  AL    src/main/java/org/apache/maven/plugin/invoker/InvokerSession.java
  AL    src/main/java/org/apache/maven/plugin/invoker/MetadataUtils.java
  AL    src/main/java/org/apache/maven/plugin/invoker/PomUtils.java
  AL    src/main/java/org/apache/maven/plugin/invoker/ReportUtils.java
  AL    src/main/java/org/apache/maven/plugin/invoker/SelectorUtils.java
  AL    src/main/java/org/apache/maven/plugin/invoker/SystemPropertyPrinter.java
  AL    src/main/java/org/apache/maven/plugin/invoker/VerifyMojo.java
  AL    src/main/mdo/invocation.mdo
  AL    src/main/resources/invoker-report.properties
  AL    src/main/resources/invoker-report_de.properties
  AL    src/main/resources/invoker-report_en.properties
  AL    src/main/resources/invoker-report_fr.properties
  AL    src/site/apt/examples/access-test-classes.apt.vm
  AL    src/site/apt/examples/clone-projects.apt.vm
  AL    src/site/apt/examples/fast-use.apt.vm
  AL    src/site/apt/examples/filtering.apt.vm
  AL    src/site/apt/examples/install-artifacts.apt.vm
  AL    src/site/apt/examples/integration-test-verify.apt.vm
  AL    src/site/apt/examples/invoker-properties.apt.vm
  AL    src/site/apt/examples/post-build-script.apt.vm
  AL    src/site/apt/examples/prepare-build-env.apt.vm
  AL    src/site/apt/examples/selector-conditions.apt.vm
  AL    src/site/apt/examples/selector-scripts.apt.vm
  AL    src/site/apt/examples/skipping.apt.vm
  AL    src/site/apt/index.apt.vm
  AL    src/site/apt/usage.apt.vm
  AL    src/site/fml/faq.fml
  AL    src/site/resources/download.cgi
  AL    src/site/site.xml
  AL    src/site/xdoc/download.xml.vm
  AL    src/test/java/org/apache/maven/plugin/invoker/ExtendedMavenProjectStub.java
  AL    src/test/java/org/apache/maven/plugin/invoker/InterpolationTest.java
  AL    src/test/java/org/apache/maven/plugin/invoker/InvokerMojoTest.java
  AL    src/test/java/org/apache/maven/plugin/invoker/InvokerPropertiesTest.java
  AL    src/test/java/org/apache/maven/plugin/invoker/SelectorUtilsTest.java
  AL    src/test/resources/unit/dummy/pom.xml
 !????? src/test/resources/unit/goals-from-file/goals.txt
  AL    src/test/resources/unit/goals-from-file/pom.xml
 !????? src/test/resources/unit/goals-from-file/validate-goal.txt
  AL    src/test/resources/unit/goals-from-file/verify.bsh
 !????? src/test/resources/unit/interpolation/goals.txt
  AL    src/test/resources/unit/interpolation/pom.xml
 !????? src/test/resources/unit/profiles-from-file/emptyProfiles.txt
 !????? src/test/resources/unit/profiles-from-file/profiles.txt
 
*****************************************************
 Printing headers for files without AL header...
 
 
=======================================================================
==src/it/clone-clean/invoker.properties
=======================================================================
# NOTE: Don't clean here to be able to detect test failures
invoker.goals = initialize

=======================================================================
==src/it/clone-clean/setup.bsh
=======================================================================
import java.io.*;

try
{
    File itRoot = new File( basedir, "target/it/clone-clean" );
    itRoot.mkdirs();
    return new File(itRoot, "foobar.log").createNewFile();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/clone-clean/verify.bsh
=======================================================================
import java.io.*;

try
{
    File itRoot = new File( basedir, "target/it/clone-clean" );
    return !new File( itRoot, "foobar.log" ).exists();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/fail-build/invoker.properties
=======================================================================
invoker.buildResult = failure

=======================================================================
==src/it/fail-build/src/it/project/prebuild.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

=======================================================================
==src/it/fail-build/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
    File touchFile = new File( basedir, "target/it/project/touch.txt" );
    System.out.println( "Checking for existence of touch file: " + touchFile );
    if ( !touchFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/fail-build-with-verify/invoker.properties
=======================================================================
invoker.buildResult = failure

=======================================================================
==src/it/fail-build-with-verify/src/it/project/prebuild.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

=======================================================================
==src/it/fail-build-with-verify/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
    File touchFile = new File( basedir, "target/it/project/touch.txt" );
    System.out.println( "Checking for existence of touch file: " + touchFile );
    if ( !touchFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/fail-noprojects_run/invoker.properties
=======================================================================
invoker.buildResult = failure

=======================================================================
==src/it/fail-noprojects_verify/invoker.properties
=======================================================================
invoker.buildResult = failure

=======================================================================
==src/it/fail-postbuild/invoker.properties
=======================================================================
invoker.buildResult = failure

=======================================================================
==src/it/fail-postbuild/src/it/project/postbuild.bsh
=======================================================================
return false;

=======================================================================
==src/it/fail-postbuild/src/it/project/prebuild.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

=======================================================================
==src/it/fail-postbuild/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
    File touchFile = new File( basedir, "target/it/project/touch.txt" );
    System.out.println( "Checking for existence of touch file: " + touchFile );
    if ( !touchFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/fail-prebuild/invoker.properties
=======================================================================
invoker.buildResult = failure

=======================================================================
==src/it/fail-prebuild/src/it/project/prebuild.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

return false;

=======================================================================
==src/it/fail-prebuild/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
    File touchFile = new File( basedir, "target/it/project/touch.txt" );
    System.out.println( "Checking for existence of touch file: " + touchFile );
    if ( !touchFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/install-extra-artifacts/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File itRepoDir = new File( basedir, "target/it-repo" );
    if ( !itRepoDir.isDirectory() )
    {
        System.out.println( "IT local repository missing: " + itRepoDir );
        return false;
    }

    String[] files =
    {
        "org/apache/maven/plugins/maven-clean-plugin/2.4/maven-clean-plugin-2.4.jar",
        "org/apache/maven/plugins/maven-clean-plugin/2.4/maven-clean-plugin-2.4.pom",
        "org/apache/maven/plugins/maven-clean-plugin/2.4/maven-clean-plugin-2.4-javadoc.jar",
        "org/apache/maven/plugins/maven-plugins/16/maven-plugins-16.pom",
        "org/apache/maven/maven-parent/15/maven-parent-15.pom",
        "org/apache/apache/6/apache-6.pom",
        "org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar",
        "org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.pom",
        "junit/junit/3.8.2/junit-3.8.2.jar",
        "junit/junit/3.8.2/junit-3.8.2.pom",
        "jdom/jdom/1.1/jdom-1.1.pom",
        "org/jdom/jdom/1.1/jdom-1.1.pom",
        "org/jdom/jdom/1.1/jdom-1.1.jar",
    };
    for ( String file : files )
    {
        File stagedFile = new File( itRepoDir, file );
        System.out.println( "Checking for existence of: " + stagedFile );
        if ( !stagedFile.isFile() )
        {
            throw new IllegalStateException( "Missing: " + stagedFile );
        }
        if ( file.endsWith( "jdom-1.1.jar" ) && stagedFile.length() < 1024 * 10 )
        {
            throw new IllegalStateException( "Corrupt: " + stagedFile );
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/integration-test-never-fails/src/it/project/prebuild.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

=======================================================================
==src/it/integration-test-never-fails/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
    File touchFile = new File( basedir, "target/it/project/touch.txt" );
    System.out.println( "Checking for existence of touch file: " + touchFile );
    if ( !touchFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/invocation-cmdline-exclude/test.properties
=======================================================================
invoker.test = !minvoker-140

=======================================================================
==src/it/invocation-debug/src/it/minvoker-142/invoker.properties
=======================================================================
invoker.debug = true

=======================================================================
==src/it/invocation-multiple/src/it/project/invoker.properties
=======================================================================
#######################################
# Default build
#######################################
invoker.goals = install
invoker.profiles = plugin,profile0
invoker.systemPropertiesFile = system1.properties

#######################################
# First build
#######################################
# goals should fall back to invoker.goals
invoker.profiles.1 = 

#######################################
# Second build
#######################################
invoker.goals.2 = test:test-maven-plugin:0.1-SNAPSHOT:test
invoker.profiles.2 = plugin,profile1
# system properties file should fall back to invoker.systemPropertiesFile

#######################################
# Third build
#######################################
invoker.goals.3 = test:test-maven-plugin:0.1-SNAPSHOT:test
# profiles should fall back to invoker.profiles
invoker.systemPropertiesFile.3 = system2.properties

=======================================================================
==src/it/invocation-multiple/src/it/project/src/main/java/org/TestMojo.java
=======================================================================
package org;

import java.io.*;
import java.util.*;

import org.apache.maven.plugin.*;

/**
 * @goal test
 */
public class TestMojo extends AbstractMojo {

    /**
     * @parameter default-value="${project.build.directory}/test.txt"
     */
    private File outputFile;

    /**
     * @see org.apache.maven.plugin.AbstractMojo#execute()
     */
    public void execute() throws MojoExecutionException, MojoFailureException {
        outputFile.getParentFile().mkdirs();
        Writer writer = null;
        try
        {
            writer = new OutputStreamWriter( new FileOutputStream( outputFile ), "UTF-8" );
            writer.write( System.getProperty( "maven.invoker.test", "null" ) );
        }
        catch (IOException e)
        {
            throw new MojoExecutionException( "Failed", e );
        }
        finally
        {
            if ( writer != null )
            {
                try
                {
                    writer.close();
                }
                catch (IOException e)
                {
                    // ignore
                }
            }
        }
    }

}

=======================================================================
==src/it/invocation-multiple/src/it/project/system1.properties
=======================================================================
maven.invoker.test = UTF-8

=======================================================================
==src/it/invocation-multiple/src/it/project/system2.properties
=======================================================================
maven.invoker.test = ISO-8859-1

=======================================================================
==src/it/invocation-multiple/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    File test0File = new File( basedir, "target/it/project/target/test0.txt" );
    System.out.println( "Checking for existence of first test file: " + test0File );
    if ( !test0File.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String test0 = FileUtils.fileRead( test0File, "UTF-8" ).trim();
    System.out.println( "Checking contents of first test file: " + test0 );
    if ( !"ISO-8859-1".equals( test0 ) )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    File test1File = new File( basedir, "target/it/project/target/test1.txt" );
    System.out.println( "Checking for existence of second test file: " + test1File );
    if ( !test1File.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String test1 = FileUtils.fileRead( test1File, "UTF-8" ).trim();
    System.out.println( "Checking contents of second test file: " + test1 );
    if ( !"UTF-8".equals( test1 ) )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/invocation-offline/src/it/project/invoker.properties
=======================================================================
# First run if offline mode which should fail to download the Clean Plugin
invoker.goals.1 = clean
invoker.offline.1 = true
invoker.buildResult.1 = failure

# Now again in online mode
invoker.goals.2 = clean

=======================================================================
==src/it/invocation-offline/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

// sanity check to make sure the builds were actually run
File repoDir = new File( basedir, "target/it-repo" );
System.out.println( "Checking for existence of test repo: " + repoDir );
if ( !repoDir.exists() )
{
    throw new FileNotFoundException( "Missing repository directory: " + repoDir );
}

return true;

=======================================================================
==src/it/invocation-project/src/it/project/invoker.properties
=======================================================================
# path to POM
invoker.project.1 = sub-1/pom.xml

# path to base directory
invoker.project.2 = sub-3

=======================================================================
==src/it/invocation-project/src/it/project/setup.bsh
=======================================================================
import java.io.*;

String[] paths =
{
    "target",
    "sub-1/target",
    "sub-2/target",
    "sub-3/target",
};

for ( String path : paths )
{
    File dir = new File( basedir, path);
    System.out.println( "Creating directory: " + dir );
    if ( !dir.mkdirs() )
    {
        throw new IOException( "Failed to create directory: " + dir );
    }
}

=======================================================================
==src/it/invocation-project/verify.bsh
=======================================================================
import java.io.*;

String[] unexpectedPaths =
{
    "sub-1/target",
    "sub-3/target",
};

for ( String path : unexpectedPaths )
{
    File file = new File( new File( basedir, "target/it/project" ), path);
    System.out.println( "Checking for absence of: " + file );
    if ( file.exists() )
    {
        throw new IOException( "Unexpected path found: " + file );
    }
}

String[] expectedPaths =
{
    "target",
    "sub-2/target",
};

for ( String path : expectedPaths )
{
    File file = new File( new File( basedir, "target/it/project" ), path);
    System.out.println( "Checking for existence of: " + file );
    if ( !file.exists() )
    {
        throw new IOException( "Expected path not found: " + file );
    }
}

return true;

=======================================================================
==src/it/invocation-reactor-indirect/invoker.properties
=======================================================================
invoker.goals = clean install

=======================================================================
==src/it/invocation-reactor-indirect/itests/pom.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.maven.plugins.invoker</groupId>
    <artifactId>MINVOKER-115-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>MINVOKER-115-itests</artifactId>
  <packaging>pom</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
        </configuration>
        <executions>
          <execution>
            <id>itests</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

=======================================================================
==src/it/invocation-reactor-indirect/itests/src/it/basic/pom.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo.it</groupId>
  <artifactId>basic</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins.invoker</groupId>
        <artifactId>MINVOKER-115-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
        <executions>
          <execution>
            <id>touch</id>
            <goals>
              <goal>touch</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

=======================================================================
==src/it/invocation-reactor-indirect/plugin/pom.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.maven.plugins.invoker</groupId>
    <artifactId>MINVOKER-115-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>MINVOKER-115-plugin</artifactId>
  <packaging>maven-plugin</packaging>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0</version>
    </dependency>
  </dependencies>
</project>

=======================================================================
==src/it/invocation-spaces/src/it projects/project/src/main/resources/test.txt
=======================================================================
${propertyFromSettings}
${propertyFromCommandLine}

=======================================================================
==src/it/invocation-spaces/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    File testFile = new File( basedir, "target/it projects/project/target/classes/test.txt" );
    System.out.println( "Checking for existence of test file: " + testFile );
    if ( !testFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String[] values = {
        "value with spaces from settings",
        "value with spaces from cli",
    };

    BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( testFile ), "UTF-8" ) );
    try
    {
        for ( String value : values )
        {
            String line = reader.readLine();
            System.out.println( "Checking for occurrence of: " + value );
            if ( !value.equals( line ) )
            {
                System.out.println( "FAILED!" );
                return false;
            }
        }
    }
    finally
    {
        reader.close();
    }

    File installedFile = new File( basedir, "target/it repo/test/spacy-pom/0.1-SNAPSHOT/spacy-pom-0.1-SNAPSHOT.jar" );
    System.out.println( "Checking for existence of installed file: " + installedFile );
    if ( !installedFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{

=======================================================================
==src/it/invoker-report/invoker.properties
=======================================================================
invoker.goals = clean integration-test site

=======================================================================
==src/it/invoker-report/src/it/failure-post/invoker.properties
=======================================================================
invoker.description = A build job without name.

=======================================================================
==src/it/invoker-report/src/it/failure-post/verify.bsh
=======================================================================
throw new IllegalStateException( "The post-build script failed as expected." );


=======================================================================
==src/it/invoker-report/src/it/failure-pre/invoker.properties
=======================================================================
invoker.name = No Description

=======================================================================
==src/it/invoker-report/src/it/failure-pre/setup.bsh
=======================================================================
throw new IllegalStateException( "The pre-build script failed as expected." );


=======================================================================
==src/it/invoker-report/src/it/skip-jre/invoker.properties
=======================================================================
invoker.description = A build job skipped due to JRE version.
invoker.java.version = 1.0

=======================================================================
==src/it/invoker-report/src/it/skip-maven/invoker.properties
=======================================================================
invoker.description = A build job skipped due to Maven version.
invoker.maven.version = 2.1.5

=======================================================================
==src/it/invoker-report/src/it/skip-os/invoker.properties
=======================================================================
invoker.description = A build job skipped due to Operation System.
invoker.os.family = ties

=======================================================================
==src/it/invoker-report/src/it/success/invoker.properties
=======================================================================
invoker.name = Success
invoker.description = A build job that should succeed.

=======================================================================
==src/it/invoker-report/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;

File reportFile = new File( basedir, "target/site/invoker-report.html");

System.out.println( "Checking for existence of report file: " + reportFile );
if ( !reportFile.exists() )
{
    System.out.println( "FAILED!" );
    return false;
}

return true;

=======================================================================
==src/it/local-repo-default/src/it/project/postbuild.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // just dump our local repo path for verification by the parent build
    File textFile = new File( basedir, "target/local-repo-path.txt" );
    textFile.getParentFile().mkdirs();
    Writer writer = new OutputStreamWriter( new FileOutputStream( textFile ), "UTF-8" );
    writer.write( localRepositoryPath.getAbsolutePath() );
    writer.close();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/local-repo-default/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File badRepoDir = new File( basedir, "target/bad-repo" );
    if ( badRepoDir.exists() )
    {
        System.out.println( "Sub build used wrong local repository (from its settings.xml): " + badRepoDir );
        return false;
    }

    /*
     * NOTE: This relies heavily on the Invoker Plugin's configuration of our parent build, not nice but until MINVOKER-49
     * is available here, we have no other way of getting the path.
     */
    File localRepoPathOfThisBuild = new File( basedir.getParentFile().getParentFile(), "local-repo" );
    System.out.println("Local repository of this build: " + localRepoPathOfThisBuild);

    File textFile = new File( basedir, "src/it/project/target/local-repo-path.txt" );
    BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( textFile ), "UTF-8" ) );
    File localRepoPathOfSubBuild = new File( reader.readLine() );
    reader.close();
    System.out.println("Local repository of sub build: " + localRepoPathOfSubBuild);

    /*
     * This is partly a sanity check of the Maven core (i.e. its MavenSettingsBuilder) which should ensure
     *   ${settings.localRepository} == ${maven.repo.local}
     * This IT is run with maven.repo.local but the Invoker Plugin passes settings.localRepository down to the sub build
     * so these paths must match.
     */
    if ( !localRepoPathOfThisBuild.getCanonicalPath().equals( localRepoPathOfSubBuild.getCanonicalPath() ) )
    {
        System.out.println( "Sub build used wrong local repository: " + localRepoPathOfSubBuild );
        return false;
    }

    File installedFile = new File( localRepoPathOfThisBuild, "test/local-repo-default/0.1-SNAPSHOT/local-repo-default-0.1-SNAPSHOT.pom" );
    if ( !installedFile.isFile() )
    {
        System.out.println( "Installed file missing in local repo: " + installedFile );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/local-repo-isolated/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File badRepoDir = new File( basedir, "target/bad-repo" );
    if ( badRepoDir.exists() )
    {
        System.out.println( "IT used wrong local repository: " + badRepoDir );
        return false;
    }

    File itRepoDir = new File( basedir, "target/it-repo" );
    if ( !itRepoDir.isDirectory() )
    {
        System.out.println( "IT local repository missing: " + itRepoDir );
        return false;
    }

    File installedFile = new File( itRepoDir, "test/local-repo-isolated/0.1-SNAPSHOT/local-repo-isolated-0.1-SNAPSHOT.pom" );
    if ( !installedFile.isFile() )
    {
        System.out.println( "Installed file missing in local repo: " + installedFile );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/local-repo-path/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

// sanity check to make sure the builds were actually run
File repoDir = new File( basedir, "target/it-repo" );
System.out.println( "Checking for existence of test repo: " + repoDir );
if ( !repoDir.exists() )
{
    throw new FileNotFoundException( "Missing repository directory: " + repoDir );
}

return true;

=======================================================================
==src/it/pom-filtering/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    File pomFile = new File( basedir, "target/it/project/pom.xml" );
    System.out.println( "Checking for existence of original IT POM: " + pomFile );
    if ( !pomFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    pomFile = new File( basedir, "target/it/project/target/classes/pom.xml" );
    System.out.println( "Checking for existence of interpolated IT POM: " + pomFile );
    if ( !pomFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String xml = FileUtils.fileRead( pomFile, "UTF-8" );

    String[] values = {
            "<prop0>${project.version}</prop0>",
            "<prop1>1.0-SNAPSHOT</prop1>",
            "<prop2>PROPERTY-FROM-PLUGIN-CONFIG</prop2>",
            "<prop3>PROPERTY-FROM-PROPERTIES-SECTION</prop3>",
            "<prop4>PASSED</prop4>",
            "<prop5>PASSED</prop5>",
            "<prop6>PASSED</prop6>",
            "<prop7>PASSED</prop7>",
            "<prop8>PASSED</prop8>",
            "<prop10>file:///",
            "<prop12>file:///",
        };
    for ( String value : values )
    {
        System.out.println( "Checking for occurrence of: " + value );
        if ( xml.indexOf( value ) < 0 )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }

    String[] badValues = {

=======================================================================
==src/it/pom-filtering-encoding/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

boolean check( String project, String encoding )
{
    File pomFile = new File( basedir, "target/it/" + project + "/pom.xml" );
    System.out.println( "Checking for existence of original IT POM: " + pomFile );
    if ( !pomFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    pomFile = new File( basedir, "target/it/" + project + "/target/classes/pom.xml" );
    System.out.println( "Checking for existence of interpolated IT POM: " + pomFile );
    if ( !pomFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String xml = FileUtils.fileRead( pomFile, encoding );

    String[] values = {
            "<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>",
            "<prop0>\u00A9\u00AE\u00C4\u00D6\u00DC\u00E4\u00F6\u00FC\u00DF</prop0>",
            "<prop1>\u00A9\u00AE\u00C4\u00D6\u00DC\u00E4\u00F6\u00FC\u00DF</prop1>",
        };
    for ( String value : values )
    {
        System.out.println( "Checking for occurrence of: " + value );
        if ( xml.indexOf( value ) < 0 )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
    return true;
}

try
{
    return check( "latin-1", "ISO-8859-1" ) && check( "utf-8", "UTF-8" );
}
catch( Throwable t )
{
    t.printStackTrace();

=======================================================================
==src/it/pom-filtering-reactor/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

boolean check( String project, boolean filtered )
{
    File pomFile = new File( basedir, "target/it/" + project + "/pom.xml" );
    System.out.println( "Checking for existence of " + ( filtered ? "" : "un" ) + "filtered POM: " + pomFile );
    if ( !pomFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String xml = FileUtils.fileRead( pomFile, "UTF-8" );

    String[] values = {
            "<prop0>pom-filtering-reactor</prop0>",
        };
    for ( String value : values )
    {
        System.out.println( "Checking for " + ( filtered ? "occurrence" : "absence" ) + " of: " + value );
        if ( ( filtered && xml.indexOf( value ) < 0 ) || ( !filtered && xml.indexOf( value ) >= 0 ) )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
    return true;
}

try
{
    return check( "mod2-parent", true ) && check( "mod2-parent/mod2", true ) && check( "mod2-parent/mod1-parent", true )
            && check( "mod2-parent/mod1", true ) && check( "mod2-parent/mod3", true)
            && check( "mod2-parent/mod1/src/it", false );
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/pom-less-invocation/src/it/no-pom/workaround.txt
=======================================================================
This file ensures the directory is cloned, to be deleted once MINVOKER-48 is released.

=======================================================================
==src/it/pom-less-invocation/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File itDir = new File( basedir, "target/it" );
    if ( !itDir.isDirectory() )
    {
        System.out.println( "IT directory not existent: " + itDir );
        return false;
    }

    String[] paths = {
            "no-pom",
            "no-pom/build.log",
    };
    for ( String path : paths )
    {
        File file = new File( itDir, path );
        if ( !file.exists() )
        {
            System.out.println( "Expected file/directory not existent: " + file );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/project-cloning/setup.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File emptyDir = new File( basedir, "src/it/module-1/empty-dir" );
    emptyDir.mkdirs();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/project-cloning/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File itDir = new File( basedir, "target/it" );
    if ( !itDir.isDirectory() )
    {
        System.out.println( "IT directory not existent: " + itDir );
        return false;
    }

    // NOTE: It is part of the test design that "module" is a prefix of "module-1"
    String[] paths = {
            "module",
            "module/pom.xml",
            "module-1",
            "module-1/pom.xml",
            "module-1/empty-dir",
            "module-1/sub-module",
            "module-1/sub-module/pom.xml",
    };
    for ( String path : paths )
    {
        File file = new File( itDir, path );
        if ( !file.exists() )
        {
            System.out.println( "Cloned file/directory not existent: " + file );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/project-cloning-reactor/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

// sanity check to make sure the builds were actually run
File itDir = new File( basedir, "target/it" );
System.out.println( "Checking for existence of clones: " + itDir );
if ( !itDir.exists() )
{
    throw new FileNotFoundException( "Missing IT directory: " + itDir );
}

return true;

=======================================================================
==src/it/project-setup/src/it/project1/invoker.properties
=======================================================================
invoker.name = Foo
invoker.description = good foo

=======================================================================
==src/it/project-setup/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    File logFile = new File( basedir, "build.log" );
    System.out.println( "Checking for existence of build log: " + logFile );
    if ( !logFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String log = FileUtils.fileRead( logFile );

    System.out.println( "Checking for first build" );
    int index = log.indexOf( "Building: project" );
    if ( !log.substring( index, index + 18 ).equals( "Building: project3" ) )
    {
        System.out.println( "FAILED!\n" + log.substring( index, index + 18 ) );
        return false;
    }

    System.out.println( "Checking for duplicate build" );
    index = log.indexOf( "Building: project3", index + 1 );
    if ( index >= 0 )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    File reportFile = new File( basedir, "target/invoker-reports/BUILD-project1.xml" );
    if ( !reportFile.exists() )
    {
        System.out.println( "reportFile not exists FAILED!" );
        return false;
    }
    String report = FileUtils.fileRead( reportFile, "UTF-8" );
    index = report.indexOf("name=\"Foo\"");
    if ( index < 0 )
    {
        System.out.println( "name missing in the report FAILED!" );
        return false;
    }
    index = report.indexOf("description=\"good foo\"");
    if ( index < 0 )
    {

=======================================================================
==src/it/script-accessibility/invoker.properties
=======================================================================
invoker.goals = clean compile

=======================================================================
==src/it/script-accessibility/src/it/beanshell/verify.bsh
=======================================================================
import org.MyClass;

System.out.println( MyClass.PUBLIC );
System.out.println( MyClass.PROTECTED );
System.out.println( MyClass.PACKAGE );
System.out.println( MyClass.PRIVATE );

=======================================================================
==src/it/script-accessibility/src/it/groovy/verify.groovy
=======================================================================
import org.MyClass;

println MyClass.PUBLIC
println MyClass.PROTECTED
println MyClass.PACKAGE
println MyClass.PRIVATE

=======================================================================
==src/it/script-accessibility/src/main/java/org/MyClass.java
=======================================================================
package org;

public class MyClass
{

    public static final String PUBLIC = "public";

    protected static final String PROTECTED = "protected";

    static final String PACKAGE = "package";

    private static final String PRIVATE = "private";

}

=======================================================================
==src/it/script-additional-vars/src/it/beanshell/postbuild.bsh
=======================================================================
import java.io.*;
import java.util.*;

try
{
    System.out.println( hello );
    if ( !hello.equals( "world" ) )
    {
        System.out.println( "Additional script variable declared in mojo configuration not defined: hello" );
        return false;
    }

    System.out.println( version );
    if ( !version.equals( "1.0-SNAPSHOT" ) )
    {
        System.out.println( "Additional script variable declared in mojo configuration not defined: version" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/script-additional-vars/src/it/beanshell/prebuild.bsh
=======================================================================
import java.io.*;
import java.util.*;

try
{
    System.out.println( hello );
    if ( !hello.equals( "world" ) )
    {
        System.out.println( "Additional script variable declared in mojo configuration not defined: hello" );
        return false;
    }

    System.out.println( version );
    if ( !version.equals( "1.0-SNAPSHOT" ) )
    {
        System.out.println( "Additional script variable declared in mojo configuration not defined: version" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/script-additional-vars/src/it/beanshell/selector.bsh
=======================================================================
import java.io.*;
import java.util.*;

try
{
    System.out.println( hello );
    if ( !hello.equals( "world" ) )
    {
        throw new Exception( "Additional script variable declared in mojo configuration not defined: hello" );
    }

    System.out.println( version );
    if ( !version.equals( "1.0-SNAPSHOT" ) )
    {
        throw new Exception( "Additional script variable declared in mojo configuration not defined: version" );
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    throw t;
}

=======================================================================
==src/it/script-additional-vars/src/it/groovy/postbuild.groovy
=======================================================================
import java.io.*
import java.util.*

try
{
    println hello
    if ( !hello.equals( "world" ) )
    {
        println "Additional script variable declared in mojo configuration not defined: hello"
        return false
    }

    println version
    if ( !version.equals( "1.0-SNAPSHOT" ) )
    {
        println "Additional script variable declared in mojo configuration not defined: version"
        return false
    }
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

=======================================================================
==src/it/script-additional-vars/src/it/groovy/prebuild.groovy
=======================================================================
import java.io.*
import java.util.*

try
{
    println hello
    if ( !hello.equals( "world" ) )
    {
        println "Additional script variable declared in mojo configuration not defined: hello"
        return false
    }

    println version
    if ( !version.equals( "1.0-SNAPSHOT" ) )
    {
        println "Additional script variable declared in mojo configuration not defined: version"
        return false
    }
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

=======================================================================
==src/it/script-additional-vars/src/it/groovy/selector.groovy
=======================================================================
import java.io.*
import java.util.*

try
{
    println hello
    if ( !hello.equals( "world" ) )
    {
        throw new Exception( "Additional script variable declared in mojo configuration not defined: hello" )
    }

    println version
    if ( !version.equals( "1.0-SNAPSHOT" ) )
    {
        throw new Exception( "Additional script variable declared in mojo configuration not defined: version" )
    }
}
catch( Throwable t )
{
    t.printStackTrace()
    throw t
}

=======================================================================
==src/it/script-class-loading/invoker.properties
=======================================================================
invoker.goals = clean test-compile

=======================================================================
==src/it/script-class-loading/src/it/beanshell/postbuild.bsh
=======================================================================
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    System.out.println( "Invoking class from project's test class path" );
    System.out.println( org.MyUtils.getNothing() );

    System.out.println( "Trying to access method which is unavaible in old plexus-utils" );
    try
    {
        System.out.println( FileUtils.class.getMethod( "copyFileIfModified", new Class[] { File.class, File.class } ) );
        System.out.println( "FAILED!" );
        return false;
    }
    catch( NoSuchMethodException e )
    {
        // expected
        e.printStackTrace();
    }
      
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/script-class-loading/src/it/beanshell/prebuild.bsh
=======================================================================
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    System.out.println( "Invoking class from project's test class path" );
    System.out.println( org.MyUtils.getNothing() );

    System.out.println( "Trying to access method which is unavaible in old plexus-utils" );
    try
    {
        System.out.println( FileUtils.class.getMethod( "copyFileIfModified", new Class[] { File.class, File.class } ) );
        System.out.println( "FAILED!" );
        return false;
    }
    catch( NoSuchMethodException e )
    {
        // expected
        e.printStackTrace();
    }
      
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/script-class-loading/src/it/groovy/postbuild.groovy
=======================================================================
import java.io.*
import java.lang.reflect.*
import java.util.*
import java.util.regex.*

import org.codehaus.plexus.util.*

try
{
    println "Invoking class from project's test class path"
    println org.MyUtils.getNothing()

    println "Trying to access method which is unavaible in old plexus-utils"
    try
    {
        Class[] types = [ File.class, File.class ];
        println FileUtils.class.getMethod( "copyFileIfModified", types )
        println "FAILED!"
        return false
    }
    catch( NoSuchMethodException e )
    {
        // expected
        e.printStackTrace()
    }
      
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

=======================================================================
==src/it/script-class-loading/src/it/groovy/prebuild.groovy
=======================================================================
import java.io.*
import java.lang.reflect.*
import java.util.*
import java.util.regex.*

import org.codehaus.plexus.util.*

try
{
    println "Invoking class from project's test class path"
    println org.MyUtils.getNothing()

    println "Trying to access method which is unavaible in old plexus-utils"
    try
    {
        Class[] types = [ File.class, File.class ];
        println FileUtils.class.getMethod( "copyFileIfModified", types )
        println "FAILED!"
        return false
    }
    catch( NoSuchMethodException e )
    {
        // expected
        e.printStackTrace()
    }
      
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

=======================================================================
==src/it/script-class-loading/src/test/java/org/MyUtils.java
=======================================================================
package org;

public class MyUtils
{

    public static String getNothing()
    {
        return "nothing";
    }

}

=======================================================================
==src/it/script-classpath-duplicates/src/it/beanshell/postbuild.bsh
=======================================================================
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/created-by-postbuild.bsh" );
    System.out.println( "Creating touch file: " + touchFile );
    touchFile.getParentFile().mkdirs();
    touchFile.createNewFile();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/script-classpath-duplicates/src/it/beanshell/prebuild.bsh
=======================================================================
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/created-by-prebuild.bsh" );
    System.out.println( "Creating touch file: " + touchFile );
    touchFile.getParentFile().mkdirs();
    touchFile.createNewFile();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/script-classpath-duplicates/src/it/groovy/postbuild.groovy
=======================================================================
import java.io.*
import java.lang.reflect.*
import java.util.*
import java.util.regex.*

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/created-by-postbuild.groovy" )
    println "Creating touch file: " + touchFile
    touchFile.getParentFile().mkdirs()
    touchFile.createNewFile()
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

return true

=======================================================================
==src/it/script-classpath-duplicates/src/it/groovy/prebuild.groovy
=======================================================================
import java.io.*
import java.lang.reflect.*
import java.util.*
import java.util.regex.*

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/created-by-prebuild.groovy" )
    println "Creating touch file: " + touchFile
    touchFile.getParentFile().mkdirs()
    touchFile.createNewFile()
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

return true

=======================================================================
==src/it/script-classpath-duplicates/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    String[] files = {
            "target/it/beanshell/target/created-by-prebuild.bsh",
            "target/it/beanshell/target/created-by-postbuild.bsh",
            "target/it/groovy/target/created-by-prebuild.groovy",
            "target/it/groovy/target/created-by-postbuild.groovy",
      };
    for ( String file : files )
    {
        File touchFile = new File( basedir, file );
        System.out.println( "Checking for existence of: " + touchFile );
        if ( !touchFile.isFile() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/script-context/src/it/beanshell/setup.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

context.put( "touchFile", new File( basedir, "touch.txt" ) );

System.out.println( context );

=======================================================================
==src/it/script-context/src/it/beanshell/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

System.out.println( context );

File touchFile = context.get( "touchFile" );
touchFile.createNewFile();

return true;

=======================================================================
==src/it/script-context/src/it/groovy/setup.groovy
=======================================================================
import java.io.*
import java.util.*
import java.util.regex.*

context.put( "touchFile", new File( basedir, "touch.txt" ) )

println context

=======================================================================
==src/it/script-context/src/it/groovy/verify.groovy
=======================================================================
import java.io.*
import java.util.*
import java.util.regex.*

println context

File touchFile = context.get( "touchFile" )
touchFile.createNewFile()

return true

=======================================================================
==src/it/script-context/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

File touchFile;

touchFile = new File( basedir, "src/it/beanshell/touch.txt" );
System.out.println( "Checking for existence of touch file: " + touchFile );
if ( !touchFile.exists() )
{
    throw new FileNotFoundException( "Did not find marker file: " + touchFile );
}

touchFile = new File( basedir, "src/it/groovy/touch.txt" );
System.out.println( "Checking for existence of touch file: " + touchFile );
if ( !touchFile.exists() )
{
    throw new FileNotFoundException( "Did not find marker file: " + touchFile );
}

return true;

=======================================================================
==src/it/script-errors/src/it/beanshell/setup.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

// BeanShell does not allow us to simply throw an error, so will we try to trigger an OutOfMemoryError...
long[] arr = new long[ Integer.MAX_VALUE ];

=======================================================================
==src/it/script-errors/src/it/groovy/setup.groovy
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" )
touchFile.createNewFile()

if ( true ) throw new AssertionError( "This should not cause the main build to fail" )


=======================================================================
==src/it/script-errors/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

// make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else
File touchFile;

touchFile = new File( basedir, "src/it/beanshell/touch.txt" );
System.out.println( "Checking for existence of touch file: " + touchFile );
if ( !touchFile.exists() )
{
    throw new FileNotFoundException( "Did not find marker file: " + touchFile );
}

touchFile = new File( basedir, "src/it/groovy/touch.txt" );
System.out.println( "Checking for existence of touch file: " + touchFile );
if ( !touchFile.exists() )
{
    throw new FileNotFoundException( "Did not find marker file: " + touchFile );
}

return true;

=======================================================================
==src/it/script-global-vars/src/it/beanshell/setup.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    System.out.println( basedir );
    if ( !( basedir instanceof File ) )
    {
        System.out.println( "Global script variable not defined: basedir" );
        return false;
    }

    System.out.println( localRepositoryPath );
    if ( !( localRepositoryPath instanceof File ) )
    {
        System.out.println( "Global script variable not defined: localRepositoryPath" );
        return false;
    }

    System.out.println( mavenVersion );
    if ( mavenVersion == null )
    {
        System.out.println( "Global script variable not defined: mavenVersion" );
        return false;
    }
    if ( mavenVersion.trim().equals( "" ) )
    {
        System.out.println( "Global script variable empty: mavenVersion" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/script-global-vars/src/it/beanshell/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    System.out.println( basedir );
    if ( !( basedir instanceof File ) )
    {
        System.out.println( "Global script variable not defined: basedir" );
        return false;
    }

    System.out.println( localRepositoryPath );
    if ( !( localRepositoryPath instanceof File ) )
    {
        System.out.println( "Global script variable not defined: localRepositoryPath" );
        return false;
    }

    System.out.println( mavenVersion );
    if ( mavenVersion == null )
    {
        System.out.println( "Global script variable not defined: mavenVersion" );
        return false;
    }
    if ( mavenVersion.trim().equals( "" ) )
    {
        System.out.println( "Global script variable empty: mavenVersion" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

=======================================================================
==src/it/script-global-vars/src/it/groovy/setup.groovy
=======================================================================
import java.io.*
import java.util.*
import java.util.regex.*

try
{
    println basedir
    if ( !( basedir instanceof File ) )
    {
        println "Global script variable not defined: basedir"
        return false
    }

    println localRepositoryPath
    if ( !( localRepositoryPath instanceof File ) )
    {
        println "Global script variable not defined: localRepositoryPath"
        return false
    }

    println mavenVersion
    if ( !mavenVersion )
    {
        println "Global script variable not defined: mavenVersion"
        return false
    }
    if ( !mavenVersion?.trim() )
    {
        println "Global script variable empty: mavenVersion"
        return false
    }
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

=======================================================================
==src/it/script-global-vars/src/it/groovy/verify.groovy
=======================================================================
import java.io.*
import java.util.*
import java.util.regex.*

try
{
    println basedir
    if ( !( basedir instanceof File ) )
    {
        println "Global script variable not defined: basedir"
        return false
    }

    println localRepositoryPath
    if ( !( localRepositoryPath instanceof File ) )
    {
        println "Global script variable not defined: localRepositoryPath"
        return false
    }

    println mavenVersion
    if ( !mavenVersion )
    {
        println "Global script variable not defined: mavenVersion"
        return false
    }
    if ( !mavenVersion?.trim() )
    {
        println "Global script variable empty: mavenVersion"
        return false
    }
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

=======================================================================
==src/it/script-interpreter-detection/src/it/beanshell/postbuild.bsh
=======================================================================
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/postbuild.bsh" );
    System.out.println( "Creating touch file: " + touchFile );
    touchFile.getParentFile().mkdirs();
    touchFile.createNewFile();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/script-interpreter-detection/src/it/beanshell/prebuild.bsh
=======================================================================
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/prebuild.bsh" );
    System.out.println( "Creating touch file: " + touchFile );
    touchFile.getParentFile().mkdirs();
    touchFile.createNewFile();
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/script-interpreter-detection/src/it/groovy/postbuild.groovy
=======================================================================
import java.io.*
import java.lang.reflect.*
import java.util.*
import java.util.regex.*

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/postbuild.groovy" )
    println "Creating touch file: " + touchFile
    touchFile.getParentFile().mkdirs()
    touchFile.createNewFile()
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

return true

=======================================================================
==src/it/script-interpreter-detection/src/it/groovy/prebuild.groovy
=======================================================================
import java.io.*
import java.lang.reflect.*
import java.util.*
import java.util.regex.*

try
{
    // create touch file so that the parent build can verify whether this script was called
    File touchFile = new File( basedir, "target/prebuild.groovy" )
    println "Creating touch file: " + touchFile
    touchFile.getParentFile().mkdirs()
    touchFile.createNewFile()
}
catch( Throwable t )
{
    t.printStackTrace()
    return false
}

return true

=======================================================================
==src/it/script-interpreter-detection/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    String[] files = {
            "src/it/beanshell/target/prebuild.bsh",
            "src/it/beanshell/target/postbuild.bsh",
            "src/it/groovy/target/prebuild.groovy",
            "src/it/groovy/target/postbuild.groovy",
      };
    for ( String file : files )
    {
        File touchFile = new File( basedir, file );
        System.out.println( "Checking for existence of: " + touchFile );
        if ( !touchFile.isFile() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/script-verify-xml/verify.groovy
=======================================================================
// from http://groovy.codehaus.org/Reading+XML+using+Groovy's+XmlSlurper
// A lot of examples covering xml assertions 

class XmlExamples {
  static def CAR_RECORDS = '''
    <records>
      <car name='HSV Maloo' make='Holden' year='2006'>
        <country>Australia</country>
        <record type='speed'>Production Pickup Truck with speed of 271kph</record>
      </car>
      <car name='P50' make='Peel' year='1962'>
        <country>Isle of Man</country>
        <record type='size'>Smallest Street-Legal Car at 99cm wide and 59 kg in weight</record>
      </car>
      <car name='Royale' make='Bugatti' year='1931'>
        <country>France</country>
        <record type='price'>Most Valuable Car at $15 million</record>
      </car>
    </records>
  '''
}
def records = new XmlSlurper().parseText(XmlExamples.CAR_RECORDS)
def allRecords = records.car
assert 3 == allRecords.size()
def allNodes = records.depthFirst().collect{ it }
assert 10 == allNodes.size()
def firstRecord = records.car[0]
assert 'car' == firstRecord.name()
assert 'Holden' == firstRecord.@make.text()
assert 'Australia' == firstRecord.country.text()
def carsWith_e_InMake = records.car.findAll{ it.@make.text().contains('e') }
assert carsWith_e_InMake.size() == 2
// alternative way to find cars with 'e' in make
assert 2 == records.car.findAll{ it.@make =~ '.*e.*' }.size()
// makes of cars that have an 's' followed by an 'a' in the country
assert ['Holden', 'Peel'] == records.car.findAll{ it.country =~ '.*s.*a.*' }.@make.collect{ it.text() }
def expectedRecordTypes = ['speed', 'size', 'price']
assert expectedRecordTypes == records.depthFirst().grep{ it.@type != '' }.'@type'*.text()
assert expectedRecordTypes == records.'**'.grep{ it.@type != '' }.'@type'*.text()
def countryOne = records.car[1].country
assert 'Peel' == countryOne.parent().@make.text()
assert 'Peel' == countryOne.'..'.@make.text()
// names of cars with records sorted by year
def sortedNames = records.car.list().sort{ it.@year.toInteger() }.'@name'*.text()
assert ['Royale', 'P50', 'HSV Maloo'] == sortedNames
assert ['Australia', 'Isle of Man'] == records.'**'.grep{ it.@type =~ 's.*' }*.parent().country*.text()
assert 'co-re-co-re-co-re' == records.car.children().collect{ it.name()[0..1] }.join('-')
assert 'co-re-co-re-co-re' == records.car.'*'.collect{ it.name()[0..1] }.join('-')

=======================================================================
==src/it/selector-conditions/src/it/jre-version-match/invoker.properties
=======================================================================
invoker.java.version = 1.4-, 1.4, 1.5+

=======================================================================
==src/it/selector-conditions/src/it/jre-version-match/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-conditions/src/it/jre-version-mismatch/invoker.properties
=======================================================================
invoker.java.version = 1.2

=======================================================================
==src/it/selector-conditions/src/it/jre-version-mismatch/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-conditions/src/it/maven-version-match/invoker.properties
=======================================================================
invoker.maven.version = 2.0+

=======================================================================
==src/it/selector-conditions/src/it/maven-version-match/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-conditions/src/it/maven-version-mismatch/invoker.properties
=======================================================================
invoker.maven.version = 1.2

=======================================================================
==src/it/selector-conditions/src/it/maven-version-mismatch/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-conditions/src/it/os-family-match/invoker.properties
=======================================================================
invoker.os.family = !nowhere

=======================================================================
==src/it/selector-conditions/src/it/os-family-match/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-conditions/src/it/os-family-mismatch/invoker.properties
=======================================================================
invoker.os.family = nowhere

=======================================================================
==src/it/selector-conditions/src/it/os-family-mismatch/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-conditions/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    String[] expected = {
            "src/it/jre-version-match/target/touch.txt",
            "src/it/os-family-match/target/touch.txt",
      };
    for ( String file : expected )
    {
        File touchFile = new File( basedir, file );
        System.out.println( "Checking for existence of: " + touchFile );
        if ( !touchFile.isFile() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }

    String[] unexpected = {
            "src/it/jre-version-mismatch/target/touch.txt",
            "src/it/os-family-mismatch/target/touch.txt",
      };
    for ( String file : unexpected )
    {
        File touchFile = new File( basedir, file );
        System.out.println( "Checking for absence of: " + touchFile );
        if ( touchFile.exists() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/selector-scripts/src/it/script-ret-false/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-scripts/src/it/script-ret-false/selector.bsh
=======================================================================
import java.io.*;

return false;

=======================================================================
==src/it/selector-scripts/src/it/script-ret-other/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-scripts/src/it/script-ret-other/selector.bsh
=======================================================================
import java.io.*;

return "Some thing";

=======================================================================
==src/it/selector-scripts/src/it/script-ret-quiet/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-scripts/src/it/script-ret-quiet/selector.bsh
=======================================================================
import java.io.*;


=======================================================================
==src/it/selector-scripts/src/it/script-ret-true/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();
return true;

=======================================================================
==src/it/selector-scripts/src/it/script-ret-true/selector.bsh
=======================================================================
import java.io.*;

return true;

=======================================================================
==src/it/selector-scripts/src/it/script-throw/postbuild.bsh
=======================================================================
import java.io.*;

// create touch file so that the parent build can verify whether this build was executed
File touchFile = new File( basedir, "target/touch.txt" );
System.out.println( "Creating touch file: " + touchFile );
touchFile.getParentFile().mkdirs();
touchFile.createNewFile();

=======================================================================
==src/it/selector-scripts/src/it/script-throw/selector.bsh
=======================================================================
import java.io.*;

throw new NullPointerException( "Bite me" );

=======================================================================
==src/it/selector-scripts/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;

try
{
    String[] expected = {
            "src/it/script-ret-true/target/touch.txt",
            "src/it/script-ret-quiet/target/touch.txt",
      };
    for ( String file : expected )
    {
        File touchFile = new File( basedir, file );
        System.out.println( "Checking for existence of: " + touchFile );
        if ( !touchFile.isFile() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }

    String[] unexpected = {
            "src/it/script-ret-false/target/touch.txt",
            "src/it/script-ret-other/target/touch.txt",
            "src/it/script-throws/target/touch.txt",
      };
    for ( String file : unexpected )
    {
        File touchFile = new File( basedir, file );
        System.out.println( "Checking for absence of: " + touchFile );
        if ( touchFile.exists() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }

    String[] success = {
            "target/invoker-reports/BUILD-script-ret-true.xml",
            "target/invoker-reports/BUILD-script-ret-quiet.xml",
      };
    for ( String file : success )
    {
         File resultFile = new File( basedir, file );
         System.out.println( "Checking build result: " + resultFile );
         String xml = FileUtils.fileRead( resultFile, "UTF-8" );
         if ( xml.indexOf("result=\"success\"") < 0 && xml.indexOf("result='success'") < 0 )
         {

=======================================================================
==src/it/settings-inherit/invoker.properties
=======================================================================
# See https://jira.codehaus.org/browse/MNG-5224
invoker.maven.version = 3.0-,3.0.4+

=======================================================================
==src/it/settings-merge/invoker.properties
=======================================================================
# See https://jira.codehaus.org/browse/MNG-5224
invoker.maven.version = 3.0-,3.0.4+

=======================================================================
==src/it/settings-merge-multiexecutions/invoker.properties
=======================================================================
# See https://jira.codehaus.org/browse/MNG-5224
invoker.maven.version = 3.0-,3.0.4+

=======================================================================
==src/it/settings-merge-multiexecutions/pom.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.maven.plugins.invoker.its</groupId>
    <artifactId>settings-merge-multiexecutions</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>@project.version@</version>
                <configuration>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <mergeUserSettings>true</mergeUserSettings>
                </configuration>
                <executions>
                    <execution>
                        <id>first-run</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>second-run</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

=======================================================================
==src/it/settings-merge-multiexecutions/src/it/minvoker-133/pom.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>test</groupId>
    <artifactId>minvoker-133</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>

=======================================================================
==src/it/settings-merge-multiexecutions/src/it/settings.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
   <profiles>
      <profile>
         <id>it-repo</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <repositories>
            <repository>
               <id>local.central</id>
               <url>@localRepositoryUrl@</url>
               <releases>
                  <enabled>true</enabled>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
               </snapshots>
            </repository>
         </repositories>
         <pluginRepositories>
            <pluginRepository>
               <id>local.central</id>
               <url>@localRepositoryUrl@</url>
               <releases>
                  <enabled>true</enabled>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
               </snapshots>
            </pluginRepository>
         </pluginRepositories>
      </profile>
   </profiles>
</settings>

=======================================================================
==src/it/skip-install/test.properties
=======================================================================
# NOTE: Skipping from the CLI is the primary use case so we prefer the system property over the direct POM configuration
invoker.skip = true

=======================================================================
==src/it/skip-install/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

File itRepoDir = new File( basedir, "target/it-repo" );
System.out.println( "Checking for absence of: " + itRepoDir );
if ( itRepoDir.isDirectory() )
{
    throw new IllegalStateException( "Creation of staging repository was not skipped: " + itRepoDir );
    return false;
}

return true;

=======================================================================
==src/it/skip-run/src/it/project/prebuild.bsh
=======================================================================
import java.io.*;

// marker for parent build that this sub build was indeed run
File touchFile = new File( basedir, "touch.txt" );
touchFile.createNewFile();

return true;

=======================================================================
==src/it/skip-run/test.properties
=======================================================================
# NOTE: Skipping from the CLI is the primary use case so we prefer the system property over the direct POM configuration
invoker.skip = true

=======================================================================
==src/it/skip-run/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    // make sure the Invoker Plugin was indeed NOT run and the build didn't fail somewhere else
    File touchFile = new File( basedir, "target/it/project/touch.txt" );
    System.out.println( "Checking for non-existence of touch file: " + touchFile );
    if ( touchFile.exists() )
    {
        System.out.println( "FAILED!" );
        return false;
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/staging-dependencies/invoker.properties
=======================================================================
invoker.goals = clean verify

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/dep/1.0/dep-1.0.pom
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>dep</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
</project>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/dep/2.0/dep-2.0.pom
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>dep</artifactId>
  <packaging>jar</packaging>
  <version>2.0</version>
</project>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/dep/maven-metadata.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>dep</artifactId>
  <versioning>
    <latest>2.0</latest>
    <release>2.0</release>
    <versions>
      <version>1.0</version>
      <version>2.0</version>
    </versions>
    <lastUpdated>20081020164906</lastUpdated>
  </versioning>
</metadata>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/maven-metadata.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>minvoker-70</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20081020.164906</timestamp>
      <buildNumber>1</buildNumber>
    </snapshot>
    <lastUpdated>20081020164906</lastUpdated>
  </versioning>
</metadata>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-20081020.164906-1.pom
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.maven.its</groupId>
    <artifactId>parent-b</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>
    <artifactId>minvoker-70</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
</project>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/minvoker-70/maven-metadata.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>minvoker-70</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <versions>
      <version>1.0-SNAPSHOT</version>
    </versions>
    <lastUpdated>20081020164906</lastUpdated>
  </versioning>
</metadata>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/parent-a/0.1-SNAPSHOT/maven-metadata.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>parent-a</artifactId>
  <version>0.1-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20081020.164906</timestamp>
      <buildNumber>1</buildNumber>
    </snapshot>
    <lastUpdated>20081020164906</lastUpdated>
  </versioning>
</metadata>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/parent-a/0.1-SNAPSHOT/parent-a-0.1-20081020.164906-1.pom
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>parent-a</artifactId>
  <packaging>pom</packaging>
  <version>0.1-SNAPSHOT</version>
</project>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/parent-b/0.1-SNAPSHOT/maven-metadata.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>parent-b</artifactId>
  <version>0.1-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20081020.164906</timestamp>
      <buildNumber>1</buildNumber>
    </snapshot>
    <lastUpdated>20081020164906</lastUpdated>
  </versioning>
</metadata>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/parent-b/0.1-SNAPSHOT/parent-b-0.1-20081020.164906-1.pom
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.maven.its</groupId>
    <artifactId>parent-a</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>
    <artifactId>parent-b</artifactId>
  <packaging>pom</packaging>
  <version>0.1-SNAPSHOT</version>
</project>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/pom/0.3-SNAPSHOT/maven-metadata.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>pom</artifactId>
  <version>0.3-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20081020.164906</timestamp>
      <buildNumber>1</buildNumber>
    </snapshot>
    <lastUpdated>20081020164906</lastUpdated>
  </versioning>
</metadata>

=======================================================================
==src/it/staging-dependencies/repo/org/apache/maven/its/pom/0.3-SNAPSHOT/pom-0.3-20081020.164906-1.pom
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.maven.its</groupId>
  <artifactId>pom</artifactId>
  <packaging>pom</packaging>
  <version>0.3-SNAPSHOT</version>
</project>

=======================================================================
==src/it/staging-dependencies/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

import org.codehaus.plexus.util.*;
import org.codehaus.plexus.util.xml.*;

try
{
    File itRepoDir = new File( basedir, "target/it-repo" );
    System.out.println( "Checking for existence of: " + itRepoDir );
    if ( !itRepoDir.isDirectory() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String[] files = {
            "junit/junit/3.8.2/junit-3.8.2.pom",
            "junit/junit/3.8.2/junit-3.8.2.jar",
            "junit/junit/maven-metadata-local.xml",
            "org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-SNAPSHOT.pom",
            "org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/minvoker-70-1.0-SNAPSHOT.jar",
            "org/apache/maven/its/minvoker-70/1.0-SNAPSHOT/maven-metadata-local.xml",
            "org/apache/maven/its/minvoker-70/maven-metadata-local.xml",
            "org/apache/maven/its/parent-b/0.1-SNAPSHOT/parent-b-0.1-SNAPSHOT.pom",
            "org/apache/maven/its/parent-b/0.1-SNAPSHOT/maven-metadata-local.xml",
            "org/apache/maven/its/parent-b/maven-metadata-local.xml",
            "org/apache/maven/its/parent-a/0.1-SNAPSHOT/parent-a-0.1-SNAPSHOT.pom",
            "org/apache/maven/its/parent-a/0.1-SNAPSHOT/maven-metadata-local.xml",
            "org/apache/maven/its/parent-a/maven-metadata-local.xml",
            "org/apache/maven/its/pom/0.3-SNAPSHOT/pom-0.3-SNAPSHOT.pom",
            "org/apache/maven/its/pom/0.3-SNAPSHOT/maven-metadata-local.xml",
            "org/apache/maven/its/pom/maven-metadata-local.xml",
            "org/apache/maven/its/dep/1.0/dep-1.0.pom",
            "org/apache/maven/its/dep/1.0/dep-1.0-tests.jar",
            "org/apache/maven/its/dep/2.0/dep-2.0.pom",
            "org/apache/maven/its/dep/2.0/dep-2.0.jar",
            "org/apache/maven/its/dep/maven-metadata-local.xml",
      };
    for ( String file : files )
    {
        File stagedFile = new File( itRepoDir, file );
        System.out.println( "Checking for existence of: " + stagedFile );
        if ( !stagedFile.isFile() )
        {
            throw new IllegalStateException( "Missing: " + stagedFile );
        }
    }


=======================================================================
==src/it/staging-pom/invoker.properties
=======================================================================
invoker.goals = clean verify

=======================================================================
==src/it/staging-pom/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File itRepoDir = new File( basedir, "target/it-repo" );
    System.out.println( "Checking for existence of: " + itRepoDir );
    if ( !itRepoDir.isDirectory() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    String[] files = {
            "test/pom-packaging/1.0-SNAPSHOT/pom-packaging-1.0-SNAPSHOT.pom",
      };
    for ( String file : files )
    {
        File stagedFile = new File( itRepoDir, file );
        System.out.println( "Checking for existence of: " + stagedFile );
        if ( !stagedFile.isFile() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/it/staging-reactor/invoker.properties
=======================================================================
invoker.goals = clean verify

=======================================================================
==src/it/staging-reactor/mod2/src/main/resources/main.properties
=======================================================================

=======================================================================
==src/it/staging-reactor/verify.bsh
=======================================================================
import java.io.*;
import java.util.*;
import java.util.regex.*;

try
{
    File itRepoDir = new File( basedir, "mod1/target/it-repo" );
    System.out.println( "Checking for existence of: " + itRepoDir );
    if ( !itRepoDir.isDirectory() )
    {
        System.out.println( "FAILED!" );
        return false;
    }

    // NOTE: Checking the metadata is included to guard against regression of MINVOKER-43
    String[] files = {
            "test/mod1/maven-metadata-local.xml",
            "test/mod1/1.0-SNAPSHOT/maven-metadata-local.xml",
            "test/mod1/1.0-SNAPSHOT/mod1-1.0-SNAPSHOT.pom",
            "test/mod1/1.0-SNAPSHOT/mod1-1.0-SNAPSHOT.jar",
            "test/mod1-parent/maven-metadata-local.xml",
            "test/mod1-parent/1.0-SNAPSHOT/maven-metadata-local.xml",
            "test/mod1-parent/1.0-SNAPSHOT/mod1-parent-1.0-SNAPSHOT.pom",
            "test/mod2/maven-metadata-local.xml",
            "test/mod2/1.0-SNAPSHOT/maven-metadata-local.xml",
            "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.pom",
            "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.jar",
            "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT-sources.jar",
            "test/mod2-parent/maven-metadata-local.xml",
            "test/mod2-parent/1.0-SNAPSHOT/maven-metadata-local.xml",
            "test/mod2-parent/1.0-SNAPSHOT/mod2-parent-1.0-SNAPSHOT.pom",
      };
    for ( String file : files )
    {
        File stagedFile = new File( itRepoDir, file );
        System.out.println( "Checking for existence of: " + stagedFile );
        if ( !stagedFile.isFile() )
        {
            System.out.println( "FAILED!" );
            return false;
        }
    }
}
catch( Throwable t )
{
    t.printStackTrace();
    return false;
}

return true;

=======================================================================
==src/test/resources/unit/goals-from-file/goals.txt
=======================================================================
clean , test
install

=======================================================================
==src/test/resources/unit/goals-from-file/validate-goal.txt
=======================================================================
validate

=======================================================================
==src/test/resources/unit/interpolation/goals.txt
=======================================================================
${cleanProps} 
${pom.groupId}:${pom.artifactId}:${pom.version}:mygoal

=======================================================================
==src/test/resources/unit/profiles-from-file/emptyProfiles.txt
=======================================================================

=======================================================================
==src/test/resources/unit/profiles-from-file/profiles.txt
=======================================================================
foo, bar