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>
  • 相关阅读:
    centos linux系统日常管理3 服务管理ntsysv,chkconfig,系统日志rsyslog,last ,lastb ,exec,xargs,dmesg,screen,nohup,curl,ping ,telnet,traceroute ,dig ,nc,nmap,host,nethogs,base64,jq 第十六节课
    centos Linux系统日常管理2 tcpdump,tshark,selinux,strings命令, iptables ,crontab,TCP,UDP,ICMP,FTP网络知识 第十五节课
    一个兼职DBA的数据库运维经验 小米科技 xx@xiaomi.com 2011
    centos Linux系统日常管理1 cpuinfo cpu核数 命令 w, vmstat, uptime ,top ,kill ,ps ,free,netstat ,sar, ulimit ,lsof ,pidof 第十四节课
    HTML5矢量实现文件上传进度条
    基于HTML5的WebGL呈现A星算法3D可视化
    基于HTML5的WebGL呈现A星算法的3D可视化
    基于HTML5的WebGL设计汉诺塔3D游戏
    基于HTML5树组件延迟加载技术实现
    基于HTML5的WebGL电信网管3D机房监控应用
  • 原文地址:https://www.cnblogs.com/testway/p/7050914.html
Copyright © 2011-2022 走看看