You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Novak Dalibor <da...@gmail.com> on 2011/04/06 15:33:23 UTC

Sources jar uploaded twice

Hello,

I am experiencing a problem since I have my project configured to use
maven-source-plugin. When I try to execute a "mvn clean install deploy"
command the deploy plugin tries to uploadsources jar to repository twice.
Since this is a nexus release repository it doesn't allow redeployment and I
get an HTTP 400 error.  (see logs below)

However when I run "mvn clean deploy" (without install) all works fine and
sources jar is uploaded only once. Does anyone have any hints why I am
experiencing this behaviour?

I am running maven 2.2.1.

Thanks,
Dalibor



[INFO] [deploy:deploy {execution: default-deploy}]
Uploading:
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1.jar
51K uploaded  (project-common-0.1.1.jar)
[INFO] Retrieving previous metadata from mycompany-thirdparty
[INFO] Uploading repository metadata for: 'artifact
com.mycompany.project:project-common'
[INFO] Uploading project information for project-common 0.1.1
Uploading:
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
39K uploaded  (project-common-0.1.1-sources.jar)
Uploading:
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file:
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar.
Return code is: 400

[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch

Re: Sources jar uploaded twice

Posted by Anders Hammar <an...@hammar.net>.
This doesn't explain why he runs into errors though. The build would only
take a while longer.

/Anders (mobile)
Den 6 apr 2011 15.59 skrev "Stephen Connolly" <
stephen.alan.connolly@gmail.com>:
> mvn clean install deploy
>
> means the following
>
> Mr Maven,
> please look up the clean phase in the standard lifecycles and
> execute all phases in the lifecycle it belongs to up to and including
> the clean phase
> then
> please look up the install phase in the standard lifecycles and
> execute all phases in the lifecycle it belongs to up to and including
> the install phase
> finally
> please look up the deploy phase in the standard lifecycles and
> execute all phases in the lifecycle it belongs to up to and including
> the deploy phase
>
> you will notice that install and deploy are in the same lifecycle with
> deploy being just after install
>
> On 6 April 2011 14:33, Novak Dalibor <da...@gmail.com> wrote:
>> Hello,
>>
>> I am experiencing a problem since I have my project configured to use
>> maven-source-plugin. When I try to execute a "mvn clean install deploy"
>> command the deploy plugin tries to uploadsources jar to repository twice.
>> Since this is a nexus release repository it doesn't allow redeployment
and I
>> get an HTTP 400 error.  (see logs below)
>>
>> However when I run "mvn clean deploy" (without install) all works fine
and
>> sources jar is uploaded only once. Does anyone have any hints why I am
>> experiencing this behaviour?
>>
>> I am running maven 2.2.1.
>>
>> Thanks,
>> Dalibor
>>
>>
>>
>> [INFO] [deploy:deploy {execution: default-deploy}]
>> Uploading:
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1.jar
>> 51K uploaded  (project-common-0.1.1.jar)
>> [INFO] Retrieving previous metadata from mycompany-thirdparty
>> [INFO] Uploading repository metadata for: 'artifact
>> com.mycompany.project:project-common'
>> [INFO] Uploading project information for project-common 0.1.1
>> Uploading:
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> 39K uploaded  (project-common-0.1.1-sources.jar)
>> Uploading:
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error deploying artifact: Failed to transfer file:
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
.
>> Return code is: 400
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: Sources jar uploaded twice

Posted by Stephen Connolly <st...@gmail.com>.
because there can only be one main artifact so it gets replaced but
you add to the collection of secondary artifacts... perhaps if core
implemented a set rather than a list and the set entries were equals
based on classifier and type

On 6 April 2011 19:01, Anders Hammar <an...@hammar.net> wrote:
> Hmm, wouldn't this be a bug then in either maven core or the sources plugin?
> I'm quite sure executing "mvn install deploy" would work for a multi-module
> build without sources attached. The main artifact wouldn't be uploaded
> twice. (Haven't verified though.)
>
> Possibly Maven 3.0.x doesn't have this problem (if it's a core thing)?
>
> /Anders
>
> On Wed, Apr 6, 2011 at 19:45, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> the sources get attached to the reactor twice
>>
>> - Stephen
>>
>> ---
>> Sent from my Android phone, so random spelling mistakes, random nonsense
>> words and other nonsense are a direct result of using swype to type on the
>> screen
>> On 6 Apr 2011 15:45, "Novak Dalibor" <da...@gmail.com> wrote:
>> > Hi Stephen,
>> >
>> > I see that implies that install step doesn't need to be called explicitly
>> > and this will solve my problem. Hooray!! Thanks, I missed that "detail".
>> >
>> > It is still strange how deploy plugin tries to upload sources twice in
>> > scenario where install phase is requested. Should this be accepted as
>> > normal?
>> >
>> > Thanks again and regards,
>> > Dalibor
>> >
>> > On Wed, Apr 6, 2011 at 2:58 PM, Stephen Connolly <
>> > stephen.alan.connolly@gmail.com> wrote:
>> >
>> >> mvn clean install deploy
>> >>
>> >> means the following
>> >>
>> >> Mr Maven,
>> >> please look up the clean phase in the standard lifecycles and
>> >> execute all phases in the lifecycle it belongs to up to and including
>> >> the clean phase
>> >> then
>> >> please look up the install phase in the standard lifecycles and
>> >> execute all phases in the lifecycle it belongs to up to and including
>> >> the install phase
>> >> finally
>> >> please look up the deploy phase in the standard lifecycles and
>> >> execute all phases in the lifecycle it belongs to up to and including
>> >> the deploy phase
>> >>
>> >> you will notice that install and deploy are in the same lifecycle with
>> >> deploy being just after install
>> >>
>> >> On 6 April 2011 14:33, Novak Dalibor <da...@gmail.com> wrote:
>> >> > Hello,
>> >> >
>> >> > I am experiencing a problem since I have my project configured to use
>> >> > maven-source-plugin. When I try to execute a "mvn clean install
>> deploy"
>> >> > command the deploy plugin tries to uploadsources jar to repository
>> twice.
>> >> > Since this is a nexus release repository it doesn't allow redeployment
>> >> and I
>> >> > get an HTTP 400 error. (see logs below)
>> >> >
>> >> > However when I run "mvn clean deploy" (without install) all works fine
>> >> and
>> >> > sources jar is uploaded only once. Does anyone have any hints why I am
>> >> > experiencing this behaviour?
>> >> >
>> >> > I am running maven 2.2.1.
>> >> >
>> >> > Thanks,
>> >> > Dalibor
>> >> >
>> >> >
>> >> >
>> >> > [INFO] [deploy:deploy {execution: default-deploy}]
>> >> > Uploading:
>> >> >
>> >>
>>
>> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1.jar
>> >> > 51K uploaded (project-common-0.1.1.jar)
>> >> > [INFO] Retrieving previous metadata from mycompany-thirdparty
>> >> > [INFO] Uploading repository metadata for: 'artifact
>> >> > com.mycompany.project:project-common'
>> >> > [INFO] Uploading project information for project-common 0.1.1
>> >> > Uploading:
>> >> >
>> >>
>>
>> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> >> > 39K uploaded (project-common-0.1.1-sources.jar)
>> >> > Uploading:
>> >> >
>> >>
>>
>> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> >> > [INFO]
>> >> >
>> ------------------------------------------------------------------------
>> >> > [ERROR] BUILD ERROR
>> >> > [INFO]
>> >> >
>> ------------------------------------------------------------------------
>> >> > [INFO] Error deploying artifact: Failed to transfer file:
>> >> >
>> >>
>>
>> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> >> .
>> >> > Return code is: 400
>> >> >
>> >> > [INFO]
>> >> >
>> ------------------------------------------------------------------------
>> >> > [INFO] For more information, run Maven with the -e switch
>> >> >
>> >>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Sources jar uploaded twice

Posted by Anders Hammar <an...@hammar.net>.
Hmm, wouldn't this be a bug then in either maven core or the sources plugin?
I'm quite sure executing "mvn install deploy" would work for a multi-module
build without sources attached. The main artifact wouldn't be uploaded
twice. (Haven't verified though.)

Possibly Maven 3.0.x doesn't have this problem (if it's a core thing)?

/Anders

On Wed, Apr 6, 2011 at 19:45, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> the sources get attached to the reactor twice
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 6 Apr 2011 15:45, "Novak Dalibor" <da...@gmail.com> wrote:
> > Hi Stephen,
> >
> > I see that implies that install step doesn't need to be called explicitly
> > and this will solve my problem. Hooray!! Thanks, I missed that "detail".
> >
> > It is still strange how deploy plugin tries to upload sources twice in
> > scenario where install phase is requested. Should this be accepted as
> > normal?
> >
> > Thanks again and regards,
> > Dalibor
> >
> > On Wed, Apr 6, 2011 at 2:58 PM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> >> mvn clean install deploy
> >>
> >> means the following
> >>
> >> Mr Maven,
> >> please look up the clean phase in the standard lifecycles and
> >> execute all phases in the lifecycle it belongs to up to and including
> >> the clean phase
> >> then
> >> please look up the install phase in the standard lifecycles and
> >> execute all phases in the lifecycle it belongs to up to and including
> >> the install phase
> >> finally
> >> please look up the deploy phase in the standard lifecycles and
> >> execute all phases in the lifecycle it belongs to up to and including
> >> the deploy phase
> >>
> >> you will notice that install and deploy are in the same lifecycle with
> >> deploy being just after install
> >>
> >> On 6 April 2011 14:33, Novak Dalibor <da...@gmail.com> wrote:
> >> > Hello,
> >> >
> >> > I am experiencing a problem since I have my project configured to use
> >> > maven-source-plugin. When I try to execute a "mvn clean install
> deploy"
> >> > command the deploy plugin tries to uploadsources jar to repository
> twice.
> >> > Since this is a nexus release repository it doesn't allow redeployment
> >> and I
> >> > get an HTTP 400 error. (see logs below)
> >> >
> >> > However when I run "mvn clean deploy" (without install) all works fine
> >> and
> >> > sources jar is uploaded only once. Does anyone have any hints why I am
> >> > experiencing this behaviour?
> >> >
> >> > I am running maven 2.2.1.
> >> >
> >> > Thanks,
> >> > Dalibor
> >> >
> >> >
> >> >
> >> > [INFO] [deploy:deploy {execution: default-deploy}]
> >> > Uploading:
> >> >
> >>
>
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1.jar
> >> > 51K uploaded (project-common-0.1.1.jar)
> >> > [INFO] Retrieving previous metadata from mycompany-thirdparty
> >> > [INFO] Uploading repository metadata for: 'artifact
> >> > com.mycompany.project:project-common'
> >> > [INFO] Uploading project information for project-common 0.1.1
> >> > Uploading:
> >> >
> >>
>
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
> >> > 39K uploaded (project-common-0.1.1-sources.jar)
> >> > Uploading:
> >> >
> >>
>
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
> >> > [INFO]
> >> >
> ------------------------------------------------------------------------
> >> > [ERROR] BUILD ERROR
> >> > [INFO]
> >> >
> ------------------------------------------------------------------------
> >> > [INFO] Error deploying artifact: Failed to transfer file:
> >> >
> >>
>
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
> >> .
> >> > Return code is: 400
> >> >
> >> > [INFO]
> >> >
> ------------------------------------------------------------------------
> >> > [INFO] For more information, run Maven with the -e switch
> >> >
> >>
>

Re: Sources jar uploaded twice

Posted by Stephen Connolly <st...@gmail.com>.
the sources get attached to the reactor twice

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 6 Apr 2011 15:45, "Novak Dalibor" <da...@gmail.com> wrote:
> Hi Stephen,
>
> I see that implies that install step doesn't need to be called explicitly
> and this will solve my problem. Hooray!! Thanks, I missed that "detail".
>
> It is still strange how deploy plugin tries to upload sources twice in
> scenario where install phase is requested. Should this be accepted as
> normal?
>
> Thanks again and regards,
> Dalibor
>
> On Wed, Apr 6, 2011 at 2:58 PM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> mvn clean install deploy
>>
>> means the following
>>
>> Mr Maven,
>> please look up the clean phase in the standard lifecycles and
>> execute all phases in the lifecycle it belongs to up to and including
>> the clean phase
>> then
>> please look up the install phase in the standard lifecycles and
>> execute all phases in the lifecycle it belongs to up to and including
>> the install phase
>> finally
>> please look up the deploy phase in the standard lifecycles and
>> execute all phases in the lifecycle it belongs to up to and including
>> the deploy phase
>>
>> you will notice that install and deploy are in the same lifecycle with
>> deploy being just after install
>>
>> On 6 April 2011 14:33, Novak Dalibor <da...@gmail.com> wrote:
>> > Hello,
>> >
>> > I am experiencing a problem since I have my project configured to use
>> > maven-source-plugin. When I try to execute a "mvn clean install deploy"
>> > command the deploy plugin tries to uploadsources jar to repository
twice.
>> > Since this is a nexus release repository it doesn't allow redeployment
>> and I
>> > get an HTTP 400 error. (see logs below)
>> >
>> > However when I run "mvn clean deploy" (without install) all works fine
>> and
>> > sources jar is uploaded only once. Does anyone have any hints why I am
>> > experiencing this behaviour?
>> >
>> > I am running maven 2.2.1.
>> >
>> > Thanks,
>> > Dalibor
>> >
>> >
>> >
>> > [INFO] [deploy:deploy {execution: default-deploy}]
>> > Uploading:
>> >
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1.jar
>> > 51K uploaded (project-common-0.1.1.jar)
>> > [INFO] Retrieving previous metadata from mycompany-thirdparty
>> > [INFO] Uploading repository metadata for: 'artifact
>> > com.mycompany.project:project-common'
>> > [INFO] Uploading project information for project-common 0.1.1
>> > Uploading:
>> >
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> > 39K uploaded (project-common-0.1.1-sources.jar)
>> > Uploading:
>> >
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> > [INFO]
>> >
------------------------------------------------------------------------
>> > [ERROR] BUILD ERROR
>> > [INFO]
>> >
------------------------------------------------------------------------
>> > [INFO] Error deploying artifact: Failed to transfer file:
>> >
>>
http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
>> .
>> > Return code is: 400
>> >
>> > [INFO]
>> >
------------------------------------------------------------------------
>> > [INFO] For more information, run Maven with the -e switch
>> >
>>

Re: Sources jar uploaded twice

Posted by Stephen Connolly <st...@gmail.com>.
mvn clean install deploy

means the following

Mr Maven,
    please look up the clean phase in the standard lifecycles and
execute all phases in the lifecycle it belongs to up to and including
the clean phase
then
    please look up the install phase in the standard lifecycles and
execute all phases in the lifecycle it belongs to up to and including
the install phase
finally
    please look up the deploy phase in the standard lifecycles and
execute all phases in the lifecycle it belongs to up to and including
the deploy phase

you will notice that install and deploy are in the same lifecycle with
deploy being just after install

On 6 April 2011 14:33, Novak Dalibor <da...@gmail.com> wrote:
> Hello,
>
> I am experiencing a problem since I have my project configured to use
> maven-source-plugin. When I try to execute a "mvn clean install deploy"
> command the deploy plugin tries to uploadsources jar to repository twice.
> Since this is a nexus release repository it doesn't allow redeployment and I
> get an HTTP 400 error.  (see logs below)
>
> However when I run "mvn clean deploy" (without install) all works fine and
> sources jar is uploaded only once. Does anyone have any hints why I am
> experiencing this behaviour?
>
> I am running maven 2.2.1.
>
> Thanks,
> Dalibor
>
>
>
> [INFO] [deploy:deploy {execution: default-deploy}]
> Uploading:
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1.jar
> 51K uploaded  (project-common-0.1.1.jar)
> [INFO] Retrieving previous metadata from mycompany-thirdparty
> [INFO] Uploading repository metadata for: 'artifact
> com.mycompany.project:project-common'
> [INFO] Uploading project information for project-common 0.1.1
> Uploading:
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
> 39K uploaded  (project-common-0.1.1-sources.jar)
> Uploading:
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error deploying artifact: Failed to transfer file:
> http://repository/content/repositories/thirdparty/com/mycompany/project/project-common/0.1.1/project-common-0.1.1-sources.jar.
> Return code is: 400
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Sources jar uploaded twice

Posted by Manuel Doninger <ma...@doninger.net>.
install and deploy are redundant. If you look at the Maven lifecycle
(http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html),
then all targets before the one you selected will be executed.
So a deploy calls also call install before. If you choose deploy, then
you don't need to execute install separately before.

Manuel

On Wed, Apr 6, 2011 at 15:33, Novak Dalibor <da...@gmail.com> wrote:
> a "mvn clean install deploy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org