Skip to content

Commit

Permalink
Merge branch 'master' into RemoveEmailOnDeactivation
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Jul 24, 2018
2 parents 1683767 + 8778981 commit 04610a8
Show file tree
Hide file tree
Showing 49 changed files with 557 additions and 135 deletions.
27 changes: 20 additions & 7 deletions Jenkinsfile
Expand Up @@ -17,11 +17,23 @@ node {
git url: 'https://github.com/ORCID/ORCID-Source.git', branch: env.BRANCH_NAME
def EHCACHE_LOCATION="${WORKSPACE}/tmp/ehcache_${env.BRANCH_NAME}_$BUILD_NUMBER"

stage('TEST') {
stage('SETUP VERSION') {
try {
sh "mkdir -p $EHCACHE_LOCATION"
do_maven("versions:set -DnewVersion=${BUILD_NUMBER}-${BRANCH_NAME} -f orcid-test/pom.xml")
do_maven("versions:set -DnewVersion=${BUILD_NUMBER}-${BRANCH_NAME} -f orcid-model/pom.xml")
do_maven("versions:set -DnewVersion=${BUILD_NUMBER}-${BRANCH_NAME}")
} catch(Exception err) {
orcid_notify("Failed to update artifact versions ${env.BRANCH_NAME}#$BUILD_NUMBER FAILED [${JOB_URL}]", 'ERROR')
deleteDir()
throw err
}
}

stage('TEST') {
try {
do_maven("clean")
do_maven("-D maven.test.skip=true -D license.skip=true -D branchVersion=${BUILD_NUMBER}-${BRANCH_NAME} -f orcid-test/pom.xml clean install")
do_maven("-D maven.test.skip=true -D license.skip=true -f orcid-test/pom.xml clean install")
} catch(Exception err) {
orcid_notify("test compile failed ${env.BRANCH_NAME}#$BUILD_NUMBER FAILED [${JOB_URL}]", 'ERROR')
deleteDir()
Expand All @@ -30,7 +42,7 @@ node {
}
stage('MODEL') {
try {
do_maven("-D maven.test.skip=true -D license.skip=true -D branchVersion=${BUILD_NUMBER}-${BRANCH_NAME} -f orcid-model/pom.xml clean install")
do_maven("-D maven.test.skip=true -D license.skip=true -f orcid-model/pom.xml clean install")
} catch(Exception err) {
orcid_notify("model compile failed ${env.BRANCH_NAME}#$BUILD_NUMBER FAILED [${JOB_URL}]", 'ERROR')
deleteDir()
Expand All @@ -40,7 +52,7 @@ node {

stage('PARENT') {
try {
do_maven("-D maven.test.skip=true -D license.skip=true -D branchVersion=${BUILD_NUMBER}-${BRANCH_NAME} clean install")
do_maven("-D maven.test.skip=true -D license.skip=true clean install")
} catch(Exception err) {
orcid_notify("parent compile failed ${env.BRANCH_NAME}#$BUILD_NUMBER FAILED [${JOB_URL}]", 'ERROR')
deleteDir()
Expand All @@ -51,9 +63,9 @@ node {
stage('TESTS') {
try {
parallel(
model: {do_maven("test -D branchVersion=${BUILD_NUMBER}-${env.BRANCH_NAME} -f orcid-test/pom.xml")},
test: {do_maven("test -D branchVersion=${BUILD_NUMBER}-${env.BRANCH_NAME} -f orcid-model/pom.xml")},
parent: {do_maven("test -D branchVersion=${BUILD_NUMBER}-${env.BRANCH_NAME}")}
model: {do_maven("test -f orcid-test/pom.xml")},
test: {do_maven("test -f orcid-model/pom.xml")},
parent: {do_maven("test")}
)
} catch(Exception err) {
orcid_notify("running tests on model and test modules failed ${env.BRANCH_NAME}#$BUILD_NUMBER FAILED [${JOB_URL}]", 'ERROR')
Expand All @@ -68,6 +80,7 @@ node {
def report_and_clean(){
junit '**/target/surefire-reports/*.xml'
deleteDir()
sh "rm -rf /var/lib/jenkins/.m2/repository/org/orcid/orcid-**/${BUILD_NUMBER}-${BRANCH_NAME}"
}

def orcid_notify(message, level){
Expand Down
6 changes: 3 additions & 3 deletions orcid-activemq/pom.xml
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>orcid-activemq</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
<name>ORCID - ActiveMQ</name>
<url>http://maven.apache.org</url>

Expand All @@ -15,7 +15,7 @@
<parent>
<groupId>org.orcid</groupId>
<artifactId>orcid-parent</artifactId>
<version>${branchVersion}</version>
<version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -46,7 +46,7 @@
<groupId>org.orcid</groupId>
<artifactId>orcid-test</artifactId>
<scope>test</scope>
<version>${branchVersion}</version>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down
8 changes: 4 additions & 4 deletions orcid-activities-indexer/pom.xml
Expand Up @@ -17,17 +17,17 @@
<dependency>
<groupId>org.orcid</groupId>
<artifactId>orcid-utils</artifactId>
<version>${branchVersion}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.orcid</groupId>
<artifactId>orcid-model</artifactId>
<version>${branchVersion}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.orcid</groupId>
<artifactId>orcid-test</artifactId>
<version>${branchVersion}</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -106,7 +106,7 @@
<parent>
<groupId>org.orcid</groupId>
<artifactId>orcid-parent</artifactId>
<version>${branchVersion}</version>
<version>${project.version}</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
3 changes: 1 addition & 2 deletions orcid-api-common/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.orcid</groupId>
<artifactId>orcid-parent</artifactId>
<version>${branchVersion}</version>
<version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -16,7 +16,6 @@
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<jena.dir>${project.build.directory}/generated-sources/jena</jena.dir>
<branchVersion>1.1.5-SNAPSHOT</branchVersion>
</properties>

<repositories>
Expand Down
3 changes: 1 addition & 2 deletions orcid-api-web/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.orcid</groupId>
<artifactId>orcid-parent</artifactId>
<version>${branchVersion}</version>
<version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -16,7 +16,6 @@

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<branchVersion>1.1.5-SNAPSHOT</branchVersion>
</properties>

<dependencies>
Expand Down
3 changes: 1 addition & 2 deletions orcid-core/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.orcid</groupId>
<artifactId>orcid-parent</artifactId>
<version>${branchVersion}</version>
<version>1.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -15,7 +15,6 @@

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<branchVersion>1.1.5-SNAPSHOT</branchVersion>
</properties>

<repositories>
Expand Down
Expand Up @@ -296,7 +296,7 @@ public void sendTips(Integer customBatchSize, String fromAddress) {
callables.add(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
processServiceAnnouncementOrNotification(n);
processServiceAnnouncementOrNotification(n, fromAddress);
return true;
}

Expand Down
Expand Up @@ -12,14 +12,14 @@ public int compare(PeerReviewSummary x, PeerReviewSummary y) {
return 0;
}

if (x.getCompletionDate() == null) {
if (y.getCompletionDate() == null) {
return -1;
}

if (y.getCompletionDate() == null) {
if (x.getCompletionDate() == null) {
return 1;
}
return x.getCompletionDate().compareTo(y.getCompletionDate());
return y.getCompletionDate().compareTo(x.getCompletionDate());
}

}
48 changes: 48 additions & 0 deletions orcid-core/src/main/java/org/orcid/pojo/PIDPojo.java
@@ -0,0 +1,48 @@
package org.orcid.pojo;

public class PIDPojo {

private String idType="";
private String idValue="";
private String normValue ="";
private String normUrl="";

public PIDPojo(){

}

public PIDPojo(String idType, String idValue, String normValue, String normUrl) {
super();
this.idType = idType;
this.idValue = idValue;
this.normValue = normValue;
this.normUrl = normUrl;
}

public String getIdType() {
return idType;
}
public void setIdType(String idType) {
this.idType = idType;
}
public String getIdValue() {
return idValue;
}
public void setIdValue(String idValue) {
this.idValue = idValue;
}
public String getNormValue() {
return normValue;
}
public void setNormValue(String normValue) {
this.normValue = normValue;
}
public String getNormUrl() {
return normUrl;
}
public void setNormUrl(String normUrl) {
this.normUrl = normUrl;
}


}
Expand Up @@ -20,7 +20,7 @@ public class PeerReviewGroup implements Serializable {

private String type;

private long id;
private long groupId;

public List<PeerReviewForm> getPeerReviews() {
return peerReviews;
Expand All @@ -46,12 +46,12 @@ public void setDescription(String description) {
this.description = description;
}

public long getId() {
return id;
public long getGroupId() {
return groupId;
}

public void setId(long id) {
this.id = id;
public void setGroupId(long groupId) {
this.groupId = groupId;
}

public String getType() {
Expand All @@ -71,7 +71,7 @@ public static PeerReviewGroup valueOf(org.orcid.jaxb.model.v3.rc1.record.summary
group.setName(groupName);
group.setType(type);
group.setDescription(groupDescription);
group.setId(groupIdRecord.getPutCode());
group.setGroupId(groupIdRecord.getPutCode());
group.setPeerReviews(new ArrayList<>());

for (PeerReviewSummary peerReviewSummary : peerReviewGroup.getPeerReviewSummary()) {
Expand Down

0 comments on commit 04610a8

Please sign in to comment.