Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

592
Visualizações
Maven build should fail if the 'buildVersion' argument doesn't exist or has empty value

The main pom file receives the version value as a maven command-line argument.

What I want to achieve is to prevent the build from executing if the argument is either non-existing in the command (not passed), or if it has empty string value, something like -DbuildVersion= or -DbuildVersion="".

The reason is that the generated JARs should not end up without the version number, or worse - with the dummy value set in the buildVersion property.

================= Solution: For anyone having the similar need - use Maven Enforcer Plugin. http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I was going to suggest the Maven Enforcer plugin (http://maven.apache.org/enforcer/maven-enforcer-plugin/), but it seems that it's not possible yet -> Run Maven Enforcer Plugin rule on command line. Wouldn't be fine for you to wrap the build process in a scrip that would make that validation for you?

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda