zoukankan      html  css  js  c++  java
  • 项目打成jar包

    distributionManagement 为发布到本地参考的地址
    repository 设置从本地maven库拉取jar包
    <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      
      <groupId>com.abc.test</groupId>
      <artifactId>aaa-bbb-ccc</artifactId>
      <packaging>jar</packaging>
      <version>0.0.1-SNAPSHOT</version>
      
      <name>fcbox-ad-test</name>
      <url>http://maven.apache.org</url>
      
      <properties>
          <version.dubbo>2.5.3</version.dubbo>
        <version.zookeeper>3.4.8</version.zookeeper>
        <version.zkclient>0.8</version.zkclient>
        <version.spring>4.3.4.RELEASE</version.spring>
        <version.javasist>3.20.0-GA</version.javasist>
        <version.compiler.plugin>2.4</version.compiler.plugin>
        <version.clean.plugin>2.5</version.clean.plugin>
        <version.compiler.plugin>2.4</version.compiler.plugin>
        <version.deploy.plugin>2.7</version.deploy.plugin>
        <version.install.plugin>2.3.1</version.install.plugin>
        <version.jar.plugin>2.4</version.jar.plugin>
        <version.source.plugin>2.2</version.source.plugin>
        <version.resources.plugin>2.6</version.resources.plugin>
      </properties>
    
      <dependencies> 
     
        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>5.1.38</version>
        </dependency>
        
      </dependencies>  
          <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.compiler.plugin}</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                        <optimize>true</optimize>
                        <encoding>utf-8</encoding>
                        <debug>true</debug>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.clean.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.deploy.plugin}</version>
                    <inherited>true</inherited>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.install.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.jar.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.source.plugin}</version>
                    <configuration>
                        <attach>true</attach>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    <distributionManagement>
        <repository>
            <id>internal</id>
            <url>http://xxx.xxx.xxx.com:8098/archiva/repository/internal/</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>Archiva Managed Snapshot Repository</name>
            <url>http://xxx.xxx.xxx.com:8098/archiva/repository/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
      
      <repositories>
        <repository>
            <id>internal</id>
            <name>Archiva Managed Internal Repository</name>
            <url>http://xxx.xxx.xxx.com:8098/archiva/repository/internal/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>snapshots</id>
            <name>Archiva Managed Snapshot Repository</name>
            <url>http://xxx.xxx.xxx.com:8098/archiva/repository/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
      </repositories>
    </project>
  • 相关阅读:
    android 本地字符串存取
    2020-07-17:线上一个服务有4个实例突然变得访问很慢,你会从什么地方入手找原因?
    2020-07-16:如何获得一个链表的倒数第n个元素?
    2020-07-15:死锁与活锁的区别,死锁与饥饿的区别?
    2020-07-14:es用过冷热分离吗?假如现在有些数据热变冷,有些数据冷变热,怎么解决?
    2020-07-28:已知sqrt (2)约等于 1.414,要求不用数学库,求sqrt (2)精确到小数点后 10 位。
    2020-07-29:从 innodb 的索引结构分析,为什么索引的 key 长度不能太长?
    2020-07-27:如何设计一个分布式文件系统,如何设计动态扩容和数据定位?
    2020-07-26:如何用 socket 编程实现 ftp 协议?
    2020-07-25:如何实现一个高效的单向链表逆序输出?
  • 原文地址:https://www.cnblogs.com/testway/p/7050914.html
Copyright © 2011-2022 走看看