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> ... /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