java deploy打包sdk上传
需要注意设置二部分maven中settings.xml 和项目中pom文件。
一、maven中settings.xml文件
<servers> <server> <id>snapshots</id> <username>yanbo.li</username> <password>xxx</password> </server> <server> <id>releases</id> <username>yanbo.li</username> <password>xxx?</password> </server> </servers>
二、配置项目pom文件
// 注意该部分<id>名称要与 settings.xml文件server中<id>相同 <distributionManagement> <repository> <id>releases</id> <name>releases</name> <url>http://nexus.dmall-os.cn:8081/nexus/repository/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>snapshots</name> <url>http://nexus.dmall-os.cn:8081/nexus/repository/snapshots/</url> </snapshotRepository> </distributionManagement>
编译打包插件也是在pom文件中
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.1</version> </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> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.0.1</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构