Skip to content

Tidy testapp and poms. #1521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down
55 changes: 21 additions & 34 deletions spring-data-couchbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,19 @@
<java-module-name>spring.data.couchbase</java-module-name>
<jodatime>2.10.13</jodatime>
<jakarta.validation>3.0.1</jakarta.validation>
<hibernate.validator>7.0.1.Final</hibernate.validator>
<apt>1.1.3</apt>
<querydsl>5.0.0</querydsl>
<mysema.querydsl>3.7.4</mysema.querydsl>
<jakarta.enterprise>3.0.0</jakarta.enterprise>
<org.hibernate.validator>7.0.1.Final</org.hibernate.validator>
<jakarta.el>4.0.0</jakarta.el>
<javax.el>3.0.0</javax.el>
<org.glassfish>4.0.2</org.glassfish>
<org.apache.geronimo.specs>1.0.1</org.apache.geronimo.specs>
<javax.interceptor>1.2.1</javax.interceptor>
<com.couchbase.mock>1.5.25</com.couchbase.mock>
<com.squareup.okhttp3>4.8.1</com.squareup.okhttp3>
<org.awaitility>4.0.3</org.awaitility>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -67,19 +76,11 @@
<version>${springdata.commons}</version>
</dependency>

<!-- in parent
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>${couchbase}</version>
</dependency>
-->

<!-- CDI -->
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>3.0.0</version>
<version>${jakarta.enterprise}</version>
</dependency>

<dependency>
Expand All @@ -92,14 +93,7 @@
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>7.0.1.Final</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<version>${org.hibernate.validator}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -137,22 +131,22 @@
<dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
<version>4.0.0</version>
<version>${jakarta.el}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
<version>${javax.el}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>4.0.2</version>
<version>${jakarta.el}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
Expand All @@ -162,42 +156,35 @@
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcdi_2.0_spec</artifactId>
<version>1.0.1</version>
<version>${org.apache.geronimo.specs}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-se</artifactId>
<version>${webbeans}</version>
<version>${javax.interceptor}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.couchbase.mock</groupId>
<artifactId>CouchbaseMock</artifactId>
<version>1.5.25</version>
<version>${com.couchbase.mock}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.8.1</version>
<version>${com.squareup.okhttp3}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-tls</artifactId>
<version>4.8.1</version>
<version>${com.squareup.okhttp3}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -226,7 +213,7 @@
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.0.3</version>
<version>${org.awaitility}</version>
<scope>test</scope>
</dependency>

Expand Down
118 changes: 54 additions & 64 deletions spring-data-testapp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-couchbase</artifactId>
</dependency>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!--- for testing only -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-couchbase</artifactId>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<properties>
<springdata.couchbase>5.0.0-SNAPSHOT</springdata.couchbase>
</properties>

<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.10.1</version>
</dependency>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-couchbase</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-couchbase</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-couchbase</artifactId>
<version>${springdata.couchbase}</version>
</dependency>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--
<version>3.0.0-SNAPSHOT</version>
-->
</plugin>
</plugins>
</build>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<repositories>
<repository>
Expand All @@ -72,24 +71,15 @@
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>

<!--
<pluginRepositories>
<pluginRepository>
<id>spring-plugins-release</id>
<url>https://repo.spring.io/plugins-release</url>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
-->

</project>
16 changes: 1 addition & 15 deletions spring-data-testapp/src/main/java/com/example/demo/Airport.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2021 the original author or authors.
* Copyright 2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,6 @@
/**
* Airport entity
*
* @author Michael Nitschinger
* @author Michael Reiche
*/
@Document
Expand Down Expand Up @@ -79,19 +78,6 @@ public LocalDateTime getOpenDate() {
return openDate;
}

/*
public Airport withId(String id) {
return new Airport(id, this.iata, this.icao);
}

public Airport withIcao(String icao) {
return new Airport(this.getId(), this.iata, icao);
}

public Airport withIata(String iata) {
return new Airport(this.getId(), iata, this.icao);
}
*/
public Airport clearVersion() {
version = Long.valueOf(0);
return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2021 the original author or authors.
* Copyright 2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.demo;

import com.couchbase.client.java.query.QueryScanConsistency;
Expand All @@ -32,10 +31,11 @@

/**
* Airport repository for testing <br>
*
* @author Michael Reiche
*/
@Repository
@Document
// @ScanConsistency(query = QueryScanConsistency.REQUEST_PLUS)
public interface AirportRepository extends CouchbaseRepository<Airport, String> {

// override an annotate with REQUEST_PLUS
Expand All @@ -49,7 +49,7 @@ public interface AirportRepository extends CouchbaseRepository<Airport, String>
@ScanConsistency(query = QueryScanConsistency.REQUEST_PLUS)
Airport findByIata(String iata);

@ScanConsistency(query = QueryScanConsistency.NOT_BOUNDED)
@ScanConsistency(query = QueryScanConsistency.NOT_BOUNDED)
Airport iata(String iata);

@Query("#{#n1ql.selectEntity} where iata = $1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2022 the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.demo;

import com.couchbase.client.java.transactions.TransactionResult;
Expand All @@ -9,6 +24,11 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;

/**
*
*
* @author Michael Reiche
*/
@Service
@Transactional
public class AirportService {
Expand Down
Loading