From 90a24bf2fd6be489e6592a58940d400a0a8017b4 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Thu, 20 Sep 2018 12:07:26 +0200 Subject: [PATCH 1/5] Moved src/** to core/src/** --- .../src}/main/java/com/schibsted/spt/data/jslt/Callable.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/Expression.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/Function.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/FunctionUtils.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/JsltException.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/Module.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/Parser.java | 0 .../main/java/com/schibsted/spt/data/jslt/ResourceResolver.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/cli/JSLT.java | 0 .../java/com/schibsted/spt/data/jslt/impl/AbstractCallable.java | 0 .../spt/data/jslt/impl/AbstractInvocationExpression.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/AbstractNode.java | 0 .../java/com/schibsted/spt/data/jslt/impl/AbstractOperator.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/AndOperator.java | 0 .../java/com/schibsted/spt/data/jslt/impl/ArrayExpression.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/ArraySlicer.java | 0 .../java/com/schibsted/spt/data/jslt/impl/BiggerComparison.java | 0 .../com/schibsted/spt/data/jslt/impl/BiggerOrEqualComparison.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/BoundedCache.java | 0 .../java/com/schibsted/spt/data/jslt/impl/BuiltinFunctions.java | 0 .../schibsted/spt/data/jslt/impl/ClasspathResourceResolver.java | 0 .../java/com/schibsted/spt/data/jslt/impl/ComparisonOperator.java | 0 .../java/com/schibsted/spt/data/jslt/impl/DivideOperator.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/DotExpression.java | 0 .../java/com/schibsted/spt/data/jslt/impl/EqualsComparison.java | 0 .../java/com/schibsted/spt/data/jslt/impl/ExperimentalModule.java | 0 .../java/com/schibsted/spt/data/jslt/impl/ExpressionImpl.java | 0 .../java/com/schibsted/spt/data/jslt/impl/ExpressionNode.java | 0 .../java/com/schibsted/spt/data/jslt/impl/FailDotExpression.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/ForExpression.java | 0 .../com/schibsted/spt/data/jslt/impl/FunctionDeclaration.java | 0 .../java/com/schibsted/spt/data/jslt/impl/FunctionExpression.java | 0 .../java/com/schibsted/spt/data/jslt/impl/FunctionWrapper.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/IfExpression.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/impl/JstlFile.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/LetExpression.java | 0 .../java/com/schibsted/spt/data/jslt/impl/LiteralExpression.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/impl/Location.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/impl/Macro.java | 0 .../java/com/schibsted/spt/data/jslt/impl/MacroExpression.java | 0 .../java/com/schibsted/spt/data/jslt/impl/MatcherExpression.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/MinusOperator.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/ModuleImpl.java | 0 .../java/com/schibsted/spt/data/jslt/impl/MultiplyOperator.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/NodeUtils.java | 0 .../java/com/schibsted/spt/data/jslt/impl/NumericOperator.java | 0 .../com/schibsted/spt/data/jslt/impl/ObjectComprehension.java | 0 .../java/com/schibsted/spt/data/jslt/impl/ObjectExpression.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/OrOperator.java | 0 .../java/com/schibsted/spt/data/jslt/impl/PairExpression.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/ParseContext.java | 0 .../main/java/com/schibsted/spt/data/jslt/impl/PlusOperator.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/impl/Scope.java | 0 .../java/com/schibsted/spt/data/jslt/impl/SmallerComparison.java | 0 .../schibsted/spt/data/jslt/impl/SmallerOrEqualsComparison.java | 0 .../java/com/schibsted/spt/data/jslt/impl/UnequalsComparison.java | 0 .../java/com/schibsted/spt/data/jslt/impl/VariableExpression.java | 0 .../com/schibsted/spt/data/jslt/impl/lambda/LambdaFunction.java | 0 .../src}/main/java/com/schibsted/spt/data/jslt/impl/package.html | 0 .../main/java/com/schibsted/spt/data/jslt/parser/ParserImpl.java | 0 {src => core/src}/main/javacc/jslt.jj | 0 .../java/com/schibsted/spt/data/jslt/FunctionDeclarationTest.java | 0 .../java/com/schibsted/spt/data/jslt/FunctionWrapperTest.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/ImportTest.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/JsltTest.java | 0 .../test/java/com/schibsted/spt/data/jslt/JsonParseErrorTest.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/JsonParseTest.java | 0 .../test/java/com/schibsted/spt/data/jslt/QueryErrorTest.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/QueryTest.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/StaticTests.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/TemplateTest.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/TestBase.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/TestFunction.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/TestUtils.java | 0 .../src}/test/java/com/schibsted/spt/data/jslt/ToStringTest.java | 0 {src => core/src}/test/resources/a-1.jstl | 0 {src => core/src}/test/resources/a-2.jstl | 0 {src => core/src}/test/resources/b-1.jstl | 0 {src => core/src}/test/resources/b-2.jstl | 0 {src => core/src}/test/resources/c-1.jstl | 0 {src => core/src}/test/resources/c-2.jstl | 0 {src => core/src}/test/resources/experimental-tests.json | 0 {src => core/src}/test/resources/function-error-tests.json | 0 {src => core/src}/test/resources/function-tests.json | 0 {src => core/src}/test/resources/functions.jstl | 0 {src => core/src}/test/resources/json-parse-error-tests.json | 0 {src => core/src}/test/resources/json-parse-tests.json | 0 {src => core/src}/test/resources/module-body.jstl | 0 {src => core/src}/test/resources/module.jstl | 0 {src => core/src}/test/resources/query-error-tests.json | 0 {src => core/src}/test/resources/query-tests.json | 0 {src => core/src}/test/resources/uses-test.jstl | 0 92 files changed, 0 insertions(+), 0 deletions(-) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/Callable.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/Expression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/Function.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/FunctionUtils.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/JsltException.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/Module.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/Parser.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/ResourceResolver.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/cli/JSLT.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/AbstractCallable.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/AbstractInvocationExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/AbstractNode.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/AbstractOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/AndOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ArrayExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ArraySlicer.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/BiggerComparison.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/BiggerOrEqualComparison.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/BoundedCache.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/BuiltinFunctions.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ClasspathResourceResolver.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ComparisonOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/DivideOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/DotExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/EqualsComparison.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ExperimentalModule.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ExpressionImpl.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ExpressionNode.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/FailDotExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ForExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/FunctionDeclaration.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/FunctionExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/FunctionWrapper.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/IfExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/JstlFile.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/LetExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/LiteralExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/Location.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/Macro.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/MacroExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/MatcherExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/MinusOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ModuleImpl.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/MultiplyOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/NodeUtils.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/NumericOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ObjectComprehension.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ObjectExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/OrOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/PairExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/ParseContext.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/PlusOperator.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/Scope.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/SmallerComparison.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/SmallerOrEqualsComparison.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/UnequalsComparison.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/VariableExpression.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/lambda/LambdaFunction.java (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/impl/package.html (100%) rename {src => core/src}/main/java/com/schibsted/spt/data/jslt/parser/ParserImpl.java (100%) rename {src => core/src}/main/javacc/jslt.jj (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/FunctionDeclarationTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/FunctionWrapperTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/ImportTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/JsltTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/JsonParseErrorTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/JsonParseTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/QueryErrorTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/QueryTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/StaticTests.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/TemplateTest.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/TestBase.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/TestFunction.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/TestUtils.java (100%) rename {src => core/src}/test/java/com/schibsted/spt/data/jslt/ToStringTest.java (100%) rename {src => core/src}/test/resources/a-1.jstl (100%) rename {src => core/src}/test/resources/a-2.jstl (100%) rename {src => core/src}/test/resources/b-1.jstl (100%) rename {src => core/src}/test/resources/b-2.jstl (100%) rename {src => core/src}/test/resources/c-1.jstl (100%) rename {src => core/src}/test/resources/c-2.jstl (100%) rename {src => core/src}/test/resources/experimental-tests.json (100%) rename {src => core/src}/test/resources/function-error-tests.json (100%) rename {src => core/src}/test/resources/function-tests.json (100%) rename {src => core/src}/test/resources/functions.jstl (100%) rename {src => core/src}/test/resources/json-parse-error-tests.json (100%) rename {src => core/src}/test/resources/json-parse-tests.json (100%) rename {src => core/src}/test/resources/module-body.jstl (100%) rename {src => core/src}/test/resources/module.jstl (100%) rename {src => core/src}/test/resources/query-error-tests.json (100%) rename {src => core/src}/test/resources/query-tests.json (100%) rename {src => core/src}/test/resources/uses-test.jstl (100%) diff --git a/src/main/java/com/schibsted/spt/data/jslt/Callable.java b/core/src/main/java/com/schibsted/spt/data/jslt/Callable.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/Callable.java rename to core/src/main/java/com/schibsted/spt/data/jslt/Callable.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/Expression.java b/core/src/main/java/com/schibsted/spt/data/jslt/Expression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/Expression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/Expression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/Function.java b/core/src/main/java/com/schibsted/spt/data/jslt/Function.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/Function.java rename to core/src/main/java/com/schibsted/spt/data/jslt/Function.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/FunctionUtils.java b/core/src/main/java/com/schibsted/spt/data/jslt/FunctionUtils.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/FunctionUtils.java rename to core/src/main/java/com/schibsted/spt/data/jslt/FunctionUtils.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/JsltException.java b/core/src/main/java/com/schibsted/spt/data/jslt/JsltException.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/JsltException.java rename to core/src/main/java/com/schibsted/spt/data/jslt/JsltException.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/Module.java b/core/src/main/java/com/schibsted/spt/data/jslt/Module.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/Module.java rename to core/src/main/java/com/schibsted/spt/data/jslt/Module.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/Parser.java b/core/src/main/java/com/schibsted/spt/data/jslt/Parser.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/Parser.java rename to core/src/main/java/com/schibsted/spt/data/jslt/Parser.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/ResourceResolver.java b/core/src/main/java/com/schibsted/spt/data/jslt/ResourceResolver.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/ResourceResolver.java rename to core/src/main/java/com/schibsted/spt/data/jslt/ResourceResolver.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/cli/JSLT.java b/core/src/main/java/com/schibsted/spt/data/jslt/cli/JSLT.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/cli/JSLT.java rename to core/src/main/java/com/schibsted/spt/data/jslt/cli/JSLT.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractCallable.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractCallable.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/AbstractCallable.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractCallable.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractInvocationExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractInvocationExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/AbstractInvocationExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractInvocationExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractNode.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractNode.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/AbstractNode.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractNode.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/AbstractOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/AbstractOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/AndOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/AndOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/AndOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/AndOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ArrayExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ArrayExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ArrayExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ArrayExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ArraySlicer.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ArraySlicer.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ArraySlicer.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ArraySlicer.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/BiggerComparison.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/BiggerComparison.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/BiggerComparison.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/BiggerComparison.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/BiggerOrEqualComparison.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/BiggerOrEqualComparison.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/BiggerOrEqualComparison.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/BiggerOrEqualComparison.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/BoundedCache.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/BoundedCache.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/BoundedCache.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/BoundedCache.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/BuiltinFunctions.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/BuiltinFunctions.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/BuiltinFunctions.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/BuiltinFunctions.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ClasspathResourceResolver.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ClasspathResourceResolver.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ClasspathResourceResolver.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ClasspathResourceResolver.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ComparisonOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ComparisonOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ComparisonOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ComparisonOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/DivideOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/DivideOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/DivideOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/DivideOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/DotExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/DotExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/DotExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/DotExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/EqualsComparison.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/EqualsComparison.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/EqualsComparison.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/EqualsComparison.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ExperimentalModule.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ExperimentalModule.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ExperimentalModule.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ExperimentalModule.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionImpl.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionImpl.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionImpl.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionImpl.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionNode.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionNode.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionNode.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ExpressionNode.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/FailDotExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/FailDotExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/FailDotExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/FailDotExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ForExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ForExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ForExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ForExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionDeclaration.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionDeclaration.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/FunctionDeclaration.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionDeclaration.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/FunctionExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionWrapper.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionWrapper.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/FunctionWrapper.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/FunctionWrapper.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/IfExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/IfExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/IfExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/IfExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/JstlFile.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/JstlFile.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/JstlFile.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/JstlFile.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/LetExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/LetExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/LetExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/LetExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/LiteralExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/LiteralExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/LiteralExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/LiteralExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/Location.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/Location.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/Location.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/Location.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/Macro.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/Macro.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/Macro.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/Macro.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/MacroExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/MacroExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/MacroExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/MacroExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/MatcherExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/MatcherExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/MatcherExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/MatcherExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/MinusOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/MinusOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/MinusOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/MinusOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ModuleImpl.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ModuleImpl.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ModuleImpl.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ModuleImpl.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/MultiplyOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/MultiplyOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/MultiplyOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/MultiplyOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/NodeUtils.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/NodeUtils.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/NodeUtils.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/NodeUtils.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/NumericOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/NumericOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/NumericOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/NumericOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ObjectComprehension.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ObjectComprehension.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ObjectComprehension.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ObjectComprehension.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ObjectExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ObjectExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ObjectExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ObjectExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/OrOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/OrOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/OrOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/OrOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/PairExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/PairExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/PairExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/PairExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/ParseContext.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/ParseContext.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/ParseContext.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/ParseContext.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/PlusOperator.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/PlusOperator.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/PlusOperator.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/PlusOperator.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/Scope.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/Scope.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/Scope.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/Scope.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/SmallerComparison.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/SmallerComparison.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/SmallerComparison.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/SmallerComparison.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/SmallerOrEqualsComparison.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/SmallerOrEqualsComparison.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/SmallerOrEqualsComparison.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/SmallerOrEqualsComparison.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/UnequalsComparison.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/UnequalsComparison.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/UnequalsComparison.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/UnequalsComparison.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/VariableExpression.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/VariableExpression.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/VariableExpression.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/VariableExpression.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/lambda/LambdaFunction.java b/core/src/main/java/com/schibsted/spt/data/jslt/impl/lambda/LambdaFunction.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/lambda/LambdaFunction.java rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/lambda/LambdaFunction.java diff --git a/src/main/java/com/schibsted/spt/data/jslt/impl/package.html b/core/src/main/java/com/schibsted/spt/data/jslt/impl/package.html similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/impl/package.html rename to core/src/main/java/com/schibsted/spt/data/jslt/impl/package.html diff --git a/src/main/java/com/schibsted/spt/data/jslt/parser/ParserImpl.java b/core/src/main/java/com/schibsted/spt/data/jslt/parser/ParserImpl.java similarity index 100% rename from src/main/java/com/schibsted/spt/data/jslt/parser/ParserImpl.java rename to core/src/main/java/com/schibsted/spt/data/jslt/parser/ParserImpl.java diff --git a/src/main/javacc/jslt.jj b/core/src/main/javacc/jslt.jj similarity index 100% rename from src/main/javacc/jslt.jj rename to core/src/main/javacc/jslt.jj diff --git a/src/test/java/com/schibsted/spt/data/jslt/FunctionDeclarationTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/FunctionDeclarationTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/FunctionDeclarationTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/FunctionDeclarationTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/FunctionWrapperTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/FunctionWrapperTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/FunctionWrapperTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/FunctionWrapperTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/ImportTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/ImportTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/ImportTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/ImportTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/JsltTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/JsltTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/JsltTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/JsltTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/JsonParseErrorTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/JsonParseErrorTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/JsonParseErrorTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/JsonParseErrorTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/JsonParseTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/JsonParseTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/JsonParseTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/JsonParseTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/QueryErrorTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/QueryErrorTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/QueryErrorTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/QueryErrorTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/QueryTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/QueryTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/QueryTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/QueryTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/StaticTests.java b/core/src/test/java/com/schibsted/spt/data/jslt/StaticTests.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/StaticTests.java rename to core/src/test/java/com/schibsted/spt/data/jslt/StaticTests.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/TemplateTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/TemplateTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/TemplateTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/TemplateTest.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/TestBase.java b/core/src/test/java/com/schibsted/spt/data/jslt/TestBase.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/TestBase.java rename to core/src/test/java/com/schibsted/spt/data/jslt/TestBase.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/TestFunction.java b/core/src/test/java/com/schibsted/spt/data/jslt/TestFunction.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/TestFunction.java rename to core/src/test/java/com/schibsted/spt/data/jslt/TestFunction.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/TestUtils.java b/core/src/test/java/com/schibsted/spt/data/jslt/TestUtils.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/TestUtils.java rename to core/src/test/java/com/schibsted/spt/data/jslt/TestUtils.java diff --git a/src/test/java/com/schibsted/spt/data/jslt/ToStringTest.java b/core/src/test/java/com/schibsted/spt/data/jslt/ToStringTest.java similarity index 100% rename from src/test/java/com/schibsted/spt/data/jslt/ToStringTest.java rename to core/src/test/java/com/schibsted/spt/data/jslt/ToStringTest.java diff --git a/src/test/resources/a-1.jstl b/core/src/test/resources/a-1.jstl similarity index 100% rename from src/test/resources/a-1.jstl rename to core/src/test/resources/a-1.jstl diff --git a/src/test/resources/a-2.jstl b/core/src/test/resources/a-2.jstl similarity index 100% rename from src/test/resources/a-2.jstl rename to core/src/test/resources/a-2.jstl diff --git a/src/test/resources/b-1.jstl b/core/src/test/resources/b-1.jstl similarity index 100% rename from src/test/resources/b-1.jstl rename to core/src/test/resources/b-1.jstl diff --git a/src/test/resources/b-2.jstl b/core/src/test/resources/b-2.jstl similarity index 100% rename from src/test/resources/b-2.jstl rename to core/src/test/resources/b-2.jstl diff --git a/src/test/resources/c-1.jstl b/core/src/test/resources/c-1.jstl similarity index 100% rename from src/test/resources/c-1.jstl rename to core/src/test/resources/c-1.jstl diff --git a/src/test/resources/c-2.jstl b/core/src/test/resources/c-2.jstl similarity index 100% rename from src/test/resources/c-2.jstl rename to core/src/test/resources/c-2.jstl diff --git a/src/test/resources/experimental-tests.json b/core/src/test/resources/experimental-tests.json similarity index 100% rename from src/test/resources/experimental-tests.json rename to core/src/test/resources/experimental-tests.json diff --git a/src/test/resources/function-error-tests.json b/core/src/test/resources/function-error-tests.json similarity index 100% rename from src/test/resources/function-error-tests.json rename to core/src/test/resources/function-error-tests.json diff --git a/src/test/resources/function-tests.json b/core/src/test/resources/function-tests.json similarity index 100% rename from src/test/resources/function-tests.json rename to core/src/test/resources/function-tests.json diff --git a/src/test/resources/functions.jstl b/core/src/test/resources/functions.jstl similarity index 100% rename from src/test/resources/functions.jstl rename to core/src/test/resources/functions.jstl diff --git a/src/test/resources/json-parse-error-tests.json b/core/src/test/resources/json-parse-error-tests.json similarity index 100% rename from src/test/resources/json-parse-error-tests.json rename to core/src/test/resources/json-parse-error-tests.json diff --git a/src/test/resources/json-parse-tests.json b/core/src/test/resources/json-parse-tests.json similarity index 100% rename from src/test/resources/json-parse-tests.json rename to core/src/test/resources/json-parse-tests.json diff --git a/src/test/resources/module-body.jstl b/core/src/test/resources/module-body.jstl similarity index 100% rename from src/test/resources/module-body.jstl rename to core/src/test/resources/module-body.jstl diff --git a/src/test/resources/module.jstl b/core/src/test/resources/module.jstl similarity index 100% rename from src/test/resources/module.jstl rename to core/src/test/resources/module.jstl diff --git a/src/test/resources/query-error-tests.json b/core/src/test/resources/query-error-tests.json similarity index 100% rename from src/test/resources/query-error-tests.json rename to core/src/test/resources/query-error-tests.json diff --git a/src/test/resources/query-tests.json b/core/src/test/resources/query-tests.json similarity index 100% rename from src/test/resources/query-tests.json rename to core/src/test/resources/query-tests.json diff --git a/src/test/resources/uses-test.jstl b/core/src/test/resources/uses-test.jstl similarity index 100% rename from src/test/resources/uses-test.jstl rename to core/src/test/resources/uses-test.jstl From 402d4336ea86c9533addd25f39577a143475883f Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Fri, 14 Sep 2018 14:55:49 +0200 Subject: [PATCH 2/5] Added settings.gradle file --- build.gradle | 2 +- settings.gradle | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle index 6907dac5..36db7215 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ sourceSets { } task jjtree (type: Exec) { - commandLine 'java', '-cp', 'javacc.jar', 'jjtree', '-OUTPUT_DIRECTORY=build/javacc/com/schibsted/spt/data/jslt/parser', 'src/main/javacc/jslt.jj' + commandLine 'java', '-cp', 'javacc.jar', 'jjtree', '-OUTPUT_DIRECTORY=build/javacc/com/schibsted/spt/data/jslt/parser', 'core/src/main/javacc/jslt.jj' } diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..834088f4 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = 'core' +include 'core' +include 'extras' From b03db9bcf101961e2a048e47d3be9e6740036f23 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Thu, 20 Sep 2018 09:58:42 +0200 Subject: [PATCH 3/5] Moved all gradle configs into root build.gradle file. --- build.gradle | 352 +++++++++++++++++++++++++++------------------------ 1 file changed, 189 insertions(+), 163 deletions(-) diff --git a/build.gradle b/build.gradle index 36db7215..7bb27a59 100644 --- a/build.gradle +++ b/build.gradle @@ -14,216 +14,242 @@ plugins { id 'com.github.johnrengelman.shadow' version '1.2.4' } -apply plugin: 'java' -apply plugin: 'com.jfrog.artifactory' -apply plugin: 'maven-publish' -apply plugin: 'maven' -apply plugin: 'signing' -apply plugin: 'jacoco' - -repositories { - mavenLocal() - jcenter() - mavenCentral() -} -dependencies { - compile 'com.fasterxml.jackson.core:jackson-databind:2.9.6' +// Common for all projects, including the (empty) root project. - testCompile 'junit:junit:4.12' -} +allprojects { + ext { + timestamp = new Date().format('yyyyMMddHHmm') + gitrev = "git log -1 HEAD --pretty=tformat:%h".execute().text.trim() + } -ext { - timestamp = new Date().format('yyyyMMddHHmm') - gitrev = "git log -1 HEAD --pretty=tformat:%h".execute().text.trim() + group 'com.schibsted.spt.data' + version "0.1.3" + project.description "A JSON query and transformation language" } -group 'com.schibsted.spt.data' -version "0.1.3" -project.description "A JSON query and transformation language" -check { - doLast { - println 'Test report in build/reports/tests/test/index.html' - } -} +// Common configuration for all (java, jslt) subprojects. +subprojects { + apply plugin: 'java' + apply plugin: 'com.jfrog.artifactory' + apply plugin: 'maven-publish' + apply plugin: 'maven' + apply plugin: 'signing' + apply plugin: 'jacoco' -// =========================================================================== -// javacc integration + repositories { + mavenLocal() + jcenter() + mavenCentral() + } -sourceSets { - main { - java { - srcDirs 'src/main/java' - srcDirs 'build/javacc' - } + check { + doLast { + println 'Test report in build/reports/tests/test/index.html' } - } - -task jjtree (type: Exec) { - commandLine 'java', '-cp', 'javacc.jar', 'jjtree', '-OUTPUT_DIRECTORY=build/javacc/com/schibsted/spt/data/jslt/parser', 'core/src/main/javacc/jslt.jj' -} + } + // =========================================================================== + // javacc integration -task javacc (type: Exec) { - commandLine 'java', '-cp', 'javacc.jar', 'javacc', '-OUTPUT_DIRECTORY=build/javacc/com/schibsted/spt/data/jslt/parser', 'build/javacc/com/schibsted/spt/data/jslt/parser/jslt.jj.jj' -} -compileJava.dependsOn 'javacc' -javacc.dependsOn 'jjtree' + sourceSets { + main { + java { + srcDirs 'src/main/java' + srcDirs 'build/javacc' + } + } + } -// =========================================================================== -// Sonatype Maven central publishing + // =========================================================================== + // Sonatype Maven central publishing -task sourceJar(type: Jar) { + task sourceJar(type: Jar) { classifier "sources" from sourceSets.main.allJava -} + } -// declaring this separately to avoid including javacc-generated sources -// because javadoc fail on those -sourceSets { + // declaring this separately to avoid including javacc-generated sources + // because javadoc fail on those + sourceSets { javadoc { - java { - srcDirs 'src/main/java' - } + java { + srcDirs 'src/main/java' + } } - } -javadoc { - source = sourceSets.javadoc.allJava -} + } + javadoc { + source = sourceSets.javadoc.allJava + } -task javadocJar(type: Jar, dependsOn: javadoc) { + task javadocJar(type: Jar, dependsOn: javadoc) { classifier "javadoc" from javadoc.destinationDir -} + } -artifacts { + artifacts { archives jar archives sourceJar archives javadocJar -} + } -publishing { + publishing { publications { - mavenJava(MavenPublication) { - customizePom(pom) - groupId group - artifactId 'jslt' - version version + mavenJava(MavenPublication) { + customizePom(pom) + groupId group + artifactId 'jslt' + version version - from components.java - - artifact(sourceJar) { - classifier = 'sources' - } - artifact(javadocJar) { - classifier = 'javadoc' - } - - // create the sign pom artifact - pom.withXml { - def pomFile = file("${project.buildDir}/generated-pom.xml") - writeTo(pomFile) - def pomAscFile = signing.sign(pomFile).signatureFiles[0] - artifact(pomAscFile) { - classifier = null - extension = 'pom.asc' - } - } - // create the signed artifacts - project.tasks.signArchives.signatureFiles.each { - artifact(it) { - def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/ - if (matcher.find()) { - classifier = matcher.group(1) - } else { - classifier = null - } - extension = 'jar.asc' - } - } + from components.java + artifact(sourceJar) { + classifier = 'sources' } - } - repositories { - maven { - url "https://oss.sonatype.org/service/local/staging/deploy/maven2" - credentials { - // these are stored in a secret gradle.properties that is not - // in the repo, so we need a fallback - username ((project.hasProperty('sonatypeUsername')) ? sonatypeUsername : "no username") - password ((project.hasProperty('sonatypePassword')) ? sonatypePassword : "no password") - } + artifact(javadocJar) { + classifier = 'javadoc' } - } -} -def customizePom(pom) { - pom.withXml { - def root = asNode() - - // eliminate test-scoped dependencies (no need in maven central POMs) - root.dependencies.removeAll { dep -> - dep.scope == "test" + // create the sign pom artifact + pom.withXml { + def pomFile = file("${project.buildDir}/generated-pom.xml") + writeTo(pomFile) + def pomAscFile = signing.sign(pomFile).signatureFiles[0] + artifact(pomAscFile) { + classifier = null + extension = 'pom.asc' + } } - - // add all items necessary for maven central publication - root.children().last() + { - resolveStrategy = Closure.DELEGATE_FIRST - - description project.description - name 'JSLT' - url 'https://github.com/schibsted/jslt' - organization { - name 'Schibsted ASA' - url 'https://github.com/schibsted/' - } - issueManagement { - system 'GitHub' - url 'https://github.com/schibsted/jslt/issues' - } - licenses { - license { - name 'Apache License 2.0' - url 'https://github.com/schibsted/jslt/blob/master/LICENSE' - distribution 'repo' - } - } - scm { - url 'https://github.com/schibsted/jslt' - connection 'scm:git:git://github.com/schibsted/jslt.git' - developerConnection 'scm:git:ssh://git@github.com:schibsted/jslt.git' - } - developers { - developer { - name 'Schibsted' - } + // create the signed artifacts + project.tasks.signArchives.signatureFiles.each { + artifact(it) { + def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/ + if (matcher.find()) { + classifier = matcher.group(1) + } else { + classifier = null } + extension = 'jar.asc' + } + } + + } + } // publishing.publications + repositories { + maven { + url "https://oss.sonatype.org/service/local/staging/deploy/maven2" + credentials { + // these are stored in a secret gradle.properties that is not + // in the repo, so we need a fallback + username ((project.hasProperty('sonatypeUsername')) ? sonatypeUsername : "no username") + password ((project.hasProperty('sonatypePassword')) ? sonatypePassword : "no password") } + } } -} + } + -model { + model { tasks.generatePomFileForMavenJavaPublication { - destination = file("$buildDir/generated-pom.xml") + destination = file("$buildDir/generated-pom.xml") } -} + } -signing { + signing { sign configurations.archives -} + } -model { + model { tasks.publishMavenJavaPublicationToMavenLocal { - dependsOn project.tasks.signArchives + dependsOn project.tasks.signArchives } tasks.publishMavenJavaPublicationToMavenRepository { - dependsOn project.tasks.signArchives + dependsOn project.tasks.signArchives + } + } + + test { + testLogging { + showStandardStreams = true } + } +} + + +project(':core') { + + dependencies { + compile 'com.fasterxml.jackson.core:jackson-databind:2.9.6' + + testCompile 'junit:junit:4.12' + } + + + task jjtree (type: Exec) { + commandLine 'java', '-cp', '../javacc.jar', 'jjtree', '-OUTPUT_DIRECTORY=build/javacc/com/schibsted/spt/data/jslt/parser', 'src/main/javacc/jslt.jj' + } + + + task javacc (type: Exec) { + commandLine 'java', '-cp', '../javacc.jar', 'javacc', '-OUTPUT_DIRECTORY=build/javacc/com/schibsted/spt/data/jslt/parser', 'build/javacc/com/schibsted/spt/data/jslt/parser/jslt.jj.jj' + } + + compileJava.dependsOn 'javacc' + javacc.dependsOn 'jjtree' + +} + +project(':extras') { + dependencies { + compile project(':core') + compile 'com.auth0:java-jwt:3.4.0' + testCompile 'junit:junit:4.12' + } } -test { - testLogging { - showStandardStreams = true + +def customizePom(pom) { + pom.withXml { + def root = asNode() + + // eliminate test-scoped dependencies (no need in maven central POMs) + root.dependencies.removeAll { dep -> + dep.scope == "test" + } + + // add all items necessary for maven central publication + root.children().last() + { + resolveStrategy = Closure.DELEGATE_FIRST + + description project.description + name 'JSLT' + url 'https://github.com/schibsted/jslt' + organization { + name 'Schibsted ASA' + url 'https://github.com/schibsted/' + } + issueManagement { + system 'GitHub' + url 'https://github.com/schibsted/jslt/issues' + } + licenses { + license { + name 'Apache License 2.0' + url 'https://github.com/schibsted/jslt/blob/master/LICENSE' + distribution 'repo' + } + } + scm { + url 'https://github.com/schibsted/jslt' + connection 'scm:git:git://github.com/schibsted/jslt.git' + developerConnection 'scm:git:ssh://git@github.com:schibsted/jslt.git' + } + developers { + developer { + name 'Schibsted' + } + } + } } } \ No newline at end of file From c5f1760546dac681b4f09738530134567e9fef12 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Thu, 20 Sep 2018 10:12:55 +0200 Subject: [PATCH 4/5] Added .editorconfig file for consistent indenting. --- .editorconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..748be1e0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{java,gradle}] +charset = utf-8 +indent_style = space +indent_size = 2 + From d174dc4ce10dc44f209b53902589bc76d5dbe8d0 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Thu, 20 Sep 2018 12:08:47 +0200 Subject: [PATCH 5/5] Initial JWT functions draft. --- .../java/com/schibsted/jslt/extras/JWT.java | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 extras/src/main/java/com/schibsted/jslt/extras/JWT.java diff --git a/extras/src/main/java/com/schibsted/jslt/extras/JWT.java b/extras/src/main/java/com/schibsted/jslt/extras/JWT.java new file mode 100644 index 00000000..b71c8a2b --- /dev/null +++ b/extras/src/main/java/com/schibsted/jslt/extras/JWT.java @@ -0,0 +1,90 @@ +// Copyright 2018 Schibsted Marketplaces Products & Technology As +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.schibsted.jslt.extras.impl; + +import java.util.Collection; +import java.util.HashSet; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.NullNode; + +import com.schibsted.spt.data.jslt.Function; +import com.schibsted.spt.data.jslt.JsltException; +import com.schibsted.spt.data.jslt.impl.AbstractCallable; + +/** + * Contains JSLT functions for unwrapping/wrapping JWT tokens. + *

+ * The api is (very!) loosely based on auth0/node-jsonwebtoken + * + * from-jwt(token: String, [secretOrPublicKey], [options: Object]) + * + * to-jwt(payload: JSON, [secretOrPrivateKey], [options: Object] ) + * + * secretOrPublicKey is a string or object containing either either the secret + * for HMAC algorithms or the PEM encoded private key for RSA and ECDSA. If + * this parameter is empty, the JWT token is assumed to use the "none" + * algorithm which results in an empty signature component in the JWT. + * + */ +public final class JWT { + + // This is copied from BuiltinFunctions. + // this will be replaced with a proper Context. need to figure out + // relationship between compile-time and run-time context first. + public static Collection functions = new HashSet(); + static { + functions.add(new JWT.FromJWT()); + functions.add(new JWT.ToJWT()); + } + + private static class FromJWT extends AbstractCallable implements Function { + public FromJWT() { + super("from-jwt", 1, 3); + } + + public JsonNode call(JsonNode input, JsonNode[] arguments) { + JsonNode token = arguments[0]; + if (token.isNull()) + return NullNode.instance; + else if (!token.isTextual()) + throw new JsltException("from-jwt(..) cannot extract a non-string: " + token); + + // TODO: Just for testing + throw new JsltException("from-jwt(..) is unimplemented"); + } + } + + private static class ToJWT extends AbstractCallable implements Function { + public ToJWT() { + super("from-jwt", 1, 3); + } + + public JsonNode call(JsonNode input, JsonNode[] arguments) { + JsonNode token = arguments[0]; + if (token.isNull()) + return NullNode.instance; + else if (!token.isTextual()) + throw new JsltException("from-jwt(..) cannot extract a non-string: " + token); + + // TODO: Just for testing + throw new JsltException("to-jwt-jwt(..) is unimplemented"); + } + } + + private JWT() { + //not called + } +}