[jira] [Commented] (KARAF-5250) SNAPSHOT metadata doesn't match SNAPSHOT artifacts in after mvn deploy

2017-07-14 Thread Grzegorz Grzybek (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086981#comment-16086981
 ] 

Grzegorz Grzybek commented on KARAF-5250:
-

OK, it's better now:
{noformat}
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ 
org.apache.karaf.features.core ---
[INFO] Using alternate deployment repository 
local-nexus::default::http://localhost:8081/nexus/content/repositories/snapshots
Downloading: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 13.9 KB/sec)
Uploading: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/org.apache.karaf.features.core-4.2.0-20170714.073334-14.jar
Uploaded: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/org.apache.karaf.features.core-4.2.0-20170714.073334-14.jar
 (610 KB at 7083.7 KB/sec)
Uploading: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/org.apache.karaf.features.core-4.2.0-20170714.073334-14.pom
Uploaded: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/org.apache.karaf.features.core-4.2.0-20170714.073334-14.pom
 (7 KB at 140.6 KB/sec)
Downloading: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
Downloaded: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
 (315 B at 17.1 KB/sec)
Uploading: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
Uploaded: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 70.9 KB/sec)
Uploading: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
Uploaded: 
http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
 (315 B at 10.6 KB/sec)
{noformat}

> SNAPSHOT metadata doesn't match SNAPSHOT artifacts in after mvn deploy
> --
>
> Key: KARAF-5250
> URL: https://issues.apache.org/jira/browse/KARAF-5250
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-tooling
>Affects Versions: 4.2.0
>Reporter: Grzegorz Grzybek
>Assignee: Grzegorz Grzybek
>Priority: Critical
> Fix For: 4.2.0
>
>
> Original [message 
> here|http://mail-archives.apache.org/mod_mbox/karaf-dev/201707.mbox/%3CCAAdXmhpQKJkvBkpp0v_AVKJCdEmkpOcgxn0meZ6gW1pKsvj4cQ%40mail.gmail.com%3E].
> First, an observation. If you check 
> https://repository.apache.org/content/groups/snapshots-group/org/apache/karaf/webconsole/org.apache.karaf.webconsole.http/4.2.0-SNAPSHOT/maven-metadata.xml,
>  you'll see this metadata declares latest SNAPSHOT version to be 
> {{4.2.0-20170713.142530-162}}.
> But if you try to actually fetch this version (that's what Aether is doing), 
> you'll get HTTP 404, because there's *no such version* - there's 
> {{4.2.0-20170713.142529-162}} - 1 *second* difference, but very important - 
> this SNAPSHOT is *not resolvable*.
> I started wondering about Nexus problems, about maven-deploy-plugin bugs, but 
> then I run this under debugger. I didn't notice this problem when using Maven 
> 3.5.0, but it failed under 3.3.9 (that's the version used by Jenkins).
> Another worrying sign was this log:
> {noformat}
> [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ 
> org.apache.karaf.features.core ---
> ...
> [INFO] Downloading: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
> [INFO] Downloaded: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
>  (315 B at 4.6 KB/sec)
> [INFO] Downloading: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
> [INFO] Downloaded: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.kar

[jira] [Commented] (KARAF-5250) SNAPSHOT metadata doesn't match SNAPSHOT artifacts in after mvn deploy

2017-07-14 Thread Christian Schneider (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086969#comment-16086969
 ] 

Christian Schneider commented on KARAF-5250:


So does this mean we have to make sure to exclude a dependency in our pom?
Do you think it makes sense to try another maven version in jenkins? 
Unfortunately 3.5.0 did not work the last time I tried it.


> SNAPSHOT metadata doesn't match SNAPSHOT artifacts in after mvn deploy
> --
>
> Key: KARAF-5250
> URL: https://issues.apache.org/jira/browse/KARAF-5250
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-tooling
>Affects Versions: 4.2.0
>Reporter: Grzegorz Grzybek
>Assignee: Grzegorz Grzybek
>Priority: Critical
> Fix For: 4.2.0
>
>
> Original [message 
> here|http://mail-archives.apache.org/mod_mbox/karaf-dev/201707.mbox/%3CCAAdXmhpQKJkvBkpp0v_AVKJCdEmkpOcgxn0meZ6gW1pKsvj4cQ%40mail.gmail.com%3E].
> First, an observation. If you check 
> https://repository.apache.org/content/groups/snapshots-group/org/apache/karaf/webconsole/org.apache.karaf.webconsole.http/4.2.0-SNAPSHOT/maven-metadata.xml,
>  you'll see this metadata declares latest SNAPSHOT version to be 
> {{4.2.0-20170713.142530-162}}.
> But if you try to actually fetch this version (that's what Aether is doing), 
> you'll get HTTP 404, because there's *no such version* - there's 
> {{4.2.0-20170713.142529-162}} - 1 *second* difference, but very important - 
> this SNAPSHOT is *not resolvable*.
> I started wondering about Nexus problems, about maven-deploy-plugin bugs, but 
> then I run this under debugger. I didn't notice this problem when using Maven 
> 3.5.0, but it failed under 3.3.9 (that's the version used by Jenkins).
> Another worrying sign was this log:
> {noformat}
> [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ 
> org.apache.karaf.features.core ---
> ...
> [INFO] Downloading: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
> [INFO] Downloaded: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
>  (315 B at 4.6 KB/sec)
> [INFO] Downloading: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
> [INFO] Downloaded: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/maven-metadata.xml
>  (315 B at 10.6 KB/sec)
> [INFO] Uploading: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
> [INFO] Uploaded: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
>  (805 B at 31.4 KB/sec)
> [INFO] Uploading: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
> [INFO] Uploaded: 
> http://localhost:8081/nexus/content/repositories/snapshots/org/apache/karaf/features/org.apache.karaf.features.core/4.2.0-SNAPSHOT/maven-metadata.xml
>  (805 B at 30.2 KB/sec)
> ...
> {noformat}
> It looked as duplicate metadata upload. I was fooled by reading 
> maven-deploy-plugin source code, because it actually may upload metadata 
> multiple times (in case of attached artifacts).
> But then, under debugger I saw this:
> {noformat}
> generators = {java.util.ArrayList@9874}  size = 4
>  0 = 
> {org.apache.maven.repository.internal.RemoteSnapshotMetadataGenerator@9881}
>   snapshots: java.util.Map  = {java.util.LinkedHashMap@9890}  size = 0
>   legacyFormat: boolean  = false
>  1 = 
> {org.apache.maven.repository.internal.RemoteSnapshotMetadataGenerator@9882}
>   snapshots: java.util.Map  = {java.util.LinkedHashMap@9889}  size = 0
>   legacyFormat: boolean  = false
>  2 = {org.apache.maven.repository.internal.VersionsMetadataGenerator@9883}
>   versions: java.util.Map  = {java.util.LinkedHashMap@9887}  size = 0
>   processedVersions: java.util.Map  = {java.util.LinkedHashMap@9888}  size = 0
>  3 = {org.apache.maven.repository.internal.VersionsMetadataGenerator@9884}
>   versions: java.util.Map  = {java.util.LinkedHashMap@9885}  size = 0
>   processedVersions: java.util.Map  = {java.util.LinkedHashMap@9886}  size = 0
> {noformat}
> which means that 
> {{org.eclipse.aether.internal.impl.DefaultDeployer#getMetadataGenerators()}} 
> returned/used too many generators. And I found that *this is the root 
> problem* - we have two instances of {{RemoteSnapshotMetadataGenerator}} and 
> both may transform