You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/05/13 09:49:10 UTC

[plc4x] branch develop updated: - Added skeleton of a groovy based prerequisite check script.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 6925936  - Added skeleton of a groovy based prerequisite check script.
6925936 is described below

commit 6925936557a9664c59d26c0ded605fa0915c8c38
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon May 13 11:49:00 2019 +0200

    - Added skeleton of a groovy based prerequisite check script.
---
 pom.xml                                   | 18 ++++++++++
 src/main/script/prerequisite-check.groovy | 60 +++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/pom.xml b/pom.xml
index 937e35f..d14ea55 100644
--- a/pom.xml
+++ b/pom.xml
@@ -672,6 +672,24 @@
 
   <build>
     <plugins>
+      <!--plugin>
+        <groupId>org.codehaus.gmaven</groupId>
+        <artifactId>groovy-maven-plugin</artifactId>
+        <version>2.1</version>
+        <inherited>false</inherited>
+        <executions>
+          <execution>
+            <phase>validate</phase>
+            <goals>
+              <goal>execute</goal>
+            </goals>
+            <configuration>
+              <source>${project.basedir}/src/main/script/prerequisite-check.groovy</source>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin-->
+
       <!-- Check if all source files have the required apache license headers -->
       <plugin>
         <groupId>org.apache.rat</groupId>
diff --git a/src/main/script/prerequisite-check.groovy b/src/main/script/prerequisite-check.groovy
new file mode 100644
index 0000000..5a74d3c
--- /dev/null
+++ b/src/main/script/prerequisite-check.groovy
@@ -0,0 +1,60 @@
+/*
+ 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 checkBison() {
+    print "bash git --version".execute().text
+}
+
+def checkDotnet() {
+    print "bash dotnet --version".execute().text
+}
+
+def checkFlex() {
+    print "bash flex --version".execute().text
+}
+
+def checkGcc() {
+    print "bash gcc --version".execute().text
+}
+
+def checkGit() {
+    print "bash git --version".execute().text
+}
+
+def checkGpp() {
+    print "bash g++ --version".execute().text
+}
+
+def checkPython() {
+    print "bash python --version".execute().text
+}
+
+checkBison()
+
+checkDotnet()
+
+checkFlex()
+
+checkGcc()
+
+checkGit()
+
+checkGpp()
+
+checkPython()
\ No newline at end of file