parent
0f4694066a
commit
782ae4e788
7
.gitignore
vendored
7
.gitignore
vendored
@ -27,3 +27,10 @@ test-out/
|
|||||||
/bin
|
/bin
|
||||||
open-refine.log
|
open-refine.log
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
main/target/
|
||||||
|
main/webapp/WEB-INF/lib/
|
||||||
|
server/target/
|
||||||
|
extensions/*/target/
|
||||||
|
extensions/*/module/MOD-INF/classes/
|
||||||
|
extensions/*/module/MOD-INF/lib/
|
||||||
|
14
.travis.yml
14
.travis.yml
@ -18,15 +18,19 @@ before_install:
|
|||||||
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/2.0.0/codacy-coverage-reporter-2.0.0-assembly.jar
|
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/2.0.0/codacy-coverage-reporter-2.0.0-assembly.jar
|
||||||
# create test database for mysql, mariadb and postgresql
|
# create test database for mysql, mariadb and postgresql
|
||||||
- mysql -u root -e 'CREATE DATABASE test_db;'
|
- mysql -u root -e 'CREATE DATABASE test_db;'
|
||||||
- mysql -u root test_db < extensions/database/test/conf/travis-mysql.sql
|
- mysql -u root test_db < extensions/database/tests/conf/travis-mysql.sql
|
||||||
- psql -c 'CREATE DATABASE test_db;' -U postgres
|
- psql -c 'CREATE DATABASE test_db;' -U postgres
|
||||||
- psql -U postgres test_db < extensions/database/test/conf/travis-pgsql.sql
|
- psql -U postgres test_db < extensions/database/tests/conf/travis-pgsql.sql
|
||||||
- cp extensions/database/test/conf/travis_tests.xml extensions/database/test/conf/tests.xml
|
- cp extensions/database/tests/conf/travis_tests.xml extensions/database/tests/conf/tests.xml
|
||||||
|
- mvn process-resources
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./refine server_test
|
- ./refine test
|
||||||
- ./refine extensions_test
|
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r build/report/jacoco.xml
|
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r build/report/jacoco.xml
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.m2
|
||||||
|
|
||||||
|
23
appveyor.yml
23
appveyor.yml
@ -11,18 +11,12 @@ clone_depth: 5
|
|||||||
skip_branch_with_pr: true
|
skip_branch_with_pr: true
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
ANT_HOME: C:\apache-ant-1.10.5
|
|
||||||
JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
|
JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
|
||||||
|
MAVEN_HOME: C:\Program Files (x86)\Apache\Maven
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
install:
|
|
||||||
- cmd: if not exist %ANT_HOME% pushd . && cd \ && appveyor DownloadFile http://www.mirrorservice.org/sites/ftp.apache.org//ant/binaries/apache-ant-1.10.5-bin.zip && 7z x apache-ant-1.10.5-bin.zip && popd
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- C:\apache-ant-1.10.5
|
|
||||||
- apache-ant-1.10.5-bin.zip
|
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
# scripts to run before test
|
# scripts to run before test
|
||||||
@ -32,7 +26,7 @@ before_test:
|
|||||||
PATH=C:\Program Files\PostgreSQL\9.6\bin\;C:\Program Files\MySQL\MySQL Server 5.7\bin\;%PATH%
|
PATH=C:\Program Files\PostgreSQL\9.6\bin\;C:\Program Files\MySQL\MySQL Server 5.7\bin\;%PATH%
|
||||||
SET MYSQL_PWD=Password12!
|
SET MYSQL_PWD=Password12!
|
||||||
mysql -u root --password=Password12! -e "create database test_db;"
|
mysql -u root --password=Password12! -e "create database test_db;"
|
||||||
mysql -u root test_db --password=Password12! < extensions\database\test\conf\travis-mysql.sql
|
mysql -u root test_db --password=Password12! < extensions\database\tests\conf\travis-mysql.sql
|
||||||
echo "localhost:*:test_db:postgres:Password12!" > C:\Program Files\PostgreSQL\9.6\pgpass.conf
|
echo "localhost:*:test_db:postgres:Password12!" > C:\Program Files\PostgreSQL\9.6\pgpass.conf
|
||||||
echo "localhost:*:test_db:postgres:Password12!" > pgpass.conf
|
echo "localhost:*:test_db:postgres:Password12!" > pgpass.conf
|
||||||
echo "localhost:*:test_db:postgres:Password12!" > %userprofile%\pgpass.conf
|
echo "localhost:*:test_db:postgres:Password12!" > %userprofile%\pgpass.conf
|
||||||
@ -40,9 +34,12 @@ before_test:
|
|||||||
SET PGPASSWORD=Password12!
|
SET PGPASSWORD=Password12!
|
||||||
SET PGUSER=postgres
|
SET PGUSER=postgres
|
||||||
createdb test_db
|
createdb test_db
|
||||||
psql -U postgres test_db < extensions\database\test\conf\travis-pgsql.sql
|
psql -U postgres test_db < extensions\database\tests\conf\travis-pgsql.sql
|
||||||
|
|
||||||
copy extensions\database\test\conf\appveyor_tests.xml extensions\database\test\conf\tests.xml
|
copy extensions\database\tests\conf\appveyor_tests.xml extensions\database\tests\conf\tests.xml
|
||||||
|
- cmd: |-
|
||||||
|
mvn process-resources
|
||||||
|
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cmd: echo Running test_script...
|
- cmd: echo Running test_script...
|
||||||
@ -51,6 +48,8 @@ test_script:
|
|||||||
|
|
||||||
path
|
path
|
||||||
|
|
||||||
refine server_test
|
refine test
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- C:\Users\appveyor\.m2
|
||||||
|
|
||||||
refine extensions_test
|
|
||||||
|
605
build.xml
605
build.xml
@ -1,605 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine Build File
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="openrefine" default="build" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
|
|
||||||
|
|
||||||
<!-- Properties are immutable, so anything set in this file takes priority-->
|
|
||||||
<property file="build.properties"/>
|
|
||||||
|
|
||||||
<property environment="env"/>
|
|
||||||
|
|
||||||
<property name="version" value="trunk"/>
|
|
||||||
<property name="full_version" value="0.0.0.0"/>
|
|
||||||
<property name="build.dir" value="build"/>
|
|
||||||
<property name="dist.dir" value="dist"/>
|
|
||||||
|
|
||||||
<property name="java_version" value="1.8"/>
|
|
||||||
|
|
||||||
<property name="appengine.app_id" value="openrefine-broker"/>
|
|
||||||
<property name="appengine.version" value="1"/>
|
|
||||||
<property name="appengine.sdk.dir" value="/opt/appengine"/>
|
|
||||||
|
|
||||||
<property name="fullname" value="openrefine-${version}" />
|
|
||||||
|
|
||||||
<property name="main.dir" value="${basedir}/main" />
|
|
||||||
|
|
||||||
<property name="webapp.dir" value="${main.dir}/webapp" />
|
|
||||||
<property name="webapp.src.dir" value="${main.dir}/src" />
|
|
||||||
<property name="webapp.lib.dir" value="${webapp.dir}/WEB-INF/lib" />
|
|
||||||
<property name="webapp.classes.dir" value="${webapp.dir}/WEB-INF/classes" />
|
|
||||||
|
|
||||||
<property name="server.dir" value="${basedir}/server" />
|
|
||||||
<property name="server.src.dir" value="${server.dir}/src" />
|
|
||||||
<property name="server.lib.dir" value="${server.dir}/lib" />
|
|
||||||
<property name="server.classes.dir" value="${server.dir}/classes" />
|
|
||||||
|
|
||||||
<property name="broker.dir" value="${basedir}/broker" />
|
|
||||||
<property name="broker.core.dir" value="${broker.dir}/core" />
|
|
||||||
<property name="broker.appengine.dir" value="${broker.dir}/appengine" />
|
|
||||||
|
|
||||||
<property name="extensions.dir" value="${basedir}/extensions" />
|
|
||||||
|
|
||||||
<property name="tests.dir" value="${main.dir}/tests" />
|
|
||||||
<property name="server.tests.dir" value="${tests.dir}/server" />
|
|
||||||
<property name="server.tests.lib.dir" value="${server.tests.dir}/lib" />
|
|
||||||
<property name="server.tests.src.dir" value="${server.tests.dir}/src" />
|
|
||||||
<property name="server.tests.classes.dir" value="${server.tests.dir}/classes" />
|
|
||||||
<property name="server.tests.report.dir" value="${build.dir}/report"/>
|
|
||||||
<property name="server.tests.report.html.dir" value="${server.tests.report.dir}/html"/>
|
|
||||||
<property name="server.tests.report.xml.path" value="${server.tests.report.dir}/jacoco.xml"/>
|
|
||||||
|
|
||||||
<property name="graphics.dir" value="${basedir}/graphics" />
|
|
||||||
<property name="conf.dir" value="${basedir}/conf" />
|
|
||||||
<property name="tools.dir" value="${basedir}/tools" />
|
|
||||||
|
|
||||||
<property name="reports.dir" value="${build.dir}/reports" />
|
|
||||||
|
|
||||||
<property name="built.webapp.name" value="webapp" />
|
|
||||||
<property name="built.webapp.dir" value="${build.dir}/${built.webapp.name}" />
|
|
||||||
|
|
||||||
<property name="built.broker.webapp.dir" value="${build.dir}/broker" />
|
|
||||||
|
|
||||||
<property name="mac.dir" value="${build.dir}/mac" />
|
|
||||||
<property name="release.name" value="openrefine-${version}" />
|
|
||||||
<property name="windows.dir" value="${build.dir}/windows/${release.name}" />
|
|
||||||
<property name="linux.dir" value="${build.dir}/linux/${release.name}" />
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<path id="server.class.path">
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement location="${server.classes.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="webapp.class.path">
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/servlet-api*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${webapp.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement location="${webapp.classes.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="tests.class.path">
|
|
||||||
<path refid="webapp.class.path"/>
|
|
||||||
<path refid="server.class.path"/>
|
|
||||||
<pathelement location="${server.tests.classes.dir}"/>
|
|
||||||
<pathelement location="${server.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<pathelement location="${tests.dir}/data" />
|
|
||||||
<fileset dir="${server.tests.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="broker.class.path">
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/servlet-api*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${webapp.lib.dir}">
|
|
||||||
<include name="**/butterfly*.jar" />
|
|
||||||
<include name="**/json*.jar" />
|
|
||||||
<include name="**/http*.jar" />
|
|
||||||
<include name="**/slf4j-api*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${broker.core.dir}/module/MOD-INF/lib">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="broker.appengine.class.path">
|
|
||||||
<pathelement location="${broker.core.dir}/module/MOD-INF/classes"/>
|
|
||||||
<path refid="broker.class.path"/>
|
|
||||||
<fileset dir="${appengine.sdk.dir}/lib">
|
|
||||||
<include name="shared/**/*.jar" />
|
|
||||||
<include name="user/**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<target name="build_server">
|
|
||||||
<mkdir dir="${server.classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" srcdir="${server.src.dir}" destdir="${server.classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<classpath refid="server.class.path" />
|
|
||||||
</javac>
|
|
||||||
<copy file="${server.src.dir}/log4j.properties" tofile="${server.classes.dir}/log4j.properties"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build_webapp">
|
|
||||||
<mkdir dir="${webapp.classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${webapp.classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${webapp.src.dir}"/>
|
|
||||||
<classpath refid="webapp.class.path" />
|
|
||||||
</javac>
|
|
||||||
<copy file="${webapp.src.dir}/log4j.properties" tofile="${webapp.classes.dir}/log4j.properties"/>
|
|
||||||
<copy file="${main.dir}/resources/schemas/datapackage-template.json" tofile="${webapp.classes.dir}/schemas/datapackage-template.json"/>
|
|
||||||
<copy file="${main.dir}/resources/schemas/TableSchemaValidator.json" tofile="${webapp.classes.dir}/schemas/TableSchemaValidator.json"/>
|
|
||||||
<copy file="${webapp.src.dir}/validator-resource-bundle.properties" tofile="${webapp.classes.dir}/validator-resource-bundle.properties"/>
|
|
||||||
<copy file="${webapp.src.dir}/log4j.properties" tofile="${webapp.classes.dir}/log4j.properties"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build_tests" depends="build">
|
|
||||||
<mkdir dir="${server.tests.classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" srcdir="${server.tests.src.dir}" destdir="${server.tests.classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<classpath refid="tests.class.path" />
|
|
||||||
</javac>
|
|
||||||
<copy file="${server.tests.src.dir}/tests.log4j.properties" tofile="${server.tests.classes.dir}/tests.log4j.properties"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build_extensions">
|
|
||||||
<ant dir="extensions/" target="build" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_server, build_webapp, build_extensions"/>
|
|
||||||
|
|
||||||
<target name="build_broker_core">
|
|
||||||
<mkdir dir="${broker.core.dir}/module/MOD-INF/classes" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${broker.core.dir}/module/MOD-INF/classes" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${broker.core.dir}/src/"/>
|
|
||||||
<classpath refid="broker.class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build_broker_appengine" depends="build_broker_core">
|
|
||||||
<mkdir dir="${broker.appengine.dir}/module/MOD-INF/classes" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${broker.appengine.dir}/module/MOD-INF/classes" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${broker.appengine.dir}/src/"/>
|
|
||||||
<classpath refid="broker.appengine.class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build_broker" depends="build_broker_core, build_broker_appengine"/>
|
|
||||||
|
|
||||||
<taskdef resource="testngtasks" classpath="${server.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
|
|
||||||
<classpath path="${server.tests.lib.dir}/jacocoant.jar"/>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<mkdir dir="${build.dir}/server_tests"/>
|
|
||||||
<target name="server_test" depends="build_tests">
|
|
||||||
<jacoco:coverage destfile="${server.tests.report.dir}/jacoco.exec">
|
|
||||||
<testng verbose="2" haltOnFailure="true" workingdir="${build.dir}/server_tests"
|
|
||||||
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
|
|
||||||
classpathref="tests.class.path">
|
|
||||||
<xmlfileset file="${server.tests.dir}/conf/tests.xml"/>
|
|
||||||
</testng>
|
|
||||||
</jacoco:coverage>
|
|
||||||
<jacoco:report>
|
|
||||||
<executiondata>
|
|
||||||
<file file="${server.tests.report.dir}/jacoco.exec"/>
|
|
||||||
</executiondata>
|
|
||||||
|
|
||||||
<structure name="OpenRefine server">
|
|
||||||
<classfiles>
|
|
||||||
<fileset dir="${webapp.classes.dir}"/>
|
|
||||||
</classfiles>
|
|
||||||
<sourcefiles encoding="UTF-8">
|
|
||||||
<fileset dir="${server.src.dir}"/>
|
|
||||||
</sourcefiles>
|
|
||||||
</structure>
|
|
||||||
<html destdir="${server.tests.report.html.dir}"/>
|
|
||||||
<xml destfile="${server.tests.report.xml.path}"/>
|
|
||||||
</jacoco:report>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- runs the tests for the extensions -->
|
|
||||||
<target name="extensions_test" depends="build">
|
|
||||||
<ant dir="extensions/" target="test" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<target name="prepare_jar">
|
|
||||||
<mkdir dir="${build.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="jar_server" depends="prepare_jar, build_server">
|
|
||||||
<jar destfile="${build.dir}/${fullname}-server.jar" basedir="${server.classes.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="jar_webapp" depends="prepare_jar, build_webapp">
|
|
||||||
<jar destfile="${build.dir}/${fullname}.jar" basedir="${webapp.classes.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="jar" depends="jar_server, jar_webapp"/>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<target name="prepare_webapp" depends="jar_webapp, build">
|
|
||||||
<mkdir dir="${built.webapp.dir}" />
|
|
||||||
|
|
||||||
<copy todir="${built.webapp.dir}">
|
|
||||||
<fileset dir="${webapp.dir}">
|
|
||||||
<include name="**/*"/>
|
|
||||||
<exclude name="WEB-INF/classes/**"/>
|
|
||||||
<exclude name="WEB-INF/lib-src/**"/>
|
|
||||||
<exclude name="WEB-INF/lib/icu4j*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy file="${build.dir}/${fullname}.jar" tofile="${built.webapp.dir}/WEB-INF/lib/${fullname}.jar"/>
|
|
||||||
|
|
||||||
<copy todir="${built.webapp.dir}/extensions">
|
|
||||||
<fileset dir="${extensions.dir}">
|
|
||||||
<include name="**/*"/>
|
|
||||||
<exclude name="**/build.xml"/>
|
|
||||||
<exclude name="**/src/**"/>
|
|
||||||
<exclude name="**/lib-src/**"/>
|
|
||||||
<exclude name="**/libsrc/**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<replace file="${built.webapp.dir}/WEB-INF/web.xml">
|
|
||||||
<replacefilter token="$VERSION" value="${version}"/>
|
|
||||||
</replace>
|
|
||||||
|
|
||||||
<replace file="${built.webapp.dir}/WEB-INF/butterfly.properties">
|
|
||||||
<replacefilter token="../../extensions" value="extensions"/>
|
|
||||||
</replace>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="mac" depends="jar, prepare_webapp">
|
|
||||||
<mkdir dir="${mac.dir}"/>
|
|
||||||
|
|
||||||
<taskdef name="bundleapp"
|
|
||||||
classname="com.oracle.appbundler.AppBundlerTask"
|
|
||||||
classpath="${appbundler.dir}/appbundler-1.0.jar" />
|
|
||||||
|
|
||||||
<bundleapp outputdirectory="${mac.dir}"
|
|
||||||
name="OpenRefine"
|
|
||||||
displayname="OpenRefine ${version}"
|
|
||||||
icon="${graphics.dir}/icon/openrefine.icns"
|
|
||||||
identifier="com.google.refine.Refine"
|
|
||||||
shortversion="${version}"
|
|
||||||
mainclassname="com/google/refine/Refine">
|
|
||||||
<runtime dir="${env.JAVA_HOME}"/>
|
|
||||||
<classpath dir="${build.dir}">
|
|
||||||
<include name="${fullname}-server.jar" />
|
|
||||||
</classpath>
|
|
||||||
<classpath dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</classpath>
|
|
||||||
<option value="-Xms256M"/>
|
|
||||||
<option value="-Xmx1024M"/>
|
|
||||||
<option value="-Drefine.version=${version}"/>
|
|
||||||
<option value="-Drefine.webapp=$APP_ROOT/Contents/Resource/${built.webapp.name}"/>
|
|
||||||
</bundleapp>
|
|
||||||
|
|
||||||
<copy todir="${mac.dir}/OpenRefine.app/Contents/Resource">
|
|
||||||
<fileset dir="${build.dir}" id="librarypathset" >
|
|
||||||
<include name="${built.webapp.name}/**/**" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!--- Options from old jarbundler code not supported by appbundler
|
|
||||||
aboutmenuname="OpenRefine"
|
|
||||||
workingdirectory="$APP_PACKAGE/Contents/Resources"
|
|
||||||
antialiasedgraphics="true"
|
|
||||||
antialiasedtext="true"
|
|
||||||
liveresize="true"
|
|
||||||
growboxintrudes="true"
|
|
||||||
screenmenu="true">
|
|
||||||
-->
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="windows" depends="jar, prepare_webapp">
|
|
||||||
<echo message="Full version ${full_version} and version ${version}"/>
|
|
||||||
<mkdir dir="${windows.dir}"/>
|
|
||||||
<taskdef
|
|
||||||
name="launch4j"
|
|
||||||
classname="net.sf.launch4j.ant.Launch4jTask"
|
|
||||||
classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar"
|
|
||||||
/>
|
|
||||||
<launch4j>
|
|
||||||
<config
|
|
||||||
headerType="console"
|
|
||||||
outfile="${windows.dir}/openrefine.exe"
|
|
||||||
jarPath="server/lib/${fullname}-server.jar"
|
|
||||||
dontWrapJar="true"
|
|
||||||
icon="${graphics.dir}/icon/openrefine.ico">
|
|
||||||
<classPath mainClass="com.google.refine.Refine">
|
|
||||||
<cp>server/lib/*.jar</cp>
|
|
||||||
</classPath>
|
|
||||||
<jre minVersion="1.8.0" jdkPreference="preferJre" initialHeapSize="256" maxHeapSize="1024">
|
|
||||||
<opt>-Djava.library.path=server/lib/native/windows </opt>
|
|
||||||
</jre>
|
|
||||||
<versionInfo
|
|
||||||
fileVersion="${full_version}"
|
|
||||||
txtFileVersion="${version}"
|
|
||||||
fileDescription="openrefine"
|
|
||||||
copyright="Copyright (c) 2013 OpenRefine contributors, 2010, Google, Inc."
|
|
||||||
productVersion="${full_version}"
|
|
||||||
txtProductVersion="${version}"
|
|
||||||
productName="OpenRefine"
|
|
||||||
companyName="OpenRefine team"
|
|
||||||
internalName="openrefine"
|
|
||||||
originalFilename="openrefine.exe"
|
|
||||||
/>
|
|
||||||
</config>
|
|
||||||
</launch4j>
|
|
||||||
<copy file="${build.dir}/${fullname}-server.jar" tofile="${windows.dir}/server/lib/${fullname}-server.jar"/>
|
|
||||||
<copy todir="${windows.dir}/server/lib">
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${windows.dir}/server/lib/native/windows">
|
|
||||||
<fileset dir="${server.lib.dir}/native/windows">
|
|
||||||
<include name="*.dll"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${windows.dir}/webapp">
|
|
||||||
<fileset dir="${built.webapp.dir}">
|
|
||||||
<include name="**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<mkdir dir="${windows.dir}/licenses"/>
|
|
||||||
<fixcrlf srcDir="${basedir}/licenses" destDir="${windows.dir}/licenses" eol="crlf"/>
|
|
||||||
|
|
||||||
<fixcrlf srcDir="${basedir}" destDir="${windows.dir}" eol="crlf">
|
|
||||||
<include name="refine.bat"/>
|
|
||||||
<include name="refine.ini"/>
|
|
||||||
<include name="README.txt"/>
|
|
||||||
<include name="LICENSE.txt"/>
|
|
||||||
</fixcrlf>
|
|
||||||
<fixcrlf file="${conf.dir}/openrefine.l4j.ini" destDir="${windows.dir}" eol="crlf"/>
|
|
||||||
|
|
||||||
<mkdir dir="${dist.dir}"/>
|
|
||||||
<zip destfile="${dist.dir}/openrefine-win-${version}.zip" basedir="${windows.dir}/.." includes="${release.name}/**"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="linux" depends="jar, prepare_webapp">
|
|
||||||
<mkdir dir="${linux.dir}"/>
|
|
||||||
|
|
||||||
<copy todir="${linux.dir}/server/lib">
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy file="${build.dir}/${fullname}-server.jar" tofile="${linux.dir}/server/lib/${fullname}-server.jar"/>
|
|
||||||
|
|
||||||
<copy todir="${linux.dir}/webapp">
|
|
||||||
<fileset dir="${built.webapp.dir}">
|
|
||||||
<include name="**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<mkdir dir="${linux.dir}/licenses"/>
|
|
||||||
<fixcrlf srcDir="${basedir}/licenses" destDir="${linux.dir}/licenses" eol="lf"/>
|
|
||||||
|
|
||||||
<fixcrlf srcDir="${basedir}" destDir="${linux.dir}" eol="lf">
|
|
||||||
<include name="refine"/>
|
|
||||||
<include name="refine.ini"/>
|
|
||||||
<include name="README.txt"/>
|
|
||||||
<include name="LICENSE.txt"/>
|
|
||||||
</fixcrlf>
|
|
||||||
|
|
||||||
<mkdir dir="${dist.dir}"/>
|
|
||||||
<tar longfile="gnu" compression="gzip" destfile="${dist.dir}/openrefine-linux-${version}.tar.gz">
|
|
||||||
<tarfileset dir="${linux.dir}/.." filemode="755">
|
|
||||||
<include name="${release.name}/refine"/>
|
|
||||||
</tarfileset>
|
|
||||||
<tarfileset dir="${linux.dir}/..">
|
|
||||||
<include name="${release.name}/**"/>
|
|
||||||
<exclude name="${release.name}/refine"/>
|
|
||||||
</tarfileset>
|
|
||||||
</tar>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="kits" depends="linux,mac,windows"
|
|
||||||
description="Build kits for all supported platforms">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<target name="prepare_reports">
|
|
||||||
<mkdir dir="${reports.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="findbugs" depends="build,prepare_reports">
|
|
||||||
<taskdef
|
|
||||||
name="findbugs"
|
|
||||||
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
|
|
||||||
classpath="${findbugs.dir}/lib/findbugs-ant.jar"
|
|
||||||
/>
|
|
||||||
<findbugs jvmargs="-Xmx1024m" home="${findbugs.dir}" output="html" outputFile="${reports.dir}/findbugs.html" >
|
|
||||||
<auxClasspath refid="webapp.class.path" />
|
|
||||||
<sourcePath path="${webapp.src.dir}" />
|
|
||||||
<class location="${webapp.classes.dir}" />
|
|
||||||
</findbugs>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="pmd" depends="prepare_reports">
|
|
||||||
<path id="pmd.path">
|
|
||||||
<fileset dir="${pmd.dir}/lib" includes="*.jar"/>
|
|
||||||
</path>
|
|
||||||
<taskdef
|
|
||||||
name="pmd"
|
|
||||||
classname="net.sourceforge.pmd.ant.PMDTask"
|
|
||||||
classpathref="pmd.path"
|
|
||||||
/>
|
|
||||||
<pmd rulesetfiles="${conf.dir}/pmd.rules.xml" targetjdk="1.8" encoding="UTF-8">
|
|
||||||
<formatter type="html" toFile="${reports.dir}/pmd.html" toConsole="true"/>
|
|
||||||
<fileset dir="${server.src.dir}">
|
|
||||||
<include name="**/*.java"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${webapp.src.dir}">
|
|
||||||
<include name="**/*.java"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${server.tests.src.dir}">
|
|
||||||
<include name="**/*.java"/>
|
|
||||||
</fileset>
|
|
||||||
</pmd>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="cpd" depends="prepare_reports">
|
|
||||||
<path id="pmd.path">
|
|
||||||
<fileset dir="${pmd.dir}/lib" includes="*.jar"/>
|
|
||||||
</path>
|
|
||||||
<taskdef
|
|
||||||
name="cpd"
|
|
||||||
classname="net.sourceforge.pmd.cpd.CPDTask"
|
|
||||||
classpathref="pmd.path"
|
|
||||||
/>
|
|
||||||
<cpd minimumTokenCount="100" outputFile="${reports.dir}/cpd.txt" encoding="UTF-8">
|
|
||||||
<fileset dir="${server.src.dir}">
|
|
||||||
<include name="**/*.java"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${webapp.src.dir}">
|
|
||||||
<include name="**/*.java"/>
|
|
||||||
</fileset>
|
|
||||||
</cpd>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="jslint" depends="prepare_reports">
|
|
||||||
<path id="jslint.path">
|
|
||||||
<fileset dir="${jslint.dir}" includes="*.jar"/>
|
|
||||||
</path>
|
|
||||||
<taskdef
|
|
||||||
name="jslint"
|
|
||||||
classname="com.googlecode.jslint4java.ant.JSLintTask"
|
|
||||||
classpathref="jslint.path"
|
|
||||||
/>
|
|
||||||
<jslint>
|
|
||||||
<formatter type="plain" destfile="${reports.dir}/jslint.txt" />
|
|
||||||
<fileset dir="${webapp.dir}/modules/core/scripts">
|
|
||||||
<include name="**/*.js" />
|
|
||||||
</fileset>
|
|
||||||
</jslint>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<target name="prepare_broker" depends="jar_server, build_broker_core">
|
|
||||||
<copy todir="${broker.core.dir}/WEB-INF/lib">
|
|
||||||
<fileset dir="${webapp.lib.dir}">
|
|
||||||
<include name="**/butterfly*.jar" />
|
|
||||||
<include name="**/rhino*.jar" />
|
|
||||||
<include name="**/commons-collections*.jar" />
|
|
||||||
<include name="**/velocity*.jar" />
|
|
||||||
<include name="**/lessen*.jar" />
|
|
||||||
<include name="**/slf4j*.jar" />
|
|
||||||
<include name="**/log4j*.jar" />
|
|
||||||
|
|
||||||
<include name="**/json*.jar" />
|
|
||||||
<include name="**/http*.jar" />
|
|
||||||
<include name="**/jcl*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="prepare_broker_appengine" depends="build_broker_appengine">
|
|
||||||
<mkdir dir="${built.broker.webapp.dir}/appengine" />
|
|
||||||
<mkdir dir="${built.broker.webapp.dir}/appengine/modules" />
|
|
||||||
|
|
||||||
<copy todir="${built.broker.webapp.dir}/appengine">
|
|
||||||
<fileset dir="${broker.appengine.dir}">
|
|
||||||
<include name="WEB-INF/**"/>
|
|
||||||
<exclude name="WEB-INF/jdo*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${built.broker.webapp.dir}/appengine/WEB-INF/classes/META-INF">
|
|
||||||
<fileset dir="${broker.appengine.dir}/WEB-INF">
|
|
||||||
<include name="jdo*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${built.broker.webapp.dir}/appengine/modules/appengine-broker">
|
|
||||||
<fileset dir="${broker.appengine.dir}/module">
|
|
||||||
<include name="**"/>
|
|
||||||
<exclude name="**/lib-src/**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${built.broker.webapp.dir}/appengine/modules/broker">
|
|
||||||
<fileset dir="${broker.core.dir}/module">
|
|
||||||
<include name="**"/>
|
|
||||||
<exclude name="**/lib-src/**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${built.broker.webapp.dir}/appengine/WEB-INF/lib">
|
|
||||||
<fileset dir="${webapp.lib.dir}">
|
|
||||||
<include name="**/butterfly*.jar" />
|
|
||||||
<include name="**/rhino*.jar" />
|
|
||||||
<include name="**/commons-collections*.jar" />
|
|
||||||
<include name="**/velocity*.jar" />
|
|
||||||
<include name="**/lessen*.jar" />
|
|
||||||
|
|
||||||
<include name="**/slf4j-api*.jar" />
|
|
||||||
<include name="**/jcl*.jar" />
|
|
||||||
|
|
||||||
<include name="**/json*.jar" />
|
|
||||||
<include name="**/http*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${built.broker.webapp.dir}/appengine/WEB-INF/lib" flatten="true">
|
|
||||||
<fileset dir="${appengine.sdk.dir}/lib/user">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<replace file="${built.broker.webapp.dir}/appengine/WEB-INF/appengine-web.xml">
|
|
||||||
<replacefilter token="$APPID" value="${appengine.app_id}"/>
|
|
||||||
<replacefilter token="$VERSION" value="${appengine.version}"/>
|
|
||||||
</replace>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<target name="clean_extensions">
|
|
||||||
<ant dir="extensions/" target="clean" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean" depends="clean_extensions">
|
|
||||||
<delete file="${build.dir}/${fullname}.jar" />
|
|
||||||
<delete file="${build.dir}/${fullname}-server.jar" />
|
|
||||||
<delete dir="${server.classes.dir}" />
|
|
||||||
<delete dir="${webapp.classes.dir}" />
|
|
||||||
<delete dir="${server.tests.classes.dir}" />
|
|
||||||
<delete dir="${broker.core.dir}/module/MOD-INF/classes" />
|
|
||||||
<delete dir="${broker.core.dir}/WEB-INF/lib" />
|
|
||||||
<delete dir="${broker.appengine.dir}/module/MOD-INF/classes" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="distclean" depends="clean">
|
|
||||||
<delete dir="${build.dir}" />
|
|
||||||
<delete dir="${dist.dir}" />
|
|
||||||
<delete dir="${tools.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine Extensions Build File
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="openrefine-extensions" default="build" basedir=".">
|
|
||||||
<target name="build">
|
|
||||||
<echo message="Building extensions" />
|
|
||||||
<ant dir="sample/" target="build" />
|
|
||||||
<ant dir="jython/" target="build" />
|
|
||||||
<ant dir="gdata/" target="build" />
|
|
||||||
<ant dir="pc-axis/" target="build" />
|
|
||||||
<ant dir="database/" target="build" />
|
|
||||||
<ant dir="wikidata/" target="build" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<echo message="cleaning extensions" />
|
|
||||||
<ant dir="sample/" target="clean" />
|
|
||||||
<ant dir="jython/" target="clean" />
|
|
||||||
<ant dir="gdata/" target="clean" />
|
|
||||||
<ant dir="pc-axis/" target="clean" />
|
|
||||||
<ant dir="database/" target="clean" />
|
|
||||||
<ant dir="wikidata/" target="clean" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test">
|
|
||||||
<echo message="Testing extensions" />
|
|
||||||
<ant dir="jython/" target="test" />
|
|
||||||
<ant dir="database/" target="test" />
|
|
||||||
<ant dir="wikidata/" target="test" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
@ -1,165 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine Database Extension Build File
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="refine-database-extension" default="build" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
|
|
||||||
|
|
||||||
<property environment="env"/>
|
|
||||||
|
|
||||||
<condition property="version" value="trunk">
|
|
||||||
<not><isset property="version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="revision" value="rXXXX">
|
|
||||||
<not><isset property="revision"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="full_version" value="0.0.0.0">
|
|
||||||
<not><isset property="full_version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="dist.dir" value="dist">
|
|
||||||
<not><isset property="dist.dir"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<property name="fullname" value="${name}-${version}-${revision}" />
|
|
||||||
<property name="java_version" value="1.8"/>
|
|
||||||
|
|
||||||
<property name="refine.dir" value="${basedir}/../../main" />
|
|
||||||
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
|
|
||||||
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
|
|
||||||
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
|
|
||||||
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
|
|
||||||
<property name="refine.tests.lib.dir" value="${refine.dir}/tests/server/lib" />
|
|
||||||
|
|
||||||
<property name="src.dir" value="${basedir}/src" />
|
|
||||||
<property name="module.dir" value="${basedir}/module" />
|
|
||||||
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
|
|
||||||
<property name="lib.dir" value="${modinf.dir}/lib" />
|
|
||||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
|
||||||
|
|
||||||
<property name="test.dir" value="${basedir}/test" />
|
|
||||||
<property name="test.src.dir" value="${test.dir}"/>
|
|
||||||
|
|
||||||
<property name="test.out.dir" value="${basedir}/test-out" />
|
|
||||||
<property name="test.build.dir" value="${test.out.dir}/build" />
|
|
||||||
|
|
||||||
<property name="test.classes.dir" value="${test.out.dir}/classes" />
|
|
||||||
<property name="test.report.dir" value="${test.out.dir}/report"/>
|
|
||||||
<property name="test.report.html.dir" value="${test.report.dir}/html"/>
|
|
||||||
<property name="test.report.xml.path" value="${test.report.dir}/jacoco.xml"/>
|
|
||||||
|
|
||||||
<path id="class.path">
|
|
||||||
<fileset dir="${lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${refine.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${refine.classes.dir}"/>
|
|
||||||
<pathelement path="${classes.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="extension.tests.class.path">
|
|
||||||
<path refid="class.path"/>
|
|
||||||
<pathelement location="${test.classes.dir}"/>
|
|
||||||
<pathelement location="${refine.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<fileset dir="${refine.tests.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<taskdef resource="testngtasks" classpath="${refine.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
|
|
||||||
<classpath path="${refine.tests.lib.dir}/jacocoant.jar"/>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<target name="build_java">
|
|
||||||
<mkdir dir="${classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${src.dir}"/>
|
|
||||||
<classpath refid="class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_java"/>
|
|
||||||
|
|
||||||
<target name="build_tests" depends="clean, build">
|
|
||||||
<mkdir dir="${test.classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" srcdir="${test.src.dir}" destdir="${test.classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<classpath refid="extension.tests.class.path" />
|
|
||||||
</javac>
|
|
||||||
<copy file="${test.src.dir}/log4j-test.properties" tofile="${test.classes.dir}/log4j-test.properties"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<mkdir dir="${test.build.dir}" />
|
|
||||||
|
|
||||||
<target name="test" depends="build_tests">
|
|
||||||
<jacoco:coverage destfile="${test.report.dir}/jacoco.exec">
|
|
||||||
<testng verbose="2" haltOnFailure="true" workingdir="${test.build.dir}"
|
|
||||||
listener="org.testng.reporters.DotTestListener"
|
|
||||||
classpathref="extension.tests.class.path">
|
|
||||||
<xmlfileset file="${test.src.dir}/conf/tests.xml"/>
|
|
||||||
</testng>
|
|
||||||
</jacoco:coverage>
|
|
||||||
<jacoco:report>
|
|
||||||
<executiondata>
|
|
||||||
<file file="${test.report.dir}/jacoco.exec"/>
|
|
||||||
</executiondata>
|
|
||||||
|
|
||||||
<structure name="Database extension">
|
|
||||||
<classfiles>
|
|
||||||
<fileset dir="${classes.dir}"/>
|
|
||||||
</classfiles>
|
|
||||||
<sourcefiles encoding="UTF-8">
|
|
||||||
<fileset dir="${src.dir}"/>
|
|
||||||
</sourcefiles>
|
|
||||||
</structure>
|
|
||||||
<html destdir="${test.report.html.dir}"/>
|
|
||||||
<xml destfile="${test.report.xml.path}"/>
|
|
||||||
</jacoco:report>
|
|
||||||
</target>
|
|
||||||
<target name="dist" depends="build">
|
|
||||||
<mkdir dir="${ext.dir}"/>
|
|
||||||
|
|
||||||
<copy todir="${ext.dir}/module">
|
|
||||||
<fileset dir="module">
|
|
||||||
<include name="**/*"/>
|
|
||||||
<exclude name="**/lib-src/*"/>
|
|
||||||
<exclude name="**/src/*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${ext.dir}/licenses">
|
|
||||||
<fileset dir="${basedir}/licenses">
|
|
||||||
<include name="**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy file="${basedir}/LICENSE.txt" tofile="${ext.dir}/LICENSE.txt"/>
|
|
||||||
<copy file="${basedir}/README.txt" tofile="${ext.dir}/README.txt"/>
|
|
||||||
|
|
||||||
<zip destfile="${dist.dir}/openrefine-${fullname}.zip">
|
|
||||||
<zipfileset dir="${ext.dir}/..">
|
|
||||||
<include name="**/**"/>
|
|
||||||
</zipfileset>
|
|
||||||
</zip>
|
|
||||||
|
|
||||||
<delete dir="${ext.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${classes.dir}" />
|
|
||||||
<delete dir="${test.out.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="distclean">
|
|
||||||
<delete dir="${dist.dir}" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
189
extensions/database/pom.xml
Normal file
189
extensions/database/pom.xml
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>database</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - Database extension</name>
|
||||||
|
<description>Connections to SQL databases for import and export</description>
|
||||||
|
<url>http://openrefine.org/</url>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>openrefine-database</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<testSourceDirectory>tests/src</testSourceDirectory>
|
||||||
|
<outputDirectory>module/MOD-INF/classes</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.0</version>
|
||||||
|
<configuration>
|
||||||
|
<suiteXmlFiles>
|
||||||
|
<suiteXmlFile>tests/conf/tests.xml</suiteXmlFile>
|
||||||
|
</suiteXmlFiles>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>module/MOD-INF/lib</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>module/MOD-INF/lib</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>42.1.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.http-client</groupId>
|
||||||
|
<artifactId>google-http-client-jackson2</artifactId>
|
||||||
|
<version>1.24.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.46</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jasypt</groupId>
|
||||||
|
<artifactId>jasypt</artifactId>
|
||||||
|
<version>1.9.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mariadb.jdbc</groupId>
|
||||||
|
<artifactId>mariadb-java-client</artifactId>
|
||||||
|
<version>2.2.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>2.9.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>2.9.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>6.9.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mockito</groupId>
|
||||||
|
<artifactId>mockito-core</artifactId>
|
||||||
|
<version>2.8.9</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -34,10 +34,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ListIterator;
|
import java.util.ListIterator;
|
||||||
|
|
||||||
import org.codehaus.jackson.JsonGenerationException;
|
import com.fasterxml.jackson.core.JsonGenerationException;
|
||||||
import org.codehaus.jackson.JsonParseException;
|
import com.fasterxml.jackson.core.JsonParseException;
|
||||||
import org.codehaus.jackson.map.JsonMappingException;
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.json.JSONWriter;
|
import org.json.JSONWriter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.json.JSONWriter;
|
import org.json.JSONWriter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.json.JSONWriter;
|
import org.json.JSONWriter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<exclude name="requiresPgSQL"/>
|
<exclude name="requiresPgSQL"/>
|
||||||
<exclude name="requiresMariaDB" />
|
<exclude name="requiresMariaDB" />
|
||||||
</run>
|
</run>
|
||||||
</groups>
|
</groups> <!--
|
||||||
<classes>
|
<classes>
|
||||||
<class name="com.google.refine.extension.database.DatabaseImportControllerTest"/>
|
<class name="com.google.refine.extension.database.DatabaseImportControllerTest"/>
|
||||||
<class name="com.google.refine.extension.database.DatabaseServiceTest"/>
|
<class name="com.google.refine.extension.database.DatabaseServiceTest"/>
|
||||||
@ -51,6 +51,10 @@
|
|||||||
<class name="com.google.refine.extension.database.mysql.MySQLDatabaseServiceTest"/>
|
<class name="com.google.refine.extension.database.mysql.MySQLDatabaseServiceTest"/>
|
||||||
<class name="com.google.refine.extension.database.pgsql.PgSQLConnectionManagerTest"/>
|
<class name="com.google.refine.extension.database.pgsql.PgSQLConnectionManagerTest"/>
|
||||||
<class name="com.google.refine.extension.database.pgsql.PgSQLDatabaseServiceTest" />
|
<class name="com.google.refine.extension.database.pgsql.PgSQLDatabaseServiceTest" />
|
||||||
</classes>
|
</classes> -->
|
||||||
|
<packages>
|
||||||
|
<package name="org.openrefine.wikidata.*" />
|
||||||
|
</packages>
|
||||||
|
|
||||||
</test>
|
</test>
|
||||||
</suite>
|
</suite>
|
@ -13,7 +13,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.apache.commons.lang.text.StrSubstitutor;
|
import org.apache.commons.lang3.text.StrSubstitutor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
@ -1,96 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine GData Extension Build File
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="grefine-gdata-extension" default="build" basedir=".">
|
|
||||||
|
|
||||||
<tstamp/>
|
|
||||||
<property name="name" value="gdata-extension"/>
|
|
||||||
<property name="version" value="0.1"/>
|
|
||||||
<property name="revision" value="${DSTAMP}${TSTAMP}"/>
|
|
||||||
<property name="dist.dir" value="dist"/>
|
|
||||||
<property name="ext.dir" value="${dist.dir}/${name}"/>
|
|
||||||
<property name="fullname" value="${name}-${version}-${revision}" />
|
|
||||||
|
|
||||||
<property name="refine.dir" value="${basedir}/../../main" />
|
|
||||||
<!-- We assume that we're a parallel project in an Eclipse workspace.
|
|
||||||
If you're using the SVN layout instead, you want something like:
|
|
||||||
<property name="refine.dir" value="${basedir}/../grefine-all/main" />
|
|
||||||
<property name="server.lib.dir" value="${basedir}/../grefine-all/server/lib" />
|
|
||||||
-->
|
|
||||||
<property name="server.lib.dir" value="${basedir}/../grefine-server/lib" />
|
|
||||||
|
|
||||||
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
|
|
||||||
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
|
|
||||||
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
|
|
||||||
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
|
|
||||||
|
|
||||||
<property name="src.dir" value="${basedir}/src" />
|
|
||||||
<property name="module.dir" value="${basedir}/module" />
|
|
||||||
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
|
|
||||||
<property name="lib.dir" value="${modinf.dir}/lib" />
|
|
||||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
|
||||||
|
|
||||||
<path id="class.path">
|
|
||||||
<fileset dir="${lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${refine.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${refine.classes.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<target name="build_java">
|
|
||||||
<mkdir dir="${classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${src.dir}"/>
|
|
||||||
<classpath refid="class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_java"/>
|
|
||||||
|
|
||||||
<target name="dist" depends="build">
|
|
||||||
<mkdir dir="${ext.dir}"/>
|
|
||||||
|
|
||||||
<copy todir="${ext.dir}/module">
|
|
||||||
<fileset dir="module">
|
|
||||||
<include name="**/*"/>
|
|
||||||
<exclude name="**/lib-src/*"/>
|
|
||||||
<exclude name="**/src/*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${ext.dir}/licenses">
|
|
||||||
<fileset dir="${basedir}/licenses">
|
|
||||||
<include name="**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy file="${basedir}/LICENSE.txt" tofile="${ext.dir}/LICENSE.txt"/>
|
|
||||||
<copy file="${basedir}/README.txt" tofile="${ext.dir}/README.txt"/>
|
|
||||||
|
|
||||||
<zip destfile="${dist.dir}/openrefine-${fullname}.zip">
|
|
||||||
<zipfileset dir="${ext.dir}/..">
|
|
||||||
<include name="**/**"/>
|
|
||||||
</zipfileset>
|
|
||||||
</zip>
|
|
||||||
|
|
||||||
<delete dir="${ext.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${classes.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="distclean">
|
|
||||||
<delete dir="${dist.dir}" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
170
extensions/gdata/pom.xml
Normal file
170
extensions/gdata/pom.xml
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>gdata</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - Gdata extension</name>
|
||||||
|
<description>Connects with Google services for data import and export</description>
|
||||||
|
<url>http://openrefine.org/</url>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>openrefine-gdata</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<testSourceDirectory>tests/src</testSourceDirectory>
|
||||||
|
<outputDirectory>module/MOD-INF/classes</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.0</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>module/MOD-INF/lib</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>module/MOD-INF/lib</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
<excludeGroupIds>org.mortbay.jetty</excludeGroupIds>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.http-client</groupId>
|
||||||
|
<artifactId>google-http-client-jackson2</artifactId>
|
||||||
|
<version>1.24.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.oauth-client</groupId>
|
||||||
|
<artifactId>google-oauth-client-jetty</artifactId>
|
||||||
|
<version>1.24.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.apis</groupId>
|
||||||
|
<artifactId>google-api-services-fusiontables</artifactId>
|
||||||
|
<version>v2-rev27-1.24.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.apis</groupId>
|
||||||
|
<artifactId>google-api-services-drive</artifactId>
|
||||||
|
<version>v3-rev126-1.24.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.apis</groupId>
|
||||||
|
<artifactId>google-api-services-sheets</artifactId>
|
||||||
|
<version>v4-rev536-1.24.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.api.client</groupId>
|
||||||
|
<artifactId>google-api-client</artifactId>
|
||||||
|
<version>1.4.1-beta</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>6.9.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -1,131 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine Extension Jython Build File
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="refine-jython" default="build" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
|
|
||||||
|
|
||||||
<property environment="env"/>
|
|
||||||
|
|
||||||
<condition property="version" value="trunk">
|
|
||||||
<not><isset property="version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="revision" value="rXXXX">
|
|
||||||
<not><isset property="revision"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="full_version" value="0.0.0.0">
|
|
||||||
<not><isset property="full_version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="dist.dir" value="dist">
|
|
||||||
<not><isset property="dist.dir"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<property name="fullname" value="${name}-${version}-${revision}" />
|
|
||||||
<property name="java_version" value="1.8"/>
|
|
||||||
|
|
||||||
<property name="refine.dir" value="${basedir}/../../main" />
|
|
||||||
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
|
|
||||||
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
|
|
||||||
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
|
|
||||||
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
|
|
||||||
<property name="refine.tests.lib.dir" value="${refine.dir}/tests/server/lib" />
|
|
||||||
|
|
||||||
<property name="src.dir" value="${basedir}/src" />
|
|
||||||
<property name="module.dir" value="${basedir}/module" />
|
|
||||||
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
|
|
||||||
<property name="lib.dir" value="${modinf.dir}/lib" />
|
|
||||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
|
||||||
|
|
||||||
<property name="extension.tests.dir" value="${basedir}/tests" />
|
|
||||||
<property name="tests.build.dir" value="${extension.tests.dir}/build" />
|
|
||||||
<property name="tests.src.dir" value="${extension.tests.dir}/src" />
|
|
||||||
<property name="tests.classes.dir" value="${extension.tests.dir}/classes" />
|
|
||||||
<property name="tests.report.dir" value="${extension.tests.dir}/report"/>
|
|
||||||
<property name="tests.report.html.dir" value="${tests.report.dir}/html"/>
|
|
||||||
<property name="tests.report.xml.path" value="${tests.report.dir}/jacoco.xml"/>
|
|
||||||
|
|
||||||
<path id="class.path">
|
|
||||||
<fileset dir="${lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${refine.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${refine.classes.dir}"/>
|
|
||||||
<pathelement path="${classes.dir}" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="extension.tests.class.path">
|
|
||||||
<path refid="class.path"/>
|
|
||||||
<pathelement location="${tests.classes.dir}"/>
|
|
||||||
<pathelement location="${refine.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<fileset dir="${refine.tests.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
|
|
||||||
<taskdef resource="testngtasks" classpath="${refine.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
|
|
||||||
<classpath path="${refine.tests.lib.dir}/jacocoant.jar"/>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<target name="build_java">
|
|
||||||
<mkdir dir="${classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${src.dir}"/>
|
|
||||||
<classpath refid="class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_java"/>
|
|
||||||
|
|
||||||
<target name="build_tests" depends="build">
|
|
||||||
<mkdir dir="${tests.classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" srcdir="${tests.src.dir}" destdir="${tests.classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<classpath refid="extension.tests.class.path" />
|
|
||||||
</javac>
|
|
||||||
<copy file="${tests.src.dir}/tests.log4j.properties" tofile="${tests.classes.dir}/tests.log4j.properties"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<mkdir dir="${tests.build.dir}" />
|
|
||||||
<target name="test" depends="build_tests">
|
|
||||||
<jacoco:coverage destfile="${tests.report.dir}/jacoco.exec">
|
|
||||||
<testng verbose="2" haltOnFailure="true" workingdir="${tests.build.dir}"
|
|
||||||
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
|
|
||||||
classpathref="extension.tests.class.path">
|
|
||||||
<xmlfileset file="${extension.tests.dir}/conf/tests.xml"/>
|
|
||||||
</testng>
|
|
||||||
</jacoco:coverage>
|
|
||||||
<jacoco:report>
|
|
||||||
<executiondata>
|
|
||||||
<file file="${tests.report.dir}/jacoco.exec"/>
|
|
||||||
</executiondata>
|
|
||||||
|
|
||||||
<structure name="Jython extension">
|
|
||||||
<classfiles>
|
|
||||||
<fileset dir="${classes.dir}"/>
|
|
||||||
</classfiles>
|
|
||||||
<sourcefiles encoding="UTF-8">
|
|
||||||
<fileset dir="${src.dir}"/>
|
|
||||||
</sourcefiles>
|
|
||||||
</structure>
|
|
||||||
<html destdir="${tests.report.html.dir}"/>
|
|
||||||
<xml destfile="${tests.report.xml.path}"/>
|
|
||||||
</jacoco:report>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${classes.dir}" />
|
|
||||||
<delete dir="${tests.classes.dir}" />
|
|
||||||
<delete dir="${tests.report.dir}" />
|
|
||||||
<delete dir="${tests.build.dir}" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
Binary file not shown.
137
extensions/jython/pom.xml
Normal file
137
extensions/jython/pom.xml
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>jython</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - Jython extension</name>
|
||||||
|
<description>OpenRefine integration of Python as an expression language</description>
|
||||||
|
<url>http://openrefine.org/</url>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>openrefine-jython</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<testSourceDirectory>tests/src</testSourceDirectory>
|
||||||
|
<outputDirectory>module/MOD-INF/classes</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.0</version>
|
||||||
|
<configuration>
|
||||||
|
<suiteXmlFiles>
|
||||||
|
<suiteXmlFile>tests/conf/tests.xml</suiteXmlFile>
|
||||||
|
</suiteXmlFiles>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>module/MOD-INF/lib</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>module/MOD-INF/lib</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.python</groupId>
|
||||||
|
<artifactId>jython-standalone</artifactId>
|
||||||
|
<version>2.7.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>6.9.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -1,97 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine PC Axis extension build file
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="refine-pc-axis" default="build" basedir=".">
|
|
||||||
<property environment="env"/>
|
|
||||||
|
|
||||||
<condition property="version" value="trunk">
|
|
||||||
<not><isset property="version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="revision" value="rXXXX">
|
|
||||||
<not><isset property="revision"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="full_version" value="0.0.0.0">
|
|
||||||
<not><isset property="full_version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="dist.dir" value="dist">
|
|
||||||
<not><isset property="dist.dir"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<property name="fullname" value="${name}-${version}-${revision}" />
|
|
||||||
|
|
||||||
<property name="refine.dir" value="${basedir}/../../main" />
|
|
||||||
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
|
|
||||||
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
|
|
||||||
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
|
|
||||||
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
|
|
||||||
<property name="server.dir" value="${basedir}/../../server" />
|
|
||||||
<property name="server.lib.dir" value="${server.dir}/lib" />
|
|
||||||
|
|
||||||
<property name="src.dir" value="${basedir}/src" />
|
|
||||||
<property name="module.dir" value="${basedir}/module" />
|
|
||||||
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
|
|
||||||
<property name="lib.dir" value="${modinf.dir}/lib" />
|
|
||||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
|
||||||
|
|
||||||
<path id="class.path">
|
|
||||||
<fileset dir="${refine.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${refine.classes.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<target name="build_java">
|
|
||||||
<mkdir dir="${classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${src.dir}"/>
|
|
||||||
<classpath refid="class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_java"/>
|
|
||||||
|
|
||||||
<target name="dist" depends="build">
|
|
||||||
<mkdir dir="${ext.dir}"/>
|
|
||||||
|
|
||||||
<copy todir="${ext.dir}/module">
|
|
||||||
<fileset dir="module">
|
|
||||||
<include name="**/*.*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy todir="${ext.dir}/licenses">
|
|
||||||
<fileset dir="${basedir}/licenses">
|
|
||||||
<include name="**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy file="${basedir}/LICENSE.txt" tofile="${ext.dir}/LICENSE.txt"/>
|
|
||||||
<copy file="${basedir}/README.txt" tofile="${ext.dir}/README.txt"/>
|
|
||||||
|
|
||||||
<zip destfile="${dist.dir}/openrefine-${fullname}.zip">
|
|
||||||
<zipfileset dir="${ext.dir}/..">
|
|
||||||
<include name="**/**"/>
|
|
||||||
</zipfileset>
|
|
||||||
</zip>
|
|
||||||
|
|
||||||
<delete dir="${ext.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${classes.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="distclean">
|
|
||||||
<delete dir="${dist.dir}" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
130
extensions/pc-axis/pom.xml
Normal file
130
extensions/pc-axis/pom.xml
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>pc-axis</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - PC-axis extension</name>
|
||||||
|
<description>OpenRefine integration of PC-axis</description>
|
||||||
|
<url>http://openrefine.org/</url>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>openrefine-pcaxis</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<testSourceDirectory>tests/src</testSourceDirectory>
|
||||||
|
<outputDirectory>module/MOD-INF/classes</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.0</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>module/MOD-INF/lib</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>module/MOD-INF/lib</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>6.9.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
29
extensions/pom.xml
Normal file
29
extensions/pom.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - extensions</name>
|
||||||
|
<description>Extensions add importers, exporters and other sorts of features to OpenRefine</description>
|
||||||
|
<url>http://openrefine.org/</url>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>openrefine</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>jython</module>
|
||||||
|
<module>wikidata</module>
|
||||||
|
<module>database</module>
|
||||||
|
<module>gdata</module>
|
||||||
|
<module>pc-axis</module>
|
||||||
|
<!-- Add new extensions here -->
|
||||||
|
</modules>
|
||||||
|
</project>
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--+
|
|
||||||
|
|
|
||||||
| OpenRefine Extension Sample Extension Build File
|
|
||||||
|
|
|
||||||
+-->
|
|
||||||
|
|
||||||
<project name="refine-sample-extension" default="build" basedir=".">
|
|
||||||
|
|
||||||
<property environment="env"/>
|
|
||||||
|
|
||||||
<condition property="version" value="trunk">
|
|
||||||
<not><isset property="version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="revision" value="rXXXX">
|
|
||||||
<not><isset property="revision"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="full_version" value="0.0.0.0">
|
|
||||||
<not><isset property="full_version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="dist.dir" value="dist">
|
|
||||||
<not><isset property="dist.dir"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<property name="fullname" value="${name}-${version}-${revision}" />
|
|
||||||
|
|
||||||
<property name="refine.dir" value="${basedir}/../../main" />
|
|
||||||
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
|
|
||||||
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
|
|
||||||
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
|
|
||||||
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
|
|
||||||
<property name="server.dir" value="${basedir}/../../server" />
|
|
||||||
<property name="server.lib.dir" value="${server.dir}/lib" />
|
|
||||||
|
|
||||||
<property name="src.dir" value="${basedir}/src" />
|
|
||||||
<property name="module.dir" value="${basedir}/module" />
|
|
||||||
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
|
|
||||||
<property name="lib.dir" value="${modinf.dir}/lib" />
|
|
||||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
|
||||||
|
|
||||||
<path id="class.path">
|
|
||||||
<fileset dir="${lib.dir}" erroronmissingdir="false">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${refine.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${refine.classes.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<target name="build_java">
|
|
||||||
<mkdir dir="${classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${src.dir}"/>
|
|
||||||
<classpath refid="class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_java"/>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${classes.dir}" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
122
extensions/sample/pom.xml
Normal file
122
extensions/sample/pom.xml
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>sample</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - Sample extension</name>
|
||||||
|
<description>Example extension provided for demonstration purposes</description>
|
||||||
|
<url>http://openrefine.org/</url>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>openrefine-sample</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<outputDirectory>module/MOD-INF/classes</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>module/MOD-INF/lib</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>module/MOD-INF/lib</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- add here the dependencies of your extension -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>6.9.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -1,133 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!-- Google Refine Wikidata Extension Build File +-->
|
|
||||||
|
|
||||||
<project name="refine-wikidata-extension" default="build" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
|
|
||||||
|
|
||||||
<property environment="env"/>
|
|
||||||
|
|
||||||
<condition property="version" value="trunk">
|
|
||||||
<not><isset property="version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="revision" value="rXXXX">
|
|
||||||
<not><isset property="revision"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="full_version" value="0.0.0.0">
|
|
||||||
<not><isset property="full_version"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition property="dist.dir" value="dist">
|
|
||||||
<not><isset property="dist.dir"/></not>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<property name="fullname" value="${name}-${version}-${revision}" />
|
|
||||||
<property name="java_version" value="1.8"/>
|
|
||||||
|
|
||||||
<property name="refine.dir" value="${basedir}/../../main" />
|
|
||||||
<property name="refine.webinf.dir" value="${refine.dir}/webapp/WEB-INF" />
|
|
||||||
<property name="refine.modinf.dir" value="${refine.dir}/webapp/modules/core/MOD-INF" />
|
|
||||||
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
|
|
||||||
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
|
|
||||||
<property name="server.dir" value="${basedir}/../../server" />
|
|
||||||
<property name="server.lib.dir" value="${server.dir}/lib" />
|
|
||||||
<property name="refine.tests.lib.dir" value="${refine.dir}/tests/server/lib" />
|
|
||||||
<property name="refine.tests.classes.dir" value="${refine.dir}/tests/server/classes" />
|
|
||||||
|
|
||||||
|
|
||||||
<property name="src.dir" value="${basedir}/src" />
|
|
||||||
<property name="module.dir" value="${basedir}/module" />
|
|
||||||
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
|
|
||||||
<property name="lib.dir" value="${modinf.dir}/lib" />
|
|
||||||
<property name="classes.dir" value="${modinf.dir}/classes" />
|
|
||||||
|
|
||||||
<property name="extension.tests.dir" value="${basedir}/tests" />
|
|
||||||
<property name="tests.build.dir" value="${extension.tests.dir}/build" />
|
|
||||||
<property name="tests.src.dir" value="${extension.tests.dir}/src" />
|
|
||||||
<property name="tests.classes.dir" value="${extension.tests.dir}/classes" />
|
|
||||||
<property name="tests.report.dir" value="${extension.tests.dir}/report"/>
|
|
||||||
<property name="tests.report.html.dir" value="${tests.report.dir}/html"/>
|
|
||||||
<property name="tests.report.xml.path" value="${tests.report.dir}/jacoco.xml"/>
|
|
||||||
|
|
||||||
<path id="class.path">
|
|
||||||
<fileset dir="${lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${refine.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${server.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${refine.classes.dir}"/>
|
|
||||||
<pathelement path="${classes.dir}" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<path id="extension.tests.class.path">
|
|
||||||
<path refid="class.path"/>
|
|
||||||
<pathelement location="${tests.classes.dir}"/>
|
|
||||||
<pathelement location="${refine.tests.classes.dir}"/>
|
|
||||||
<pathelement location="${refine.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<fileset dir="${refine.tests.lib.dir}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<taskdef resource="testngtasks" classpath="${refine.tests.lib.dir}/testng-6.8.jar"/>
|
|
||||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
|
|
||||||
<classpath path="${refine.tests.lib.dir}/jacocoant.jar"/>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<target name="build_java">
|
|
||||||
<mkdir dir="${classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<src path="${src.dir}"/>
|
|
||||||
<classpath refid="class.path" />
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build" depends="build_java"/>
|
|
||||||
|
|
||||||
<target name="build_tests" depends="build">
|
|
||||||
<mkdir dir="${tests.classes.dir}" />
|
|
||||||
<javac source="${java_version}" target="${java_version}" encoding="utf-8" srcdir="${tests.src.dir}" destdir="${tests.classes.dir}" debug="true" includeAntRuntime="no">
|
|
||||||
<classpath refid="extension.tests.class.path" />
|
|
||||||
</javac>
|
|
||||||
<copy file="${tests.src.dir}/tests.log4j.properties" tofile="${tests.classes.dir}/tests.log4j.properties"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test" depends="build_tests">
|
|
||||||
<jacoco:coverage destfile="${tests.report.dir}/jacoco.exec">
|
|
||||||
<testng verbose="2" haltOnFailure="true" workingdir="${extension.tests.dir}"
|
|
||||||
listener="org.testng.reporters.DotTestListener" excludedgroups="broken"
|
|
||||||
classpathref="extension.tests.class.path">
|
|
||||||
<xmlfileset file="${extension.tests.dir}/conf/tests.xml"/>
|
|
||||||
</testng>
|
|
||||||
</jacoco:coverage>
|
|
||||||
<jacoco:report>
|
|
||||||
<executiondata>
|
|
||||||
<file file="${tests.report.dir}/jacoco.exec"/>
|
|
||||||
</executiondata>
|
|
||||||
|
|
||||||
<structure name="Wikidata extension">
|
|
||||||
<classfiles>
|
|
||||||
<fileset dir="${classes.dir}" />
|
|
||||||
</classfiles>
|
|
||||||
<sourcefiles encoding="UTF-8">
|
|
||||||
<fileset dir="${src.dir}"/>
|
|
||||||
</sourcefiles>
|
|
||||||
</structure>
|
|
||||||
<html destdir="${tests.report.html.dir}"/>
|
|
||||||
<xml destfile="${tests.report.xml.path}"/>
|
|
||||||
</jacoco:report>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${classes.dir}" />
|
|
||||||
<delete dir="${tests.classes.dir}" />
|
|
||||||
<delete dir="${tests.report.dir}" />
|
|
||||||
<delete dir="${tests.build.dir}" />
|
|
||||||
</target>
|
|
||||||
</project>
|
|
||||||
|
|
209
extensions/wikidata/pom.xml
Normal file
209
extensions/wikidata/pom.xml
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
<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.openrefine</groupId>
|
||||||
|
<artifactId>wikidata</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>OpenRefine - Wikidata extension</name>
|
||||||
|
<description>Schema alignment and data upload for Wikidata</description>
|
||||||
|
<url>https://www.wikidata.org/wiki/Wikidata:Tools/OpenRefine</url>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.openrefine</groupId>
|
||||||
|
<artifactId>extensions</artifactId>
|
||||||
|
<version>3.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>openrefine-wikidata</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<testSourceDirectory>tests/src</testSourceDirectory>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>tests/data</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
<outputDirectory>module/MOD-INF/classes</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.8</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.0</version>
|
||||||
|
<configuration>
|
||||||
|
<suiteXmlFiles>
|
||||||
|
<suiteXmlFile>tests/conf/tests.xml</suiteXmlFile>
|
||||||
|
</suiteXmlFiles>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>module/MOD-INF/lib</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
|
<version>2.5.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>install-wdtk-datamodel</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<file>${basedir}/lib/wdtk-datamodel-0.9.0-SNAPSHOT-jar-with-dependencies.jar</file>
|
||||||
|
<repositoryLayout>default</repositoryLayout>
|
||||||
|
<groupId>org.wikidata.wdtk</groupId>
|
||||||
|
<artifactId>wdtk-datamodel</artifactId>
|
||||||
|
<version>0.9.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<generatePom>true</generatePom>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>install-file</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>install-wdtk-wikibaseapi</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<file>${basedir}/lib/wdtk-wikibaseapi-0.9.0-SNAPSHOT.jar</file>
|
||||||
|
<repositoryLayout>default</repositoryLayout>
|
||||||
|
<groupId>org.wikidata.wdtk</groupId>
|
||||||
|
<artifactId>wdtk-wikibaseapi</artifactId>
|
||||||
|
<version>0.9.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<generatePom>true</generatePom>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>install-file</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>module/MOD-INF/lib</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wikidata.wdtk</groupId>
|
||||||
|
<artifactId>wdtk-wikibaseapi</artifactId>
|
||||||
|
<version>0.9.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wikidata.wdtk</groupId>
|
||||||
|
<artifactId>wdtk-datamodel</artifactId>
|
||||||
|
<version>0.9.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- testing dependencies -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>main</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<classifier>tests</classifier>
|
||||||
|
<type>test-jar</type>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>6.9.10</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mockito</groupId>
|
||||||
|
<artifactId>mockito-core</artifactId>
|
||||||
|
<version>2.8.9</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -52,7 +52,7 @@ public class PreviewWikibaseSchemaCommandTest extends SchemaCommandTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testValidSchema()
|
public void testValidSchema()
|
||||||
throws JSONException, IOException, ServletException {
|
throws JSONException, IOException, ServletException {
|
||||||
String schemaJson = jsonFromFile("data/schema/inception.json").toString();
|
String schemaJson = jsonFromFile("schema/inception.json").toString();
|
||||||
when(request.getParameter("schema")).thenReturn(schemaJson);
|
when(request.getParameter("schema")).thenReturn(schemaJson);
|
||||||
|
|
||||||
command.doPost(request, response);
|
command.doPost(request, response);
|
||||||
|
@ -44,7 +44,7 @@ public class SaveWikibaseSchemaCommandTest extends SchemaCommandTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testValidSchema()
|
public void testValidSchema()
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
String schemaJson = jsonFromFile("data/schema/inception.json").toString();
|
String schemaJson = jsonFromFile("schema/inception.json").toString();
|
||||||
when(request.getParameter("schema")).thenReturn(schemaJson);
|
when(request.getParameter("schema")).thenReturn(schemaJson);
|
||||||
|
|
||||||
command.doPost(request, response);
|
command.doPost(request, response);
|
||||||
|
@ -70,7 +70,7 @@ public class QuickStatementsExporterTest extends RefineTest {
|
|||||||
throws JSONException, IOException {
|
throws JSONException, IOException {
|
||||||
Project project = this.createCSVProject(TestingData.inceptionWithNewCsv);
|
Project project = this.createCSVProject(TestingData.inceptionWithNewCsv);
|
||||||
TestingData.reconcileInceptionCells(project);
|
TestingData.reconcileInceptionCells(project);
|
||||||
JSONObject serialized = TestingData.jsonFromFile("data/schema/inception.json");
|
JSONObject serialized = TestingData.jsonFromFile("schema/inception.json");
|
||||||
WikibaseSchema schema = WikibaseSchema.reconstruct(serialized);
|
WikibaseSchema schema = WikibaseSchema.reconstruct(serialized);
|
||||||
project.overlayModels.put("wikibaseSchema", schema);
|
project.overlayModels.put("wikibaseSchema", schema);
|
||||||
Engine engine = new Engine(project);
|
Engine engine = new Engine(project);
|
||||||
|
@ -53,7 +53,7 @@ public class PerformWikibaseEditsOperationTest extends OperationTest {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject getJson()
|
public JSONObject getJson()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
return TestingData.jsonFromFile("data/operations/perform-edits.json");
|
return TestingData.jsonFromFile("operations/perform-edits.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expectedExceptions=IllegalArgumentException.class)
|
@Test(expectedExceptions=IllegalArgumentException.class)
|
||||||
|
@ -53,13 +53,13 @@ public class SaveWikibaseSchemaOperationTest extends OperationTest {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject getJson()
|
public JSONObject getJson()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
return TestingData.jsonFromFile("data/operations/save-schema.json");
|
return TestingData.jsonFromFile("operations/save-schema.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLoadChange()
|
public void testLoadChange()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
JSONObject schemaJson = TestingData.jsonFromFile("data/schema/inception.json");
|
JSONObject schemaJson = TestingData.jsonFromFile("schema/inception.json");
|
||||||
String changeString = "newSchema=" + schemaJson.toString() + "\n" + "oldSchema=\n" + "/ec/";
|
String changeString = "newSchema=" + schemaJson.toString() + "\n" + "oldSchema=\n" + "/ec/";
|
||||||
WikibaseSchema schema = WikibaseSchema.reconstruct(schemaJson);
|
WikibaseSchema schema = WikibaseSchema.reconstruct(schemaJson);
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public class WikibaseSchemaTest extends RefineTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testSerialize()
|
public void testSerialize()
|
||||||
throws JSONException, IOException {
|
throws JSONException, IOException {
|
||||||
JSONObject serialized = TestingData.jsonFromFile("data/schema/history_of_medicine.json");
|
JSONObject serialized = TestingData.jsonFromFile("schema/history_of_medicine.json");
|
||||||
WikibaseSchema parsed = WikibaseSchema.reconstruct(serialized);
|
WikibaseSchema parsed = WikibaseSchema.reconstruct(serialized);
|
||||||
StringWriter writer = new StringWriter();
|
StringWriter writer = new StringWriter();
|
||||||
JSONWriter jsonWriter = new JSONWriter(writer);
|
JSONWriter jsonWriter = new JSONWriter(writer);
|
||||||
@ -108,7 +108,7 @@ public class WikibaseSchemaTest extends RefineTest {
|
|||||||
writer.close();
|
writer.close();
|
||||||
JSONObject newSerialized = ParsingUtilities.evaluateJsonStringToObject(writer.toString());
|
JSONObject newSerialized = ParsingUtilities.evaluateJsonStringToObject(writer.toString());
|
||||||
// toString because it looks like JSONObject equality isn't great…
|
// toString because it looks like JSONObject equality isn't great…
|
||||||
assertEquals(TestingData.jsonFromFile("data/schema/history_of_medicine_normalized.json").toString(),
|
assertEquals(TestingData.jsonFromFile("schema/history_of_medicine_normalized.json").toString(),
|
||||||
newSerialized.toString());
|
newSerialized.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,14 +117,14 @@ public class WikibaseSchemaTest extends RefineTest {
|
|||||||
throws JSONException, IOException {
|
throws JSONException, IOException {
|
||||||
// this json file was generated by an earlier version of the software
|
// this json file was generated by an earlier version of the software
|
||||||
// it contains extra "type" fields that are now ignored.
|
// it contains extra "type" fields that are now ignored.
|
||||||
JSONObject serialized = TestingData.jsonFromFile("data/schema/roarmap.json");
|
JSONObject serialized = TestingData.jsonFromFile("schema/roarmap.json");
|
||||||
WikibaseSchema.reconstruct(serialized);
|
WikibaseSchema.reconstruct(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEvaluate()
|
public void testEvaluate()
|
||||||
throws JSONException, IOException {
|
throws JSONException, IOException {
|
||||||
JSONObject serialized = TestingData.jsonFromFile("data/schema/inception.json");
|
JSONObject serialized = TestingData.jsonFromFile("schema/inception.json");
|
||||||
WikibaseSchema schema = WikibaseSchema.reconstruct(serialized);
|
WikibaseSchema schema = WikibaseSchema.reconstruct(serialized);
|
||||||
Engine engine = new Engine(project);
|
Engine engine = new Engine(project);
|
||||||
List<ItemUpdate> updates = schema.evaluate(project, engine);
|
List<ItemUpdate> updates = schema.evaluate(project, engine);
|
||||||
@ -146,7 +146,7 @@ public class WikibaseSchemaTest extends RefineTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testEvaluateRespectsFacets()
|
public void testEvaluateRespectsFacets()
|
||||||
throws JSONException, IOException {
|
throws JSONException, IOException {
|
||||||
JSONObject serialized = TestingData.jsonFromFile("data/schema/inception.json");
|
JSONObject serialized = TestingData.jsonFromFile("schema/inception.json");
|
||||||
WikibaseSchema schema = WikibaseSchema.reconstruct(serialized);
|
WikibaseSchema schema = WikibaseSchema.reconstruct(serialized);
|
||||||
Engine engine = new Engine(project);
|
Engine engine = new Engine(project);
|
||||||
JSONObject engineConfig = new JSONObject("{\n" + " \"mode\": \"row-based\",\n" + " \"facets\": [\n"
|
JSONObject engineConfig = new JSONObject("{\n" + " \"mode\": \"row-based\",\n" + " \"facets\": [\n"
|
||||||
|
@ -24,10 +24,12 @@
|
|||||||
package org.openrefine.wikidata.testing;
|
package org.openrefine.wikidata.testing;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.openrefine.wikidata.schema.WbLanguageConstant;
|
import org.openrefine.wikidata.schema.WbLanguageConstant;
|
||||||
@ -133,8 +135,8 @@ public class TestingData {
|
|||||||
|
|
||||||
public static JSONObject jsonFromFile(String filename)
|
public static JSONObject jsonFromFile(String filename)
|
||||||
throws IOException, JSONException {
|
throws IOException, JSONException {
|
||||||
byte[] contents = Files.readAllBytes(Paths.get(filename));
|
InputStream f = TestingData.class.getClassLoader().getResourceAsStream(filename);
|
||||||
String decoded = new String(contents, "utf-8");
|
String decoded = IOUtils.toString(f);
|
||||||
return ParsingUtilities.evaluateJsonStringToObject(decoded);
|
return ParsingUtilities.evaluateJsonStringToObject(decoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user