You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jane Young <Ja...@Sun.COM> on 2009/05/20 11:19:16 UTC

maven deploy question

Hi Maven gurus,

Looks like "mvn deploy" is  deploying artifact from the target directory 
to remote maven repo.  Is it possible to configure "mvn deploy" to 
deploy artifact from the local maven repo.  Also, is it possible to skip 
all the lifecyle phases before deploy (validate, compile, test, package, 
integration-test, verify and install) and just deploy from local maven 
repo to remote maven repo?

Thanks,
Jane


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


Re: maven antrun plugin issue with sending emails

Posted by Wayne Fay <wa...@gmail.com>.
> If I run the ant script directly ie "ant send-email-notification" it works
> fine. I have the mail and activation jars in the ANT_HOME/lib directory.

Maven does not use the Ant installed in ANT_HOME. Instead, it
downloads its own copy of the Ant jars into the local repo cache under
~/.m2 and uses them. So it doesn't really matter what you've done to
ANT_HOME. Instead, you'll need to specify the proper <dependencies>
inside the <plugin> node for the maven-antrun-plugin.

Refer to the documentation for more help:
http://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html

Wayne

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


maven antrun plugin issue with sending emails

Posted by Matt Milliss <ma...@gmail.com>.
I'm having problems getting the ant mail task working when running from 
the antrun plugin, the pom and ant build files I use to highlight this 
issue are below

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.mail.test</groupId>
    <artifactId>mail-test</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>mail-test</name>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>Test for email sending</id>
                        <phase>compile</phase>
                        <configuration>
                            <tasks>
                                <ant antfile="${basedir}/build.xml" 
inheritRefs="true">
                          <target name="send-email-notification"/>
                </ant>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>



<?xml version="1.0"?>
<project name="mail-test">
        <target name="send-email-notification">
        <mail mailhost="my.mail.host.com" mailport="465" ssl="false" 
subject="testing 1 2 3">
            <from address="me@mine.com" />
            <to address="me@mine.com" />
            <message>This is a test email</message>
        </mail>
    </target>
</project>   



When I run
mvn compile
the following error occurs and no email is sent.

[INFO] Scanning for projects...
[INFO] 
------------------------------------------------------------------------
[INFO] Building mail-test
[INFO]    task-segment: [compile]
[INFO] 
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
/home/development/Desktop/src/main/resources
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [antrun:run {execution: Test for email sending}]
[INFO] Executing tasks

send-email-notification:
     [mail] Failed to initialise MIME mail: 
org.apache.tools.ant.taskdefs.email.MimeMailer
[INFO] Executed tasks
[INFO] 
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri May 22 08:44:45 EST 2009
[INFO] Final Memory: 8M/108M
[INFO] 
------------------------------------------------------------------------

If I run the ant script directly ie "ant send-email-notification" it 
works fine. I have the mail and activation jars in the ANT_HOME/lib 
directory.

My environement is:
mvn -v
Apache Maven 2.1.0 (r755702; 2009-03-19 06:10:27+1100)
Java version: 1.6.0_06
Java home: /usr/java/jdk1.6.0_06/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.26.8-57.fc8" arch: "i386" Family: "unix"

ant -v
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: /usr/java/jdk1.6.0_06/jre
Detected OS: Linux
parsing buildfile /home/development/Desktop/build.xml with URI = 
file:/home/development/Desktop/build.xml
Project base dir set to: /home/development/Desktop

BUILD SUCCESSFUL
Total time: 0 seconds

Any help would be greatly appreciated.

Cheers
Matt Milliss


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


Re: maven deploy question

Posted by Jane Young <Ja...@Sun.COM>.
Thanks, Stephen. 
This may work for us.


Stephen Connolly wrote:
> sorry that should be
>
> mvn deploy -DaltDeploymentRepository=stage::default::http://stage.repo.url/
> <http://stage.repo.url/>
>
> mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:merge-maven-repos \
>      -Dwagon.source=http://stage.repo.url \
>      -Dwagon.target=http://deploy.repo.url \
>      -Djava.io.tmpdir=target
>
>
>
> 2009/5/20 Stephen Connolly <st...@gmail.com>
>
>   
>> mvn deploy -DaltDeploymentRepository=http://stage.repo.url/
>>
>> mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:merge-maven-repos \
>>      -Dwagon.source=http://stage.repo.url \
>>
>>      -Dwagon.target=http://deploy.repo.url \
>>      -Djava.io.tmpdir=target
>>
>>
>>
>> 2009/5/20 Stephen Connolly <st...@gmail.com>
>>
>> You need to stage the deploy, i.e. deploy to an intermediate repository and
>>     
>>> then move them from there.
>>>
>>> I know that the pro version of Nexus has support built in for this, but
>>> given that we have not purchased it I cannot attest to it's workability.
>>>
>>> Alternatively there is a stage mojo on one of the plugins (might be
>>> wagon-maven-plugin) to help copying a staged repository to the final
>>> repository
>>>
>>> -Stephen
>>>
>>>
>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>
>>>       
>>>> Hi,
>>>>
>>>> Thanks for responding.
>>>> In  our project, we first do "mvn install" to produce the artifact and
>>>> then run QA tests to make sure the artifacts are good before deploying to
>>>> the remote maven repository.  When executing "mvn deploy", it will go
>>>> through preceding lifecycle phases (compile, package, test, install) before
>>>> getting to deploy.   We want to make sure the same artifacts that was tested
>>>> in the local maven repository is getting published to the remote repository.
>>>>  But since deploy is executing compile, package and install again, it may
>>>> possibly end up with different artifacts then the ones that was tested.  Is
>>>> there a workaround to this?  Is it possible to skip the preceding lifecycle
>>>> phases when executing "mvn deploy".  There are hundreds of artifacts in the
>>>> project so deploying individual files with deploy:deploy-file will not work
>>>> for us.
>>>> Any suggestions?
>>>>
>>>> Thanks,
>>>> Jane
>>>>
>>>>
>>>>
>>>> Baptiste MATHUS wrote:
>>>>
>>>>         
>>>>> Well, I'm finally not sure I understand what you want to do.
>>>>> Did you look at the provided link?
>>>>>
>>>>> Some goals (bound to the standard lifecycle that you should be aware of:
>>>>>
>>>>> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics
>>>>> )
>>>>> * "package" will create the "packaged" version inside target directory
>>>>> (though this directory is customizable, but let's say you use the
>>>>> default
>>>>> values)
>>>>> * "install" will do all that package does + install the packaged
>>>>> artifact
>>>>> inside your local repository
>>>>> * "deploy" will do all that install does + deploy the artifact into your
>>>>> maven repository
>>>>>
>>>>> Deploy:deploy-file works at the file level. It takes many arguments, and
>>>>> you
>>>>> can use it to deploy any artifact in any repository, any
>>>>> groupId/artifactId/version.
>>>>>
>>>>> Really, I think this is what you need. If not, please rephrase your need
>>>>> more thoroughly.
>>>>>
>>>>> Cheers.
>>>>>
>>>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>>> Thanks for the link.
>>>>>> I do not want to deploy individual artifacts.  I want to deploy
>>>>>> artifacts
>>>>>> from a project.   Is it possible to do this with deploy:deploy-file?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Baptiste MATHUS wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Hi,
>>>>>>>
>>>>>>> See
>>>>>>>
>>>>>>> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
>>>>>>> Also note that modern MRM have a page that features this exact upload.
>>>>>>>
>>>>>>> Cheers.
>>>>>>>
>>>>>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> Hi Maven gurus,
>>>>>>>>
>>>>>>>> Looks like "mvn deploy" is  deploying artifact from the target
>>>>>>>> directory
>>>>>>>> to
>>>>>>>> remote maven repo.  Is it possible to configure "mvn deploy" to
>>>>>>>> deploy
>>>>>>>> artifact from the local maven repo.  Also, is it possible to skip all
>>>>>>>> the
>>>>>>>> lifecyle phases before deploy (validate, compile, test, package,
>>>>>>>> integration-test, verify and install) and just deploy from local
>>>>>>>> maven
>>>>>>>> repo
>>>>>>>> to remote maven repo?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Jane
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>             
>>>>>
>>>>>
>>>>>           
>>>>         
>
>   


Re: maven deploy question

Posted by Stephen Connolly <st...@gmail.com>.
sorry that should be

mvn deploy -DaltDeploymentRepository=stage::default::http://stage.repo.url/
<http://stage.repo.url/>

mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:merge-maven-repos \
     -Dwagon.source=http://stage.repo.url \
     -Dwagon.target=http://deploy.repo.url \
     -Djava.io.tmpdir=target



2009/5/20 Stephen Connolly <st...@gmail.com>

> mvn deploy -DaltDeploymentRepository=http://stage.repo.url/
>
> mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:merge-maven-repos \
>      -Dwagon.source=http://stage.repo.url \
>
>      -Dwagon.target=http://deploy.repo.url \
>      -Djava.io.tmpdir=target
>
>
>
> 2009/5/20 Stephen Connolly <st...@gmail.com>
>
> You need to stage the deploy, i.e. deploy to an intermediate repository and
>> then move them from there.
>>
>> I know that the pro version of Nexus has support built in for this, but
>> given that we have not purchased it I cannot attest to it's workability.
>>
>> Alternatively there is a stage mojo on one of the plugins (might be
>> wagon-maven-plugin) to help copying a staged repository to the final
>> repository
>>
>> -Stephen
>>
>>
>> 2009/5/20 Jane Young <Ja...@sun.com>
>>
>>> Hi,
>>>
>>> Thanks for responding.
>>> In  our project, we first do "mvn install" to produce the artifact and
>>> then run QA tests to make sure the artifacts are good before deploying to
>>> the remote maven repository.  When executing "mvn deploy", it will go
>>> through preceding lifecycle phases (compile, package, test, install) before
>>> getting to deploy.   We want to make sure the same artifacts that was tested
>>> in the local maven repository is getting published to the remote repository.
>>>  But since deploy is executing compile, package and install again, it may
>>> possibly end up with different artifacts then the ones that was tested.  Is
>>> there a workaround to this?  Is it possible to skip the preceding lifecycle
>>> phases when executing "mvn deploy".  There are hundreds of artifacts in the
>>> project so deploying individual files with deploy:deploy-file will not work
>>> for us.
>>> Any suggestions?
>>>
>>> Thanks,
>>> Jane
>>>
>>>
>>>
>>> Baptiste MATHUS wrote:
>>>
>>>> Well, I'm finally not sure I understand what you want to do.
>>>> Did you look at the provided link?
>>>>
>>>> Some goals (bound to the standard lifecycle that you should be aware of:
>>>>
>>>> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics
>>>> )
>>>> * "package" will create the "packaged" version inside target directory
>>>> (though this directory is customizable, but let's say you use the
>>>> default
>>>> values)
>>>> * "install" will do all that package does + install the packaged
>>>> artifact
>>>> inside your local repository
>>>> * "deploy" will do all that install does + deploy the artifact into your
>>>> maven repository
>>>>
>>>> Deploy:deploy-file works at the file level. It takes many arguments, and
>>>> you
>>>> can use it to deploy any artifact in any repository, any
>>>> groupId/artifactId/version.
>>>>
>>>> Really, I think this is what you need. If not, please rephrase your need
>>>> more thoroughly.
>>>>
>>>> Cheers.
>>>>
>>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>>
>>>>
>>>>
>>>>> Thanks for the link.
>>>>> I do not want to deploy individual artifacts.  I want to deploy
>>>>> artifacts
>>>>> from a project.   Is it possible to do this with deploy:deploy-file?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Baptiste MATHUS wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> See
>>>>>>
>>>>>> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
>>>>>> Also note that modern MRM have a page that features this exact upload.
>>>>>>
>>>>>> Cheers.
>>>>>>
>>>>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi Maven gurus,
>>>>>>>
>>>>>>> Looks like "mvn deploy" is  deploying artifact from the target
>>>>>>> directory
>>>>>>> to
>>>>>>> remote maven repo.  Is it possible to configure "mvn deploy" to
>>>>>>> deploy
>>>>>>> artifact from the local maven repo.  Also, is it possible to skip all
>>>>>>> the
>>>>>>> lifecyle phases before deploy (validate, compile, test, package,
>>>>>>> integration-test, verify and install) and just deploy from local
>>>>>>> maven
>>>>>>> repo
>>>>>>> to remote maven repo?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Jane
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>

Re: maven deploy question

Posted by Stephen Connolly <st...@gmail.com>.
mvn deploy -DaltDeploymentRepository=http://stage.repo.url/

mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:merge-maven-repos \
     -Dwagon.source=http://stage.repo.url \
     -Dwagon.target=http://deploy.repo.url \
     -Djava.io.tmpdir=target



2009/5/20 Stephen Connolly <st...@gmail.com>

> You need to stage the deploy, i.e. deploy to an intermediate repository and
> then move them from there.
>
> I know that the pro version of Nexus has support built in for this, but
> given that we have not purchased it I cannot attest to it's workability.
>
> Alternatively there is a stage mojo on one of the plugins (might be
> wagon-maven-plugin) to help copying a staged repository to the final
> repository
>
> -Stephen
>
>
> 2009/5/20 Jane Young <Ja...@sun.com>
>
>> Hi,
>>
>> Thanks for responding.
>> In  our project, we first do "mvn install" to produce the artifact and
>> then run QA tests to make sure the artifacts are good before deploying to
>> the remote maven repository.  When executing "mvn deploy", it will go
>> through preceding lifecycle phases (compile, package, test, install) before
>> getting to deploy.   We want to make sure the same artifacts that was tested
>> in the local maven repository is getting published to the remote repository.
>>  But since deploy is executing compile, package and install again, it may
>> possibly end up with different artifacts then the ones that was tested.  Is
>> there a workaround to this?  Is it possible to skip the preceding lifecycle
>> phases when executing "mvn deploy".  There are hundreds of artifacts in the
>> project so deploying individual files with deploy:deploy-file will not work
>> for us.
>> Any suggestions?
>>
>> Thanks,
>> Jane
>>
>>
>>
>> Baptiste MATHUS wrote:
>>
>>> Well, I'm finally not sure I understand what you want to do.
>>> Did you look at the provided link?
>>>
>>> Some goals (bound to the standard lifecycle that you should be aware of:
>>>
>>> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics
>>> )
>>> * "package" will create the "packaged" version inside target directory
>>> (though this directory is customizable, but let's say you use the default
>>> values)
>>> * "install" will do all that package does + install the packaged artifact
>>> inside your local repository
>>> * "deploy" will do all that install does + deploy the artifact into your
>>> maven repository
>>>
>>> Deploy:deploy-file works at the file level. It takes many arguments, and
>>> you
>>> can use it to deploy any artifact in any repository, any
>>> groupId/artifactId/version.
>>>
>>> Really, I think this is what you need. If not, please rephrase your need
>>> more thoroughly.
>>>
>>> Cheers.
>>>
>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>
>>>
>>>
>>>> Thanks for the link.
>>>> I do not want to deploy individual artifacts.  I want to deploy
>>>> artifacts
>>>> from a project.   Is it possible to do this with deploy:deploy-file?
>>>>
>>>>
>>>>
>>>>
>>>> Baptiste MATHUS wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> See
>>>>>
>>>>> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
>>>>> Also note that modern MRM have a page that features this exact upload.
>>>>>
>>>>> Cheers.
>>>>>
>>>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi Maven gurus,
>>>>>>
>>>>>> Looks like "mvn deploy" is  deploying artifact from the target
>>>>>> directory
>>>>>> to
>>>>>> remote maven repo.  Is it possible to configure "mvn deploy" to deploy
>>>>>> artifact from the local maven repo.  Also, is it possible to skip all
>>>>>> the
>>>>>> lifecyle phases before deploy (validate, compile, test, package,
>>>>>> integration-test, verify and install) and just deploy from local maven
>>>>>> repo
>>>>>> to remote maven repo?
>>>>>>
>>>>>> Thanks,
>>>>>> Jane
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>

Re: maven deploy question

Posted by Stephen Connolly <st...@gmail.com>.
You need to stage the deploy, i.e. deploy to an intermediate repository and
then move them from there.

I know that the pro version of Nexus has support built in for this, but
given that we have not purchased it I cannot attest to it's workability.

Alternatively there is a stage mojo on one of the plugins (might be
wagon-maven-plugin) to help copying a staged repository to the final
repository

-Stephen

2009/5/20 Jane Young <Ja...@sun.com>

> Hi,
>
> Thanks for responding.
> In  our project, we first do "mvn install" to produce the artifact and then
> run QA tests to make sure the artifacts are good before deploying to the
> remote maven repository.  When executing "mvn deploy", it will go through
> preceding lifecycle phases (compile, package, test, install) before getting
> to deploy.   We want to make sure the same artifacts that was tested in the
> local maven repository is getting published to the remote repository.  But
> since deploy is executing compile, package and install again, it may
> possibly end up with different artifacts then the ones that was tested.  Is
> there a workaround to this?  Is it possible to skip the preceding lifecycle
> phases when executing "mvn deploy".  There are hundreds of artifacts in the
> project so deploying individual files with deploy:deploy-file will not work
> for us.
> Any suggestions?
>
> Thanks,
> Jane
>
>
>
> Baptiste MATHUS wrote:
>
>> Well, I'm finally not sure I understand what you want to do.
>> Did you look at the provided link?
>>
>> Some goals (bound to the standard lifecycle that you should be aware of:
>>
>> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics
>> )
>> * "package" will create the "packaged" version inside target directory
>> (though this directory is customizable, but let's say you use the default
>> values)
>> * "install" will do all that package does + install the packaged artifact
>> inside your local repository
>> * "deploy" will do all that install does + deploy the artifact into your
>> maven repository
>>
>> Deploy:deploy-file works at the file level. It takes many arguments, and
>> you
>> can use it to deploy any artifact in any repository, any
>> groupId/artifactId/version.
>>
>> Really, I think this is what you need. If not, please rephrase your need
>> more thoroughly.
>>
>> Cheers.
>>
>> 2009/5/20 Jane Young <Ja...@sun.com>
>>
>>
>>
>>> Thanks for the link.
>>> I do not want to deploy individual artifacts.  I want to deploy artifacts
>>> from a project.   Is it possible to do this with deploy:deploy-file?
>>>
>>>
>>>
>>>
>>> Baptiste MATHUS wrote:
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> See
>>>>
>>>> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
>>>> Also note that modern MRM have a page that features this exact upload.
>>>>
>>>> Cheers.
>>>>
>>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hi Maven gurus,
>>>>>
>>>>> Looks like "mvn deploy" is  deploying artifact from the target
>>>>> directory
>>>>> to
>>>>> remote maven repo.  Is it possible to configure "mvn deploy" to deploy
>>>>> artifact from the local maven repo.  Also, is it possible to skip all
>>>>> the
>>>>> lifecyle phases before deploy (validate, compile, test, package,
>>>>> integration-test, verify and install) and just deploy from local maven
>>>>> repo
>>>>> to remote maven repo?
>>>>>
>>>>> Thanks,
>>>>> Jane
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>
>

Re: maven deploy question

Posted by Jane Young <Ja...@Sun.COM>.
Hi,

Thanks for responding.
In  our project, we first do "mvn install" to produce the artifact and 
then run QA tests to make sure the artifacts are good before deploying 
to the remote maven repository.  When executing "mvn deploy", it will go 
through preceding lifecycle phases (compile, package, test, install) 
before getting to deploy.   We want to make sure the same artifacts that 
was tested in the local maven repository is getting published to the 
remote repository.  But since deploy is executing compile, package and 
install again, it may possibly end up with different artifacts then the 
ones that was tested.  Is there a workaround to this?  Is it possible to 
skip the preceding lifecycle phases when executing "mvn deploy".  There 
are hundreds of artifacts in the project so deploying individual files 
with deploy:deploy-file will not work for us. 

Any suggestions?

Thanks,
Jane


Baptiste MATHUS wrote:
> Well, I'm finally not sure I understand what you want to do.
> Did you look at the provided link?
>
> Some goals (bound to the standard lifecycle that you should be aware of:
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics
> )
> * "package" will create the "packaged" version inside target directory
> (though this directory is customizable, but let's say you use the default
> values)
> * "install" will do all that package does + install the packaged artifact
> inside your local repository
> * "deploy" will do all that install does + deploy the artifact into your
> maven repository
>
> Deploy:deploy-file works at the file level. It takes many arguments, and you
> can use it to deploy any artifact in any repository, any
> groupId/artifactId/version.
>
> Really, I think this is what you need. If not, please rephrase your need
> more thoroughly.
>
> Cheers.
>
> 2009/5/20 Jane Young <Ja...@sun.com>
>
>   
>> Thanks for the link.
>> I do not want to deploy individual artifacts.  I want to deploy artifacts
>> from a project.   Is it possible to do this with deploy:deploy-file?
>>
>>
>>
>>
>> Baptiste MATHUS wrote:
>>
>>     
>>> Hi,
>>>
>>> See
>>> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
>>> Also note that modern MRM have a page that features this exact upload.
>>>
>>> Cheers.
>>>
>>> 2009/5/20 Jane Young <Ja...@sun.com>
>>>
>>>
>>>
>>>       
>>>> Hi Maven gurus,
>>>>
>>>> Looks like "mvn deploy" is  deploying artifact from the target directory
>>>> to
>>>> remote maven repo.  Is it possible to configure "mvn deploy" to deploy
>>>> artifact from the local maven repo.  Also, is it possible to skip all the
>>>> lifecyle phases before deploy (validate, compile, test, package,
>>>> integration-test, verify and install) and just deploy from local maven
>>>> repo
>>>> to remote maven repo?
>>>>
>>>> Thanks,
>>>> Jane
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>
>>>
>>>       
>>     
>
>
>   


Re: maven deploy question

Posted by Baptiste MATHUS <ml...@batmat.net>.
Well, I'm finally not sure I understand what you want to do.
Did you look at the provided link?

Some goals (bound to the standard lifecycle that you should be aware of:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Build_Lifecycle_Basics
)
* "package" will create the "packaged" version inside target directory
(though this directory is customizable, but let's say you use the default
values)
* "install" will do all that package does + install the packaged artifact
inside your local repository
* "deploy" will do all that install does + deploy the artifact into your
maven repository

Deploy:deploy-file works at the file level. It takes many arguments, and you
can use it to deploy any artifact in any repository, any
groupId/artifactId/version.

Really, I think this is what you need. If not, please rephrase your need
more thoroughly.

Cheers.

2009/5/20 Jane Young <Ja...@sun.com>

> Thanks for the link.
> I do not want to deploy individual artifacts.  I want to deploy artifacts
> from a project.   Is it possible to do this with deploy:deploy-file?
>
>
>
>
> Baptiste MATHUS wrote:
>
>> Hi,
>>
>> See
>> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
>> Also note that modern MRM have a page that features this exact upload.
>>
>> Cheers.
>>
>> 2009/5/20 Jane Young <Ja...@sun.com>
>>
>>
>>
>>> Hi Maven gurus,
>>>
>>> Looks like "mvn deploy" is  deploying artifact from the target directory
>>> to
>>> remote maven repo.  Is it possible to configure "mvn deploy" to deploy
>>> artifact from the local maven repo.  Also, is it possible to skip all the
>>> lifecyle phases before deploy (validate, compile, test, package,
>>> integration-test, verify and install) and just deploy from local maven
>>> repo
>>> to remote maven repo?
>>>
>>> Thanks,
>>> Jane
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Re: maven deploy question

Posted by Jane Young <Ja...@Sun.COM>.
Thanks for the link.
I do not want to deploy individual artifacts.  I want to deploy 
artifacts from a project.   Is it possible to do this with 
deploy:deploy-file?



Baptiste MATHUS wrote:
> Hi,
>
> See
> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
> Also note that modern MRM have a page that features this exact upload.
>
> Cheers.
>
> 2009/5/20 Jane Young <Ja...@sun.com>
>
>   
>> Hi Maven gurus,
>>
>> Looks like "mvn deploy" is  deploying artifact from the target directory to
>> remote maven repo.  Is it possible to configure "mvn deploy" to deploy
>> artifact from the local maven repo.  Also, is it possible to skip all the
>> lifecyle phases before deploy (validate, compile, test, package,
>> integration-test, verify and install) and just deploy from local maven repo
>> to remote maven repo?
>>
>> Thanks,
>> Jane
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
>   


Re: maven deploy question

Posted by Baptiste MATHUS <ml...@batmat.net>.
Hi,

See
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
Also note that modern MRM have a page that features this exact upload.

Cheers.

2009/5/20 Jane Young <Ja...@sun.com>

> Hi Maven gurus,
>
> Looks like "mvn deploy" is  deploying artifact from the target directory to
> remote maven repo.  Is it possible to configure "mvn deploy" to deploy
> artifact from the local maven repo.  Also, is it possible to skip all the
> lifecyle phases before deploy (validate, compile, test, package,
> integration-test, verify and install) and just deploy from local maven repo
> to remote maven repo?
>
> Thanks,
> Jane
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !