Today, I'd like to talk to you about Maven and rights. Maven must be able to deploy to a central place, the remote repository. We'll do this using sftp. Now look at the following output:
jar:deploy:
[echo] maven.repo.list is set - using artifact deploy mode
Will deploy to 1 repository(ies): R1
Deploying to repository: R1
Using private key: /home/user1/.ssh/keytest
Deploying: /home/user1/blah/myproject/project.xml-->myproject/poms/myproject-3.6.1-build01.pom
Failed to deploy to: R1 Reason: Error occured while deploying to remote host:repository.company.com:null
BUILD FAILEDThe problem turned out to be a rights issue: the file already existed, but wasn't writeable:
$ cd /var/www/repository/maven/ZIG/poms $ ls -l myproject-3.6.1-build01.pom -rw-r--r-- 1 user2 users 3870 Nov 23 16:42 myproject-3.6.1-build01.pom
Don't you just love this stuff? Only took about two hours. For three teammembers.