java要多思考下
成長^_^
:: ::
新隨筆
:: :: ::
管理
::
33 隨筆 :: 0 文章 :: 19 評(píng)論 :: 0 Trackbacks
公告
專注于互聯(lián)網(wǎng)技術(shù),興趣愛好廣泛,邏輯思維甚好,數(shù)學(xué)專業(yè)出生。
記錄生活,記錄工作。工作是快樂時(shí),生活就是幸福;工作是義務(wù)時(shí),生活就會(huì)痛苦O(∩_∩)O~
留言簿
(2)
給我留言
查看公開留言
查看私人留言
隨筆分類
(36)
技術(shù)研究(13)
(rss)
研發(fā)管理(15)
(rss)
系統(tǒng)運(yùn)維(8)
(rss)
最新隨筆
1.?【原】mysql5.7安裝過程記錄
2.?【原】Centos虛擬機(jī)安裝與設(shè)置要點(diǎn)
3.?【原】使用FRP代理內(nèi)網(wǎng)HTTP/TCP服務(wù),方便公司外部訪問
4.?【原】node環(huán)境搭建-解決windows環(huán)境下各種moudle not found錯(cuò)誤,各種模塊依賴錯(cuò)誤
5.?【原】ubuntu下使用eclipse+pydev搭建python開發(fā)環(huán)境(numpy,django)
6.?【原】JAVA時(shí)區(qū)設(shè)置及時(shí)區(qū)不一致帶來的奇葩現(xiàn)象
7.?【原】使用eclipse集成maven,svn進(jìn)行java項(xiàng)目開發(fā)的步驟
8.?【原】nginx均衡多tomcat環(huán)境配置,及這種環(huán)境下的remoteIp及ServerName獲取方式
9.?【原】使用redis緩存的實(shí)踐總結(jié)
10.?【原】使用maven復(fù)制配置文件
最新評(píng)論
1.?re: 【原】使用webbench進(jìn)行壓力測(cè)試過程中的一些疑惑[未登錄]
問題解決了嗎,是如何解決的,大神
--蘿卜
2.?re: 【原】JAVA時(shí)區(qū)設(shè)置及時(shí)區(qū)不一致帶來的奇葩現(xiàn)象
Recent projects implemented in the function of a curriculum, the core functions are as follows
--Kizi 2
3.?re: 【原】配置tomcat以GBK編碼方式運(yùn)行
@偶爾
可以在catalina.bat 里面設(shè)置
--leifang
4.?re: 【原】配置tomcat以GBK編碼方式運(yùn)行
setenv.sh 沒有找到
--偶爾
5.?re: 【原】使用maven整合多個(gè)web項(xiàng)目,多個(gè)war合并[未登錄]
我很好奇的是分項(xiàng)目后,開發(fā)期的自動(dòng)編譯部署熱更新這方面的事情是怎么搞定的啊?期待分享
--rock
【原】使用maven+eclipse+svn結(jié)合的方式管理多項(xiàng)目依賴
1、按項(xiàng)目需求拆分模塊,配置maven項(xiàng)目結(jié)構(gòu)
2、將項(xiàng)目拆分為一個(gè)java項(xiàng)目common,與多個(gè)web項(xiàng)目,建立他們之間的依賴關(guān)系
項(xiàng)目結(jié)構(gòu)如下:
demo--|
demo-common--|
src/main/java
src/main/resource
pom-common.xml
demo-web-----|
src/main/java
src/main/resource
src/main/webapp
pom-web.xml
pom.xml
3、編寫pom文件,配置項(xiàng)目依賴環(huán)境
3.1、pom.xml
1
<
project
xmlns
="http://maven.apache.org/POM/4.0.0"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
2
xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
3
<
modelVersion
>
4.0.0
</
modelVersion
>
5
<
name
>
demo
</
name
>
7
<
artifactId
>
demo
</
artifactId
>
8
<
groupId
>
com.demo
</
groupId
>
9
<
version
>
1.0.0-SNAPSHOT
</
version
>
10
<
packaging
>
pom
</
packaging
>
11
12
<
modules
>
13
<
module
>
demo-common/trunk
</
module
>
14
<
module
>
demo-web/trunk
</
module
>
15
</
modules
>
........
3.2、pom-common.xml
1
<
project
xmlns
="http://maven.apache.org/POM/4.0.0"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
2
xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
3
<
modelVersion
>
4.0.0
</
modelVersion
>
4
5
<
groupId
>
com.demo
</
groupId
>
6
<
artifactId
>
demo-common
</
artifactId
>
7
<
packaging
>
jar
</
packaging
>
8
<
version
>
1.0.0-SNAPSHOT
</
version
>
9
3.3、pom-web.xml
1
<
project
xmlns
="http://maven.apache.org/POM/4.0.0"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
2
<
modelVersion
>
4.0.0
</
modelVersion
>
3
<
artifactId
>
demo-web
</
artifactId
>
4
<
packaging
>
war
</
packaging
>
5
<
version
>
3.0
</
version
>
6
7
<
parent
>
8
<
artifactId
>
demo
</
artifactId
>
9
<
groupId
>
com.demo
</
groupId
>
10
<
version
>
1.0.0-SNAPSHOT
</
version
>
11
</
parent
>
12
13
<
properties
>
14
<
demo
.common.version
>
3.0.0-SNAPSHOT
</
demo.common.version
>
15
</
properties
>
16
17
<
build
>
31
<
plugins
>
32
<
plugin
>
33
<
groupId
>
org.apache.maven.plugins
</
groupId
>
34
<
artifactId
>
maven-eclipse-plugin
</
artifactId
>
35
<
version
>
2.8
</
version
>
36
<
configuration
>
37
<
wtpversion
>
2.0
</
wtpversion
>
38
<
sourceExcludes
>
39
<
sourceExclude
>
**/.svn/
</
sourceExclude
>
40
</
sourceExcludes
>
41
<
downloadSources
>
true
</
downloadSources
>
42
<
outputDirectory
>
43
src/main/webapp/WEB-INF/classes
44
</
outputDirectory
>
45
</
configuration
>
46
</
plugin
>
47
<
plugin
>
48
<
groupId
>
org.apache.maven.plugins
</
groupId
>
49
<
artifactId
>
maven-compiler-plugin
</
artifactId
>
50
<
version
>
2.3.2
</
version
>
51
<
configuration
>
52
<
source
>
1.6
</
source
>
53
<
target
>
1.6
</
target
>
54
<
encoding
>
UTF-8
</
encoding
>
55
</
configuration
>
56
</
plugin
>
57
<
plugin
>
58
<
groupId
>
org.apache.maven.plugins
</
groupId
>
59
<
artifactId
>
maven-resources-plugin
</
artifactId
>
60
<
version
>
2.4
</
version
>
61
<
configuration
>
62
<
encoding
>
UTF-8
</
encoding
>
63
</
configuration
>
64
</
plugin
>
65
<
plugin
>
66
<
groupId
>
org.codehaus.mojo
</
groupId
>
67
<
artifactId
>
aspectj-maven-plugin
</
artifactId
>
68
<
version
>
1.3.1
</
version
>
69
<
dependencies
>
70
<
dependency
>
71
<
groupId
>
org.aspectj
</
groupId
>
72
<
artifactId
>
aspectjrt
</
artifactId
>
73
<
version
>
1.6.10
</
version
>
74
</
dependency
>
75
<
dependency
>
76
<
groupId
>
org.aspectj
</
groupId
>
77
<
artifactId
>
aspectjtools
</
artifactId
>
78
<
version
>
1.6.10
</
version
>
79
</
dependency
>
80
</
dependencies
>
81
<
configuration
>
82
<
source
>
1.6
</
source
>
83
<
target
>
1.6
</
target
>
84
<
XnoInline
>
true
</
XnoInline
>
85
<
showWeaveInfo
>
true
</
showWeaveInfo
>
86
</
configuration
>
96
</
plugin
>
97
</
plugins
>
98
</
build
>
99
100
<
dependencies
>
101
<
dependency
>
102
<
groupId
>
com.demo
</
groupId
>
103
<
artifactId
>
demo-common
</
artifactId
>
104
<
version
>
${demo.common.version}
</
version
>
105
</
dependency
>
106
4、這時(shí),在demo根目錄下執(zhí)行mvn package -Dmaven.test.skip=true,執(zhí)行成功表明配置有效
5、在demo根目錄下執(zhí)行 mvn eclipse:eclipse 生成eclipse項(xiàng)目環(huán)境
6、在eclipse中使用import-->maven導(dǎo)入maven項(xiàng)目
7、這時(shí)會(huì)看到eclipse里產(chǎn)生三個(gè)項(xiàng)目,一個(gè)是demo,一個(gè)是demo-common,一個(gè)是demo-web,其中demo-web是web項(xiàng)目
技術(shù)文章收藏站點(diǎn)
posted on 2011-12-26 19:01
java要多思考下
閱讀(4581)
評(píng)論(0)
編輯
收藏
新用戶注冊(cè)
刷新評(píng)論列表
只有注冊(cè)用戶
登錄
后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Powered by:
BlogJava
Copyright © java要多思考下
主站蜘蛛池模板:
洱源县
|
东阳市
|
资溪县
|
廉江市
|
高陵县
|
连云港市
|
文安县
|
名山县
|
融水
|
温州市
|
西贡区
|
阿坝
|
远安县
|
永兴县
|
建始县
|
理塘县
|
河源市
|
遵义县
|
沂水县
|
郸城县
|
东莞市
|
依安县
|
买车
|
托克逊县
|
全州县
|
蛟河市
|
晋城
|
大竹县
|
射阳县
|
乌鲁木齐市
|
阳东县
|
布尔津县
|
阳朔县
|
秦安县
|
尚志市
|
仙桃市
|
阿坝
|
久治县
|
茌平县
|
龙泉市
|
安仁县
|