Skip to content

Commit

Permalink
Merge branch 'main' into task/main/DURACOM-288
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Nov 7, 2024
2 parents 8f3aebe + 76355af commit ae1acef
Show file tree
Hide file tree
Showing 45 changed files with 380 additions and 425 deletions.
118 changes: 118 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#-------------------
# DSpace's dependabot rules. Enables maven updates for all dependencies on a weekly basis
# for main and any maintenance branches. Security updates only apply to main.
#-------------------
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
# Allow up to 10 open PRs for dependencies
open-pull-requests-limit: 10
# Group together some upgrades in a single PR
groups:
# Group together all Build Tools in a single PR
build-tools:
applies-to: version-updates
patterns:
- "org.apache.maven.plugins:*"
- "*:*-maven-plugin"
- "*:maven-*-plugin"
- "com.github.spotbugs:spotbugs"
- "com.google.code.findbugs:*"
- "com.google.errorprone:*"
- "com.puppycrawl.tools:checkstyle"
- "org.sonatype.plugins:*"
exclude-patterns:
# Exclude anything from Spring, as that is in a separate group
- "org.springframework.*:*"
update-types:
- "minor"
- "patch"
test-tools:
applies-to: version-updates
patterns:
- "junit:*"
- "com.github.stefanbirker:system-rules"
- "com.h2database:*"
- "io.findify:s3mock*"
- "io.netty:*"
- "org.hamcrest:*"
- "org.mock-server:*"
- "org.mockito:*"
update-types:
- "minor"
- "patch"
# Group together all Apache Commons deps in a single PR
apache-commons:
applies-to: version-updates
patterns:
- "org.apache.commons:*"
- "commons-*:commons-*"
update-types:
- "minor"
- "patch"
# Group together all fasterxml deps in a single PR
fasterxml:
applies-to: version-updates
patterns:
- "com.fasterxml:*"
- "com.fasterxml.*:*"
update-types:
- "minor"
- "patch"
# Group together all Hibernate deps in a single PR
hibernate:
applies-to: version-updates
patterns:
- "org.hibernate.*:*"
update-types:
- "minor"
- "patch"
# Group together all Jakarta deps in a single PR
jakarta:
applies-to: version-updates
patterns:
- "jakarta.*:*"
- "org.eclipse.angus:jakarta.mail"
- "org.glassfish.jaxb:jaxb-runtime"
update-types:
- "minor"
- "patch"
# Group together all Google deps in a single PR
google-apis:
applies-to: version-updates
patterns:
- "com.google.apis:*"
- "com.google.api-client:*"
- "com.google.http-client:*"
- "com.google.oauth-client:*"
update-types:
- "minor"
- "patch"
# Group together all Spring deps in a single PR
spring:
applies-to: version-updates
patterns:
- "org.springframework:*"
- "org.springframework.*:*"
update-types:
- "minor"
- "patch"
# Group together all WebJARs deps in a single PR
webjars:
applies-to: version-updates
patterns:
- "org.webjars:*"
- "org.webjars.*:*"
update-types:
- "minor"
- "patch"
ignore:
# Don't try to auto-update any DSpace dependencies
- dependency-name: "org.dspace:*"
- dependency-name: "org.dspace.*:*"
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
- dependency-name: "*"
update-types: ["version-update:semver-major"]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags
.project
.classpath
.checkstyle
.factorypath

## Ignore project files created by IntelliJ IDEA
*.iml
Expand Down
2 changes: 1 addition & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ For more information on CheckStyle configurations below, see: http://checkstyle.
<!-- Requirements for Javadocs for methods -->
<module name="JavadocMethod">
<!-- All public methods MUST HAVE Javadocs -->
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<!-- Allow params, throws and return tags to be optional -->
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
Expand Down
22 changes: 11 additions & 11 deletions dspace-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>validate</phase>
Expand All @@ -116,7 +116,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
<configuration>
<revisionOnScmFailure>UNKNOWN_REVISION</revisionOnScmFailure>
</configuration>
Expand Down Expand Up @@ -177,7 +177,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<executions>
<execution>
<id>workflow-curation</id>
Expand Down Expand Up @@ -814,7 +814,7 @@
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-junit-rule</artifactId>
<version>5.11.2</version>
<version>5.15.0</version>
<scope>test</scope>
<exclusions>
<!-- Exclude snakeyaml to avoid conflicts with: spring-boot-starter-cache -->
Expand Down Expand Up @@ -865,32 +865,32 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.1.106.Final</version>
<version>4.1.114.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>4.1.106.Final</version>
<version>4.1.114.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>4.1.106.Final</version>
<version>4.1.114.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.1.106.Final</version>
<version>4.1.114.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.106.Final</version>
<version>4.1.114.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.106.Final</version>
<version>4.1.114.Final</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
Expand All @@ -911,7 +911,7 @@
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
import org.dspace.discovery.SearchUtils;
import org.dspace.servicemanager.DSpaceKernelImpl;
import org.dspace.servicemanager.DSpaceKernelInit;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.rules.TestName;

/**
* Abstract Test class copied from DSpace API
Expand All @@ -46,6 +50,12 @@ public class AbstractDSpaceIntegrationTest {
*/
protected static DSpaceKernelImpl kernelImpl;

/**
* Obtain the TestName from JUnit, so that we can print it out in the test logs (see below)
*/
@Rule
public TestName testName = new TestName();

/**
* Default constructor
*/
Expand Down Expand Up @@ -90,6 +100,20 @@ public static void initTestEnvironment() {
}
}

@Before
public void printTestMethodBefore() {
// Log the test method being executed. Put lines around it to make it stand out.
log.info("---");
log.info("Starting execution of test method: {}()", testName.getMethodName());
log.info("---");
}

@After
public void printTestMethodAfter() {
// Log the test method just completed.
log.info("Finished execution of test method: {}()", testName.getMethodName());
}

/**
* This method will be run after all tests finish as per @AfterClass. It
* will clean resources initialized by the @BeforeClass methods.
Expand Down
23 changes: 23 additions & 0 deletions dspace-api/src/test/java/org/dspace/AbstractDSpaceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
import org.apache.logging.log4j.Logger;
import org.dspace.servicemanager.DSpaceKernelImpl;
import org.dspace.servicemanager.DSpaceKernelInit;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;

Expand Down Expand Up @@ -62,6 +66,12 @@ protected AbstractDSpaceTest() { }
*/
protected static DSpaceKernelImpl kernelImpl;

/**
* Obtain the TestName from JUnit, so that we can print it out in the test logs (see below)
*/
@Rule
public TestName testName = new TestName();

/**
* This method will be run before the first test as per @BeforeClass. It will
* initialize shared resources required for all tests of this class.
Expand Down Expand Up @@ -94,6 +104,19 @@ public static void initKernel() {
}
}

@Before
public void printTestMethodBefore() {
// Log the test method being executed. Put lines around it to make it stand out.
log.info("---");
log.info("Starting execution of test method: {}()", testName.getMethodName());
log.info("---");
}

@After
public void printTestMethodAfter() {
// Log the test method just completed.
log.info("Finished execution of test method: {}()", testName.getMethodName());
}

/**
* This method will be run after all tests finish as per @AfterClass. It
Expand Down
18 changes: 15 additions & 3 deletions dspace-server-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.1.0</version>
<version>1.2.1</version>
<executions>
<execution>
<phase>initialize</phase>
Expand Down Expand Up @@ -343,6 +343,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<!-- Use version brought in by spring-boot-starter-web above -->
<exclusion>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-observation</artifactId>
</exclusion>
<!-- Use version brought in by spring-boot-starter-web above -->
<exclusion>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-commons</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -419,7 +431,7 @@
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>json-editor__json-editor</artifactId>
<version>2.6.1</version>
<version>2.15.1</version>
</dependency>
<!-- Also pull in current version of Bootstrap via WebJars.
This is used by BOTH our HAL Browser and our OAI-PMH interface.
Expand All @@ -437,7 +449,7 @@
<artifactId>spring-boot-starter-security</artifactId>
<version>${spring-boot.version}</version>
<exclusions>
<!-- Later version brought in by spring-boot-starter-web above -->
<!-- Use version brought in by spring-boot-starter-web above -->
<exclusion>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-observation</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private AuthenticationTokenResource shortLivedTokenResponse(HttpServletRequest r
* @return ResponseEntity
*/
@RequestMapping(value = "/login", method = { RequestMethod.GET, RequestMethod.PUT, RequestMethod.PATCH,
RequestMethod.DELETE })
RequestMethod.DELETE })
public ResponseEntity login() {
return ResponseEntity.status(HttpStatus.METHOD_NOT_ALLOWED).body("Only POST is allowed for login requests.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import org.springframework.web.bind.annotation.RestController;

/**
* This controller will handle all the incoming calls on the api/code/items/{uuid}/owningCollection endpoint
* This controller will handle all the incoming calls on the api/core/items/{uuid}/owningCollection endpoint
* where the uuid corresponds to the item of which you want to edit the owning collection.
*/
@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* @author Andrea Bollini (andrea.bollini at 4science.it)
*/
@LinksRest(links = {
@LinkRest(method = "getEperson", name = AuthorizationRest.EPERSON),
@LinkRest(method = "getFeature", name = AuthorizationRest.FEATURE),
@LinkRest(method = "getObject", name = AuthorizationRest.OBJECT)
@LinkRest(method = "getEperson", name = AuthorizationRest.EPERSON),
@LinkRest(method = "getFeature", name = AuthorizationRest.FEATURE),
@LinkRest(method = "getObject", name = AuthorizationRest.OBJECT)
})
public class AuthorizationRest extends BaseObjectRest<String> {
public static final String NAME = "authorization";
Expand Down
Loading

0 comments on commit ae1acef

Please sign in to comment.