Skip to content

Commit

Permalink
[Upd] Update to JOPA 2.0.0, Spring Boot 3.2.5 and related libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed May 28, 2024
1 parent 92c8b7b commit 85c25bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 47 deletions.
49 changes: 8 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.4</version>
<version>3.2.5</version>
</parent>

<artifactId>termit</artifactId>
Expand All @@ -24,45 +24,15 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>central-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>kbss</id>
<url>https://kbss.felk.cvut.cz/m2repo</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>central-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

<properties>
<java.version>17</java.version>
<org.apache.tika.tika-core.version>2.7.0</org.apache.tika.tika-core.version>
<org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
<org.springdoc.version>2.2.0</org.springdoc.version>
<cz.cvut.kbss.jopa.version>2.0.1-SNAPSHOT</cz.cvut.kbss.jopa.version>
<cz.cvut.kbss.jopa.version>2.0.0</cz.cvut.kbss.jopa.version>
<cz.cvut.kbss.jsonld.version>0.14.3</cz.cvut.kbss.jsonld.version>
<org.aspectj.version>1.9.20</org.aspectj.version>

<!-- Default value for deployment type property which should otherwise specified on command line -->
<deployment>DEV</deployment>
Expand Down Expand Up @@ -142,14 +112,14 @@
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-rio-rdfxml</artifactId>
<version>4.3.8</version>
<version>4.3.11</version>
</dependency>

<!-- Spring declarative transactions with JOPA -->
<dependency>
<groupId>com.github.ledsoft</groupId>
<artifactId>jopa-spring-transaction</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.3.0</version>
</dependency>

<!-- Spring -->
Expand Down Expand Up @@ -196,6 +166,10 @@
<artifactId>httpclient5</artifactId>
<version>5.2.1</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>

<!-- JWT support for Java -->
<dependency>
Expand Down Expand Up @@ -473,13 +447,6 @@
</aspectLibraries>
<parameters>true</parameters>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${org.aspectj.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>main</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class ChangeTrackingAspect {
@Autowired
private ChangeTrackingHelperDao helperDao;

@Pointcut(value = "execution(public void persist(..)) && target(cz.cvut.kbss.termit.persistence.dao.GenericDao) " +
@Pointcut(value = "execution(public void persist(..)) && (target(cz.cvut.kbss.termit.persistence.dao.BaseAssetDao)) " +
"&& @args(cz.cvut.kbss.termit.model.changetracking.Audited)")
public void persistOperation() {
}
Expand All @@ -56,7 +56,7 @@ public void persistOperation() {
public void persistTermOperation() {
}

@Pointcut(value = "execution(public * update(..)) && target(cz.cvut.kbss.termit.persistence.dao.GenericDao) " +
@Pointcut(value = "execution(public * update(..)) && target(cz.cvut.kbss.termit.persistence.dao.BaseAssetDao) " +
"&& @args(cz.cvut.kbss.termit.model.changetracking.Audited)")
public void updateOperation() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ void detachDetachesInstanceFromPersistenceContext() {

transactional(() -> {
final Resource toDetach = sut.find(resource.getUri()).get();
assertTrue(sut.em.contains(toDetach));
assertTrue(em.contains(toDetach));
sut.detach(toDetach);
assertFalse(sut.em.contains(toDetach));
assertFalse(em.contains(toDetach));
});
}

Expand All @@ -247,9 +247,9 @@ void detachDoesNothingForNonManagedInstance() {
final Resource resource = Generator.generateResourceWithId();

transactional(() -> {
assertFalse(sut.em.contains(resource));
assertFalse(em.contains(resource));
sut.detach(resource);
assertFalse(sut.em.contains(resource));
assertFalse(em.contains(resource));
});
}

Expand Down

0 comments on commit 85c25bb

Please sign in to comment.