Skip to content

Commit cfa415c

Browse files
authored
Merge pull request #42 from gabriellucius/fix-maven-repository
Fix maven repository
2 parents 9696053 + 3a9a151 commit cfa415c

File tree

18 files changed

+104
-17
lines changed

18 files changed

+104
-17
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ Caso tenha dúvidas ou precise de suporte, acesse nosso [fórum].
133133

134134
Changelog
135135
---------
136+
4.1.1
137+
- Publicação da biblioteca no Repositório Global do Maven: ajustes no javadoc e melhorias gerais
138+
136139
4.1.0
137140
- Melhorias e adicionado exemplos das transações de cancelamento e estorno (total e parcial)
138141

public/example-api/build.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'br.com.uol.pagseguro'
2-
version '1.0-SNAPSHOT'
2+
version '4.1.1'
33

44
apply plugin: 'java'
55
apply plugin: 'idea'
@@ -8,14 +8,11 @@ apply plugin: 'eclipse'
88
sourceCompatibility = 1.6
99

1010
repositories {
11-
maven {
12-
url 'http://repo.mvn.intranet.s2it.com.br/nexus/content/groups/public/'
13-
}
11+
mavenCentral()
1412
}
1513

16-
1714
dependencies {
18-
compile (group: 'br.com.uol.pagseguro', name: 'pagseguro-api', version: '1.0-SNAPSHOT')
15+
compile (group: 'br.com.uol.pagseguro', name: 'pagseguro-api', version: '4.1.1')
1916
}
2017

2118
configurations.all {

source/build.gradle

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
group 'br.com.uol.pagseguro'
2-
version '3.1.1'
2+
version '4.1.1'
33

44
apply plugin: 'java'
55
apply plugin: 'idea'
66
apply plugin: 'eclipse'
7+
apply plugin: 'maven'
8+
apply plugin: 'signing'
79

810
sourceCompatibility = 1.6
911

1012
repositories {
11-
maven {
12-
url 'http://repo.mvn.intranet.s2it.com.br/nexus/content/groups/public/'
13-
}
13+
mavenCentral()
1414
}
1515

1616
dependencies {
@@ -23,3 +23,66 @@ dependencies {
2323
compileOnly(group: 'org.slf4j', name: 'slf4j-api', version: '1.7.21')
2424
compileOnly(group: 'commons-logging', name: 'commons-logging', version: '1.2')
2525
}
26+
27+
uploadArchives {
28+
repositories {
29+
mavenDeployer {
30+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
31+
32+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
33+
authentication(userName: ossrhUsername, password: ossrhPassword)
34+
}
35+
36+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
37+
authentication(userName: ossrhUsername, password: ossrhPassword)
38+
}
39+
40+
pom.project {
41+
name project.name
42+
packaging 'jar'
43+
44+
description 'A collection of domain classes to ease integrations with PagSeguro Api'
45+
url 'https://github.com/pagseguro/pagseguro-java-sdk/'
46+
47+
scm {
48+
url 'https://github.com/pagseguro/pagseguro-java-sdk/'
49+
}
50+
51+
licenses {
52+
license {
53+
name 'The Apache License, Version 2.0'
54+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
55+
}
56+
}
57+
58+
developers {
59+
developer {
60+
id 'pagseguro'
61+
name 'PagSeguro'
62+
63+
}
64+
}
65+
}
66+
}
67+
}
68+
}
69+
70+
task javadocJar(type: Jar) {
71+
classifier = 'javadoc'
72+
from javadoc
73+
}
74+
75+
task sourcesJar(type: Jar) {
76+
classifier = 'sources'
77+
from sourceSets.main.allSource
78+
}
79+
80+
artifacts {
81+
archives javadocJar, sourcesJar
82+
}
83+
84+
// Uncomment this block to sign the files when building to upload to Maven
85+
//signing {
86+
// sign configurations.archives
87+
//}
88+

source/gradle.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### OSSRH credentials to upload do Sonatype Nexus and Maven ###
2+
ossrhUsername=ossrhUsername
3+
ossrhPassword=ossrhPassword
4+
5+
### Signing access and files ###
6+
signing.keyId=THEKEYID
7+
signing.password=THEKEYPASSWORD
8+
signing.secretKeyRingFile=THEKEYRINGPATH

source/src/main/java/br/com/uol/pagseguro/api/common/domain/BankName.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public String getStringName() {
5959

6060
/**
6161
* Get bank name by string name
62+
* @return Name
6263
*/
6364
public Name getName() {
6465
return Name.fromName(stringName);

source/src/main/java/br/com/uol/pagseguro/api/common/domain/Permission.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ public interface Permission {
3131
/**
3232
* Get code of permission
3333
*
34-
* @return
34+
* @return Permission code
3535
*/
3636
PermissionCode getCode();
3737

3838
/**
3939
* Get status of permission
4040
*
41-
* @return
41+
* @return status
4242
*/
4343
String getStatus();
4444

4545
/**
4646
* Get last update of permission
4747
*
48-
* @return
48+
* @return last update date
4949
*/
5050
Date getLastUpdate();
5151

source/src/main/java/br/com/uol/pagseguro/api/common/domain/xml/PermissionXML.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public String getCodeId() {
5050
/**
5151
* Set code of permission
5252
*
53-
* @param code Code
53+
* @param codeId Code
5454
*/
5555
@XmlElement(name = "code")
5656
public void setCodeId(String codeId) {

source/src/main/java/br/com/uol/pagseguro/api/credential/Credential.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public static Credential sellerCredential(String email, String token) {
5959
* @param appId The Application id
6060
* @param appKey Specifies the corresponding token to PagSeguro application that is making the
6161
* request.
62+
* @return ApplicationCredential
6263
*/
6364
public static Credential applicationCredential(String appId, String appKey) {
6465
return new ApplicationCredential(appId, appKey);

source/src/main/java/br/com/uol/pagseguro/api/credential/CredentialProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ public interface CredentialProvider {
3131
/**
3232
* Get credential
3333
*
34-
* @return The credential used by user.
3534
* @see Credential
35+
* @return The credential used by user.
36+
* @throws Exception if a problem occurs
3637
*/
3738
Credential getCredential() throws Exception;
3839

source/src/main/java/br/com/uol/pagseguro/api/environment/EnvironmentProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ public interface EnvironmentProvider {
3333
/**
3434
* Get configurations environment
3535
*
36-
* @return Configurations environment
3736
* @see PagSeguroEnv
37+
* @return Configurations environment
38+
* @throws Exception if a problem occurs
3839
*/
3940
PagSeguroEnv getEnvironment() throws Exception;
4041
}

0 commit comments

Comments
 (0)