如何让Maven构建版本从不变(How to make maven build take version from constant)
我有一个多模块项目。 我已经在pom.xml中引入了一个属性
app.version
,而不是版本中的任何版本:版本标记和模块部分中的依赖项。我在哈德逊环境中使用maven 3.1.1。
用
${app.version}
替换写入的值(1.6.0-SNAPSHOT)后,真正通过的构建顺序没有出错。是什么导致了这个问题
我从一开始就得到了这些警告,可能会有影响吗?
[WARNING] Some problems were encountered while building the effective model for com.mycompany.project:project-module:jar:2.4.0 [WARNING] 'version' contains an expression but should be a constant. @ com.mycompany.project:project-module:${app.version}, /var/lib/hudson/jobs/myJob TRUNK Maven/workspace/project-module/pom.xml, line 20, column 11
我需要解析太多的pom.xml:s,所以层次结构如下,我给它:
main_pom | --- modules | | | --- all other modules --- test | module A | | | module B module C
我给哈德森从main_pom开始。 它最后处理main_pom。 为什么? 它从所有其他模块部分中的随机一个开始,构建其他模块,然后是模块,测试和main_pom。 为什么这个疯狂的命令?
失败在模块A中。它首先构建而不是模块B.
正确的顺序是从main_pom - >模块B - >模块A等开始,但它直接从模块A开始。
编辑:
我的pom.xmls具有以下结构:
<parent> <groupId>com.mycompany.project</groupId> <artifactId>modules or parent_pom</artifactId> <version>${app.version}</version> <relativePath>../modules or parent_pom</relativePath> </parent> <dependency> <groupId>com.mycompany.project</groupId> <artifactId>some other module</artifactId> <version>${app.version}</version> </dependency>
I have a multi module project. I have introduced a property
app.version
which I use instead of version everywhere in the pom.xml: in version tag and in dependencies in modules part.I use maven 3.1.1 in Hudson environment.
After substituting written values (1.6.0-SNAPSHOT) with
${app.version}
, the build order that really goes through without error, is gone.What caused the issue?
I got these kind of warnings in the begin, may it affect?
[WARNING] Some problems were encountered while building the effective model for com.mycompany.project:project-module:jar:2.4.0 [WARNING] 'version' contains an expression but should be a constant. @ com.mycompany.project:project-module:${app.version}, /var/lib/hudson/jobs/myJob TRUNK Maven/workspace/project-module/pom.xml, line 20, column 11
I would need to parse too much the pom.xml:s, so the hierarchy is like follows, I give it:
main_pom | --- modules | | | --- all other modules --- test | module A | | | module B module C
I give for hudson to start from main_pom. It handles main_pom as last. Why? It starts now from random one in all other modules part, builds the others, then modules, test and main_pom. Why this insane order?
The fail is in module A. It builds that first and not module B.
Correct order would be to start from main_pom -> module B -> module A etc but it starts directly from module A.
Edit:
My pom.xmls have the following structure:
<parent> <groupId>com.mycompany.project</groupId> <artifactId>modules or parent_pom</artifactId> <version>${app.version}</version> <relativePath>../modules or parent_pom</relativePath> </parent> <dependency> <groupId>com.mycompany.project</groupId> <artifactId>some other module</artifactId> <version>${app.version}</version> </dependency>
原文:https://stackoverflow.com/questions/40907845
最满意答案
GitHub当前的开发版本显然是Python 3兼容的(Python 3.5及更高版本)。
安装它:
pip3 install git+https://github.com/webpy/webpy#egg=web.py
自2016年6月起 ,该项目使用Travis进行持续集成, 并已配置Python 3.5为每次提交运行测试套件。
The
web.py
project is now publishing a pre-release version to PyPI that is Python 3 compatible; install it with:pip install web.py==0.40-dev1
as outlined in their Getting Started section. You can also install the latest pre-release with
pip install --pre web.py
These releases are Python 3 compatible (Python 3.5 and up).
You can also install the current GitHub under-development codebase with:
pip3 install git+https://github.com/webpy/webpy#egg=web.py
The project uses Travis for continuous integration has configured Python 3.5 to run the test suite for each commit, since June 2016; the configuration has since been updated regularly to add new Python 3.x releases.
相关问答
更多-
web.py 现在支持python3吗[2021-12-30]
help> web Help on package web: NAME web - web.py: makes web apps (http://webpy.org) PACKAGE CONTENTS application browser contrib (package) db debugerror form http httpserver net py3helpers session template test utils webapi webopenid wsgi wsgiserver (packa ... -
GitHub当前的开发版本显然是Python 3兼容的(Python 3.5及更高版本)。 安装它: pip3 install git+https://github.com/webpy/webpy#egg=web.py 自2016年6月起 ,该项目使用Travis进行持续集成, 并已配置Python 3.5为每次提交运行测试套件。 The web.py project is now publishing a pre-release version to PyPI that is Python 3 comp ...
-
我把它变成了一个多 处理过程,并从生成的进程中为子 进程执行p.wait() ,并且生成的进程负责其余的步骤并将结果更新到数据库中。 web.py进度页面将在数据库中检查执行进度,从而解决了问题。 码: from multiprocessing import Process class ProcHandler(Process): def __init__(self, *args, **kwargs): #Initialize Process.__init__(s ...
-
web.py获取请求标头(web.py obtain request headers)[2022-03-29]
web.ctx.env结构使您可以访问WSGI环境变量 。 在WSGI应用程序中,内容类型标题被命名为CONTENT_TYPE : ct = web.ctx.env.get('CONTENT_TYPE') The web.ctx.env structure gives you access to the WSGI environment variable. In WSGI apps, the content type header is named CONTENT_TYPE: ct = web.ctx.e ... -
共享主机上的Web.py(Web.py on shared hosting)[2022-02-07]
你有没有使用fastcgi的原因? 这可能比尝试使用一些高编号的端口好得多,特别是因为您的网络主机可能不会很满意。 在这篇文章中有一些关于这样做的注释(在dreamhost上,但它应该与你类似): http://thefire.us/archives/261 Is there a reason you're not using fastcgi? That's probably considerably better than trying to use some high-numbered port, pa ... -
Web.py无法找到文件(Web.py cannot find files)[2021-09-16]
我找到了答案! 我添加到这个字符串: '/(js|css|img)/(.*)', 'static', /( '/(js|css|img)/(.*)', 'static', 类静态实现较早。 这门课相似: class static: def GET(self, media, file): try: f = open(media+'/'+file, 'r') return f.read() except: ... -
在dict中添加函数并作为globals参数传递给render: render = web.template.render('templates/', globals={'sum': sum}) 然后在您的模板中,您可以使用它: $def with (numbers)
Numbers add to $sum(numbers)
Add the functions in a dict and pass as the globals argument to render: render = ... -
看起来您没有安装auth模块。 我假设您正在尝试使用http://jpscaletti.com/webpy_auth/上的auth模块。 您没有说明是通过easy_install安装web.py还是在下载tarball后运行setup.py。 在任何一种情况下,我都建议你: 找到web.py安装文件夹 从上面的链接下载auth模块,并将内容解压缩到web.py安装文件夹的contrib /文件夹中 It looks like you do not have the auth module installed ...
-
接下来: http : //edvanbeinum.com/how-to-install-and-configure-supervisord我可以用supervisord轻松完成 Following this: http://edvanbeinum.com/how-to-install-and-configure-supervisord I can easily do it with supervisord
-
解决方案! 在Apache配置中,我需要将AllowEncodedSlashes指令添加到NoDecode值。 请参阅https://httpd.apache.org/docs/2.2/fr/mod/core.html#allowencodedslashes Solution found ! Into Apache configuration, I need to add the AllowEncodedSlashes directive to NoDecode value. See https://htt ...