Commit bf921e846b16483629f3b6c29428f1a529d9522e

Authored by Paulo Graça
1 parent e01c1fd590
Exists in tests

PG: logging and maven optimization

ptcrisync/pom.xml
1 1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 3 <modelVersion>4.0.0</modelVersion>
4   - <groupId>PTCRISync</groupId>
5   - <artifactId>PTCRISync</artifactId>
  4 + <groupId>pt.ptcris</groupId>
  5 + <artifactId>ptcrisync</artifactId>
6 6 <version>0.0.1</version>
7 7  
8 8 <properties>
9 9 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10   - <log4j.version>2.4</log4j.version>
11   - <jaxb2-basics.version>0.9.5</jaxb2-basics.version>
12   - <jersey.version>2.22.1</jersey.version>
  10 + <orcid-api-client.version>2.0-rc1</orcid-api-client.version>
13 11 </properties>
14 12  
15 13 <dependencies>
16   - <!-- Log4J -->
  14 + <!-- Degois ORCID Client -->
17 15 <dependency>
18   - <groupId>org.apache.logging.log4j</groupId>
19   - <artifactId>log4j-core</artifactId>
20   - <version>${log4j.version}</version>
21   - </dependency>
22   - <dependency>
23   - <groupId>javax.ws.rs</groupId>
24   - <artifactId>javax.ws.rs-api</artifactId>
25   - <version>2.0.1</version>
26   - </dependency>
27   - <!-- JAXB2 -->
28   - <dependency>
29   - <groupId>org.jvnet.jaxb2_commons</groupId>
30   - <artifactId>jaxb2-basics-runtime</artifactId>
31   - <version>${jaxb2-basics.version}</version>
32   - </dependency>
33   - <!-- Jersey Client -->
34   - <dependency>
35   - <groupId>org.glassfish.jersey.core</groupId>
36   - <artifactId>jersey-client</artifactId>
37   - <version>${jersey.version}</version>
38   - </dependency>
39   - <dependency>
40   - <groupId>org.glassfish.jersey.containers</groupId>
41   - <artifactId>jersey-container-servlet</artifactId>
42   - <version>${jersey.version}</version>
43   - </dependency>
44   - <dependency>
45   - <groupId>org.glassfish.jersey.media</groupId>
46   - <artifactId>jersey-media-json-jackson</artifactId>
47   - <version>${jersey.version}</version>
48   - </dependency>
49   - <dependency>
50   - <groupId>org.glassfish.jersey.media</groupId>
51   - <artifactId>jersey-media-jaxb</artifactId>
52   - <version>${jersey.version}</version>
  16 + <groupId>org.um.dsi.gavea</groupId>
  17 + <artifactId>degois-orcid-client</artifactId>
  18 + <version>${orcid-api-client.version}</version>
53 19 </dependency>
54 20 </dependencies>
55 21  
  22 + <!-- Build Settings -->
56 23 <build>
57   - <sourceDirectory>src</sourceDirectory>
58 24 <plugins>
59   -<plugin>
60   - <groupId>org.apache.maven.plugins</groupId>
61   - <artifactId>maven-jar-plugin</artifactId>
62   - <configuration>
63   - <archive>
64   - <manifest>
65   - <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
66   - <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
67   - </manifest>
68   - </archive>
69   - </configuration>
70   -</plugin>
  25 + <plugin>
  26 + <groupId>org.apache.maven.plugins</groupId>
  27 + <artifactId>maven-jar-plugin</artifactId>
  28 + <version>2.6</version>
  29 + <configuration />
  30 + </plugin>
71 31 <plugin>
72 32 <artifactId>maven-compiler-plugin</artifactId>
73 33 <version>3.3</version>
... ... @@ -76,12 +36,34 @@
76 36 <target />
77 37 </configuration>
78 38 </plugin>
  39 + <plugin>
  40 + <inherited>true</inherited>
  41 + <artifactId>maven-deploy-plugin</artifactId>
  42 + <version>2.8.2</version>
  43 + <configuration>
  44 + <updateReleaseInfo>true</updateReleaseInfo>
  45 + </configuration>
  46 + </plugin>
79 47 </plugins>
80 48 </build>
  49 +
  50 + <distributionManagement>
  51 + <repository>
  52 + <id>internal.repo</id>
  53 + <name>Temporary Staging Repository</name>
  54 + <url>file:///tmp/mvn-repo</url>
  55 + </repository>
  56 + </distributionManagement>
  57 +
  58 + <!-- Environment Settings -->
  59 + <repositories>
  60 + <repository>
  61 + <id>dev-ptcris.repo</id>
  62 + <url>https://gitlab.fccn.pt/dev-ptcris/mvn-repo/raw/master</url>
  63 + </repository>
  64 + </repositories>
  65 +
  66 + <!-- More Project Information -->
81 67 <name>PTCRISync</name>
82 68 <description>This project aims to help the syncronization between ORCID and local systems.</description>
83   - <organization>
84   - <name>FCT|FCCN</name>
85   - <url>http://www.fccn.pt</url>
86   - </organization>
87   -</project>
88 69 \ No newline at end of file
  70 +</project>
... ...
ptcrisync/src/main/java/pt/ptcris/ORCIDHelper.java
... ... @@ -97,6 +97,9 @@ public class ORCIDHelper {
97 97 putCode = workSummary.getPutCode();
98 98 pubCodesList.add(putCode);
99 99 }
  100 + //putCode = workGroup.getWorkSummary().get(0).getPutCode();
  101 + //pubCodesList.add(putCode);
  102 +
100 103 }
101 104  
102 105 return pubCodesList;
... ... @@ -243,7 +246,8 @@ public class ORCIDHelper {
243 246 }
244 247  
245 248 public Work addWork(Work work) throws OrcidClientException {
246   - _log.debug("[addWork]");
  249 + _log.debug("[addWork]" + getWorkTitle(work));
  250 +
247 251 //Remove any putCode if exists
248 252 work.setPutCode(null);
249 253 BigInteger putCode = new BigInteger(client.addWork(work));
... ...