Skip to content

Commit 42c7057

Browse files
authored
Merge branch '3.0.0-RC' into deprecated
2 parents 93ee4c1 + 85f22b8 commit 42c7057

File tree

8 files changed

+90
-78
lines changed

8 files changed

+90
-78
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ The *GoodData Java SDK* logs using `slf4j-api`. Please adjust your logging confi
4646
<dependency>
4747
<groupId>org.slf4j</groupId>
4848
<artifactId>slf4j-nop</artifactId>
49-
<version>3.0.0-RC.1+api1</version>
5049
</dependency>
5150
```
5251

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"process": {
3-
"recoverable": true
4-
}
2+
"process": {
3+
"recoverable": true
4+
}
55
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"process": {
3-
"recoveryInProgress": true
4-
}
2+
"process": {
3+
"recoveryInProgress": true
4+
}
55
}

gooddata-java/src/main/java/com/gooddata/sdk/service/GoodData.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public void logout() {
324324
*
325325
* @return initialized service for project management
326326
*/
327-
@Bean
327+
@Bean("goodDataProjectService")
328328
public ProjectService getProjectService() {
329329
return projectService;
330330
}
@@ -334,7 +334,7 @@ public ProjectService getProjectService() {
334334
*
335335
* @return initialized service for account management
336336
*/
337-
@Bean
337+
@Bean("goodDataAccountService")
338338
public AccountService getAccountService() {
339339
return accountService;
340340
}
@@ -345,7 +345,7 @@ public AccountService getAccountService() {
345345
*
346346
* @return initialized service for metadata management
347347
*/
348-
@Bean
348+
@Bean("goodDataMetadataService")
349349
public MetadataService getMetadataService() {
350350
return metadataService;
351351
}
@@ -355,7 +355,7 @@ public MetadataService getMetadataService() {
355355
*
356356
* @return initialized service for model management
357357
*/
358-
@Bean
358+
@Bean("goodDataModelService")
359359
public ModelService getModelService() {
360360
return modelService;
361361
}
@@ -365,7 +365,7 @@ public ModelService getModelService() {
365365
*
366366
* @return initialized service for API root management
367367
*/
368-
@Bean
368+
@Bean("goodDataGdcService")
369369
public GdcService getGdcService() {
370370
return gdcService;
371371
}
@@ -375,7 +375,7 @@ public GdcService getGdcService() {
375375
*
376376
* @return initialized service for data store management
377377
*/
378-
@Bean
378+
@Bean("goodDataDataStoreService")
379379
public DataStoreService getDataStoreService() {
380380
return dataStoreService;
381381
}
@@ -385,7 +385,7 @@ public DataStoreService getDataStoreService() {
385385
*
386386
* @return initialized service for dataset management
387387
*/
388-
@Bean
388+
@Bean("goodDataDatasetService")
389389
public DatasetService getDatasetService() {
390390
return datasetService;
391391
}
@@ -395,7 +395,7 @@ public DatasetService getDatasetService() {
395395
*
396396
* @return initialized service for exports
397397
*/
398-
@Bean
398+
@Bean("goodDataExportService")
399399
public ExportService getExportService() {
400400
return exportService;
401401
}
@@ -405,7 +405,7 @@ public ExportService getExportService() {
405405
*
406406
* @return initialized service for dataload processes management and process executions
407407
*/
408-
@Bean
408+
@Bean("goodDataProcessService")
409409
public ProcessService getProcessService() {
410410
return processService;
411411
}
@@ -415,7 +415,7 @@ public ProcessService getProcessService() {
415415
*
416416
* @return initialized service for ADS management
417417
*/
418-
@Bean
418+
@Bean("goodDataWarehouseService")
419419
public WarehouseService getWarehouseService() {
420420
return warehouseService;
421421
}
@@ -425,7 +425,7 @@ public WarehouseService getWarehouseService() {
425425
*
426426
* @return initialized service for connector integration management
427427
*/
428-
@Bean
428+
@Bean("goodDataConnectorService")
429429
public ConnectorService getConnectorService() {
430430
return connectorService;
431431
}
@@ -435,7 +435,7 @@ public ConnectorService getConnectorService() {
435435
*
436436
* @return initialized service for project notifications management
437437
*/
438-
@Bean
438+
@Bean("goodDataNotificationService")
439439
public NotificationService getNotificationService() {
440440
return notificationService;
441441
}
@@ -445,7 +445,7 @@ public NotificationService getNotificationService() {
445445
*
446446
* @return initialized service for metadata export/import
447447
*/
448-
@Bean
448+
@Bean("goodDataExportImportService")
449449
public ExportImportService getExportImportService() {
450450
return exportImportService;
451451
}
@@ -455,7 +455,7 @@ public ExportImportService getExportImportService() {
455455
*
456456
* @return initialized service for feature flag management
457457
*/
458-
@Bean
458+
@Bean("goodDataFeatureFlagService")
459459
public FeatureFlagService getFeatureFlagService() {
460460
return featureFlagService;
461461
}
@@ -465,7 +465,7 @@ public FeatureFlagService getFeatureFlagService() {
465465
*
466466
* @return initialized service for output stage management
467467
*/
468-
@Bean
468+
@Bean("goodDataOutputStageService")
469469
public OutputStageService getOutputStageService() {
470470
return outputStageService;
471471
}
@@ -475,7 +475,7 @@ public OutputStageService getOutputStageService() {
475475
*
476476
* @return initialized service for project templates
477477
*/
478-
@Bean
478+
@Bean("goodDataProjectTemplateService")
479479
public ProjectTemplateService getProjectTemplateService() {
480480
return projectTemplateService;
481481
}
@@ -484,7 +484,7 @@ public ProjectTemplateService getProjectTemplateService() {
484484
* Get initialized service for audit events
485485
* @return initialized service for audit events
486486
*/
487-
@Bean
487+
@Bean("goodDataAuditEventService")
488488
public AuditEventService getAuditEventService() {
489489
return auditEventService;
490490
}
@@ -493,7 +493,7 @@ public AuditEventService getAuditEventService() {
493493
* Get initialized service for afm execution
494494
* @return initialized service for afm execution
495495
*/
496-
@Bean
496+
@Bean("goodDataExecuteAfmService")
497497
public ExecuteAfmService getExecuteAfmService() {
498498
return executeAfmService;
499499
}
@@ -502,7 +502,7 @@ public ExecuteAfmService getExecuteAfmService() {
502502
* Get initialized service for Life Cycle Management
503503
* @return initialized service for Life Cycle Management
504504
*/
505-
@Bean
505+
@Bean("goodDataLcmService")
506506
public LcmService getLcmService() {
507507
return lcmService;
508508
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved.
3+
* This source code is licensed under the BSD-style license found in the
4+
* LICENSE.txt file in the root directory of this source tree.
5+
*/
6+
package com.gooddata.sdk.service
7+
8+
import org.springframework.context.support.ClassPathXmlApplicationContext
9+
import spock.lang.Shared
10+
import spock.lang.Specification
11+
import spock.lang.Unroll
12+
13+
class GoodDataBeansAsServicesIT extends Specification {
14+
15+
@Shared ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext('spring/gd-annotationConfig.xml')
16+
17+
@Unroll
18+
def "should register service of type #clazzName from xml using annotation config"() {
19+
expect:
20+
context.getBean(clazz)
21+
22+
where:
23+
clazz << GoodData.class.getDeclaredMethods()
24+
.collect { m -> m.returnType}
25+
.findAll {rt -> rt.name.endsWith('Service')}
26+
clazzName = clazz.simpleName
27+
}
28+
}

gooddata-java/src/test/java/com/gooddata/sdk/service/spring/GoodDataBeansAsServicesIT.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
<httpclient.version>4.5.7</httpclient.version>
5151
<httpcore.version>4.4.11</httpcore.version>
5252
<jackson.version>2.9.8</jackson.version>
53-
<slf4j.version>1.7.25</slf4j.version>
53+
<slf4j.version>1.7.26</slf4j.version>
5454
<spring.version>4.3.18.RELEASE</spring.version>
5555
<jadler.version>1.3.0</jadler.version>
56-
<json-unit.version>2.3.0</json-unit.version>
56+
<json-unit.version>2.4.0</json-unit.version>
5757
<surefire.version>2.22.1</surefire.version>
5858
<failsafe.version>2.22.1</failsafe.version>
5959
</properties>
@@ -415,13 +415,13 @@
415415
<artifactId>jadler-core</artifactId>
416416
<version>${jadler.version}</version>
417417
<scope>test</scope>
418-
<exclusions>
419-
<exclusion>
420-
<groupId>org.hamcrest</groupId>
421-
<artifactId>hamcrest-library</artifactId>
422-
</exclusion>
423-
</exclusions>
424-
</dependency>
418+
<exclusions>
419+
<exclusion>
420+
<groupId>org.hamcrest</groupId>
421+
<artifactId>hamcrest-library</artifactId>
422+
</exclusion>
423+
</exclusions>
424+
</dependency>
425425
<dependency>
426426
<groupId>net.jadler</groupId>
427427
<artifactId>jadler-all</artifactId>
@@ -437,7 +437,7 @@
437437
<dependency>
438438
<groupId>nl.jqno.equalsverifier</groupId>
439439
<artifactId>equalsverifier</artifactId>
440-
<version>3.1.4</version>
440+
<version>3.1.5</version>
441441
<scope>test</scope>
442442
</dependency>
443443
<dependency>

release.sh

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,46 +34,58 @@ done
3434

3535
shift $(( ${OPTIND} - 1 ))
3636

37-
if [ $# -ne 0 ]
38-
then
37+
if [[ $# -ne 0 ]]; then
3938
echo "There are unexpected parameters!" 1>&2
4039
usage
4140
exit 1
4241
fi
4342

44-
if [ -z "${VERSION}" ]
45-
then
43+
if [[ -z "${VERSION}" ]]; then
4644
echo "No version given!"
4745
usage
4846
exit 1
4947
fi
5048

51-
if [ -z "${GPG_PASS}" ]
52-
then
49+
if ! [[ ${VERSION} =~ ^[0-9]+\.[0-9]+\.[0-9]+(-RC\.[0-9]+)?$ ]]; then
50+
echo "Version has to match regex ^[0-9]+\.[0-9]+\.[0-9]+(-RC\.[0-9]+)?$"
51+
exit 1
52+
fi
53+
54+
if [ -z "${GPG_PASS}" ]; then
5355
echo "Enter gpg password: "
5456
read -s GPG_PASS
55-
if [ -z "${GPG_PASS}" ]
56-
then
57+
if [[ -z "${GPG_PASS}" ]]; then
5758
echo "No gpg password given!"
5859
usage
5960
exit 1
6061
fi
6162
fi
6263

64+
if [[ $(git log -1 --pretty="%s") =~ ^\[maven-release-plugin\].+$ ]]; then
65+
echo "Latest commit in your branch is from maven-release-plugin. You're either on wrong branch or your previous release trial failed and you haven't removed commits created in this trial."
66+
exit 1
67+
fi
68+
69+
if [[ $(git log -1 --pretty="%s") =~ "^bump version$" ]]; then
70+
echo "Latest commit in your branch is \"bump version\". You're either on wrong branch or your previous release trial failed and you haven't removed commits created in this trial."
71+
exit 1
72+
fi
73+
6374
API_VERSION=$(cat gooddata-java-model/src/main/resources/GoodDataApiVersion)
64-
FULL_VERSION=$VERSION+api$API_VERSION
65-
DEV_VERSION=$(echo $VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')-SNAPSHOT
75+
FULL_VERSION=${VERSION}+api${API_VERSION}
76+
DEV_VERSION=$(echo ${VERSION} | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')-SNAPSHOT
6677

6778
sed -i.bak "s/\(<version>\)[0-9]*\.[0-9]*\.[0-9]*[^<]*\(<\/version>\)/\1${FULL_VERSION}\2/" README.md && rm -f README.md.bak
6879
git commit -a -m "bump version"
6980

7081
mvn --batch-mode release:prepare release:perform -DreleaseVersion=${FULL_VERSION} -DdevelopmentVersion=${DEV_VERSION} -Darguments="-Dgpg.passphrase=${GPG_PASS}"
7182
MVN_RET_VAL=$?
72-
if [ $MVN_RET_VAL -ne 0 ]; then
73-
echo "Mvn build failed - please fix it and try to release again"
74-
echo "Removing last commit '$(git log -1 --pretty="%h %s")'"
75-
git reset --hard HEAD~1
76-
exit $MVN_RET_VAL
83+
if [[ ${MVN_RET_VAL} -ne 0 ]]; then
84+
echo
85+
echo "ERROR: Maven build failed - please fix it and try to release again."
86+
echo "WARN: You may need to remove up to 3 commits depending on what was done before the failure. Use e.g.: git reset --hard origin/HEAD"
87+
echo
88+
exit ${MVN_RET_VAL}
7789
fi
7890

7991
git push origin --tags HEAD

0 commit comments

Comments
 (0)