由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 如何让一个package使用另一个package的source
相关主题
请教一个java web application设计的问题免费的credit card charging module
问个 maven multi-module project dependency 的问题How to ues log4j to send log email in the multithreaded processes as similiar with single-threaded
俺梦想的系统Brainbench test (转载)
问一个spring dynamic module/OSGi的问题read from multiple inputstreams at the same time?
[转载] apache mod_jk.so 问题问个gwt client code调用远程object的问题
Java Tools and Technologies Landscape for 2014请问最佳的方案:在其他项目基础上扩展
JB JAVA Bean,SERVLET位置一问请教关于使用map和fields
What is good Java software?IDEA有些同一个module下的不想关error造成不能运行
相关话题的讨论汇总
话题: package话题: module话题: build话题: ant话题: modules
进入Java版参与讨论
1 (共1页)
l*****a
发帖数: 14598
1
本来在一个package里面生成多个jar,但是太费时间
打算分成多个package
但是他们使用一套code base
不同点可以用不同的build.xml
考虑在其他几个package中只包含build.xml..
1这样可行吗?
是不是其他几个package要依赖主package,我只希望build其他package时能得到
主package的code,但不希望它build
2.主package有变化时,有希望trigger其他几个分别build automatically吗?
thanks
java菜鸟
s*********n
发帖数: 237
2
You need a management tool, such as maven or ant. Either one can build with
selective code (by path, by file pattern, ...). You can make the other
targets depending on the main target.
l*****a
发帖数: 14598
3
now they are in the same package,using ant and build one by one
can I split them into different packages?
since I just want to build them seperately
but if they are in different package, I am afraid that if I just build one
package, it can't find the source of the main package

with

【在 s*********n 的大作中提到】
: You need a management tool, such as maven or ant. Either one can build with
: selective code (by path, by file pattern, ...). You can make the other
: targets depending on the main target.

l*****a
发帖数: 14598
4
ding!!!

【在 l*****a 的大作中提到】
: now they are in the same package,using ant and build one by one
: can I split them into different packages?
: since I just want to build them seperately
: but if they are in different package, I am afraid that if I just build one
: package, it can't find the source of the main package
:
: with

g*****g
发帖数: 34805
5
你的问题最方便的解决方案是ant。ant可以在一个build.xml设置多个target。
比如web module,一个jar,一个war几乎是必然。war可以调用jar的那个target。
就算多个不同的jar,有共同部分,你也可以用zipgroupfileset,include/exclude
等多种办法来达到目的。
当然把代码分到不同项目(eclipse project),用ant+ivy或者maven是比较常见的做法
J*******n
发帖数: 2901
6
主package有变化时,有希望trigger其他几个分别build automatically吗?
你要自动trigger,这个ant做不到吧?一般得用Version control system + CI (git +
jenkins)实现吧
g*****g
发帖数: 34805
7
Jenkins.

+

【在 J*******n 的大作中提到】
: 主package有变化时,有希望trigger其他几个分别build automatically吗?
: 你要自动trigger,这个ant做不到吧?一般得用Version control system + CI (git +
: jenkins)实现吧

B***r
发帖数: 79
8
Maven definitely can handle that with modules:

project1
project2
project3

project1 and project2 can generate their jars that can be used by project3
which creates a war file for the application.
each module has its own pom.xml
It has been used in my company.
1 (共1页)
进入Java版参与讨论
相关主题
IDEA有些同一个module下的不想关error造成不能运行[转载] apache mod_jk.so 问题
关于vert.x,这几篇文章写得还不错 (转载)Java Tools and Technologies Landscape for 2014
问一个gradle的基础问题JB JAVA Bean,SERVLET位置一问
大家拍我吧,自己太弱了What is good Java software?
请教一个java web application设计的问题免费的credit card charging module
问个 maven multi-module project dependency 的问题How to ues log4j to send log email in the multithreaded processes as similiar with single-threaded
俺梦想的系统Brainbench test (转载)
问一个spring dynamic module/OSGi的问题read from multiple inputstreams at the same time?
相关话题的讨论汇总
话题: package话题: module话题: build话题: ant话题: modules