1.pom new file
< Build > < plugins > < plugin > < the groupId > org.apache.maven.plugins </ the groupId > < the artifactId > Maven-plugin-Source </ the artifactId > < Version > 3.0.1 </ Version > <-! Tie set source plug-in to Maven lifecycle, and implement source of goal-bound after the life cycle -> < Executions > < execution > <-! binding source to the Maven plugin lifecycle -> < Phase >compile</ Phase > <-! Execution goals source plugin is bound in the life cycle -> < Goals > < . Goal > JAR-NO-fork </ . Goal > </ Goals > </ Execution > </ Executions > </ plugin > < plugin > < the groupId > org.apache.maven.plugins </ the groupId > < the artifactId > Maven-Surefire-plugin </ the artifactId > <configuration> <skip>false</skip> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build>
<distributionManagement> <repository> <id>fmsh</id> <name>fmsh_deploy</name> <url>http://192.168.43.91:8081/repository/fmsh-repo/</url> </repository> </distributionManagement>
2.maven configuration file is maven PW account password
<servers> <server> <id>deploy</id> <username>user_name</username> <password>user_pwd</password> </server> </servers>
3. Open a command terminal, enter the directory where the pom file, execute the command mvn deploy