You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Neumann <t....@stream-line.de> on 2004/11/04 11:44:35 UTC

Problems while setting up a remote repository

Hello,

I'm newby to maven and I'm trying to setup a remote repository for our 
company. Until now I haven't been successful. This is what I tried in 
the last 2 days:

1) Using maven.repo.remote in build.properties

I set maven.repo.remote to http://localhost. Maven asks for a property 
maven.username. I specified the property, despite the fact that the 
webserver is open for everyone. When issuing "maven jar:deploy" maven 
still tries to access ibiblio.org - via scp I guess.

2) Using maven.repo.list with sftp or scp protocol

I added the following entries to the build.property.

maven.repo.list=R1

maven.repo.R1=scp://localhost
maven.repo.R1.directory=maven_remote_repo
maven.repo.R1.username=XYZ
maven.repo.R1.password=******

Username, password, hostname and directory are correct. I verified it by 
using scp from a command line with the same options. Calling jar:deploy 
results in the following error.

Deploying to repository: R1
com.jcraft.jsch.JSchException: Auth fail
         at com.jcraft.jsch.Session.connect(Unknown Source)
         at 
org.apache.maven.deploy.deployers.GenericSshDeployer.init(GenericSshDeployer.java:166)
         at 
org.apache.maven.deploy.deployers.ScpDeployer.init(ScpDeployer.java:103)
         at org.apache.maven.deploy.DeployTool.deploy(DeployTool.java:134)
         at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.doDeploy(DefaultArtifactDeployer.java:390)
         at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:123)
         at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121)
         at 
org.apache.maven.artifact.deployer.DeployBean.deploy(DeployBean.java:144)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at 
org.apache.commons.jelly.impl.DynamicBeanTag.doTag(DynamicBeanTag.java:230)
         at 
org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:145)
         at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
         at 
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
         at 
org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:87)
         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
         at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
         at 
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
         at 
org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:84)
         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
         at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
         at 
org.apache.commons.jelly.impl.DynamicTag.doTag(DynamicTag.java:125)
         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
         at 
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
         at 
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
         at 
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
         at com.werken.werkz.Goal.fire(Goal.java:639)
         at com.werken.werkz.Goal.attain(Goal.java:575)
         at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
         at 
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:634)
         at org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
         at org.apache.maven.cli.App.doMain(App.java:486)
         at org.apache.maven.cli.App.main(App.java:1215)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.werken.forehead.Forehead.run(Forehead.java:551)
         at com.werken.forehead.Forehead.main(Forehead.java:581)
Failed to deploy to: R1 Reason: Cannot connect. Reason: Auth fail

The same is true for sftp

3) Using maven.repo.list with scpexe protocol

I added the following entries to the build.property.

maven.repo.list=R1

maven.repo.R1=scpexe://localhost
maven.repo.R1.directory=maven_remote_repo
maven.repo.R1.username=XYZ
maven.repo.R1.password=*****

Username, password, hostname and directory are correct. I verified it by 
using scp from a command line with the same options. When calling 
jar:deploy maven starts copying the files and I get prompted 4 to 5 
times for my password. But when I look at the directory it is still 
empty. Building up the required directory structure in the remote 
directory does not work. The files simply seem to disappear.

4) Using maven.repo.list with http protocol

Despite the fact that it is not written in the documentation I tried to 
use the http protocol.

maven.repo.list=R1

maven.repo.R1=http://localhost

Maven seems to execute the jar:deploy goal without any error. When 
looking at the directory afterwards it is still empty. Creating the 
required directory structure does not work either. I found the following 
entries in the apache access log.

127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] "PUT / HTTP/1.1" 403 276 "-" 
"Jakarta Commons-HttpClient/2.0final" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] "<?xml version=\"1.0\"?>" 400 
- "-" "-" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] "PUT / HTTP/1.1" 403 276 "-" 
"Jakarta Commons-HttpClient/2.0final" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] "PUT / HTTP/1.1" 403 276 "-" 
"Jakarta Commons-HttpClient/2.0final" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] "PK\x03\x04" 501 - "-" "-" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] "PUT / HTTP/1.1" 403 276 "-" 
"Jakarta Commons-HttpClient/2.0final" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] 
"1cb2c0c49f7dae5c50f875a8f536b1ca" 501 - "-" "-" "-"
127.0.0.1 - - [03/Nov/2004:17:26:52 +0100] 
"8002e227b0d77739c0dbc653915474a4" 501 - "-" "-" "-"

These look to me as if maven is producing malformed http requests. Well 
at least it was worth a try.

Finally I should mention I'm working with maven V1.0 on a Debian linux 
box using JDK 1.4.2_04. As a http daemon I using the debian apache 
package V 1.3. HTTP PUT is configured in this server using mod_put and 
it works with the specified URLs.

So can anybody give me a proven "How to" or hint on setting up an own 
remote repository that works. Thanks for your efforts in advance.

Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org