Closed
Description
This is against version 2.1.2.
I have two problems. If I publish sources, which is published after the jar, then when gradle tries to retrieve the latest jar it does this:
http://localhost:4567/snapshot/xx/xx/xxx/xxxx/1.53-SNAPSHOT/maven-metadata.xml
http://localhost:4567/snapshot/xx/xx/xxx/xxxx/1.53-SNAPSHOT/iPayUtils-1.53-20200513.061306-4-sources-2.pom
http://localhost:4567/snapshot/xx/xx/xxx/xxxx/1.53-SNAPSHOT/iPayUtils-1.53-20200513.061306-4-sources-2.jar
So it only retrieves sources. Probably thinks that is the latest artifact.
If I don't publish sources then gradle ends up asking for this:
http://localhost:4567/snapshot/xx/xx/xxx/xxxxx/1.53-SNAPSHOT/xxxxx-1.53-20200513.063347-1-1.jar
The build number is repeated at the end and so it doesn't find it. The maven-metadata.xml downloaded is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<metadata>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>1.53</version>
<versioning>
<release>xxx-1.53-20200513.063347-1</release>
<latest>xxx-1.53-20200513.063347-1</latest>
<snapshot>
<timestamp>20200513.063347-1</timestamp>
<buildNumber>1</buildNumber>
</snapshot>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>xxx-1.53-20200513.063347-1</value>
<updated>20200513.063347-1</updated>
</snapshotVersion>
</snapshotVersions>
<lastUpdated>20200513063347</lastUpdated>
</versioning>
</metadata>
This is what I get from artifactory for the same setup. A few difference I don't know the impact of, but the updated field looks different and does not include the build number, maybe that's the issue?
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>1.53-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20200513.063915</timestamp>
<buildNumber>1</buildNumber>
</snapshot>
<lastUpdated>20200513063916</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>1.53-20200513.063915-1</value>
<updated>20200513063915</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>1.53-20200513.063915-1</value>
<updated>20200513063915</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
dzikoysk commentedon May 13, 2020
Oh, thanks for a metadata generated by the Artifactory. Maven has lacks in docs and it's why some of fields contain different values. Could you also provide log from NanoMaven console?
GH-29 Modify field values in generated maven-metadata file
dzikoysk commentedon May 13, 2020
Try again with 2.1.2. I think that the proper values in metadata file should fix this problem.
ruzkant commentedon May 14, 2020
Great, thx. Now if I only publish main jar it works, but if I also publish source jar it still has issues.
After first publish with sources:
Nano log:
folder contents:
metadata.xml:
After second publish with sources:
Nano log:
folder contents:
Note here the missing classifier xml field for source jars...
metadata.xml:
Example from artifactory for another lib showing the :
dzikoysk commentedon May 14, 2020
Well, it looks like a mess, but as far as I conclude, we just need a proper support for classifiers and then it should work 🤔
GH-29 Support classifiers (Resolve #37)
dzikoysk commentedon May 15, 2020
2.2.0 supports proper classifiers. You have to remove old configuration to launch this version due to #35
ruzkant commentedon May 15, 2020
Thanks that resolves it!
dzikoysk commentedon May 15, 2020
Oof, finally. Thanks for details and your time during this process :)
dzikoysk commentedon May 15, 2020
Official 2.2.0 released -> https://github.com/dzikoysk/nanomaven/releases/tag/2.2.0
GH-29 Modify field values in generated maven-metadata file
GH-29 Support classifiers (Resolve #37)