[jira] [Commented] (KARAF-5251) Installing a feature containing JNA refreshes many system bundles

2017-07-14 Thread Seth Leger (JIRA)

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

Seth Leger commented on KARAF-5251:
---

This makes any feature that uses JNA untestable via Pax Exam (unless you use 
org.apache.karaf.features.FeaturesService.Option.NoAutoRefreshBundles or 
{{feature:install -r}}) because the refresh invalidates @Inject references in 
your test as the core bundles are refreshed.

> Installing a feature containing JNA refreshes many system bundles
> -
>
> Key: KARAF-5251
> URL: https://issues.apache.org/jira/browse/KARAF-5251
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell
>Affects Versions: 4.1.0
>Reporter: Seth Leger
>Priority: Critical
>
> jline 3.X that is included with the shell in Karaf 4.1+ has an optional 
> dependency on the Java Native Access packages.
> {noformat}
> Import-Package = 
> com.sun.jna;resolution:=optional,
> com.sun.jna.ptr;resolution:=optional,
> com.sun.jna.win32;resolution:=optional,
> ...
> {noformat}
> This means that if you install a feature that includes the JNA bundles, it 
> will refresh the jline bundle and all related bundles to satisfy this 
> dependency. The group of related bundles that gets refreshed seems to be very 
> large and can have a variety of negative side-effects:
> - Terminating the current SSH session
> - Terminating subsequent feature installations
> - The {{shell.init.script}} seems to get interrupted as it refreshes, 
> printing a lot of error messages:
> {noformat}
> karaf@root()> feature:install java-native-access 
> Error executing command: java.lang.InterruptedException
> __ __    
>/ //_/ __ _/ __/  
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/ 
>   Apache Karaf (4.1.1)
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> Error in initialization script: 
> /root/Downloads/apache-karaf-4.1.1/etc/shell.init.script: Task 
> java.util.concurrent.FutureTask@3c8bdda9 rejected from 
> java.util.concurrent.ThreadPoolExecutor@7989445c[Terminated, pool size = 0, 
> active threads = 0, queued tasks = 0, completed tasks = 0]
> Error in initialization script: 
> /root/Downloads/apache-karaf-4.1.1/etc/scripts/shell.completion.script: null
> {noformat}
> This problem can be reproduced by creating a feature containing the {{jna}} 
> and {{jna-platform}} bundles and installing it on a fresh Karaf instance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (KARAF-5251) Installing a feature containing JNA refreshes many system bundles

2017-07-14 Thread Seth Leger (JIRA)
Seth Leger created KARAF-5251:
-

 Summary: Installing a feature containing JNA refreshes many system 
bundles
 Key: KARAF-5251
 URL: https://issues.apache.org/jira/browse/KARAF-5251
 Project: Karaf
  Issue Type: Bug
  Components: karaf-shell
Affects Versions: 4.1.0
Reporter: Seth Leger
Priority: Critical


jline 3.X that is included with the shell in Karaf 4.1+ has an optional 
dependency on the Java Native Access packages.
{noformat}
Import-Package = 
com.sun.jna;resolution:=optional,
com.sun.jna.ptr;resolution:=optional,
com.sun.jna.win32;resolution:=optional,
...
{noformat}
This means that if you install a feature that includes the JNA bundles, it will 
refresh the jline bundle and all related bundles to satisfy this dependency. 
The group of related bundles that gets refreshed seems to be very large and can 
have a variety of negative side-effects:
- Terminating the current SSH session
- Terminating subsequent feature installations
- The {{shell.init.script}} seems to get interrupted as it refreshes, printing 
a lot of error messages:

{noformat}
karaf@root()> feature:install java-native-access 
Error executing command: java.lang.InterruptedException
__ __    
   / //_/ __ _/ __/  
  / ,<  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/ 

  Apache Karaf (4.1.1)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.

Error in initialization script: 
/root/Downloads/apache-karaf-4.1.1/etc/shell.init.script: Task 
java.util.concurrent.FutureTask@3c8bdda9 rejected from 
java.util.concurrent.ThreadPoolExecutor@7989445c[Terminated, pool size = 0, 
active threads = 0, queued tasks = 0, completed tasks = 0]
Error in initialization script: 
/root/Downloads/apache-karaf-4.1.1/etc/scripts/shell.completion.script: null
{noformat}

This problem can be reproduced by creating a feature containing the {{jna}} and 
{{jna-platform}} bundles and installing it on a fresh Karaf instance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (KARAF-5250) SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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:all-tabpanel
 ]

Grzegorz Grzybek resolved KARAF-5250.
-
Resolution: Fixed

I see build 
https://builds.apache.org/view/K/view/Karaf/job/karaf-master/4443/console 
correctly deploying SNAPSHOT artifacts now.

> SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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 "SNAPSHOT" version to two different timestamped versions - 
> then artifact is uploaded *once* (with first 

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

2017-07-14 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5250:


Commit e4222843c5fa420f54da3f3f1e84d74c78ad9579 in karaf's branch 
refs/heads/master from [~gzres]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=e422284 ]

[KARAF-5250] Fix deployment of SNAPSHOTs - no metadata override after artifact 
upload


> SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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 

[jira] [Commented] (KARAF-5082) Allow the use of external data for features configuration

2017-07-14 Thread Oliver Lietz (JIRA)

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

Oliver Lietz commented on KARAF-5082:
-

[~gnt], this feature is extremely helpful for getting Apache Sling on Karaf up 
and running smoothly. Can you backport this feature to 4.1?

> Allow the use of external data for features configuration
> -
>
> Key: KARAF-5082
> URL: https://issues.apache.org/jira/browse/KARAF-5082
> Project: Karaf
>  Issue Type: New Feature
>Affects Versions: 4.1.1
>Reporter: Jean-Philippe CLEMENT
>Assignee: Guillaume Nodet
> Fix For: 4.2.0
>
>
> This addition follows KARAF-4829. In order to get synchronous configuration 
> file, the  tag should be used instead of .
> At present time  does not allow to use external files as  
> does. Using several external files might be more handy (and short) than 
> inlining the configuration in the  tag.
> I would be a real nice addition to add a location attribute to , for 
> instance:
> 
> Thank you!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5250) SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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=16086985#comment-16086985
 ] 

Christian Schneider commented on KARAF-5250:


Nice. What did you change?

> SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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 "SNAPSHOT" version to two different timestamped versions - 
> then artifact is uploaded *once* (with first timestamped version) and then 
> metadata is uploaded twice - first time with correct 

[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=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: 
> 

[jira] [Updated] (KARAF-5250) SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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:all-tabpanel
 ]

Grzegorz Grzybek updated KARAF-5250:

Summary: SNAPSHOT metadata doesn't match SNAPSHOT artifacts after mvn 
deploy  (was: SNAPSHOT metadata doesn't match SNAPSHOT artifacts in after mvn 
deploy)

> SNAPSHOT metadata doesn't match SNAPSHOT artifacts 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 "SNAPSHOT" version to two different timestamped versions - 
> then artifact is uploaded *once* (with first 

[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=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 "SNAPSHOT" 

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

2017-07-14 Thread Grzegorz Grzybek (JIRA)
Grzegorz Grzybek created KARAF-5250:
---

 Summary: 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 "SNAPSHOT" version to two different timestamped versions - then 
artifact is uploaded *once* (with first timestamped version) and then metadata 
is uploaded twice - first time with correct version and then with 1-second 
later version...

Why? Why duplicate generators? The problem is _class realm_ of ... 
org.apache.karaf.tooling:karaf-services-maven-plugin when running on Maven 
3.3.9. 

maven-aether-provider-3.3.9.jar declares (META-INF/plexus/components.xml):
{code:xml}

  org.eclipse.aether.impl.MetadataGeneratorFactory
  snapshot