JR Utily

fix issue with pom => remove jee specs from unnecessary poms

......@@ -15,6 +15,7 @@
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
......
......@@ -30,6 +30,10 @@
<version>${solr.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId>
</dependency>
<!-- **** TOOLS : LOGS + UTILS **** -->
......
......@@ -51,11 +51,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.2.RELEASE</version>
<configuration>
<mainClass>org.legrog.recommendation.postprocess.PostprocessingApplication</mainClass>
<layout>ZIP</layout>
</configuration>
<executions>
<execution>
<goals>
......
......@@ -7,7 +7,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.context.annotation.Bean;
import java.io.*;
......@@ -33,6 +36,9 @@ public class PostprocessingApplication {
Properties properties;
Set<Long> sampleItemIds;
Set<Long> sampleUserIds;
//fixme ne jamais utiliser de classes concretes comme type de variables
// ce que tu veux ici c'est Map<Long, Set<Long>>
HashMap<Long, Set<Long>> sampleItemUserIds;
public static void main(String[] args) {
......@@ -88,6 +94,7 @@ public class PostprocessingApplication {
logger.trace("Nombre de couples item-user dans l'échantillon {}", sampleCoupleCount);
} catch (IOException e) {
//fixme use logger instead of e.printStackTrace() !!!
e.printStackTrace();
}
......@@ -110,6 +117,8 @@ public class PostprocessingApplication {
void loadParametersProperties() {
//fixme use logger instead of e.printStackTrace() !!!
Properties properties = new Properties();
InputStream in = null;
try {
......
......@@ -32,8 +32,8 @@
<custom.web.dir>src/main/java/org/legrog/web</custom.web.dir>
<!-- misc -->
<debug.jvm.args />
<tomee.autoreload />
<debug.jvm.args/>
<tomee.autoreload/>
</properties>
......@@ -77,6 +77,12 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.omnifaces/omnifaces -->
<dependency>
<groupId>org.omnifaces</groupId>
......
......@@ -47,6 +47,15 @@
<artifactId>solr-solrj</artifactId>
<version>${solr.version}</version>
</dependency>
<!-- SPECS JEE -->
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId>
<version>${tomee.javaee-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
......@@ -59,14 +68,6 @@
<dependencies>
<!-- SPECS JEE -->
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId>
<version>${tomee.javaee-api.version}</version>
<scope>provided</scope>
</dependency>
<!-- **** TEST SCOPE **** -->
<dependency>
......@@ -85,7 +86,7 @@
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId> junit-platform-console</artifactId>
<artifactId>junit-platform-console</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
......