You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2024/01/10 12:50:57 UTC
(maven-help-plugin) branch master updated: [MPH-207] Add ITs for evaluating an expression resulting into a null object. (#101)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 9117770 [MPH-207] Add ITs for evaluating an expression resulting into a null object. (#101)
9117770 is described below
commit 9117770e8b787d3aef3475d8cff0af95fe1e02bc
Author: Vincent Latombe <vi...@latombe.net>
AuthorDate: Wed Jan 10 13:50:52 2024 +0100
[MPH-207] Add ITs for evaluating an expression resulting into a null object. (#101)
---
.../invoker.properties | 18 ++++++++++++++
.../evaluate-null-object-with-output/pom.xml | 28 ++++++++++++++++++++++
.../test.properties | 19 +++++++++++++++
.../evaluate-null-object-with-output/verify.groovy | 23 ++++++++++++++++++
.../evaluate-null-object/invoker.properties | 18 ++++++++++++++
src/it/projects/evaluate-null-object/pom.xml | 28 ++++++++++++++++++++++
.../projects/evaluate-null-object/test.properties | 18 ++++++++++++++
src/it/projects/evaluate-null-object/verify.groovy | 23 ++++++++++++++++++
8 files changed, 175 insertions(+)
diff --git a/src/it/projects/evaluate-null-object-with-output/invoker.properties b/src/it/projects/evaluate-null-object-with-output/invoker.properties
new file mode 100644
index 0000000..e9c555f
--- /dev/null
+++ b/src/it/projects/evaluate-null-object-with-output/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:evaluate
diff --git a/src/it/projects/evaluate-null-object-with-output/pom.xml b/src/it/projects/evaluate-null-object-with-output/pom.xml
new file mode 100644
index 0000000..2ceb885
--- /dev/null
+++ b/src/it/projects/evaluate-null-object-with-output/pom.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.help</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+</project>
diff --git a/src/it/projects/evaluate-null-object-with-output/test.properties b/src/it/projects/evaluate-null-object-with-output/test.properties
new file mode 100644
index 0000000..4856d8e
--- /dev/null
+++ b/src/it/projects/evaluate-null-object-with-output/test.properties
@@ -0,0 +1,19 @@
+# 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.
+
+expression = some.invalid.property
+output = result.txt
diff --git a/src/it/projects/evaluate-null-object-with-output/verify.groovy b/src/it/projects/evaluate-null-object-with-output/verify.groovy
new file mode 100644
index 0000000..b8feaea
--- /dev/null
+++ b/src/it/projects/evaluate-null-object-with-output/verify.groovy
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+def result = new File(basedir, 'result.txt').text;
+assert result == 'null object or invalid expression'
+
+return true;
diff --git a/src/it/projects/evaluate-null-object/invoker.properties b/src/it/projects/evaluate-null-object/invoker.properties
new file mode 100644
index 0000000..e9c555f
--- /dev/null
+++ b/src/it/projects/evaluate-null-object/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:evaluate
diff --git a/src/it/projects/evaluate-null-object/pom.xml b/src/it/projects/evaluate-null-object/pom.xml
new file mode 100644
index 0000000..2ceb885
--- /dev/null
+++ b/src/it/projects/evaluate-null-object/pom.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.help</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+</project>
diff --git a/src/it/projects/evaluate-null-object/test.properties b/src/it/projects/evaluate-null-object/test.properties
new file mode 100644
index 0000000..a5c6a32
--- /dev/null
+++ b/src/it/projects/evaluate-null-object/test.properties
@@ -0,0 +1,18 @@
+# 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.
+
+expression = some.invalid.property
diff --git a/src/it/projects/evaluate-null-object/verify.groovy b/src/it/projects/evaluate-null-object/verify.groovy
new file mode 100644
index 0000000..a26b256
--- /dev/null
+++ b/src/it/projects/evaluate-null-object/verify.groovy
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+def result = new File(basedir, 'build.log').text;
+assert result.contains( 'null object or invalid expression' )
+
+return true;