You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Daniel Pocock <da...@pocock.com.au> on 2013/05/15 19:55:19 UTC

ServiceMix builds fail behind a HTTP proxy


I've observed that the ServiceMix build fails when behind a proxy

The Maven proxy settings are used for most things, but there is a karaf
plugin that tries to do direct network access, and it has been a problem
for other people building Karaf by itself:

http://mail-archives.apache.org/mod_mbox/camel-users/201208.mbox/%3CCANZYW6aRgR%3DnpH1080a5XWpbKD9aakCU8OGCJH5ydg02rXjhsg%40mail.gmail.com%3E

> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:features-maven-plugin:2.2.8:add-features-to-repo
> (add-features-to-repo-win) on project dist: Can't resolve bundle
> com.google.code.scriptengines:scriptengines-jruby:jar:1.1: Could not
> transfer artifact com.google.code.s
> criptengines:scriptengines-jruby:jar:1.1 from/to
> http://scriptengines.googlecode.com/svn/m2-repo/
> (http://scriptengines.googlecode.com/svn/m
> 2-repo/): Connection to http://scriptengines.googlecode.com refused
> [ERROR]
> com.google.code.scriptengines:scriptengines-jruby:jar:1.1
> [ERROR]
> [ERROR] from the specified remote repositories:
> [ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
> (http://scriptengines.googlecode.com/svn/m2-repo/, releases=true,
> snapshots=true):
> Connection refused: connect



but the solution doesn't appear to work for a ServiceMix build

I notice that during the build several copies of

org.ops4j.pax.url.mvn.cfg are created within the tree.  I tried adding the correction to all of them and continuing the build, it didn't work.  I also tried adding

-Dorg.ops4j.pax.url.mvn.proxySupport=true

on the command line and that didn't work either.


The artifact it is trying to access is actually in the local mvn ~/.m2/repository as well, it seems un-necessary that it has to make another network access

I have been able to run the build successfully on a machine that is not stuck behind a proxy.

Can anybody clarify how to proceed and do a full build either behind a proxy or completely offline?




Re: ServiceMix builds fail behind a HTTP proxy

Posted by Daniel Pocock <da...@pocock.com.au>.
On 23/05/13 07:02, Freeman Fang wrote:
> Hi,
> 
> FYI, KARAF-2316 get fixed, you can edit pom.xml 
> like
>               <groupId>org.apache.karaf.tooling</groupId>
>                 <artifactId>features-maven-plugin</artifactId>
> -                <version>${karaf.version}</version>
> +                <version>2.3.2-SNAPSHOT</version>
> to pick up the SNAPSHOT version to test it.

I found that in four pom.xml files, should I change all of them?

src/assemblies/apache-servicemix-minimal/pom.xml
src/assemblies/apache-servicemix-jbi/pom.xml
src/assemblies/apache-servicemix-full/pom.xml
src/assemblies/apache-servicemix/pom.xml

For a quick test, I tried changing the property in src/parent/pom.xml -
I understand that doesn't just impact the plugin version though, but it
confirms that the new Karaf resolves the error.  Would it be reasonable
to have a distinct property name for configuring the plugin version in a
central place?

> Also, another work around is add
> <repository> 
>     <id>scriptengines.googlecode.com</id> 
>     <name>Script Engines</name> 
>     <url>http://scriptengines.googlecode.com/svn/m2-repo</url> 
> </repository> 

I can confirm that this was also necessary for my build to succeed on a
box behind a proxy, without it, I get an exception.

One other thing I also found, in addition to setting -Dhttp.proxyHost
and proxyPort, it is also necessary to set the https equivalents:
https.proxyHost and https.proxyPort

With all of the above, I can successfully build behind a proxy now.

Regards,

Daniel


Re: ServiceMix builds fail behind a HTTP proxy

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

FYI, KARAF-2316 get fixed, you can edit pom.xml 
like
              <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>features-maven-plugin</artifactId>
-                <version>${karaf.version}</version>
+                <version>2.3.2-SNAPSHOT</version>
to pick up the SNAPSHOT version to test it.

Also, another work around is add
<repository> 
    <id>scriptengines.googlecode.com</id> 
    <name>Script Engines</name> 
    <url>http://scriptengines.googlecode.com/svn/m2-repo</url> 
</repository> 
to your pom, so that when this DefaultArtifactRepository get created, the proxy configuration in maven settings.xml could be injected.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-17, at 下午4:45, Daniel Pocock wrote:

> On 17/05/13 02:23, Freeman Fang wrote:
>> Hi,
>> 
>> Thanks for the info, I'm gonna take a close look, already create KARAF-2316[1] to track it.
>> 
>> [1]https://issues.apache.org/jira/browse/KARAF-2316
> 
> Ok, thanks for this.  In this particular case, the build has been
> attempted on a Windows machine.
> 
> I'm also going to try exactly the same procedure on a Linux machine that
> is behind the same proxy, just to make sure it is not some
> platform-specific issue that is causing it to behave badly with proxy
> settings.
> 
> 


Re: ServiceMix builds fail behind a HTTP proxy

Posted by Daniel Pocock <da...@pocock.com.au>.
On 17/05/13 02:23, Freeman Fang wrote:
> Hi,
>
> Thanks for the info, I'm gonna take a close look, already create KARAF-2316[1] to track it.
>
> [1]https://issues.apache.org/jira/browse/KARAF-2316

Ok, thanks for this.  In this particular case, the build has been
attempted on a Windows machine.

I'm also going to try exactly the same procedure on a Linux machine that
is behind the same proxy, just to make sure it is not some
platform-specific issue that is causing it to behave badly with proxy
settings.



Re: ServiceMix builds fail behind a HTTP proxy

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Thanks for the info, I'm gonna take a close look, already create KARAF-2316[1] to track it.

[1]https://issues.apache.org/jira/browse/KARAF-2316
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-17, at 上午12:11, Daniel Pocock wrote:

> On 16/05/13 09:54, Freeman Fang wrote:
>> Hi,
>> 
>> Pass system properties about http proxy into your maven should work,
>> 
>> something like -Dhttp.proxyHost=your_proxy_host -Dhttp.proxyPort=your_proxy_port, etc
> 
> It still doesn't help - it always fails at exactly the same spot, and
> the root cause is from
> 
> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon
> 
> 
> rather than regular Java HTTP connection code, so I suspect that setting
> is being ignored.
> 
> The maven .m2/settings.xml proxy settings work fine for everything else
> up to this point in the build.
> 
> Notice the exception says it was trying to connect directly to the host,
> it doesn't mention the proxy at all:
> 
> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:features-maven-plugin:2.2.10:add-features-to-repo
> (add-features-
> to-repo) on project apache-servicemix-full: Can't resolve bundle
> com.google.code.scriptengines:scriptengines-jruby:jar:1
> .1: Could not transfer artifact
> com.google.code.scriptengines:scriptengines-jruby:jar:1.1 from/to http://scriptengines.g ooglecode.com/svn/m2-repo/
> (http://scriptengines.googlecode.com/svn/m2-repo/): Connection to http://scriptengines.google code.com refused [ERROR] com.google.code.scriptengines:scriptengines-jruby:jar:1.1
> [ERROR]
> [ERROR] from the specified remote repositories:
> [ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
> (http://scriptengines.googlecode.com/svn/m2-repo/, releases=tru e, snapshots=true): Connection timed out: connect [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:features-maven-p
> lugin:2.2.10:add-features-to-repo (add-features-to-repo) on project
> apache-servicemix-full: Can't resolve bundle com.goo
> gle.code.scriptengines:scriptengines-jruby:jar:1.1
> 
> 
> 
> 
> Caused by: 
> org.apache.maven.wagon.providers.http.httpclient.conn.HttpHostConnectException: 
> Connection to http://scripten
> gines.googlecode.com refused
>         at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(Def
> aultClientConnectionOperator.java:190)
>         at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConn
> ectionImpl.java:294)
>         at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequest
> Director.java:645)
>         at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDir
> ector.java:480)
>         at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
> va:906)
>         at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
> va:805)
>         at
> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
>         at
> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.resourceExists(AbstractHttpClientWagon.java:665)
>         ... 5 more
> Caused by: java.net.ConnectException: Connection timed out: connect
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
>         at
> 
> 


Re: ServiceMix builds fail behind a HTTP proxy

Posted by Daniel Pocock <da...@pocock.com.au>.
On 16/05/13 09:54, Freeman Fang wrote:
> Hi,
>
> Pass system properties about http proxy into your maven should work,
>
> something like -Dhttp.proxyHost=your_proxy_host -Dhttp.proxyPort=your_proxy_port, etc

It still doesn't help - it always fails at exactly the same spot, and
the root cause is from

org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon


rather than regular Java HTTP connection code, so I suspect that setting
is being ignored.

The maven .m2/settings.xml proxy settings work fine for everything else
up to this point in the build.

Notice the exception says it was trying to connect directly to the host,
it doesn't mention the proxy at all:

[ERROR] Failed to execute goal
org.apache.karaf.tooling:features-maven-plugin:2.2.10:add-features-to-repo
(add-features-
to-repo) on project apache-servicemix-full: Can't resolve bundle
com.google.code.scriptengines:scriptengines-jruby:jar:1
.1: Could not transfer artifact
com.google.code.scriptengines:scriptengines-jruby:jar:1.1 from/to http://scriptengines.g ooglecode.com/svn/m2-repo/
(http://scriptengines.googlecode.com/svn/m2-repo/): Connection to http://scriptengines.google code.com refused [ERROR] com.google.code.scriptengines:scriptengines-jruby:jar:1.1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
(http://scriptengines.googlecode.com/svn/m2-repo/, releases=tru e, snapshots=true): Connection timed out: connect [ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:features-maven-p
lugin:2.2.10:add-features-to-repo (add-features-to-repo) on project
apache-servicemix-full: Can't resolve bundle com.goo
gle.code.scriptengines:scriptengines-jruby:jar:1.1




Caused by: 
org.apache.maven.wagon.providers.http.httpclient.conn.HttpHostConnectException: 
Connection to http://scripten
gines.googlecode.com refused
         at
org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(Def
aultClientConnectionOperator.java:190)
         at
org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConn
ectionImpl.java:294)
         at
org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequest
Director.java:645)
         at
org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDir
ector.java:480)
         at
org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
va:906)
         at
org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
va:805)
         at
org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
         at
org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.resourceExists(AbstractHttpClientWagon.java:665)
         ... 5 more
Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
         at



Re: ServiceMix builds fail behind a HTTP proxy

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Pass system properties about http proxy into your maven should work,

something like -Dhttp.proxyHost=your_proxy_host -Dhttp.proxyPort=your_proxy_port, etc

-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-16, at 下午3:45, Daniel Pocock wrote:

> On 16/05/13 09:35, Freeman Fang wrote:
>> Hi,
>> 
>> No, that's property only apply for pax-url-mvn, has nothing to do with features-maven-plugin in Karaf.
>> 
>> The problem you run into is that karaf features-maven-plugin just ignore proxy settings in ~/.m2/settings.xml
> Is there any immediate workaround I can try in order to make the build
> succeed? (other than setting up a silent proxy)
> 
> 
> 
>> Could you please create a jira in Karaf so that we can track and take care of it?
>> 
>> Thanks
>> -------------
>> Freeman(Yue) Fang
>> 
>> Red Hat, Inc. 
>> FuseSource is now part of Red Hat
>> Web: http://fusesource.com | http://www.redhat.com/
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> http://blog.sina.com.cn/u/1473905042
>> weibo: @Freeman小屋
>> 
>> www.camelone.org : The open source integration conference: 
>> 
>> On 2013-5-16, at 下午3:22, Daniel Pocock wrote:
>> 
>>> I also came across this bug:
>>> https://issues.apache.org/jira/browse/KARAF-1657
>>> 
>>> which appears to be just a change to the comments in the sample config
>>> rather than any code change
>>> 
>>> It implies that the plugin should be using the Maven proxy settings by
>>> default - but the error (below) suggests it did not try to use the proxy
>>> during a ServiceMix build.
>>> 
>>> 
>>> On 15/05/13 19:55, Daniel Pocock wrote:
>>>> I've observed that the ServiceMix build fails when behind a proxy
>>>> 
>>>> The Maven proxy settings are used for most things, but there is a karaf
>>>> plugin that tries to do direct network access, and it has been a problem
>>>> for other people building Karaf by itself:
>>>> 
>>>> http://mail-archives.apache.org/mod_mbox/camel-users/201208.mbox/%3CCANZYW6aRgR%3DnpH1080a5XWpbKD9aakCU8OGCJH5ydg02rXjhsg%40mail.gmail.com%3E
>>>> 
>>>>> [ERROR] Failed to execute goal
>>>>> org.apache.karaf.tooling:features-maven-plugin:2.2.8:add-features-to-repo
>>>>> (add-features-to-repo-win) on project dist: Can't resolve bundle
>>>>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1: Could not
>>>>> transfer artifact com.google.code.s
>>>>> criptengines:scriptengines-jruby:jar:1.1 from/to
>>>>> http://scriptengines.googlecode.com/svn/m2-repo/
>>>>> (http://scriptengines.googlecode.com/svn/m
>>>>> 2-repo/): Connection to http://scriptengines.googlecode.com refused
>>>>> [ERROR]
>>>>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1
>>>>> [ERROR]
>>>>> [ERROR] from the specified remote repositories:
>>>>> [ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
>>>>> (http://scriptengines.googlecode.com/svn/m2-repo/, releases=true,
>>>>> snapshots=true):
>>>>> Connection refused: connect
>>>> 
>>>> but the solution doesn't appear to work for a ServiceMix build
>>>> 
>>>> I notice that during the build several copies of
>>>> 
>>>> org.ops4j.pax.url.mvn.cfg are created within the tree.  I tried adding the correction to all of them and continuing the build, it didn't work.  I also tried adding
>>>> 
>>>> -Dorg.ops4j.pax.url.mvn.proxySupport=true
>>>> 
>>>> on the command line and that didn't work either.
>>>> 
>>>> 
>>>> The artifact it is trying to access is actually in the local mvn ~/.m2/repository as well, it seems un-necessary that it has to make another network access
>>>> 
>>>> I have been able to run the build successfully on a machine that is not stuck behind a proxy.
>>>> 
>>>> Can anybody clarify how to proceed and do a full build either behind a proxy or completely offline?
>>>> 
>>>> 
>>>> 
>> 
> 


Re: ServiceMix builds fail behind a HTTP proxy

Posted by Daniel Pocock <da...@pocock.com.au>.
On 16/05/13 09:35, Freeman Fang wrote:
> Hi,
>
> No, that's property only apply for pax-url-mvn, has nothing to do with features-maven-plugin in Karaf.
>
> The problem you run into is that karaf features-maven-plugin just ignore proxy settings in ~/.m2/settings.xml
Is there any immediate workaround I can try in order to make the build
succeed? (other than setting up a silent proxy)



> Could you please create a jira in Karaf so that we can track and take care of it?
>
> Thanks
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
> Web: http://fusesource.com | http://www.redhat.com/
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: @Freeman小屋
>
> www.camelone.org : The open source integration conference: 
>
> On 2013-5-16, at 下午3:22, Daniel Pocock wrote:
>
>> I also came across this bug:
>> https://issues.apache.org/jira/browse/KARAF-1657
>>
>> which appears to be just a change to the comments in the sample config
>> rather than any code change
>>
>> It implies that the plugin should be using the Maven proxy settings by
>> default - but the error (below) suggests it did not try to use the proxy
>> during a ServiceMix build.
>>
>>
>> On 15/05/13 19:55, Daniel Pocock wrote:
>>> I've observed that the ServiceMix build fails when behind a proxy
>>>
>>> The Maven proxy settings are used for most things, but there is a karaf
>>> plugin that tries to do direct network access, and it has been a problem
>>> for other people building Karaf by itself:
>>>
>>> http://mail-archives.apache.org/mod_mbox/camel-users/201208.mbox/%3CCANZYW6aRgR%3DnpH1080a5XWpbKD9aakCU8OGCJH5ydg02rXjhsg%40mail.gmail.com%3E
>>>
>>>> [ERROR] Failed to execute goal
>>>> org.apache.karaf.tooling:features-maven-plugin:2.2.8:add-features-to-repo
>>>> (add-features-to-repo-win) on project dist: Can't resolve bundle
>>>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1: Could not
>>>> transfer artifact com.google.code.s
>>>> criptengines:scriptengines-jruby:jar:1.1 from/to
>>>> http://scriptengines.googlecode.com/svn/m2-repo/
>>>> (http://scriptengines.googlecode.com/svn/m
>>>> 2-repo/): Connection to http://scriptengines.googlecode.com refused
>>>> [ERROR]
>>>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1
>>>> [ERROR]
>>>> [ERROR] from the specified remote repositories:
>>>> [ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
>>>> (http://scriptengines.googlecode.com/svn/m2-repo/, releases=true,
>>>> snapshots=true):
>>>> Connection refused: connect
>>>
>>> but the solution doesn't appear to work for a ServiceMix build
>>>
>>> I notice that during the build several copies of
>>>
>>> org.ops4j.pax.url.mvn.cfg are created within the tree.  I tried adding the correction to all of them and continuing the build, it didn't work.  I also tried adding
>>>
>>> -Dorg.ops4j.pax.url.mvn.proxySupport=true
>>>
>>> on the command line and that didn't work either.
>>>
>>>
>>> The artifact it is trying to access is actually in the local mvn ~/.m2/repository as well, it seems un-necessary that it has to make another network access
>>>
>>> I have been able to run the build successfully on a machine that is not stuck behind a proxy.
>>>
>>> Can anybody clarify how to proceed and do a full build either behind a proxy or completely offline?
>>>
>>>
>>>
>


Re: ServiceMix builds fail behind a HTTP proxy

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

No, that's property only apply for pax-url-mvn, has nothing to do with features-maven-plugin in Karaf.

The problem you run into is that karaf features-maven-plugin just ignore proxy settings in ~/.m2/settings.xml

Could you please create a jira in Karaf so that we can track and take care of it?

Thanks
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-16, at 下午3:22, Daniel Pocock wrote:

> 
> I also came across this bug:
> https://issues.apache.org/jira/browse/KARAF-1657
> 
> which appears to be just a change to the comments in the sample config
> rather than any code change
> 
> It implies that the plugin should be using the Maven proxy settings by
> default - but the error (below) suggests it did not try to use the proxy
> during a ServiceMix build.
> 
> 
> On 15/05/13 19:55, Daniel Pocock wrote:
>> 
>> I've observed that the ServiceMix build fails when behind a proxy
>> 
>> The Maven proxy settings are used for most things, but there is a karaf
>> plugin that tries to do direct network access, and it has been a problem
>> for other people building Karaf by itself:
>> 
>> http://mail-archives.apache.org/mod_mbox/camel-users/201208.mbox/%3CCANZYW6aRgR%3DnpH1080a5XWpbKD9aakCU8OGCJH5ydg02rXjhsg%40mail.gmail.com%3E
>> 
>>> [ERROR] Failed to execute goal
>>> org.apache.karaf.tooling:features-maven-plugin:2.2.8:add-features-to-repo
>>> (add-features-to-repo-win) on project dist: Can't resolve bundle
>>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1: Could not
>>> transfer artifact com.google.code.s
>>> criptengines:scriptengines-jruby:jar:1.1 from/to
>>> http://scriptengines.googlecode.com/svn/m2-repo/
>>> (http://scriptengines.googlecode.com/svn/m
>>> 2-repo/): Connection to http://scriptengines.googlecode.com refused
>>> [ERROR]
>>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1
>>> [ERROR]
>>> [ERROR] from the specified remote repositories:
>>> [ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
>>> (http://scriptengines.googlecode.com/svn/m2-repo/, releases=true,
>>> snapshots=true):
>>> Connection refused: connect
>> 
>> 
>> but the solution doesn't appear to work for a ServiceMix build
>> 
>> I notice that during the build several copies of
>> 
>> org.ops4j.pax.url.mvn.cfg are created within the tree.  I tried adding the correction to all of them and continuing the build, it didn't work.  I also tried adding
>> 
>> -Dorg.ops4j.pax.url.mvn.proxySupport=true
>> 
>> on the command line and that didn't work either.
>> 
>> 
>> The artifact it is trying to access is actually in the local mvn ~/.m2/repository as well, it seems un-necessary that it has to make another network access
>> 
>> I have been able to run the build successfully on a machine that is not stuck behind a proxy.
>> 
>> Can anybody clarify how to proceed and do a full build either behind a proxy or completely offline?
>> 
>> 
>> 
> 


Re: ServiceMix builds fail behind a HTTP proxy

Posted by Daniel Pocock <da...@pocock.com.au>.
I also came across this bug:
https://issues.apache.org/jira/browse/KARAF-1657

which appears to be just a change to the comments in the sample config
rather than any code change

It implies that the plugin should be using the Maven proxy settings by
default - but the error (below) suggests it did not try to use the proxy
during a ServiceMix build.


On 15/05/13 19:55, Daniel Pocock wrote:
>
> I've observed that the ServiceMix build fails when behind a proxy
>
> The Maven proxy settings are used for most things, but there is a karaf
> plugin that tries to do direct network access, and it has been a problem
> for other people building Karaf by itself:
>
> http://mail-archives.apache.org/mod_mbox/camel-users/201208.mbox/%3CCANZYW6aRgR%3DnpH1080a5XWpbKD9aakCU8OGCJH5ydg02rXjhsg%40mail.gmail.com%3E
>
>> [ERROR] Failed to execute goal
>> org.apache.karaf.tooling:features-maven-plugin:2.2.8:add-features-to-repo
>> (add-features-to-repo-win) on project dist: Can't resolve bundle
>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1: Could not
>> transfer artifact com.google.code.s
>> criptengines:scriptengines-jruby:jar:1.1 from/to
>> http://scriptengines.googlecode.com/svn/m2-repo/
>> (http://scriptengines.googlecode.com/svn/m
>> 2-repo/): Connection to http://scriptengines.googlecode.com refused
>> [ERROR]
>> com.google.code.scriptengines:scriptengines-jruby:jar:1.1
>> [ERROR]
>> [ERROR] from the specified remote repositories:
>> [ERROR] http://scriptengines.googlecode.com/svn/m2-repo/
>> (http://scriptengines.googlecode.com/svn/m2-repo/, releases=true,
>> snapshots=true):
>> Connection refused: connect
>
>
> but the solution doesn't appear to work for a ServiceMix build
>
> I notice that during the build several copies of
>
> org.ops4j.pax.url.mvn.cfg are created within the tree.  I tried adding the correction to all of them and continuing the build, it didn't work.  I also tried adding
>
> -Dorg.ops4j.pax.url.mvn.proxySupport=true
>
> on the command line and that didn't work either.
>
>
> The artifact it is trying to access is actually in the local mvn ~/.m2/repository as well, it seems un-necessary that it has to make another network access
>
> I have been able to run the build successfully on a machine that is not stuck behind a proxy.
>
> Can anybody clarify how to proceed and do a full build either behind a proxy or completely offline?
>
>
>