如何使用Maven for App Engine设置Java Eclipse(Juno)动态Web项目(How to setup a Java Eclipse (Juno) dynamic web project with Maven for App Engine)
我在Eclipse中使用appengine + GWT并且有工作代码,但是想要添加Maven来控制jar文件。 目前建议设置这样一个项目的方法是什么?
我找到了一些可能的选择,但对我来说不起作用:
1)创建“动态Web项目”并设置目录以适应Maven ... https://developers.google.com/eclipse/docs/faq#gwt_with_maven
2)与1类似, 使用Maven和Eclipse执行Java Dynamic Web项目的更多步骤
3)使用插件m2e 1.3+和m2e-wtp 0.16.0+ http://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/0.16#New_project_conversion_participants
我尝试从头开始创建项目并将Maven添加到工作项目中,但是没有工作。 Maven看起来正在工作,因为每件事都编译好,但部署失败了。 看起来没有部署来自Maven的Jar文件。
I am using appengine + GWT in Eclipse and have working code but wanted to add Maven to control jar files. What is the current suggested way to setup such a project?
I have found a few possible options, but non work for me:
1) create "Dynamic Web Project" and setup directories to fit with Maven ... https://developers.google.com/eclipse/docs/faq#gwt_with_maven
2) Similar to 1, with more steps Java Dynamic Web project with Maven and Eclipse
3) use plugins m2e 1.3+ and m2e-wtp 0.16.0+ http://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/0.16#New_project_conversion_participants
I have tried creating projects from scratch and adding Maven to a working project, but non work. Maven looks to be working as every thing compiles ok, but the deploy fails. Look like the Jar files from Maven are not being deployed.
原文:https://stackoverflow.com/questions/17561895
最满意答案
如果你愿意,你可以试试这个较短的版本。
regexp="^(\\b[a-zA-Z\\d+#.-]+\\b(?:\\s+|$)){0,5}$")
应该管用。
顺便说一句,在你的正则表达式中,你会说:
匹配1到5个字符(最多5个字符的字?),(后面是空格,然后是0到4个字符),零次或四次。 这是你想要的吗? :)
You could try this shorter version if you want.
regexp="^(\\b[a-zA-Z\\d+#.-]+\\b(?:\\s+|$)){0,5}$")
Should work.
Btw in your regex you say :
Match one to five chars (word of max 5 chars?), (followed by space, followed by zero to four chars. ) zero or four times. Is this what you want? :)
相关问答
更多-
好的,我确实深入研究了这一点。 JSR303指定的算法具有不直观的混乱,其中(props)是递归可解析的,而不是什么。 我认为,这主要是由于注释'属性和RB属性的语法差别很大。 所以我创建了自己的MessageInterpolator,你可以在我的回购中找到它: http : //github.com/Andrey-Sisoyev/adv-msg-interpolator 。 它解决了几乎所有问题,并且还允许寻址资源包,在哪里查找属性。 Ok, I did dig into this. The algori ...
-
Spring和JSR303(Spring and JSR303)[2023-09-10]
JSR-303提供程序(大多数情况下为hibernate-validator)执行对象验证的大部分工作。 Spring在此过程中的角色很小 - 它只解析用户的数据,将其绑定到对象并将此对象传递给验证器。 此外,在应用程序启动期间,Spring会创建Validator实例。 因此,您可以干涉此过程:创建对象,将手动验证,获取Validator实例并将对象传递给他。 因此,您将获得一Set ConstraintViolation ,它表示每个字段的错误。 在这个方案中,主要的问题是JSR-303验证器与对象一起 ... -
如果你愿意,你可以试试这个较短的版本。 regexp="^(\\b[a-zA-Z\\d+#.-]+\\b(?:\\s+|$)){0,5}$") 应该管用。 顺便说一句,在你的正则表达式中,你会说: 匹配1到5个字符(最多5个字符的字?),(后面是空格,然后是0到4个字符),零次或四次。 这是你想要的吗? :) You could try this shorter version if you want. regexp="^(\\b[a-zA-Z\\d+#.-]+\\b(?:\\s+|$)){0,5}$") ...
-
您可以通过传递给isValid()方法的ConstraintValidatorContext创建自定义约束违规对象,如下所示: public class BreedSizeValidator implements ConstraintValidator
{ private String value; @Override public void initialize(BreedSize constraintAnnotation) { ... -
我相信@Pattern就是@Pattern @Pattern("^\\s*$") private String smsChannelContent = ""; javadoc说 带注释的String必须与以下正则表达式匹配。 所以使用你需要的模式。 我不确定你是想检查空格还是空格。 I believe @Pattern does just that @Pattern("^\\s*$") private String smsChannelContent = ""; The javadoc states T ...
-
JSR303验证组继承(JSR303 Validation Group inheritance)[2022-04-22]
您的期望与规范要求相反。 从规范 (PDF上的第27页): 对于给定的接口Z,标记为属于组Z的约束(即,注释元素组包含接口Z的位置)或Z的任何超级接口(继承的组)被认为是组Z的一部分。 换句话说,如果使用Section1.class进行验证并使用All.class标记@NotNull , All.class应用约束。 但不是相反。 将其视为一组: All都是一组常见的约束,通过扩展All , Section1成为All的超集 ,而不是子集。 因此,当您使用All进行验证时,它仅应用All及其超级接口指定的那 ... -
我以前遇到过这个问题。 我相信除了使用@Valid之外,您还必须使用@ModelAttribute("dataForm")因此它知道如何将表单映射到DataEntryForm对象。 @RequestMapping( method = RequestMethod.POST ) public String addData( @ModelAttribute("dataForm") @Valid DataEntryForm dataForm, BindingRe ...
-
请看这里: 如何在Spring 4中启用注释驱动验证? 简而言之:检查是否已将所有验证API JAR依赖项包含到最终包中。 Please take a look at here: How to turn on annotation driven validation in Spring 4? In short: check if you have included all the validation API JAR dependencies into the final package.
-
我认为你的messageSource配置是错误的。 尝试这样的事情:
classpath:window classpath ... -
Hibernate JSR303验证和错误生成的propertyPath(Hibernate JSR303 validation and incorrectly generated propertyPath)[2023-07-30]
我也在Hibernate论坛上问了这个问题,并在那里得到了解答。 我想在这里分享答案,以防其他人遇到这个问题。 只需将Collection更改为List即可解决问题。 这是更新的单元测试: package com.foo; import java.util.ArrayList; import java.util.List; import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation. ...