changeset 6:7cde94b782c9

7902144: Make jemmy/v3 build/test with Maven Reviewed-by: shurailine Contributed-by: erik.greijus@oracle.com
author shurailine
date Thu, 19 Apr 2018 14:40:38 -0700
parents 898c9e02c8c9
children ab97460a343c
files SWT/JemmySWT/pom.xml SWT/JemmySWT/src/org/jemmy/swt/jemmy.properties core/JemmyAWTInput/pom.xml core/JemmyAWTInput/src/org/jemmy/input/jemmy.properties core/JemmyBrowser/pom.xml core/JemmyBrowser/src/org/jemmy/browser/jemmy.properties core/JemmyCore/pom.xml core/JemmyCore/src/org/jemmy/jemmy.properties make/build_template.xml pom.xml
diffstat 10 files changed, 366 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SWT/JemmySWT/pom.xml	Thu Apr 19 14:40:38 2018 -0700
@@ -0,0 +1,107 @@
+<?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">
+	<!--   
+   Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+   
+   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   
+   The contents of this file are subject to the terms of either the Universal Permissive License 
+   v 1.0 as shown at http://oss.oracle.com/licenses/upl
+   
+   or the following license:
+   
+   Redistribution and use in source and binary forms, with or without modification, are permitted
+   provided that the following conditions are met:
+   
+   1. Redistributions of source code must retain the above copyright notice, this list of conditions
+   and the following disclaimer.
+   
+   2. Redistributions in binary form must reproduce the above copyright notice, this list of
+   conditions and the following disclaimer in the documentation and/or other materials provided with
+   the distribution.
+   
+   3. Neither the name of the copyright holder nor the names of its contributors may be used to
+   endorse or promote products derived from this software without specific prior written permission.
+   
+       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+       WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    -->
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.jemmy.v3</groupId>
+        <artifactId>Jemmy</artifactId>
+        <version>1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>JemmySWT</artifactId>
+    <packaging>jar</packaging>
+    <properties>
+        <swt.version>4.3</swt.version>
+        <version.file>org/jemmy/swt/jemmy.properties</version.file>
+        <version.class>org.jemmy.swt.Version</version.class>
+    </properties>
+    <profiles>
+        <profile>
+            <id>macos</id>
+            <activation>
+                <os>
+                    <family>mac</family>
+                </os>
+            </activation>
+            <properties>
+                <osgi.platform>cocoa.macosx.x86_64</osgi.platform>
+            </properties>
+        </profile>
+        <profile>
+            <id>linux</id>
+            <activation>
+                <os>
+                    <family>unix</family>
+                    <name>Linux</name>
+                </os>
+            </activation>
+            <properties>
+                <osgi.platform>gtk.linux.x86_64</osgi.platform>
+            </properties>
+        </profile>
+        <profile>
+            <id>windows</id>
+            <activation>
+                <os>
+                    <family>windows</family>
+                </os>
+            </activation>
+            <properties>
+                <osgi.platform>win32.win32.x86_64</osgi.platform>
+            </properties>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>org.eclipse.swt</groupId>
+            <artifactId>org.eclipse.swt.${osgi.platform}</artifactId>
+            <version>${swt.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jemmy.v3</groupId>
+            <artifactId>JemmyCore</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jemmy.v3</groupId>
+            <artifactId>JemmyBrowser</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jemmy.v3</groupId>
+            <artifactId>JemmyAWTInput</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+</project>
--- a/SWT/JemmySWT/src/org/jemmy/swt/jemmy.properties	Mon Jan 29 10:53:15 2018 -0800
+++ b/SWT/JemmySWT/src/org/jemmy/swt/jemmy.properties	Thu Apr 19 14:40:38 2018 -0700
@@ -1,3 +1,4 @@
 version.major=0
 version.minor=9
 version.mini=6
+build=${buildnumber}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/JemmyAWTInput/pom.xml	Thu Apr 19 14:40:38 2018 -0700
@@ -0,0 +1,66 @@
+<?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">
+	<!--   
+   Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+   
+   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   
+   The contents of this file are subject to the terms of either the Universal Permissive License 
+   v 1.0 as shown at http://oss.oracle.com/licenses/upl
+   
+   or the following license:
+   
+   Redistribution and use in source and binary forms, with or without modification, are permitted
+   provided that the following conditions are met:
+   
+   1. Redistributions of source code must retain the above copyright notice, this list of conditions
+   and the following disclaimer.
+   
+   2. Redistributions in binary form must reproduce the above copyright notice, this list of
+   conditions and the following disclaimer in the documentation and/or other materials provided with
+   the distribution.
+   
+   3. Neither the name of the copyright holder nor the names of its contributors may be used to
+   endorse or promote products derived from this software without specific prior written permission.
+   
+       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+       WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    -->
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.jemmy.v3</groupId>
+        <artifactId>Jemmy</artifactId>
+        <version>1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>JemmyAWTInput</artifactId>
+    <packaging>jar</packaging>
+    <properties>
+        <version.file>org/jemmy/input/jemmy.properties</version.file>
+        <version.class>org.jemmy.input.Version</version.class>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.jemmy.v3</groupId>
+            <artifactId>JemmyCore</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <testResources>
+            <testResource>
+                <directory>test</directory>
+                <includes>
+                    <include>**/*.png</include>
+                    <include>**/*.jpg</include>
+                </includes>
+            </testResource>
+        </testResources>
+    </build>
+</project>
--- a/core/JemmyAWTInput/src/org/jemmy/input/jemmy.properties	Mon Jan 29 10:53:15 2018 -0800
+++ b/core/JemmyAWTInput/src/org/jemmy/input/jemmy.properties	Thu Apr 19 14:40:38 2018 -0700
@@ -1,3 +1,4 @@
 version.major=0
 version.minor=9
 version.mini=5
+build=${buildnumber}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/JemmyBrowser/pom.xml	Thu Apr 19 14:40:38 2018 -0700
@@ -0,0 +1,55 @@
+<?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">
+	<!--   
+   Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+   
+   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   
+   The contents of this file are subject to the terms of either the Universal Permissive License 
+   v 1.0 as shown at http://oss.oracle.com/licenses/upl
+   
+   or the following license:
+   
+   Redistribution and use in source and binary forms, with or without modification, are permitted
+   provided that the following conditions are met:
+   
+   1. Redistributions of source code must retain the above copyright notice, this list of conditions
+   and the following disclaimer.
+   
+   2. Redistributions in binary form must reproduce the above copyright notice, this list of
+   conditions and the following disclaimer in the documentation and/or other materials provided with
+   the distribution.
+   
+   3. Neither the name of the copyright holder nor the names of its contributors may be used to
+   endorse or promote products derived from this software without specific prior written permission.
+   
+       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+       WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    -->
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.jemmy.v3</groupId>
+        <artifactId>Jemmy</artifactId>
+        <version>1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>JemmyBrowser</artifactId>
+    <packaging>jar</packaging>
+    <properties>
+        <version.file>org/jemmy/browser/jemmy.properties</version.file>
+        <version.class>org.jemmy.browser.Version</version.class>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.jemmy.v3</groupId>
+            <artifactId>JemmyCore</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+</project>
--- a/core/JemmyBrowser/src/org/jemmy/browser/jemmy.properties	Mon Jan 29 10:53:15 2018 -0800
+++ b/core/JemmyBrowser/src/org/jemmy/browser/jemmy.properties	Thu Apr 19 14:40:38 2018 -0700
@@ -1,3 +1,4 @@
 version.major=0
 version.minor=9
 version.mini=5
+build=${buildnumber} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/JemmyCore/pom.xml	Thu Apr 19 14:40:38 2018 -0700
@@ -0,0 +1,12 @@
+<?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>
+    <parent>
+        <groupId>org.jemmy.v3</groupId>
+        <artifactId>Jemmy</artifactId>
+        <version>1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>JemmyCore</artifactId>
+    <packaging>jar</packaging>
+</project>
--- a/core/JemmyCore/src/org/jemmy/jemmy.properties	Mon Jan 29 10:53:15 2018 -0800
+++ b/core/JemmyCore/src/org/jemmy/jemmy.properties	Thu Apr 19 14:40:38 2018 -0700
@@ -1,3 +1,4 @@
 version.major=1
 version.minor=0
 version.mini=0
+build=${buildnumber}
--- a/make/build_template.xml	Mon Jan 29 10:53:15 2018 -0800
+++ b/make/build_template.xml	Thu Apr 19 14:40:38 2018 -0700
@@ -45,7 +45,7 @@
         <mkdir dir="${build.classes.dir}"/>
         <javac srcdir="${src.dir}" classpath="${dependencies.classpath}" destdir="${build.classes.dir}" debug="on" includeantruntime="false"/>
         <copy file="${src.dir}/${version.file}" tofile="${build.classes.dir}/${version.file}"/>
-        <echo message="build=${buildnumber}" file="${build.classes.dir}/${version.file}" append="true"/>
+        <replaceregexp file="${build.classes.dir}/${version.file}" match="\$\{buildnumber\}" replace="${buildnumber}" byline="true"/>
     </target>
     <target name="compile-test" depends="compile">
         <fail message="Please specify jtreg.home" unless="jtreg.home"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pom.xml	Thu Apr 19 14:40:38 2018 -0700
@@ -0,0 +1,121 @@
+<?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">
+	<!--   
+   Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+   
+   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   
+   The contents of this file are subject to the terms of either the Universal Permissive License 
+   v 1.0 as shown at http://oss.oracle.com/licenses/upl
+   
+   or the following license:
+   
+   Redistribution and use in source and binary forms, with or without modification, are permitted
+   provided that the following conditions are met:
+   
+   1. Redistributions of source code must retain the above copyright notice, this list of conditions
+   and the following disclaimer.
+   
+   2. Redistributions in binary form must reproduce the above copyright notice, this list of
+   conditions and the following disclaimer in the documentation and/or other materials provided with
+   the distribution.
+   
+   3. Neither the name of the copyright holder nor the names of its contributors may be used to
+   endorse or promote products derived from this software without specific prior written permission.
+   
+       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+       WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    -->
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.jemmy.v3</groupId>
+    <artifactId>Jemmy</artifactId>
+    <version>1.0</version>
+    <packaging>pom</packaging>
+    <modules>
+        <module>./core/JemmyCore</module>
+        <module>./core/JemmyAWTInput</module>
+        <module>./core/JemmyBrowser</module>
+        <module>./SWT/JemmySWT</module>
+    </modules>
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <changeSet>0</changeSet>
+        <timestamp>${maven.build.timestamp}</timestamp>
+        <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
+    </properties>
+    <profiles>
+        <profile>
+            <id>setbuildnumber</id>
+            <activation>
+                <property>
+                    <name>!buildnumber</name>
+                </property>
+            </activation>
+            <properties>
+                <buildnumber>${timestamp}</buildnumber>
+            </properties>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>6.14.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <sourceDirectory>./src</sourceDirectory>
+        <testSourceDirectory>./test</testSourceDirectory>
+        <resources>
+            <resource>
+                <directory>src</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/jemmy.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src</directory>
+                <filtering>false</filtering>
+                <excludes>
+                    <exclude>**/jemmy.properties</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.21.0</version>
+                <configuration>
+                    <reuseForks>false</reuseForks>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>3.0.2</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>${version.class}</mainClass>
+                        </manifest>
+                    </archive>
+                    <excludes>
+                    	<exclude>**/*.java</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>