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> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId> <artifactId>maven-ejb-plugin</artifactId>
<version>2.5.1</version>
<configuration> <configuration>
<ejbVersion>3.1</ejbVersion> <ejbVersion>3.1</ejbVersion>
<excludes> <excludes>

View File

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

View File

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

View File

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

View File

@ -111,7 +111,7 @@ public class PDFDocumentTest {
FileUtils.writeStringToFile(file, jsonString, "UTF-8"); FileUtils.writeStringToFile(file, jsonString, "UTF-8");
// create pdf // 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.setDirectoryForTemplateLoading(new File(System.getProperty("java.io.tmpdir")));
cfg.setDefaultEncoding("UTF-8"); cfg.setDefaultEncoding("UTF-8");
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);

69
pom.xml
View File

@ -133,15 +133,37 @@
<dependency> <dependency>
<groupId>org.apache.pdfbox</groupId> <groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId> <artifactId>pdfbox</artifactId>
<version>2.0.7</version> <version>2.0.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.freemarker</groupId> <groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId> <artifactId>freemarker</artifactId>
<version>2.3.23</version> <version>2.3.23</version>
</dependency> </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>
<groupId>de.muehlencord.shared</groupId>
<artifactId>shared-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-util</artifactId> <artifactId>shared-util</artifactId>
@ -151,23 +173,46 @@
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-jeeutil</artifactId> <artifactId>shared-jeeutil</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<build> <build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<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> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -15,40 +15,10 @@
<build> <build>
<plugins> <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 --> <!-- convert wsdl to object -->
<plugin> <plugin>
<groupId>org.jvnet.jax-ws-commons</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId> <artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version> <!-- TODO does not work with 2.3 -->
<configuration> <configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir> <sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
</configuration> </configuration>
@ -66,6 +36,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>authentication.wsdl</wsdlFile> <wsdlFile>authentication.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -80,6 +55,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>alerts.wsdl</wsdlFile> <wsdlFile>alerts.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -94,6 +74,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>sites.wsdl</wsdlFile> <wsdlFile>sites.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -108,6 +93,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>webs.wsdl</wsdlFile> <wsdlFile>webs.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -122,6 +112,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>lists.wsdl</wsdlFile> <wsdlFile>lists.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -136,6 +131,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>search.wsdl</wsdlFile> <wsdlFile>search.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@ -150,6 +150,11 @@
<wsdlFiles> <wsdlFiles>
<wsdlFile>usergroup.wsdl</wsdlFile> <wsdlFile>usergroup.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
@ -159,8 +164,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId> <artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<configuration> <configuration>
<quiet>false</quiet> <quiet>false</quiet>
<verbose>false</verbose> <verbose>false</verbose>
@ -175,19 +178,14 @@
<goal>xjc</goal> <goal>xjc</goal>
</goals> </goals>
<configuration> <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. --> <!-- The package in which the source files will be generated. -->
<packageName>de.muehlencord.shared.sharepoint.api.batch</packageName> <packageName>de.muehlencord.shared.sharepoint.api.batch</packageName>
<!-- The working directory to create the generated java source files. --> <!-- The working directory to create the generated java source files. -->
<outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory> <outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory>
<removeOldOutput>true</removeOldOutput> <removeOldOutput>true</removeOldOutput>
<!-- bindings to use --> <sources>
<bindingDirectory>${basedir}/src/main/resources/jaxb</bindingDirectory> <source>${basedir}/src/main/resources/xsd/batch.xsd</source>
<bindingFiles>batch.xml</bindingFiles> </sources>
<extension>true</extension>
</configuration> </configuration>
</execution> </execution>
@ -198,19 +196,15 @@
<goal>xjc</goal> <goal>xjc</goal>
</goals> </goals>
<configuration> <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. --> <!-- The package in which the source files will be generated. -->
<packageName>de.muehlencord.shared.sharepoint.api.lists</packageName> <packageName>de.muehlencord.shared.sharepoint.api.lists</packageName>
<!-- The working directory to create the generated java source files. --> <!-- The working directory to create the generated java source files. -->
<outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory> <outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory>
<removeOldOutput>true</removeOldOutput> <removeOldOutput>true</removeOldOutput>
<!-- bindings to use --> <sources>
<bindingDirectory>${basedir}/src/main/resources/jaxb</bindingDirectory> <source>${basedir}/src/main/resources/xsd/lists.xsd</source>
<bindingFiles>lists.xml</bindingFiles> </sources>
<extension>true</extension> <clearOutputDir>false</clearOutputDir>
</configuration> </configuration>
</execution> </execution>
@ -221,19 +215,16 @@
<goal>xjc</goal> <goal>xjc</goal>
</goals> </goals>
<configuration> <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. --> <!-- The package in which the source files will be generated. -->
<packageName>de.muehlencord.shared.sharepoint.api.usergroup</packageName> <packageName>de.muehlencord.shared.sharepoint.api.usergroup</packageName>
<!-- The working directory to create the generated java source files. --> <!-- The working directory to create the generated java source files. -->
<outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory> <outputDirectory>${project.build.directory}/generated-sources/jaxb/</outputDirectory>
<removeOldOutput>true</removeOldOutput> <removeOldOutput>true</removeOldOutput>
<!-- bindings to use -->
<bindingDirectory>${basedir}/src/main/resources/jaxb</bindingDirectory>
<bindingFiles>usergroup.xml</bindingFiles>
<extension>true</extension> <extension>true</extension>
<sources>
<source>${basedir}/src/main/resources/xsd/usergroup.xsd</source>
</sources>
<clearOutputDir>false</clearOutputDir>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
@ -251,9 +242,8 @@
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-util</artifactId> <artifactId>shared-util</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>

View File

@ -25,8 +25,8 @@ public class SPBatch extends SPJaxbObject<Batch> {
return schemaList; return schemaList;
} }
public void addMethod(Method method) { 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; return field;
}). }).
forEach((Field field) -> { forEach((Field field) -> {
method.getFields().add(field); method.getField().add(field);
}); });
batch.addMethod(method); batch.addMethod(method);
} }
@ -220,7 +220,7 @@ public class SPList extends SPJaxbObject<List> {
} }
Fields fields = getValue().fields; 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)) { if (field.getDisplayName().equals(columnDisplayName)) {
return field.getName(); return field.getName();
} }
@ -288,7 +288,7 @@ public class SPList extends SPJaxbObject<List> {
return field; return field;
}). }).
forEach((Field field) -> { forEach((Field field) -> {
method.getFields().add(field); method.getField().add(field);
}); });
batch.addMethod(method); batch.addMethod(method);
} }

View File

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

View File

@ -35,7 +35,7 @@ public class SPMethod extends SPJaxbObject<Method> {
} }
public List<Field> getFields() { 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() { public List<String> getEmailAddresses() {
List<String> returnList = new ArrayList<>(); List<String> returnList = new ArrayList<>();
for (User user : getValue().users) { for (User user : getValue().getUser()) {
returnList.add (user.email); returnList.add (user.email);
} }

View File

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