updated libraries and plugins to latest versions

This commit is contained in:
jomu
2018-01-09 10:09:02 +00:00
parent efb22b1c46
commit 0c81703042
13 changed files with 121 additions and 102 deletions

View File

@ -83,7 +83,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
<excludes>

View File

@ -33,7 +33,6 @@
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
@ -49,7 +48,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
</configuration>

View File

@ -21,12 +21,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>

View File

@ -46,7 +46,7 @@ public class GsonSerialisation {
System.out.println(jsonString);
System.out.println("*******");
Configuration cfg = new Configuration(Configuration.VERSION_2_3_24);
Configuration cfg = new Configuration(Configuration.VERSION_2_3_23);
cfg.setDirectoryForTemplateLoading(new File(System.getProperty("java.io.tmpdir")));
cfg.setDefaultEncoding("UTF-8");
Template template = cfg.getTemplate("users.ftlh");

View File

@ -111,7 +111,7 @@ public class PDFDocumentTest {
FileUtils.writeStringToFile(file, jsonString, "UTF-8");
// create pdf
Configuration cfg = new Configuration(Configuration.VERSION_2_3_24);
Configuration cfg = new Configuration(Configuration.VERSION_2_3_23);
cfg.setDirectoryForTemplateLoading(new File(System.getProperty("java.io.tmpdir")));
cfg.setDefaultEncoding("UTF-8");
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);

49
pom.xml
View File

@ -133,13 +133,30 @@
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.7</version>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.23</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.15</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -147,17 +164,23 @@
<artifactId>shared-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>de.muehlencord.shared</groupId>
<artifactId>shared-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>de.muehlencord.shared</groupId>
<artifactId>shared-jeeutil</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -169,6 +192,28 @@
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>

View File

@ -15,40 +15,10 @@
<build>
<plugins>
<!-- project overall settings -->
<plugin>
<!-- Ensure that usage of the maven-jaxb2-plugin is JDK 8 compatible in absence of a fix
for https://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-80.
TODO: bug is fixed, but how to apply to xsd generation plugin-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<id>set-additional-system-properties</id>
<goals>
<goal>set-system-properties</goal>
</goals>
</execution>
</executions>
<configuration>
<properties>
<property>
<name>javax.xml.accessExternalSchema</name>
<value>file,http</value>
</property>
</properties>
</configuration>
</plugin>
<!-- convert wsdl to object -->
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version> <!-- TODO does not work with 2.3 -->
<configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
</configuration>
@ -66,6 +36,11 @@
<wsdlFiles>
<wsdlFile>authentication.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
<execution>
@ -80,6 +55,11 @@
<wsdlFiles>
<wsdlFile>alerts.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
<execution>
@ -94,6 +74,11 @@
<wsdlFiles>
<wsdlFile>sites.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
<execution>
@ -108,6 +93,11 @@
<wsdlFiles>
<wsdlFile>webs.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
<execution>
@ -122,6 +112,11 @@
<wsdlFiles>
<wsdlFile>lists.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
<execution>
@ -136,6 +131,11 @@
<wsdlFiles>
<wsdlFile>search.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
<execution>
@ -150,6 +150,11 @@
<wsdlFiles>
<wsdlFile>usergroup.wsdl</wsdlFile>
</wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration>
</execution>
</executions>
@ -159,8 +164,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<quiet>false</quiet>
<verbose>false</verbose>
@ -175,19 +178,14 @@
<goal>xjc</goal>
</goals>
<configuration>
<!-- The schema directory or xsd files. -->
<schemaDirectory>${basedir}/src/main/resources/xsd</schemaDirectory>
<!-- the file to read -->
<schemaFiles>batch.xsd</schemaFiles>
<!-- The package in which the source files will be generated. -->
<packageName>de.muehlencord.shared.sharepoint.api.batch</packageName>
<!-- The working directory to create the generated java source files. -->
<outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory>
<removeOldOutput>true</removeOldOutput>
<!-- bindings to use -->
<bindingDirectory>${basedir}/src/main/resources/jaxb</bindingDirectory>
<bindingFiles>batch.xml</bindingFiles>
<extension>true</extension>
<sources>
<source>${basedir}/src/main/resources/xsd/batch.xsd</source>
</sources>
</configuration>
</execution>
@ -198,19 +196,15 @@
<goal>xjc</goal>
</goals>
<configuration>
<!-- The schema directory or xsd files. -->
<schemaDirectory>${basedir}/src/main/resources/xsd</schemaDirectory>
<!-- the file to read -->
<schemaFiles>lists.xsd</schemaFiles>
<!-- The package in which the source files will be generated. -->
<packageName>de.muehlencord.shared.sharepoint.api.lists</packageName>
<!-- The working directory to create the generated java source files. -->
<outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory>
<removeOldOutput>true</removeOldOutput>
<!-- bindings to use -->
<bindingDirectory>${basedir}/src/main/resources/jaxb</bindingDirectory>
<bindingFiles>lists.xml</bindingFiles>
<extension>true</extension>
<sources>
<source>${basedir}/src/main/resources/xsd/lists.xsd</source>
</sources>
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
@ -221,19 +215,16 @@
<goal>xjc</goal>
</goals>
<configuration>
<!-- The schema directory or xsd files. -->
<schemaDirectory>${basedir}/src/main/resources/xsd</schemaDirectory>
<!-- the file to read -->
<schemaFiles>usergroup.xsd</schemaFiles>
<!-- The package in which the source files will be generated. -->
<packageName>de.muehlencord.shared.sharepoint.api.usergroup</packageName>
<!-- The working directory to create the generated java source files. -->
<outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory>
<removeOldOutput>true</removeOldOutput>
<!-- bindings to use -->
<bindingDirectory>${basedir}/src/main/resources/jaxb</bindingDirectory>
<bindingFiles>usergroup.xml</bindingFiles>
<extension>true</extension>
<sources>
<source>${basedir}/src/main/resources/xsd/usergroup.xsd</source>
</sources>
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
</executions>
@ -251,9 +242,8 @@
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>de.muehlencord.shared</groupId>
<artifactId>shared-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>

View File

@ -26,7 +26,7 @@ public class SPBatch extends SPJaxbObject<Batch> {
}
public void addMethod(Method method) {
getValue().getMethods().add(method);
getValue().getMethod().add(method);
}
}

View File

@ -152,7 +152,7 @@ public class SPList extends SPJaxbObject<List> {
return field;
}).
forEach((Field field) -> {
method.getFields().add(field);
method.getField().add(field);
});
batch.addMethod(method);
}
@ -220,7 +220,7 @@ public class SPList extends SPJaxbObject<List> {
}
Fields fields = getValue().fields;
for (de.muehlencord.shared.sharepoint.api.lists.Field field : fields.getFields()) {
for (de.muehlencord.shared.sharepoint.api.lists.Field field : fields.getField()) {
if (field.getDisplayName().equals(columnDisplayName)) {
return field.getName();
}
@ -288,7 +288,7 @@ public class SPList extends SPJaxbObject<List> {
return field;
}).
forEach((Field field) -> {
method.getFields().add(field);
method.getField().add(field);
});
batch.addMethod(method);
}

View File

@ -40,7 +40,7 @@ public class SPLists extends SPJaxbObject<de.muehlencord.shared.sharepoint.api.l
/* ** get list objects *** */
public SPList getSpListByTitle(String listName) throws NoSuchAlgorithmException, KeyManagementException, JAXBException, MalformedURLException, SAXException {
if (this.getValue().lists == null) {
if (this.getValue().getList() == null) {
getValueFromSharepoint();
}
List list = getListByTitle(listName); // TODO throw exception if not found
@ -53,11 +53,11 @@ public class SPLists extends SPJaxbObject<de.muehlencord.shared.sharepoint.api.l
/* *** get lists information *** */
public java.util.List<String> getListNames() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, ParseException, JAXBException,
SAXException {
if (this.getValue().lists == null) {
if (this.getValue().getList() == null) {
getValueFromSharepoint();
}
java.util.List<String> returnList = new LinkedList<>();
this.getValue().lists.stream().
this.getValue().getList().stream().
forEach((currentList) -> {
returnList.add(currentList.name);
});
@ -67,11 +67,11 @@ public class SPLists extends SPJaxbObject<de.muehlencord.shared.sharepoint.api.l
public String getListNameByTitle(String listTitle) throws NoSuchAlgorithmException, KeyManagementException, JAXBException,
MalformedURLException, SAXException {
if (this.getValue().lists == null) {
if (this.getValue().getList() == null) {
getValueFromSharepoint();
}
for (List list : getValue().lists) {
for (List list : getValue().getList()) {
if (list.title.equals(listTitle)) {
return list.name;
}
@ -114,7 +114,7 @@ public class SPLists extends SPJaxbObject<de.muehlencord.shared.sharepoint.api.l
}
private List getListByTitle(String listTitle) {
for (List list : this.getValue().lists) {
for (List list : this.getValue().getList()) {
if (list.getTitle().equals(listTitle)) {
return list;
}

View File

@ -35,7 +35,7 @@ public class SPMethod extends SPJaxbObject<Method> {
}
public List<Field> getFields() {
return getValue().getFields();
return getValue().getField();
}
}

View File

@ -25,7 +25,7 @@ public class SPUsers extends SPJaxbObject<Users> {
public List<String> getEmailAddresses() {
List<String> returnList = new ArrayList<>();
for (User user : getValue().users) {
for (User user : getValue().getUser()) {
returnList.add (user.email);
}

View File

@ -13,11 +13,6 @@
</parent>
<properties>
<elapi.version>3.0.0</elapi.version>
<jsfapi.version>2.2.13</jsfapi.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.shiro</groupId>
@ -27,13 +22,11 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>${jsfapi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>${elapi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>