Use the MAVEN command in a DOS window to package, deploy

Source: Internet
Author: User

1, cmd--"c:\users\administrator-->mvn-version first see if MAVEN installation is successful, environment variables are configured correctly

2. CD to the path of the item to be packaged: CD D:\xx\work\xxx\hfqnc123\smtkMaven

3. Then, under the project path, you can use the MAVEN command: MVN package,mvn deploy command to package the project, deploy

4. If you want to deploy the project to a remote repository, you need to configure:

<Distributionmanagement>
<Repository>
<Id>releases</Id>
<Name>internal releases</Name>
<Url>http://localhost:8081/nexus/content/repositories/releases</Url>
</Repository>
<Snapshotrepository>
<Id >snapshots </id >
<name >internal snapshots </name >
<url >http://localhost:8081/nexus/content/ Repositories/snapshots </url ;
</ snapshotrepository >
</distributionmanagement ;
The project can then be posted to the remote repository with MVN deploy
<Parent>
<GroupId>com.tykj</GroupId>
<Artifactid>bspparty-parent</Artifactid>
<Version>0.0.2-snapshot</Version>
<!--<relativepath&gt ... /bspparty-parent/pom.xml</relativepath>-->
</parent ;
If the sub-project declares artifactid , that is, the child project is covered in the parent project Pom < Span style= "color: #000080; Font-weight:bold; " >artifactid , typically this artifactid is to be overwritten, if the node in the parent project is not declared in the subproject, that is the node that inherits the parent project,
If the subproject inherits the parent project, you need to define an aggregation in the parent project's POM:
  <modules ; 
<module ;.. /bspparty </module ;
</modules ;
This time, Maven's inheritance and aggregation are all done
     < span>                              
    < span>                               

Use the MAVEN command to package, deploy under a DOS window

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.