You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Grzegorz Grzybek (JIRA)" <ji...@apache.org> on 2016/12/22 11:26:58 UTC

[jira] [Commented] (KARAF-3172) boot features with mvn: handler can't be resolved when maven repo is a https url

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

Grzegorz Grzybek commented on KARAF-3172:
-----------------------------------------

Works fine in Karaf 3.0.8.

# unpack {{apache-karaf-3.0.8.tar.gz}}
# run {{bin/karaf}}
# edit {{etc/org.ops4j.pax.url.mvn.cfg}}, so you have:
{noformat}
org.ops4j.pax.url.mvn.repositories= \
    https://repo1.maven.org/maven2@id=central
{noformat}
# edit {{etc/org.ops4j.pax.logging.cfg}}, so you have:
{noformat}
log4j.logger.shaded.org.eclipse.aether = TRACE
log4j.logger.shaded.org.apache.http.headers = DEBUG
log4j.logger.org.ops4j.pax.url.mvn = TRACE
{noformat}
# install something you *don't* have in your {{~/.m2/repository}}:
{noformat}
karaf@root()> install mvn:commons-io/commons-io/2.5
Bundle ID: 64
{noformat}
# see this in logs:
{noformat}
2016-12-22 12:22:00,204 | ... | ... | Resolving [mvn:commons-io/commons-io/2.5]
2016-12-22 12:22:00,211 | ... | ... | Using manager SimpleLocalRepositoryManager with priority 0.0 for /home/ggrzybek/.m2/repository
2016-12-22 12:22:00,244 | ... | ... | Using transporter WagonTransporter with priority -1.0 for https://repo1.maven.org/maven2/
2016-12-22 12:22:00,245 | ... | ... | Using connector BasicRepositoryConnector with priority 0.0 for https://repo1.maven.org/maven2/
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> GET /maven2/commons-io/commons-io/2.5/commons-io-2.5.jar HTTP/1.1
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> Cache-control: no-cache
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> Cache-store: no-store
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> Pragma: no-cache
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> Expires: 0
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> Accept-Encoding: gzip
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> User-Agent: Aether
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> User-Agent: Aether
2016-12-22 12:22:00,667 | ... | ... | http-outgoing-0 >> Host: repo1.maven.org
2016-12-22 12:22:00,668 | ... | ... | http-outgoing-0 >> Connection: Keep-Alive
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << HTTP/1.1 200 OK
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << x-amz-meta-last-modified-epoch: 1461336756239
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << ETag: "e2d74794fba570ec2115fb9d5b05dc9b"
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Content-Type: application/java-archive
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Last-Modified: Fri, 22 Apr 2016 14:52:36 GMT
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << X-Checksum-MD5: e2d74794fba570ec2115fb9d5b05dc9b
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << X-Checksum-SHA1: 2852e6e05fbb95076fc091f6d1780f1f8fe35e0f
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Via: 1.1 varnish
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Fastly-Debug-Digest: b6291ade3f14df24a4977cb59acb9c56e6ab2587cb87561921e555e2cd2f3220
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Content-Length: 208700
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Accept-Ranges: bytes
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Date: Thu, 22 Dec 2016 11:22:00 GMT
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Via: 1.1 varnish
2016-12-22 12:22:00,723 | ... | ... | http-outgoing-0 << Age: 3554785
2016-12-22 12:22:00,724 | ... | ... | http-outgoing-0 << Connection: keep-alive
2016-12-22 12:22:00,724 | ... | ... | http-outgoing-0 << X-Served-By: cache-iad2129-IAD, cache-ams4132-AMS
2016-12-22 12:22:00,724 | ... | ... | http-outgoing-0 << X-Cache: HIT, HIT
2016-12-22 12:22:00,724 | ... | ... | http-outgoing-0 << X-Cache-Hits: 1, 1
2016-12-22 12:22:00,724 | ... | ... | http-outgoing-0 << X-Timer: S1482405720.686150,VS0,VE3
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> GET /maven2/commons-io/commons-io/2.5/commons-io-2.5.jar.sha1 HTTP/1.1
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> Cache-control: no-cache
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> Cache-store: no-store
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> Pragma: no-cache
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> Expires: 0
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> Accept-Encoding: gzip
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> User-Agent: Aether
2016-12-22 12:22:00,913 | ... | ... | http-outgoing-0 >> User-Agent: Aether
2016-12-22 12:22:00,914 | ... | ... | http-outgoing-0 >> Host: repo1.maven.org
2016-12-22 12:22:00,914 | ... | ... | http-outgoing-0 >> Connection: Keep-Alive
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << HTTP/1.1 200 OK
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << x-amz-meta-last-modified-epoch: 1461336756255
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << ETag: "9bb509a05885fcf13c3d11f815830ffc"
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << Content-Type: text/plain
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << Last-Modified: Fri, 22 Apr 2016 14:52:36 GMT
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << X-Checksum-MD5: 9bb509a05885fcf13c3d11f815830ffc
2016-12-22 12:22:00,963 | ... | ... | http-outgoing-0 << X-Checksum-SHA1: 16dd4a1205ee0a61ea507244e0eae90c2db190e7
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Via: 1.1 varnish
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Fastly-Debug-Digest: 0934995d32371f90f301912a8e071af2fc78ed27c8f5b4a4a585335b2d4e9307
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Content-Length: 40
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Accept-Ranges: bytes
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Date: Thu, 22 Dec 2016 11:22:00 GMT
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Via: 1.1 varnish
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Age: 3183749
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << Connection: keep-alive
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << X-Served-By: cache-iad2147-IAD, cache-ams4132-AMS
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << X-Cache: HIT, HIT
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << X-Cache-Hits: 1, 2
2016-12-22 12:22:00,964 | ... | ... | http-outgoing-0 << X-Timer: S1482405720.934184,VS0,VE0
2016-12-22 12:22:00,966 | ... | ... | Resolved (commons-io:commons-io:jar:2.5) as /home/ggrzybek/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
{noformat}


> boot features with mvn: handler can't be resolved when maven repo is a https url
> --------------------------------------------------------------------------------
>
>                 Key: KARAF-3172
>                 URL: https://issues.apache.org/jira/browse/KARAF-3172
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.3.6
>            Reporter: Daniel Haag
>            Assignee: Grzegorz Grzybek
>              Labels: features, maven
>
> When specifying a https maven repo in the
> org.ops4j.pax.url.mvn.repositories
> karaf does only query the http maven repos for features on bootup:
> org.apache.karaf.features.cfg:featuresBoot
> On the Repository Site no https requests are seen and also the debug output of karaf indicates only requests for the http repos:
> {code}
> 2014-08-20 14:53:43,423 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [file:/home/esb/.m2/repository/,releases=true,snapshots=true]
> 2014-08-20 14:53:43,423 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,424 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [https://mvnrepo.uibk.ac.at/artifactory/repo1/,releases=true,snapshots=false]
> 2014-08-20 14:53:43,424 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,424 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [https://mvnrepo.uibk.ac.at/artifactory/esb-repos/,releases=true,snapshots=false]
> 2014-08-20 14:53:43,424 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,425 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [https://svn.apache.org/repos/asf/servicemix/m2-repo/,releases=true,snapshots=false]
> 2014-08-20 14:53:43,425 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,425 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [http://repository.springsource.com/maven/bundles/release/,releases=true,snapshots=false]
> 2014-08-20 14:53:43,426 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,426 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [http://repository.springsource.com/maven/bundles/external/,releases=true,snapshots=false]
> 2014-08-20 14:53:43,426 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,427 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  260 | 1 - org.ops4j.pax.url.mvn - 1.3.7 | Collecting versions from repository [https://oss.sonatype.org/content/repositories/releases/,releases=true,snapshots=false]
> 2014-08-20 14:53:43,427 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  378 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Resolving exact version
> 2014-08-20 14:53:43,427 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [file:/home/esb/.m2/repository/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:43,435 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [https://mvnrepo.uibk.ac.at/artifactory/repo1/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:43,444 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [https://mvnrepo.uibk.ac.at/artifactory/esb-repos/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:43,551 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [https://svn.apache.org/repos/asf/servicemix/m2-repo/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:43,670 | DEBUG | FelixStartLevel  | HttpURLConnection                | va.util.logging.LoggingProxyImpl   61 |  -  -  | sun.net.www.MessageHeader@50ba181a7 pairs: {GET /maven/bundles/release/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml HTTP/1.1: null}{User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11}{Cache-Control: no-cache}{Pragma: no-cache}{Host: repository.springsource.com}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
> 2014-08-20 14:53:43,790 | DEBUG | FelixStartLevel  | HttpURLConnection                | va.util.logging.LoggingProxyImpl   61 |  -  -  | sun.net.www.MessageHeader@69847c5d7 pairs: {null: HTTP/1.1 404 Not Found}{x-amz-request-id: 8D8C08BC9EA498D1}{x-amz-id-2: YnFTsaRr5DW5hWHuAYm3ukPPRPNrlzd+cF/0NVM2J7Fn9Zw7eept1WjfRmjjmOy2}{Content-Type: application/xml}{Transfer-Encoding: chunked}{Date: Wed, 20 Aug 2014 12:53:43 GMT}{Server: AmazonS3}
> 2014-08-20 14:53:43,791 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [http://repository.springsource.com/maven/bundles/release/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:43,910 | DEBUG | FelixStartLevel  | HttpURLConnection                | va.util.logging.LoggingProxyImpl   61 |  -  -  | sun.net.www.MessageHeader@2d854f2f7 pairs: {GET /maven/bundles/external/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml HTTP/1.1: null}{User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11}{Cache-Control: no-cache}{Pragma: no-cache}{Host: repository.springsource.com}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
> 2014-08-20 14:53:44,032 | DEBUG | FelixStartLevel  | HttpURLConnection                | va.util.logging.LoggingProxyImpl   61 |  -  -  | sun.net.www.MessageHeader@b11ae027 pairs: {null: HTTP/1.1 404 Not Found}{x-amz-request-id: 57B3F8C3ABFE51C5}{x-amz-id-2: PnUD+UOhVOOmlqmR9MsYrelB87JHiZVxqtAjOhaFOT4ZFX458pWJt5s1JBmaKtzs}{Content-Type: application/xml}{Transfer-Encoding: chunked}{Date: Wed, 20 Aug 2014 12:53:42 GMT}{Server: AmazonS3}
> 2014-08-20 14:53:44,033 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [http://repository.springsource.com/maven/bundles/external/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:44,456 | DEBUG | FelixStartLevel  | Connection                       | .pax.url.mvn.internal.Connection  190 | 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [2.12.0] from URL [https://oss.sonatype.org/content/repositories/releases/org/apache/camel/karaf/apache-camel/2.12.0/apache-camel-2.12.0-features.xml]]
> 2014-08-20 14:53:44,457 | WARN  | FelixStartLevel  | FeaturesServiceImpl              | res.internal.FeaturesServiceImpl 1133 | 27 - org.apache.karaf.features.core - 2.3.6 | Unable to add features repository mvn:org.apache.camel.karaf/apache-camel/2.12.0/xml/features at startup
> java.lang.RuntimeException: URL [mvn:org.apache.camel.karaf/apache-camel/2.12.0/xml/features] could not be resolved.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)