Getting mvn deploy to work

View: New views
4 Messages — Rating Filter:   Alert me  

Getting mvn deploy to work

by Tim Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, all,

I'm having trouble getting command-line deployment to a copy of
Artifactory on my local network working, and am fairly baffled at what's
going on.  Perhaps someone here can help - I've got about 25 projects
that interrelate that I'm working on kind of at the same time, and if I
have to use the web interface to upload each one after each change I'll
quickly go mad :-/

Running mvn deploy on the command line gives the following error:

[INFO] Error deploying artifact: Failed to transfer file:
http://timboudreau.com/mvn/repo/libs-snapshots-local/com/timboudreau/quickmodels/0.2-SNAPSHOT/quickmodels-0.2-20090701.214553-1.jar.
Return code is: 400

So on the server, I look at the apache logs and I see:

2009-07-01 17:29:14,781 [WARN ] (o.a.e.UploadServiceImpl:37) - Sending
HTTP error code 400: Could not find a local repository named repo to
deploy to..

Well, that's interesting.  So something thinks the repository is
"repo".  The <distributionManagement> section of my POM looks like this:

    <distributionManagement>
        <repository>
            <name>timboudreau.com</name>
            <url>http://timboudreau.com/mvn/repo/libs-releases-local</url>
            <id>timboudreau.com</id>
        </repository>
        <snapshotRepository>
            <id>timboudreau.com</id>
            <name>timboudreau.com</name>
            <url>http://timboudreau.com/mvn/repo/libs-snapshots-local</url>
        </snapshotRepository>
    </distributionManagement>

Nothing called just "repo" there.  Could it be somehow being read from
the <repositories> section of the POM?

        <repository>
            <id>timboudreau</id>
            <name>Tim Boudreau's Repository</name>
            <layout>default</layout>
            <url>http://timboudreau.com/mvn/repo/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

Meanwhile, in $HOME/.m2/settings.xml, the server is defined thusly:

    <servers>
        <server>
            <id>timboudreau.com</id>
            <username>secretname</username>
            <password>secretpass</password>
            <filePermissions>664</filePermissions>
            <directoryPermissions>775</directoryPermissions>
            <configuration></configuration>
        </server>
    </servers>

and this username/password combo works fine for deploying via the web
interface.

So my guess is that 'mvn deploy' is simply telling artifactory to put it
in the wrong place (btw, I've tried the urls both with dav: and without,
not sure which I should be using - read somewhere that straight http
doesn't work).

Any ideas?  This is driving me batty!

Thanks,

Tim

------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
Artifactory-users@...
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Re: Getting mvn deploy to work

by freddy33 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Don't go mad :)

Your distribution management URL have 2 repository names one after an other. Should be:
<distributionManagement>
       <repository>
           <name>timboudreau.com</name>
           <url>http://timboudreau.com/mvn/libs-releases-local</
url>
           <id>timboudreau.com</id>
       </repository>
       <snapshotRepository>
           <id>timboudreau.com</id>
           <name>timboudreau.com</name>
           <url>http://timboudreau.com/mvn/libs-snapshots-local</url>
       </snapshotRepository>
   </distributionManagement>

Should work.
HTH,
Fred.

On Thu, Jul 2, 2009 at 12:56 AM, Tim Boudreau <tboudreau@...> wrote:
Hi, all,

I'm having trouble getting command-line deployment to a copy of
Artifactory on my local network working, and am fairly baffled at what's
going on.  Perhaps someone here can help - I've got about 25 projects
that interrelate that I'm working on kind of at the same time, and if I
have to use the web interface to upload each one after each change I'll
quickly go mad :-/

Running mvn deploy on the command line gives the following error:

[INFO] Error deploying artifact: Failed to transfer file:
http://timboudreau.com/mvn/repo/libs-snapshots-local/com/timboudreau/quickmodels/0.2-SNAPSHOT/quickmodels-0.2-20090701.214553-1.jar.
Return code is: 400

So on the server, I look at the apache logs and I see:

2009-07-01 17:29:14,781 [WARN ] (o.a.e.UploadServiceImpl:37) - Sending
HTTP error code 400: Could not find a local repository named repo to
deploy to..

Well, that's interesting.  So something thinks the repository is
"repo".  The <distributionManagement> section of my POM looks like this:

   <distributionManagement>
       <repository>
           <name>timboudreau.com</name>
           <url>http://timboudreau.com/mvn/repo/libs-releases-local</url>
           <id>timboudreau.com</id>
       </repository>
       <snapshotRepository>
           <id>timboudreau.com</id>
           <name>timboudreau.com</name>
           <url>http://timboudreau.com/mvn/repo/libs-snapshots-local</url>
       </snapshotRepository>
   </distributionManagement>

Nothing called just "repo" there.  Could it be somehow being read from
the <repositories> section of the POM?

       <repository>
           <id>timboudreau</id>
           <name>Tim Boudreau's Repository</name>
           <layout>default</layout>
           <url>http://timboudreau.com/mvn/repo/</url>
           <snapshots>
               <enabled>true</enabled>
           </snapshots>
       </repository>

Meanwhile, in $HOME/.m2/settings.xml, the server is defined thusly:

   <servers>
       <server>
           <id>timboudreau.com</id>
           <username>secretname</username>
           <password>secretpass</password>
           <filePermissions>664</filePermissions>
           <directoryPermissions>775</directoryPermissions>
           <configuration></configuration>
       </server>
   </servers>

and this username/password combo works fine for deploying via the web
interface.

So my guess is that 'mvn deploy' is simply telling artifactory to put it
in the wrong place (btw, I've tried the urls both with dav: and without,
not sure which I should be using - read somewhere that straight http
doesn't work).

Any ideas?  This is driving me batty!

Thanks,

Tim

------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
Artifactory-users@...
https://lists.sourceforge.net/lists/listinfo/artifactory-users



--
JFrog Ltd
5 Habonim st., P.O.Box 8187
Netanya, Israel 42504.
Tel: +972 9 8941444    
Fax: +972 9 8659977
http://www.jfrog.org/
http://freddy33.blogspot.com/
http://nothingisinfinite.blogspot.com/

------------------------------------------------------------------------------

_______________________________________________
Artifactory-users mailing list
Artifactory-users@...
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Re: Getting mvn deploy to work

by Tim Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Frederic Simon wrote:
>
> Don't go mad :)
>
> Your distribution management URL have 2 repository names one after an
> other.
> Should be:
> <distributionManagement>
> ...
>

Tried that - in fact, just tried it again from my laptop in an internet cafe
after doing a fresh checkout - same 400 error.

I really need to get this stuff building and auto-deploying with Hudson, as
keeping my repository in sync with the actual sources is becoming a major
chore - after checking out 23 projects (with many interdependencies - I'm
splitting up some Wicket apps I wrote into the past into libraries of
reusable components and Maven archetypes to quickly build applications from
them), I naturally found I couldn't build some of them because what was in
my maven repository is not up to date.  So instead of coding happily from an
internet cafe, I'm rebuilding things and manually uploading them to
Artifactory...

Arrrrgh!

Any further suggestions welcome.  Or if anybody knows some system property
magic to get meaningful logging out of Wagon, that would be appreciated too.

-Tim
--
View this message in context: http://n2.nabble.com/Getting-mvn-deploy-to-work-tp3192046p3198443.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
Artifactory-users@...
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Re: Getting mvn deploy to work

by Yoav Landman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tim,

Can you post your recent error report from Maven (after correcting the repo URLs), together with your effective-settings and the "repositories" and "distributionManagement" sections from your effective-pom?

BTW, the file and directory permissions are not necessary with Artifactory.

Thanks,

Yoav

On Fri, Jul 3, 2009 at 2:30 AM, Tim Boudreau <tboudreau@...> wrote:


Frederic Simon wrote:
>
> Don't go mad :)
>
> Your distribution management URL have 2 repository names one after an
> other.
> Should be:
> <distributionManagement>
> ...
>

Tried that - in fact, just tried it again from my laptop in an internet cafe
after doing a fresh checkout - same 400 error.

I really need to get this stuff building and auto-deploying with Hudson, as
keeping my repository in sync with the actual sources is becoming a major
chore - after checking out 23 projects (with many interdependencies - I'm
splitting up some Wicket apps I wrote into the past into libraries of
reusable components and Maven archetypes to quickly build applications from
them), I naturally found I couldn't build some of them because what was in
my maven repository is not up to date.  So instead of coding happily from an
internet cafe, I'm rebuilding things and manually uploading them to
Artifactory...

Arrrrgh!

Any further suggestions welcome.  Or if anybody knows some system property
magic to get meaningful logging out of Wagon, that would be appreciated too.

-Tim
--
View this message in context: http://n2.nabble.com/Getting-mvn-deploy-to-work-tp3192046p3198443.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
Artifactory-users@...
https://lists.sourceforge.net/lists/listinfo/artifactory-users


------------------------------------------------------------------------------

_______________________________________________
Artifactory-users mailing list
Artifactory-users@...
https://lists.sourceforge.net/lists/listinfo/artifactory-users