In a project that uses MAVEN, it is sometimes necessary to make a local project into a jar package and upload it to the Mevan repository.
The operation is as follows:
1. Configure the user name and password for the settings file in Maven as follows:
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
2. Configure the uploaded Maven repository path in the Pom file in the project that needs to be hit as a jar:
<distributionManagement>
<repository>
<id>releases</id>
<name>deploy server</name>
<url>http://192.168.1.1:9000/nexus/content/repositories/thirdparty/</url>
</repository>
</distributionManagement>
3. Set in the run configuration in eclipse, such as:
4. Click to run
prompt, if an error occurs that is unauthorized, it indicates that the user information in the settings configuration error
Use Eclipse to upload a local project into a jar package to the MAVEN repository