Skip to content
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

Erro no Gradle Build #45

Open
andreconjo opened this issue Jul 17, 2018 · 1 comment
Open

Erro no Gradle Build #45

andreconjo opened this issue Jul 17, 2018 · 1 comment

Comments

@andreconjo
Copy link

Esse é o erro que aparece:

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\andre.conjo\Documents\Spring\PagSeguro\pagseguro-java-sdk\source\build.gradle' line: 33

  • What went wrong:
    A problem occurred evaluating root project 'pagseguro-api'.

Could not get unknown property 'ossrhUsername' for object of type org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s

Segue as versões:
GRADLE

`------------------------------------------------------------
Gradle 4.9

Build time: 2018-07-16 08:14:03 UTC
Revision: efcf8c1cf533b03c70f394f270f46a174c738efc

Kotlin DSL: 0.18.4
Kotlin: 1.2.41
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Windows 10 10.0 amd64
`
JAVA

java version "1.8.0_162"

@andreconjo
Copy link
Author

andreconjo commented Jul 17, 2018

Segue a correção:

  • Vá até a pasta SOURCE
  • Abra o arquivo build.gradle
  • Procure por:

authentication(username: ossrhUsername, password: ossrhPassword)

  • Altere para:

authentication(userName: hasProperty('ossrhUsername')?ossrhUsername:'', password: hasProperty('ossrhPassword')?ossrhPassword:'')

Primeiro passo concluido.
Agora precisamos remover todos os casos de Test da API.

Ainda na pasta SOURCE (supracitado) e entre na pasta src

Remova a pasta test

Volte para a pasta SOURCE (supracitada)

  • Abra o Git Bash (ou o terminal que você usa para o Gradle)
  • Execute o comando

gradle build

e Pronto!

http://twitter.com/andreconjo
http://facebook.com/andre.henriqu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant