diff --git a/nb-configuration.xml b/nb-configuration.xml index 00dea3e61d563b10c9cd00a3ba3dda34e9871fc4..e9e56b52729f6bef68a0435ec98b924804cf7522 100755 --- a/nb-configuration.xml +++ b/nb-configuration.xml @@ -18,6 +18,5 @@ Any value defined here will override the pom.xml file value but is only applicab <netbeans.hint.license>nibio_open_source_license.ftl</netbeans.hint.license> <org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>WildFly</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server> <org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>1.7-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion> - <netbeans.hint.jdkPlatform>JDK_1.8_SUN</netbeans.hint.jdkPlatform> </properties> </project-shared-configuration> diff --git a/pom.xml b/pom.xml index 5ef3e3fc76cf16cee7d3b7c3d066dc4e309c36da..5b0ee8bab63d26bc97c7e133dc382f87438ec802 100755 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,17 @@ <name>VIPSCore</name> <url>http://maven.apache.org</url> - +<repositories> + <repository> + <id>bedatadriven</id> + <name>bedatadriven public repo</name> + <url>https://nexus.bedatadriven.com/content/groups/public/</url> + </repository> + <repository> + <id>jitpack.io</id> + <url>https://jitpack.io</url> + </repository> +</repositories> <dependencies> <dependency> <groupId>org.reflections</groupId> @@ -21,18 +31,129 @@ <artifactId>cors-filter</artifactId> <version>1.7.1</version> </dependency> + + <dependency> + <groupId>org.graalvm</groupId> + <artifactId>graal-sdk</artifactId> + <version>1.0.0-rc7</version> + </dependency> <dependency> - <groupId>no.bioforsk.vips.common</groupId> + <groupId>com.bedatadriven</groupId> + <artifactId>jackson-datatype-jts</artifactId> + <version>2.4</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>no.nibio.vips.common</groupId> <artifactId>VIPSCommon</artifactId> <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>javax</groupId> + <artifactId>javaee-web-api</artifactId> + <version>7.0</version> <type>jar</type> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> </dependency> <dependency> - <groupId>com.bedatadriven</groupId> - <artifactId>jackson-datatype-jts</artifactId> - <version>2.2</version> + <groupId>axis</groupId> + <artifactId>axis</artifactId> + <version>1.4</version> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>dnmi-ws</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>xerces</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>xalan</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet.jsp</groupId> + <artifactId>jsp-api</artifactId> + <version>2.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>tidy</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>relayclient</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>UserAgentUtils</artifactId> + <version>1.6</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-validator</groupId> + <artifactId>commons-validator</artifactId> + <version>1.2.0</version> <type>jar</type> </dependency> + <dependency> + <groupId>javax</groupId> + <artifactId>javaee-api</artifactId> + <version>6.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-math</groupId> + <artifactId>commons-math</artifactId> + <version>1.2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-net</groupId> + <artifactId>commons-net</artifactId> + <version>1.4.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>commons-codec</artifactId> + <version>1.6</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>external.lib</groupId> + <artifactId>json-simple</artifactId> + <version>1.1</version> + </dependency> </dependencies> <build> @@ -42,8 +163,8 @@ <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> - <source>1.8</source> - <target>1.8</target> + <source>10</source> + <target>10</target> </configuration> </plugin> <plugin> diff --git a/src/main/java/no/nibio/vips/core/VIPSCoreApplication.java b/src/main/java/no/nibio/vips/core/VIPSCoreApplication.java index 2b2a649c043fac0cb1ba564828480eed0c6fe938..8e46ddae3a1723be7fcb65ef40c59b7e34cf7f9f 100755 --- a/src/main/java/no/nibio/vips/core/VIPSCoreApplication.java +++ b/src/main/java/no/nibio/vips/core/VIPSCoreApplication.java @@ -56,6 +56,5 @@ public class VIPSCoreApplication extends Application */ private void addRestResourceClasses(Set<Class<?>> resources) { resources.add(no.nibio.vips.core.config.JacksonConfig.class); - resources.add(no.nibio.vips.core.service.ModelResourceImpl.class); } } \ No newline at end of file diff --git a/src/main/java/no/nibio/vips/core/config/JacksonConfig.java b/src/main/java/no/nibio/vips/core/config/JacksonConfig.java index ed2c61c2999f160c8cb4ec679c85cea8376f9e3f..be1aaabff5a451c8b5cf188aad3a5309bf75c777 100755 --- a/src/main/java/no/nibio/vips/core/config/JacksonConfig.java +++ b/src/main/java/no/nibio/vips/core/config/JacksonConfig.java @@ -20,6 +20,7 @@ package no.nibio.vips.core.config; import com.bedatadriven.jackson.datatype.jts.JtsModule; +import com.fasterxml.jackson.databind.DeserializationFeature; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.ext.ContextResolver; @@ -43,6 +44,8 @@ public class JacksonConfig implements ContextResolver<ObjectMapper>{ objectMapper = new ObjectMapper(); objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); objectMapper.registerModule(new JtsModule()); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.registerModule(new JtsModule()); } @Override diff --git a/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java b/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java index 13e0c995a687edd18208999a4b00e9a101d90211..cab6b58ab3a64e8c794859a7ac81f8ed31064887 100755 --- a/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java +++ b/src/main/java/no/nibio/vips/core/service/ModelResourceImpl.java @@ -24,6 +24,7 @@ import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.http.HttpServletRequest; @@ -252,6 +253,7 @@ public class ModelResourceImpl implements ModelResource{ @Override public Response runModel(ModelConfiguration config) { + System.out.println("runModel 1"); try { Model calledModel = ModelFactory.getInstance().getModelInstance(config.getModelId()); diff --git a/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index ee829f6d820e5367a5511e0c66fa12fabc67a7ac..1a1e0575a8cfbab863c92cfcc4c4779f85a924e4 100755 --- a/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -21,9 +21,13 @@ along with VIPSCore. If not, see <http://www.nibio.no/licenses/>. <deployment> <dependencies> <module name="no.nibio.vips.modelcontainer"/> + <module name="org.graalvm"/> <module name="no.nibio.vips.VIPSCommon" export="true"/> <module name="com.fasterxml.jackson.core.jackson-core" /> <module name="com.fasterxml.jackson.core.jackson-databind" /> </dependencies> + <exclusions> + <module name="org.jboss.resteasy.resteasy-json-binding-provider"/> + </exclusions> </deployment> </jboss-deployment-structure>