Skip to content

Commit 353ccc2

Browse files
committed
maven cleanup and removing the ui project from the master
1 parent f8b852a commit 353ccc2

22 files changed

Lines changed: 68 additions & 977 deletions

File tree

‎common-client/pom.xml‎

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -20,94 +20,6 @@
2020
<version>1.0.1-SNAPSHOT</version>
2121
</dependency>
2222

23-
<!-- util -->
24-
25-
<dependency>
26-
<groupId>com.google.guava</groupId>
27-
<artifactId>guava</artifactId>
28-
<version>${guava.version}</version>
29-
</dependency>
30-
31-
<dependency>
32-
<groupId>org.apache.commons</groupId>
33-
<artifactId>commons-lang3</artifactId>
34-
<version>${commons-lang3.version}</version>
35-
</dependency>
36-
37-
<dependency>
38-
<groupId>org.apache.httpcomponents</groupId>
39-
<artifactId>httpcore</artifactId>
40-
<version>${httpcore.version}</version>
41-
<exclusions>
42-
<exclusion>
43-
<artifactId>commons-logging</artifactId>
44-
<groupId>commons-logging</groupId>
45-
</exclusion>
46-
</exclusions>
47-
</dependency>
48-
49-
<dependency>
50-
<groupId>org.apache.httpcomponents</groupId>
51-
<artifactId>httpclient</artifactId>
52-
<exclusions>
53-
<exclusion>
54-
<artifactId>commons-logging</artifactId>
55-
<groupId>commons-logging</groupId>
56-
</exclusion>
57-
</exclusions>
58-
</dependency>
59-
60-
<!-- spring -->
61-
62-
<dependency>
63-
<groupId>org.springframework</groupId>
64-
<artifactId>spring-core</artifactId>
65-
<exclusions>
66-
<exclusion>
67-
<artifactId>commons-logging</artifactId>
68-
<groupId>commons-logging</groupId>
69-
</exclusion>
70-
</exclusions>
71-
</dependency>
72-
<dependency>
73-
<groupId>org.springframework</groupId>
74-
<artifactId>spring-context</artifactId>
75-
</dependency>
76-
<dependency>
77-
<groupId>org.springframework</groupId>
78-
<artifactId>spring-beans</artifactId>
79-
</dependency>
80-
<dependency>
81-
<groupId>org.springframework</groupId>
82-
<artifactId>spring-expression</artifactId>
83-
</dependency>
84-
<dependency>
85-
<groupId>org.springframework</groupId>
86-
<artifactId>spring-oxm</artifactId>
87-
</dependency>
88-
89-
<!-- may be unnecessary - check -->
90-
<dependency>
91-
<groupId>org.springframework</groupId>
92-
<artifactId>spring-aspects</artifactId>
93-
</dependency>
94-
<dependency>
95-
<groupId>org.springframework</groupId>
96-
<artifactId>spring-aop</artifactId>
97-
</dependency>
98-
99-
<dependency>
100-
<groupId>org.springframework</groupId>
101-
<artifactId>spring-web</artifactId>
102-
</dependency>
103-
104-
<!-- security -->
105-
106-
<dependency>
107-
<groupId>org.springframework.security</groupId>
108-
<artifactId>spring-security-config</artifactId>
109-
</dependency>
110-
11123
<!-- marshalling -->
11224

11325
<dependency>
@@ -132,49 +44,16 @@
13244
<dependency>
13345
<groupId>ch.qos.logback</groupId>
13446
<artifactId>logback-classic</artifactId>
135-
<!-- <scope>runtime</scope> -->
13647
</dependency>
13748
<dependency>
13849
<groupId>org.slf4j</groupId>
13950
<artifactId>jcl-over-slf4j</artifactId>
140-
<!-- <scope>runtime</scope> --> <!-- some spring dependencies need to compile against jcl -->
14151
</dependency>
14252
<dependency> <!-- needed to bridge to slf4j for projects that use the log4j APIs directly -->
14353
<groupId>org.slf4j</groupId>
14454
<artifactId>log4j-over-slf4j</artifactId>
14555
</dependency>
14656

147-
<!-- test scoped -->
148-
149-
<dependency>
150-
<groupId>org.springframework</groupId>
151-
<artifactId>spring-test</artifactId>
152-
<scope>test</scope>
153-
</dependency>
154-
155-
<dependency>
156-
<groupId>junit</groupId>
157-
<artifactId>junit</artifactId>
158-
<scope>test</scope>
159-
</dependency>
160-
161-
<dependency>
162-
<groupId>org.hamcrest</groupId>
163-
<artifactId>hamcrest-core</artifactId>
164-
<scope>test</scope>
165-
</dependency>
166-
<dependency>
167-
<groupId>org.hamcrest</groupId>
168-
<artifactId>hamcrest-library</artifactId>
169-
<scope>test</scope>
170-
</dependency>
171-
172-
<dependency>
173-
<groupId>org.mockito</groupId>
174-
<artifactId>mockito-core</artifactId>
175-
<scope>test</scope>
176-
</dependency>
177-
17857
</dependencies>
17958

18059
<build>
@@ -191,7 +70,6 @@
19170
<plugin>
19271
<groupId>org.apache.maven.plugins</groupId>
19372
<artifactId>maven-jar-plugin</artifactId>
194-
<version>2.6</version>
19573
<executions>
19674
<execution>
19775
<goals>

‎common-test/src/main/java/org/baeldung/test/common/web/AbstractLogicLiveTest.java‎

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,18 @@
33
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
44
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
55
import static org.apache.commons.lang3.RandomStringUtils.randomNumeric;
6-
import static org.baeldung.common.search.ClientOperation.EQ;
7-
import static org.baeldung.common.search.ClientOperation.NEG_EQ;
86
import static org.baeldung.common.spring.util.Profiles.CLIENT;
97
import static org.baeldung.common.spring.util.Profiles.TEST;
108
import static org.hamcrest.CoreMatchers.is;
119
import static org.hamcrest.MatcherAssert.assertThat;
12-
import static org.hamcrest.Matchers.equalTo;
1310
import static org.hamcrest.Matchers.notNullValue;
1411
import static org.junit.Assert.assertEquals;
1512
import static org.junit.Assert.assertNotNull;
1613

17-
import org.apache.commons.lang3.tuple.ImmutableTriple;
1814
import org.apache.http.HttpHeaders;
1915
import org.baeldung.client.IDtoOperations;
2016
import org.baeldung.client.marshall.IMarshaller;
2117
import org.baeldung.common.interfaces.INameableDto;
22-
import org.baeldung.common.search.ClientOperation;
23-
import org.baeldung.common.util.SearchField;
2418
import org.baeldung.common.web.WebConstants;
2519
import org.baeldung.test.common.client.template.IRestClient;
2620
import org.baeldung.test.common.util.IDUtil;
@@ -103,58 +97,6 @@ public final void givenResourceExists_whenResourceIsRetrieved_thenResourceIsCorr
10397
assertThat(res.getStatusCode(), is(409));
10498
}
10599

106-
// find one - by attributes
107-
// note: kept as the same tests from AbstractLogicClientRestLiveTest are
108-
// still ignored (bug in RestTemplate)
109-
110-
@Test
111-
/**/public final void givenResourceExists_whenResourceIsSearchedByNameAttribute_thenNoExceptions() {
112-
// Given
113-
final T existingResource = getApi().create(createNewResource());
114-
115-
// When
116-
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), EQ, existingResource.getName());
117-
getApi().searchOne(nameConstraint);
118-
}
119-
120-
@Test
121-
/**/public final void givenResourceExists_whenResourceIsSearchedByNameAttribute_thenResourceIsFound() {
122-
// Given
123-
final T existingResource = getApi().create(createNewResource());
124-
125-
// When
126-
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), EQ, existingResource.getName());
127-
final T resourceByName = getApi().searchOne(nameConstraint);
128-
129-
// Then
130-
assertNotNull(resourceByName);
131-
}
132-
133-
@Test
134-
/**/public final void givenResourceExists_whenResourceIsSearchedByNameAttribute_thenFoundResourceIsCorrect() {
135-
// Given
136-
final T existingResource = getApi().create(createNewResource());
137-
138-
// When
139-
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), EQ, existingResource.getName());
140-
final T resourceByName = getApi().searchOne(nameConstraint);
141-
142-
// Then
143-
assertThat(existingResource, equalTo(resourceByName));
144-
}
145-
146-
@Test
147-
/**/public final void givenResourceExists_whenResourceIsSearchedByNagatedNameAttribute_thenNoExceptions() {
148-
// Given
149-
final T existingResource = getApi().create(createNewResource());
150-
151-
// When
152-
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), NEG_EQ, existingResource.getName());
153-
getApi().searchAll(nameConstraint);
154-
155-
// Then
156-
}
157-
158100
// create
159101

160102
@Test

‎common-test/src/main/java/org/baeldung/test/common/web/AbstractSearchLiveTest.java‎

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
import static org.baeldung.common.spring.util.Profiles.CLIENT;
88
import static org.baeldung.common.spring.util.Profiles.TEST;
99
import static org.hamcrest.CoreMatchers.is;
10+
import static org.hamcrest.MatcherAssert.assertThat;
11+
import static org.hamcrest.Matchers.equalTo;
1012
import static org.hamcrest.Matchers.hasItem;
1113
import static org.hamcrest.Matchers.not;
12-
import static org.junit.Assert.assertThat;
14+
import static org.junit.Assert.assertNotNull;
1315

1416
import java.util.List;
1517

@@ -32,7 +34,7 @@
3234

3335
@SuppressWarnings("unchecked")
3436
@ActiveProfiles({ CLIENT, TEST })
35-
public abstract class AbstractSearchLiveTest<T extends INameableDto> extends AbstractSearchReadOnlyLiveTest<T>implements ISearchTest {
37+
public abstract class AbstractSearchLiveTest<T extends INameableDto> extends AbstractSearchReadOnlyLiveTest<T> implements ISearchTest {
3638

3739
public AbstractSearchLiveTest() {
3840
super();
@@ -83,6 +85,58 @@ public final void givenResourceWithIdExists_whenResourceIsSearchedById_thenResou
8385
assertThat(found, hasItem(existingResource));
8486
}
8587

88+
// find one - by attributes
89+
// note: kept as the same tests from AbstractLogicClientRestLiveTest are
90+
// still ignored (bug in RestTemplate)
91+
92+
@Test
93+
/**/public final void givenResourceExists_whenResourceIsSearchedByNameAttribute_thenNoExceptions() {
94+
// Given
95+
final T existingResource = getApi().create(createNewResource());
96+
97+
// When
98+
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), EQ, existingResource.getName());
99+
getApi().searchOne(nameConstraint);
100+
}
101+
102+
@Test
103+
/**/public final void givenResourceExists_whenResourceIsSearchedByNameAttribute_thenResourceIsFound() {
104+
// Given
105+
final T existingResource = getApi().create(createNewResource());
106+
107+
// When
108+
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), EQ, existingResource.getName());
109+
final T resourceByName = getApi().searchOne(nameConstraint);
110+
111+
// Then
112+
assertNotNull(resourceByName);
113+
}
114+
115+
@Test
116+
/**/public final void givenResourceExists_whenResourceIsSearchedByNameAttribute_thenFoundResourceIsCorrect() {
117+
// Given
118+
final T existingResource = getApi().create(createNewResource());
119+
120+
// When
121+
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), EQ, existingResource.getName());
122+
final T resourceByName = getApi().searchOne(nameConstraint);
123+
124+
// Then
125+
assertThat(existingResource, equalTo(resourceByName));
126+
}
127+
128+
@Test
129+
/**/public final void givenResourceExists_whenResourceIsSearchedByNagatedNameAttribute_thenNoExceptions() {
130+
// Given
131+
final T existingResource = getApi().create(createNewResource());
132+
133+
// When
134+
final ImmutableTriple<String, ClientOperation, String> nameConstraint = new ImmutableTriple<String, ClientOperation, String>(SearchField.name.name(), NEG_EQ, existingResource.getName());
135+
getApi().searchAll(nameConstraint);
136+
137+
// Then
138+
}
139+
86140
// by name
87141

88142
@Override

0 commit comments

Comments
 (0)