-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Taylor wrote: > This is the first time ive done this so im probably missing something > simple. > > Relevant Apache looks like this:- > > Alias /maven_repo/ /opt/app/maven_repo/ > <Directory /opt/app/maven_repo> > DAV on > Options Indexes FollowSymLinks MultiViews > AllowOverride None > Order allow,deny > Allow from all > AuthType Basic > AuthName "MAVEN Repository" > # (Following line optional) > # AuthBasicProvider file > AuthUserFile /opt/app/apache2/passwd/passwords > Require user svn > > </Directory> > > > [EMAIL PROTECTED] app]$ ls -ltrd maven_repo > lrwxrwxrwx 1 svn users 15 Oct 31 17:42 maven_repo -> /DGW/maven_repo > [EMAIL PROTECTED] app]$ ls -ltrd /DGW/maven_repo > drwxrwxrwx 2 svn users 4096 Oct 31 17:42 /DGW/maven_repo > > I can browse directories ok. > > But when I try and upload using:- > > mvn -e deploy:deploy-file -DgroupId=remedy -DartifactId=arapi > -Dversion=7.1 -Dpackaging=jar > -Dfile="C:\Downloads\Java\all_remedy\arapi71.jar" > -DrepositoryId=NortelToolsRepo -Durl="http://hardgwd01/maven_repo"
Simon, Please look at your Apache logs, pom.xml and settings.xml file. You may have a repository id in your pom.xml file that does not match your settings.xml file. It could be as simple as the wrong password has been configured in the settings.xml file. I say this because you say you can already browse the repository meaning you must have authenticated, etc via the browser. Maven has to authenticate too but doesn't have the browser cache to rely on. The Apache logs will provide the clue as to where your configuration may be in error. See other note below. > > It throws an error:- > > [INFO] Trace > org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying > artifact > : Authorization failed: Access denied to: > http://hardgwd01/maven_repo/remedy/ara > pi/7.1/arapi-7.1.jar > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa > ultLifecycleExecutor.java:564) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone > Goal(DefaultLifecycleExecutor.java:493) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau > ltLifecycleExecutor.java:463) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan > dleFailures(DefaultLifecycleExecutor.java:311) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen > ts(DefaultLifecycleExecutor.java:224) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi > fecycleExecutor.java:143) > at > org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: org.apache.maven.plugin.MojoExecutionException: Error > deploying artif > act: Authorization failed: Access denied to: > http://hardgwd01/maven_repo/remedy/ > arapi/7.1/arapi-7.1.jar > at > org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo. > java:243) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi > nManager.java:443) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa > ultLifecycleExecutor.java:539) > ... 16 more > Caused by: > org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error > deploying artifact: Authorization failed: Access denied to: > http://hardgwd01/ma > ven_repo/remedy/arapi/7.1/arapi-7.1.jar > at > org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Def > aultArtifactDeployer.java:94) > at > org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo. > java:239) > ... 18 more > Caused by: org.apache.maven.wagon.TransferFailedException: Authorization > failed: > Access denied to: > http://hardgwd01/maven_repo/remedy/arapi/7.1/arapi-7.1.jar > at > org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(D > efaultWagonManager.java:272) > at > org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(Def > aultWagonManager.java:153) > at > org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Def > aultArtifactDeployer.java:80) > ... 19 more > Caused by: org.apache.maven.wagon.authorization.AuthorizationException: > Access d > enied to: http://hardgwd01/maven_repo/remedy/arapi/7.1/arapi-7.1.jar > at > org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(Lightw > eightHttpWagon.java:165) > at > org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(D > efaultWagonManager.java:237) > ... 21 more > > The only way I have overcome this error is to create all the dirs in the > upload path. You may also have a conflict in the apache and user permissions. Wagon should be creating the directories for you. If you are are on Unix/Linux, then watch the permissions and owner on the parent directory i.e. chmod g+rwsx directory-name. The same file system permissions would apply for other operating systems. > This shouldn't be necessary should it? > How do I overcome this is ti an apache config? > > Thanks > > Simon > > > Simon Taylor > Service Tools Solutions (STS) Engineer > Nortel > Email [EMAIL PROTECTED] > Office +44.1279 402291 (ESN 6 742 2291) > Mobile +44.7740.533743 (ESN 748 3743) > > Regards, Greg -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHKZT2xyxe5L6mr7IRAh+9AKCU1l0AZVXrB3Pw5BcoqwqYJwBNaQCcCGuj srmF6B7oRFt4VMA76NQVYz0= =B8nL -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]