I modified the wagon-ssh source ( ScpWagon.java ) to drop the "-m" mkdir option ( it seems redundant anyway, given that umask is called in the same shell ), copied the jars to the lib folder and it worked.
-Moiz -----Original Message----- From: dohadwala, moiz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 22, 2005 12:14 PM To: 'Maven Users List' Subject: [m2] deploy:deploy errors I am getting errors while trying to deploy a test plugin to an internal repository. E:\Projects\map\test-maven-plugin>m2 -X deploy:deploy + Error stacktraces are turned on. [DEBUG] Building Maven global-level plugin registry from: 'D:\Java\maven\maven-2.0-SNAPSHOT\conf\plugin-registry.xml' [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\mdohadwa\.m2\plugin-registry.xml' [INFO] Searching repository for plugin with prefix: 'deploy'. [INFO] ---------------------------------------------------------------------------- [INFO] Building Maven Test Plugin [INFO] task-segment: [deploy:deploy] [INFO] ---------------------------------------------------------------------------- [DEBUG] org.apache.maven.plugins:maven-deploy-plugin:maven-plugin:2.0-beta-1 (selected for runtime) [DEBUG] junit:junit:jar:3.8.1 (selected for runtime) [INFO] [deploy:deploy] [INFO] Retrieving previous build number from Corp-Internal [DEBUG] repository metadata for: 'snapshot com.corp.map:test-maven-plugin:1.0-SNAPSHOT' could not be found on repository: Corp-Internal [DEBUG] not adding permissions to wagon connection Uploading: scp://10.239.23.58/opt/maven/maven2//com/corp/map/test-maven-plugin/1.0-SNAP SHOT/test-maven-plugin-1.0-20050922.190024-1.jar Executing command: mkdir -p -m /opt/maven/maven2/com/corp/map/test-maven-plugin/1.0-SNAPSHOT [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- [INFO] Diagnosis: Error deploying artifact [INFO] ---------------------------------------------------------------------------- [ERROR] Cause: org.apache.maven.plugin.MojoExecutionException: Error deploying artifact at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:154) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage r.java:380) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife cycleExecutor.java:502) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De faultLifecycleExecutor.java:465) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec ycleExecutor.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa ultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle Executor.java:136) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186) at org.apache.maven.cli.MavenCli.main(MavenCli.java:302) 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:585) 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.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArt ifactDeployer.java:85) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArt ifactDeployer.java:53) at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:142) ... 16 more Caused by: org.apache.maven.wagon.TransferFailedException: scp: /opt/maven/maven2/com/corp/map/test-maven-plugin/1.0-SNAPSHOT/test-maven-plu gin-1.0-20050922.190024-1.jar: No such file or directory at org.apache.maven.wagon.providers.ssh.ScpWagon.checkAck(ScpWagon.java:702) at org.apache.maven.wagon.providers.ssh.ScpWagon.put(ScpWagon.java:330) at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultW agonManager.java:161) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWag onManager.java:94) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArt ifactDeployer.java:71) ... 18 more It tried to run the mkdir command ( mkdir -p -m /opt/maven/maven2/com/corp/map/test-maven-plugin/1.0-SNAPSHOT ) directly while logged in as the same user, I get the following error message: [EMAIL PROTECTED] map]$ mkdir -p -m /opt/maven/maven2/com/corp/map/test-maven-plugin/1.0-SNAPSHOT mkdir: too few arguments Try `mkdir --help' for more information. [EMAIL PROTECTED] map]$ mkdir --help Usage: mkdir [OPTION] DIRECTORY... Create the DIRECTORY(ies), if they do not already exist. -Z, --context=CONTEXT (SELinux) set security context to CONTEXT Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask -p, --parents no error if existing, make parent directories as needed -v, --verbose print a message for each created directory --help display this help and exit --version output version information and exit The repository is running Red Hat Linux ES ( kernel 2.6.9 ). I am thinking the "-m" option should be dropped if permissions are not being set. Also the error message has the wrong path. The directory was missing since it could not be created and not the jar file itself. -Moiz --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
