Redian新闻
>
帮忙看看maven 的问题
avatar
帮忙看看maven 的问题# Java - 爪哇娇娃
c*d
1
在本版打了三天牌,一开始连别人资料都不会查找(以前联众和Q游都是右键查分
数胜率等资料的),更不知道这里可以玩信号牌的。囧rz 三天下来,基本上摸了一个
大概。奋斗成果如下:
牌室ID:chld
积分:42
总局数69,胜44副24逃跑1
胜率:63.77%
作为一个菜鸟,简单小结一下,并提出一下建议(或者希望吧)
1,菜鸟(或者新马甲)进牌室先别急着上桌,先熟悉下界面。我由于是不熟悉情况就
开玩,中间有一盘临时有事。我没有找到协商退出的按钮,直接点强退...好嘛,第一
天以-12分结束。
2,开牌前看看另外几家的胜率和逃跑情况。这方面我有血泪教训,我基本上打牌不挑
对家和边家的,进去就举手。第一天打了15盘左右,好像是胜负各半。被对家坑被边家
虐倒也罢了,受不了的是那种下台就走,还有就是抢不到庄或者要输了就强退的——这
最后一种实在是深恶痛绝,牌品太差。而且,被这样搞两次,牌真的来的很烂!
3,第二天继续玩。进桌子举手,发现对家不开始。好几次都如此——被高手嫌弃了也.
..当时大为不爽,都想重新注册个号重来了。但想想还是继续奋斗吧。由于我从不挑人
,赢了输了都继续开。有位坐我边家大侠(id记不得了,积分在500分以上)主动做了
我对家。合作了20来盘,积分终于转正了,激动!这一天结束,积分达到了12分,应该
不会再成“负翁”——感谢这位大侠~~
3,第三天,由于是正分,终于不被嫌弃了...再接再厉,rp大爆发啊,赢了30分。
oyeah!
几个感慨:
1,不打无准备之仗。争取事先熟悉操作,并查看另外三家的资料,以确定出牌策略。
2,尽量找那种输赢都继续、不强退的人一起玩(对家边家),这样比较有连续性。一
方面,免得每一盘都抢庄玩,靠天吃饭,好不容易熟悉了几位的出牌风格,得,全换人
了!另
一方面,连续打牌有利于保持较好的节奏,减少随机性。
3,牌品很重要。牌品好的人,别人愿意带你,边家也愿意和你玩。
4,坚持,不放弃。无论牌好坏,无论分高低。
建议:
1,能否在资料里面加一个胜率的统计?积分高低其实不是一个很好的指标,你懂的.
2,能否增加黑名单功能?或者在设置里面增加选项(断线率、积分等)
3,能否和联众、QQ游戏里一样的,找到一群不纠结于胜负,愿意过a(至少过5或者过
10)的玩家,在牌室最后几张桌子坐着玩。大家默认90桌以后的桌子是切磋的...
avatar
h*k
2
求救呀。刚开始用maven做一个新的project
可公司网络是有限制的,连最基本的mvn 命令都执行不了,create不了新的folder
structure.
一般这种情况怎么解决?
avatar
n*s
3
1)可以看到胜负,以及强退的场数。
2)黑名单就别指望了,4年前就提过要求了。
3)估计这儿游戏的人比QQ,联众少[没去那两处打过],不纠结胜负的人不容易凑在一
起。
avatar
e*t
4
Using Maven's archetype mechanism has nothing to do with internet.

【在 h**k 的大作中提到】
: 求救呀。刚开始用maven做一个新的project
: 可公司网络是有限制的,连最基本的mvn 命令都执行不了,create不了新的folder
: structure.
: 一般这种情况怎么解决?

avatar
c*d
5
有胜负,但没有胜率统计。就是胜场/总计。这个指标最直观。光看胜负场数,比较难
估计的。
黑名单就算了。
最后一点,也不是说不纠结胜负,至少打过5或者10吧,这种应该还是有不少的

【在 n******s 的大作中提到】
: 1)可以看到胜负,以及强退的场数。
: 2)黑名单就别指望了,4年前就提过要求了。
: 3)估计这儿游戏的人比QQ,联众少[没去那两处打过],不纠结胜负的人不容易凑在一
: 起。

avatar
g*g
6
不明白,不能下载dependency?repository在本地硬盘上,没有建不了folder一说。

【在 h**k 的大作中提到】
: 求救呀。刚开始用maven做一个新的project
: 可公司网络是有限制的,连最基本的mvn 命令都执行不了,create不了新的folder
: structure.
: 一般这种情况怎么解决?

avatar
M*l
7
你沉迷了,嗯

【在 c**d 的大作中提到】
: 有胜负,但没有胜率统计。就是胜场/总计。这个指标最直观。光看胜负场数,比较难
: 估计的。
: 黑名单就算了。
: 最后一点,也不是说不纠结胜负,至少打过5或者10吧,这种应该还是有不少的

avatar
y*d
8
是不是说 template 不全?

【在 g*****g 的大作中提到】
: 不明白,不能下载dependency?repository在本地硬盘上,没有建不了folder一说。
avatar
g*g
9
有时候会有下载一半corrupted的情况,把local repository里的相关目录
删掉即可。

【在 y***d 的大作中提到】
: 是不是说 template 不全?
avatar
h*k
10
mvn archetype:generate
马上就开始downloading.. maven-install-plugin..
和其他的plugin..
然后就是 failed..因为公司出不去central maven repository..难道maven装上没有默
认还要再去下载这些plugin?
谢谢

【在 g*****g 的大作中提到】
: 不明白,不能下载dependency?repository在本地硬盘上,没有建不了folder一说。
avatar
h*k
11
比如用maven自己的例子
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -
DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
然后就开始scanning for projects,
downloading.. plugins
就挂了

【在 y***d 的大作中提到】
: 是不是说 template 不全?
avatar
y*d
12
I'd guess there might be some proxy settings to mvn, and maybe your company
has a proxy?

【在 h**k 的大作中提到】
: 比如用maven自己的例子
: mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -
: DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
: 然后就开始scanning for projects,
: downloading.. plugins
: 就挂了

avatar
h*k
13
看来必须要个account可以通过proxy,否则maven没法用

【在 y***d 的大作中提到】
: I'd guess there might be some proxy settings to mvn, and maybe your company
: has a proxy?

avatar
e*t
14
sorry, my bad.
忘了我自己都有自己的local repository了。
几个办法:
1. 自己下载需要的plugin, 然后一个一个mvn install. 非常冗长,麻烦的过程
2. 自己在一个可以访问central maven repository的机器上build好local maven
repository, 然后整个copy 到你需要的机器上。
3. 找一台可以访问central maven repository,并且你也可以访问的机器,装maven
proxy.

【在 h**k 的大作中提到】
: mvn archetype:generate
: 马上就开始downloading.. maven-install-plugin..
: 和其他的plugin..
: 然后就是 failed..因为公司出不去central maven repository..难道maven装上没有默
: 认还要再去下载这些plugin?
: 谢谢

avatar
h*k
15
多谢
很清楚,我想办法从3往1试

【在 e*****t 的大作中提到】
: sorry, my bad.
: 忘了我自己都有自己的local repository了。
: 几个办法:
: 1. 自己下载需要的plugin, 然后一个一个mvn install. 非常冗长,麻烦的过程
: 2. 自己在一个可以访问central maven repository的机器上build好local maven
: repository, 然后整个copy 到你需要的机器上。
: 3. 找一台可以访问central maven repository,并且你也可以访问的机器,装maven
: proxy.

avatar
w*z
16
你公司没有一个大家都用的maven repository?以后你的jar怎么deploy啊?别人怎么
引用啊?

【在 h**k 的大作中提到】
: 多谢
: 很清楚,我想办法从3往1试

avatar
h*k
17
我准备给组里架一个
可这个internal repo也要到central repo下载些东西把?

【在 w**z 的大作中提到】
: 你公司没有一个大家都用的maven repository?以后你的jar怎么deploy啊?别人怎么
: 引用啊?

avatar
w*z
18
需要用到的,都download下来,测试通过,deploy到internal repo上。
至少我们公司都这样,不会随便直接连到外面的repo上的。这样也便于控制版本,要不
别人一改,如果你POM没写好,有可能就用到别人新的jar了,没通过测试,会不会有
Risk啊?

【在 h**k 的大作中提到】
: 我准备给组里架一个
: 可这个internal repo也要到central repo下载些东西把?

avatar
h*k
19
多谢
那那些maven的plugins都装在哪里?
是每个人的local还是plugin也可以装到internal repo上?

【在 w**z 的大作中提到】
: 需要用到的,都download下来,测试通过,deploy到internal repo上。
: 至少我们公司都这样,不会随便直接连到外面的repo上的。这样也便于控制版本,要不
: 别人一改,如果你POM没写好,有可能就用到别人新的jar了,没通过测试,会不会有
: Risk啊?

avatar
g*g
20
Plugins are just libs that can be downloaded automatically if
they are in the repo. It's recommended to push all your dependency
and plugins to intranet repo so that your build server has no
external dependency.

【在 h**k 的大作中提到】
: 多谢
: 那那些maven的plugins都装在哪里?
: 是每个人的local还是plugin也可以装到internal repo上?

avatar
h*k
21
谢谢
第一次用maven,感觉还有挺多要适应的
已经setup好了internal repo, 用的nexus. maven跟internal repo还有些问题。回头
希望大家多帮助

【在 g*****g 的大作中提到】
: Plugins are just libs that can be downloaded automatically if
: they are in the repo. It's recommended to push all your dependency
: and plugins to intranet repo so that your build server has no
: external dependency.

avatar
h*k
22
问一个简单的问题,可我也没找到答案
比如我upload一个jar到 internal repo,
同时upload pom

org.apache.poi
poi
3.8-beta5

This artifact depends on ...
commons-codec
commons-logging
log4j
这个jar自己有三个dependency,我要不要在这里也写出来? 还是这个pom 就可以了。
当然我会单独另外再upload另外三个。
谢谢

【在 g*****g 的大作中提到】
: Plugins are just libs that can be downloaded automatically if
: they are in the repo. It's recommended to push all your dependency
: and plugins to intranet repo so that your build server has no
: external dependency.

avatar
g*g
23
You want to include them so your app doesn't have to do that.

【在 h**k 的大作中提到】
: 问一个简单的问题,可我也没找到答案
: 比如我upload一个jar到 internal repo,
: 同时upload pom
:
: org.apache.poi
: poi
: 3.8-beta5
:

: This artifact depends on ...
: commons-codec

avatar
h*k
24
太谢谢了。

【在 g*****g 的大作中提到】
: You want to include them so your app doesn't have to do that.
avatar
w*z
25
poi jar 本身是maven artifact, 它的pom里应该有了需要的dependency。你不用自
己再加了吧?只要把那些需要的jar deploy 到maven repo,应该就可以了。

【在 h**k 的大作中提到】
: 问一个简单的问题,可我也没找到答案
: 比如我upload一个jar到 internal repo,
: 同时upload pom
:
: org.apache.poi
: poi
: 3.8-beta5
:

: This artifact depends on ...
: commons-codec

avatar
g*g
26
You still need to add them to your intranet repo if you want your build
server completely independent of external repo.

【在 w**z 的大作中提到】
: poi jar 本身是maven artifact, 它的pom里应该有了需要的dependency。你不用自
: 己再加了吧?只要把那些需要的jar deploy 到maven repo,应该就可以了。

avatar
w*z
27
of course, you will need to deploy the dependent jars to the internal repo.
(It's hard to imagine any company would let its build server depend on
external repo) But I don't think you need to define those dependency in your
application's pom. The maven artifact should have those dependencies
defined in its own pom.

【在 g*****g 的大作中提到】
: You still need to add them to your intranet repo if you want your build
: server completely independent of external repo.

avatar
r*s
28
maven一开始上手确实痛苦,
Stabilized就好了。
有一点about windows Xp env,
if you are using it.
by default maven saves all jars under your home dir .m2
but on xp it could be a long dir name with space in it,
e.g.C:\Documents and Settings\youruname\.m2
some compiler/maven plugin may fail because of that.
the solution is to put a settings.xml under the dir to re-direct
it somewhere else:
http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
C:\\data\.m2\repository


.
your

【在 w**z 的大作中提到】
: of course, you will need to deploy the dependent jars to the internal repo.
: (It's hard to imagine any company would let its build server depend on
: external repo) But I don't think you need to define those dependency in your
: application's pom. The maven artifact should have those dependencies
: defined in its own pom.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。