Giter Site home page Giter Site logo

builder-demo's Introduction

演示不同的打包工具功能

目录

  1. ANT
  2. MAVEN
  3. GRADLE
  4. Builder

功能展现

演示分为4个功能,并使用统一的命令(MVN风格):

  1. clean 清理,
  2. compile,编译,依赖管理
  3. test,执行单元测试
  4. package,打包
  5. deploy: 发布包到远端库

此外,考虑到在实际应用中的不同场景:

  1. 多模块编译,一个proj有多个子模块编译
  2. 条件发布,生成不同的分发包,包中的配置文件不同
  3. 嵌入版本识别,自动将源码版本ID加入到发布包中### 扩展

ant-demo

http://ant.apache.org/

ant compile 编译代码
ant test 执行测试
ant package 编译,测试,打包,输出tools.jar

条件打包

可以改打包中的配置文件

ant package -debug -Dprofile=production 

ivy-demo

http://ant.apache.org/ivy/

示ant和ivy依赖管理工具协作,用法和ant-demo是一样的,区别在于使用ivy来管理依赖,而不提交jar在源码中。

maven-demo

http://maven.apache.org/

演示maven声明依赖,条件打包

mvn compile
mvn test
mvn package

使用生产配置来打包:

mvn package -P prod

maven-groovy

如何在maven中编译groovy和java

template

提供两个配置模板

  • settings.xml 配置阿里云镜像
  • pom.xml 配置servlet2.5时代的包依赖,用于旧工程的迁移

builder-demo's People

Contributors

lxbzmy avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.