slawekjaranowski commented on a change in pull request #11: URL: https://github.com/apache/maven-verifier/pull/11#discussion_r824859977
########## File path: src/site/markdown/index.md ########## @@ -0,0 +1,24 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +# About Apache Verifier Maven Component + +Provides a test harness for Maven integration tests. This is a library which can be used in own Java-based integration tests. Look at the [Getting Started guide](./getting-started.html) for more information on how to use it. + +Other example usages can be found in the integration tests of the [Apache Maven Remote Resources Plugin](https://github.com/apache/maven-remote-resources-plugin/blob/maven-remote-resources-plugin-1.7.0/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_FilterLocalOverride.java). Review comment: It is simple test ... If we want to show more complicated usage I will link to Maven Integration project as reference https://github.com/apache/maven-integration-testing ########## File path: src/site/markdown/getting-started.md ########## @@ -0,0 +1,94 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +# Getting Started + +## Overview + +Using the `Verifier` consists out of three different phases + +1. Configure +2. Run +3. Verify Review comment: no needed table of content for short document ########## File path: src/site/markdown/getting-started.md ########## @@ -0,0 +1,94 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +# Getting Started + +## Overview + +Using the `Verifier` consists out of three different phases + +1. Configure +2. Run +3. Verify + +## Configure + +The `Verifier` instance is constructed in the simplest case with just one argument taking the path name of the base directory containing the `pom.xml` of the project you want to build. + +``` +String baseDir = ... +Verifier verifier = new Verifier(baseDir); +``` + +The configuration can be further tweaked with additional setter methods and/or constructors taking more parameters. + +### System Properties + +The following systen properties/environment variables are evaluated + +| System Property | Description | Review comment: Please add to table: Which properties are required? What is default values / behavior if property is not set? ########## File path: src/site/markdown/getting-started.md ########## @@ -0,0 +1,94 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +# Getting Started + +## Overview + +Using the `Verifier` consists out of three different phases + +1. Configure +2. Run +3. Verify + +## Configure + +The `Verifier` instance is constructed in the simplest case with just one argument taking the path name of the base directory containing the `pom.xml` of the project you want to build. + +``` +String baseDir = ... +Verifier verifier = new Verifier(baseDir); Review comment: please follow maven convention, space after and before parentheses ########## File path: src/site/markdown/getting-started.md ########## @@ -0,0 +1,94 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +# Getting Started + +## Overview + +Using the `Verifier` consists out of three different phases + +1. Configure +2. Run +3. Verify + +## Configure + +The `Verifier` instance is constructed in the simplest case with just one argument taking the path name of the base directory containing the `pom.xml` of the project you want to build. + +``` +String baseDir = ... +Verifier verifier = new Verifier(baseDir); +``` + +The configuration can be further tweaked with additional setter methods and/or constructors taking more parameters. + +### System Properties + +The following systen properties/environment variables are evaluated + +| System Property | Description | +| --- | --- | +| `verifier.forkMode` | The following values are supported: <br/>`auto` uses the forked launcher when environment variables are set<br/>`embedder` always uses the embedded launcher<br/>any other value leads to always using the forked launcher +| `maven.home` | The directory containing the Maven executable in `bin/mvn` | +| `user.home` | Set by JRE, used for determining Maven default local repository path or the fallback Maven executable | +| `maven.bootclasspath` | Only relevant if Maven home could be determined and the embedded launcher is being used. Determines the classpath of the launcher. May contain multiple path separated by the system dependent path separator. +| `classworlds.conf` | Only relevant if Maven home could be determined and the embedded launcher is being used. The configuration file used by [Plexus Classworlds Loader][plexus-classwords]. If not set defaults to `<Maven Home>/bin/m2.conf`. | +| `maven.repo.local` | Contains the path of the local Maven repository | +| `maven.repo.local.layout` | Layout of the local Maven repository. Either `legacy` or `default` with the latter being the default. | + + +### Finding Maven Executable + +The following mechanism determines the binary which is used for executing Maven. This is + +- either the embedded launcher which uses + - the `org.apache.maven.cli.MavenCli` class loaded from the context class loader (in case Maven Home could not be determined) or + - the [Plexus Classworlds Loader][plexus-classwords] (in case Maven Home could be determined) +- or the forked launcher + +Whether the embedded or the forked launcher are used depends on the field `forkJvm` set through the constructor or `setForkJvm` or as fallback on the value of system property `verifier.forkMode`. + +#### Determining Maven Home directory + +The following directories are considered as potential Maven home directory (relevant for both forked launcher and embedded launcher with [Plexus Classworlds Loader][plexus-classwords]). The first existing directory terminates the mechanism. + +1. Maven Home path given in the constructor +2. System property `maven.home` +3. Environment variable `M2_HOME` Review comment: M2_HOME is deprecated - should be removed from code -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org