关于 Maven 2 的几个问题
我对 Maven 2 有一些疑问,我希望有人能为我解决问题:
为此创建了一个新线程(链接:Maven 2 插件,build + Surefire)
是否可以使用 diffrend 值多次定义配置文件(例如使用 diffrend 配置文件)并激活这些配置文件全部简介? 我尝试过一次,似乎只有一个配置文件被实际执行。
这个解决方案是常见的还是值得推荐的:我有几个项目,它们的 pom 中有很多东西两次(意味着项目 a 有一些报告插件和项目 b 相同),我现在创建一个新项目,它打包为pom 并在那里做我的项目共有的所有事情,并让它们继承这个父 pom。 我实际上认为这很好,因为它使我的 pom 文件更薄,但另一方面,我有一个父项目,它只是一个 pom 文件。
有人有 Maven + Selenium 的经验吗? 我尝试过 mavenium、ant task selenese 和 maven 插件来执行我的测试.. 坦白地说,他们中的每个人都给我带来了麻烦。 总而言之,蚂蚁塞勒尼斯是真正起作用的……有点。 我感觉我使用了错误的 jar 文件或者不知道我真正需要什么(我认为获得 java-client-driver 就可以了,我还需要 Seleneium-server 或 rc 吗?)
我希望我可以在一个帖子中提出 4 个问题(至少它们都是关于 Maven 2 的)。 预先感谢您的回复。
库库达斯
i have some questions about Maven 2 and i hope somebody can clear things up for me:
made a new thread about that (link: Maven 2 plugin, build + surefire)
Is it possible to define a profile several times with diffrend values (such as use a diffrend configruation file) and activate those profiles all? I tried that once and it seems that just one profile gets actually executed.
Is this solution common or probably recommendable: I have several projects which have a lot of stuff in their pom twice(meaning project a has some reporting plugins and project b the same), i now make a new project which is packed as pom and do all things in there which my projects have common and let them inherit from this parent pom. I actually think this is good because it makes my pom files thinner but on the other hand i have a parent project which is just a pom file.
Does somebody have expierince with Maven + Selenium ? I've tried mavenium, ant task selenese, and maven plugin to execute my tests .. and quiete frankly eveyone of them gave me trouble. All in all the ant selenese was the one who actually worked .. kinda. I'm feeling like i'm using the wrong jar files or don't know what i really need (i thought it would be ok to get java-client-driver, do i need seleneium-server or rc too?)
I hope it is okay that i make one thread with kinda 4 questions (at least they are all about maven 2). Thanks in advance for your response.
kukudas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请下次单独提问。
我无法回答这个问题。 我不太确定我是否理解这个问题。
不同的配置文件可以包含给定插件的不同值。 通常,如果您激活所有这些,只有其中一个会获胜。
建议仅使用 Pom 父 pom。 实际上,它们是保持理智的唯一方法。
我们在运行 selenium 方面拥有丰富的经验,但仅限于 Surefire 插件(以及 jetty 插件),因为我们所有的测试都是基于 junit 的。 它工作得非常好。
Please ask separate questions next time.
I cannot answer that. I'm not really sure I understand the question.
Different profiles can contain different values for a given plugin. Normally if you activate all of them, only one of them will win.
Pom-only parent poms are recommended. Actually they are the only way to stay sane.
We have plenty of experience with running selenium, but only thorough the surefire-plugin (and with the jetty-plugin), since all of our tests are junit based. It works really well.
Maven 中的配置文件是附加的。 从命令行,您可以像此示例一样进行调用来激活两个配置文件:
Profiles in Maven are additive. From the command line you can make a call like this example to activate two profiles: