I finally found the problem. I keep forgetting that the Maven Release plugin does not use the M2Eclipse settings. I didn't have any settings file in my command-line Maven installation so it couldn't find the server id to send the credentials to Archiva. Once I put the settings file in the conf directory of my command-line Maven installation it worked fine.
Tim McGinnis 717 720-1962 Web Development AES/PHEAA From: "Timothy Mcginnis" <[email protected]> To: [email protected] Date: 08/30/2010 07:58 AM Subject: Re: no matching permissions I checked for the Block Re-deployment but I don't have that setting in my repository screen. I am running 1.3 so I assume that setting was added later. The output with the -e flag is listed below. I ran it with the -X flag also and noticed that right before it attempts to upload the artifact there is a debug line that says "not adding permissions to wagon connection". + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'release'. [INFO] ------------------------------------------------------------------------ [INFO] Building Test Project [INFO] task-segment: [release:perform] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] [release:perform {execution: default-cli}] [INFO] Checking out the project to perform the release ... [INFO] Executing: cmd.exe /X /C "svn --non-interactive checkout svn+ssh://[email protected]/svn/java/MavenPOC/tags/test-project-1.1 checkout" [INFO] Working directory: C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target [INFO] Executing goals 'deploy'... [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance. [INFO] [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Building Test Project [INFO] [INFO] task-segment: [deploy] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] [resources:resources {execution: default-resources}] [INFO] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] [INFO] Copying 0 resource [INFO] [INFO] [compiler:compile {execution: default-compile}] [INFO] [INFO] Compiling 1 source file to C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\classes [INFO] [INFO] [resources:testResources {execution: default-testResources}] [INFO] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] [INFO] Copying 0 resource [INFO] [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] [surefire:test {execution: default-test}] [INFO] [INFO] Surefire report directory: C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\surefire-reports [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] There are no tests to run. [INFO] [INFO] Results : [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] [jar:jar {execution: default-jar}] [INFO] [INFO] Building jar: C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\test-project-1.1.jar [INFO] [INFO] Preparing source:jar [INFO] [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] [source:jar {execution: attach-sources}] [INFO] [INFO] Building jar: C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\test-project-1.1-sources.jar [INFO] [INFO] [javadoc:jar {execution: attach-javadocs}] [INFO] [WARNING] Source files encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Loading source files for package com.aes.test... [INFO] Constructing Javadoc information... [INFO] Standard Doclet version 1.6.0 [INFO] Building tree for all the packages and classes... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\com/aes/test/\FakeClass.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\com/aes/test/\package-frame.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\com/aes/test/\package-summary.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\com/aes/test/\package-tree.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\constant-values.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\com/aes/test/\class-use\FakeClass.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\com/aes/test/\package-use.html... [INFO] Building index for all the packages and classes... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\overview-tree.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\index-all.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\deprecated-list.html... [INFO] Building index for all classes... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\allclasses-frame.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\allclasses-noframe.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\index.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\help-doc.html... [INFO] Generating C:/Documents and Settings/tmcginni/IBM/rationalsdp7.0/svnPOC/test-project/target/checkout/target/apidocs\stylesheet.css... [INFO] [INFO] Building jar: C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\test-project-1.1-javadoc.jar [INFO] [INFO] [install:install {execution: default-install}] [INFO] [INFO] Installing C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\test-project-1.1.jar to C:\Documents and Settings\tmcginni\.m2\2e02057b-repository\com\aes\test-project\1.1\test-project-1.1.jar [INFO] [INFO] Installing C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\test-project-1.1-sources.jar to C:\Documents and Settings\tmcginni\.m2\2e02057b-repository\com\aes\test-project\1.1\test-project-1.1-sources.jar [INFO] [INFO] Installing C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\target\test-project-1.1-javadoc.jar to C:\Documents and Settings\tmcginni\.m2\2e02057b-repository\com\aes\test-project\1.1\test-project-1.1-javadoc.jar [INFO] [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Uploading: http://2e02057b.aessuccess.org:8085/archiva/repository/internal//com/aes/test-project/1.1/test-project-1.1.jar [INFO] 2/2K [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [ERROR] BUILD ERROR [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Error deploying artifact: Failed to transfer file: http://2e02057b.aessuccess.org:8085/archiva/repository/internal/com/aes/test-project/1.1/test-project-1.1.jar . Return code is: 401 [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Total time: 7 seconds [INFO] [INFO] Finished at: Mon Aug 30 07:52:25 EDT 2010 [INFO] [INFO] Final Memory: 26M/106M [INFO] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Maven execution failed, exit code: '1' [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) 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: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89) at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:67) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:334) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:282) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:262) at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:129) ... 19 more Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:375) at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:393) at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81) ... 24 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13 seconds [INFO] Finished at: Mon Aug 30 07:52:25 EDT 2010 [INFO] Final Memory: 10M/30M [INFO] ------------------------------------------------------------------------ ======================================== Here is a segment from the debug output. [INFO] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy' --> [INFO] [DEBUG] (f) artifact = com.aes:test-project:jar:1.1 [INFO] [DEBUG] (f) attachedArtifacts = [com.aes:test-project:java-source:sources:1.1, com.aes:test-project:javadoc:javadoc:1.1] [INFO] [DEBUG] (f) deploymentRepository = Repository[archiva.internal|http://2e02057b.aessuccess.org:8085/archiva/repository/internal/] [INFO] [DEBUG] (s) localRepository = Repository[local|file://C:\Documents and Settings\tmcginni\.m2\2e02057b-repository] [INFO] [DEBUG] (f) packaging = jar [INFO] [DEBUG] (f) pomFile = C:\Documents and Settings\tmcginni\IBM\rationalsdp7.0\svnPOC\test-project\target\checkout\pom.xml [INFO] [DEBUG] (f) skip = false [INFO] [DEBUG] (f) updateReleaseInfo = true [INFO] [DEBUG] -- end configuration -- [INFO] [INFO] [deploy:deploy {execution: default-deploy}] [INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol http [INFO] [DEBUG] Checking for pre-existing User-Agent configuration. [INFO] [DEBUG] Adding User-Agent configuration. [INFO] [DEBUG] not adding permissions to wagon connection [INFO] Uploading: http://2e02057b.aessuccess.org:8085/archiva/repository/internal//com/aes/test-project/1.1/test-project-1.1.jar [INFO] 2/2K [INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol http [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [ERROR] BUILD ERROR [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Error deploying artifact: Failed to transfer file: http://2e02057b.aessuccess.org:8085/archiva/repository/internal/com/aes/test-project/1.1/test-project-1.1.jar . Return code is: 401 [INFO] [INFO] [INFO] ------------------------------------------------------------------------ Tim McGinnis 717 720-1962 Web Development AES/PHEAA From: "Deng Ching" <[email protected]> To: [email protected] Date: 08/28/2010 05:43 AM Subject: Re: no matching permissions Sent by: [email protected] The configuration looks correct. Can you post the Maven build output? Can you check also if the Block Re-deployment of Released Artifacts is enabled in the internal repository? If that's enabled, Archiva wouldn't allow overwriting of release artifacts. The error returned in this case shouldn't be a 401 though, but it couldn't hurt to check to make sure. Thanks, Deng On Fri, Aug 27, 2010 at 10:56 PM, Timothy Mcginnis <[email protected]> wrote: > I have been using archiva for 2 years. I have just set up another > instance for testing. I have a user that is assigned the System > Administrator role and I am trying to release a project. When it goes to > load the artifact to Archiva I get a 401 error. In the archiva.log file I > see the following > > 2010-08-27 10:51:10,074 [btpool0-2] INFO > org.apache.maven.archiva.security.ArchivaServletAuthenticator - > Authorization Denied > [ip=10.10.41.86,permission=archiva-upload-repository,repo=internal] : no > matching permissions > > Using the same user I can upload the same artifact through the browser > interface. > > Using the same username and password I can deploy the project to the > snapshot repo. > > Here is the settings.xml portion. > > <server> > <id>archiva.internal</id> > <username>john</username> > <password>welcome2</password> > </server> > <server> > <id>archiva.snapshots</id> > <username>john</username> > <password>welcome2</password> > </server> > <server> > <id>archiva.universe</id> > <username>john</username> > <password>welcome2</password> > </server> > > Here is the distributionManagement portion from my project. > > <distributionManagement> > <repository> > <id>archiva.internal</id> > <name>Internal Release Repository</name> > <url> > http://2e02057b.aessuccess.org:8085/archiva/repository/internal/</url> > </repository> > <snapshotRepository> > <id>archiva.snapshots</id> > <name>Internal Snapshot Repository</name> > <url> > http://2e02057b.aessuccess.org:8085/archiva/repository/snapshots/</url> > </snapshotRepository> > </distributionManagement> > > Can anybody see what I am doing wrong? > > > Tim McGinnis > 717 720-1962 > Web Development > AES/PHEAA > ============================================================================== > This message contains privileged and confidential information intended for the above addressees only. If you > receive this message in error please delete or destroy this message and/or attachments. > > The sender of this message will fully cooperate in the civil and criminal prosecution of any individual engaging > in the unauthorized use of this message. > ============================================================================== > ============================================================================== This message contains privileged and confidential information intended for the above addressees only. If you receive this message in error please delete or destroy this message and/or attachments. The sender of this message will fully cooperate in the civil and criminal prosecution of any individual engaging in the unauthorized use of this message. ============================================================================== ============================================================================== This message contains privileged and confidential information intended for the above addressees only. If you receive this message in error please delete or destroy this message and/or attachments. The sender of this message will fully cooperate in the civil and criminal prosecution of any individual engaging in the unauthorized use of this message. ============================================================================== ============================================================================== This message contains privileged and confidential information intended for the above addressees only. If you receive this message in error please delete or destroy this message and/or attachments. The sender of this message will fully cooperate in the civil and criminal prosecution of any individual engaging in the unauthorized use of this message. ==============================================================================
