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

Maven published pom has invalid dependency version syntax #3

Open
RenYuENG opened this issue Nov 22, 2018 · 3 comments
Open

Maven published pom has invalid dependency version syntax #3

RenYuENG opened this issue Nov 22, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@RenYuENG
Copy link

The Maven artefact published to the local repo, when using gradle clean build publishToMavenLocal, has invalid dependency version syntax (using latest maven: 3.6.0):

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>+</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-lang3</artifactId>
  <version>+</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
  <version>2.+</version>
  <scope>compile</scope>
</dependency>

This causes Maven to report:
[ERROR] Failed to execute goal on project NDHA-ExternalDCTool: Could not resolve dependencies for project nz.govt.natlib.ndha.externaldctool:NDHA-ExternalDCTool:jar:0.1: The following artifacts could not be resolved: com.google.guava:guava:jar:+, org.apache.commons:commons-lang3:jar:+: Could not find artifact com.google.guava:guava:jar:+ in dia-nexus (https://nexus.dia.govt.nz/repository/maven-public/) -> [Help 1]

Substituting in a fixed version number, e.g. 27.0-jre for guava resolves this issue.

The Maven Versions plugin should be used to keep the dependency version number up to date

@RenYuENG RenYuENG added the bug Something isn't working label Nov 22, 2018
@kurtlenfesty
Copy link
Contributor

@RenYuENG It appears that maven doesn't support the + syntax. Can you create a branch and update the versions to the last matching version. Look on maven central. Assign it to me.

@RenYuENG
Copy link
Author

@kurtlenfesty I'll make a branch and make any changes that I thought were needed to get the tool working with my Watermarker project ... might need to add some new methods to get the SIP fields I need. I'll make a merge request when you get back. Enjoy your holiday!

@kurtlenfesty
Copy link
Contributor

I'm quite able to check pull requests on my trip. No need to wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants