1、pom.xml 配置

<plugins>

<!--          Compiler maven 编辑器插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF8</encoding>
                </configuration>
            </plugin>
             <!-- 打包源代码插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
 <!-- 配置管理 -->
    <distributionManagement>
        <snapshotRepository>
            <id>snapshots</id>
            <url>http://12.0.0.1:8081/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>releases</id>
            <url>http://12.0.0.1:8081/nexus/content/repositories/releases</url>
        </repository>

    </distributionManagement>

2、操作

eclipse maven deploy jar包源码发布配置



相关文章:

  • 2021-12-20
  • 2021-05-29
  • 2022-12-23
  • 2021-11-07
  • 2021-09-04
  • 2021-07-06
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-12-29
  • 2021-04-04
  • 2021-09-13
  • 2021-04-09
相关资源
相似解决方案