java - Odd file naming using wget with Nexus Rest API -


i have script pulls .war artifacts our nexus repository using wget pull artifacts via nexus rest api.

the url hit wget similar this:

http://our.nexus.net:8081/nexus/service/local/artifact/maven/redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war

it works fine in our dev environment, , pulls artifact name someartifact-1.0.0.war.

however, in our test environment, pulls artifact correctly, gives name:

redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war

any ideas why not renaming correctly?

here example output wget when names wrong.

--2015-05-11 11:22:12-- http://our.nexus.net:8081/nexus/service/local/artifact/maven/redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war resolving our.nexus.net... (ip) connecting our.nexus.net|(ip)|:8081... connected. http request sent, awaiting response... 307 temporary redirect location: http://our.nexus.net:8081/nexus/service/local/repositories/releases/content/com/somecompany/someartifact/1.0.0/someartifact-1.0.0.war [following] --2015-05-11 11:22:12-- http://our.nexus.net:8081/nexus/service/local/repositories/releases/content/com/somecompany/someartifact/1.0.0/someartifact-1.0.0.war reusing existing connection our.nexus.net:8081. http request sent, awaiting response... 200 ok length: 22046212 (21m) [application/java-archive] saving to: "/tmp/deploy/redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war"  100%[======================================================>] 22,046,212 56.7m/s in 0.4s  2015-05-11 11:22:12 (56.7 mb/s) - "/tmp/deploy/redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war" saved [22046212/22046212] 

and when naming correctly:

--2015-05-11 11:22:12-- http://our.nexus.net:8081/nexus/service/local/artifact/maven/redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war resolving our.nexus.net... (ip) connecting our.nexus.net|(ip)|:8081... connected. http request sent, awaiting response... 307 temporary redirect location: http://our.nexus.net:8081/nexus/service/local/repositories/releases/content/com/somecompany/someartifact/1.0.0/someartifact-1.0.0.war [following] --2015-05-11 11:22:12-- http://our.nexus.net:8081/nexus/service/local/repositories/releases/content/com/somecompany/someartifact/1.0.0/someartifact-1.0.0.war reusing existing connection our.nexus.net:8081. http request sent, awaiting response... 200 ok length: 22046212 (21m) [application/java-archive] saving to: "/tmp/deploy/someartifact-1.0.0.war"  100%[======================================================>] 22,046,212 56.7m/s in 0.4s  2015-05-11 11:22:12 (56.7 mb/s) - "/tmp/deploy/someartifact.1.0.0.war" saved [22046212/22046212] 

edit: additional information below.

both dev , test environment have wget version 1.12.

the dev server, works running redhat enterprise linux os version 6.4. test server, not work version 6.6.

looks problem difference in wget setup in redhat enterprise linux os version 6.4 versus 6.6.

i ended using -o flag wget ensure file name wanted.

wget -o someartifact.1.0.0.war "http://our.nexus.net:8081/nexus/service/local/artifact/maven/redirect?g=com.somecompany&a=someartifact&v=1.0.0&r=releases&p=war" 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -