[
https://issues.apache.org/jira/browse/ISIS-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008227#comment-13008227
]
Jeff Schultz commented on ISIS-82:
----------------------------------
Thanks Dan. Frustrating.
I assume it's a configuration issue with my Eclipse or Maven installation.
I can see the MaxLengthFacetAnnotationForProperty constructed during
initialisation, but it isn't called when ToDoItems are created at runtime.
Tracing through the Facets actually used, it looks like only the default
MaxLengthFacetUnlimited is used.
> @MaxLength and other validators don't work in the archetype-generated project
> -----------------------------------------------------------------------------
>
> Key: ISIS-82
> URL: https://issues.apache.org/jira/browse/ISIS-82
> Project: Isis
> Issue Type: Question
> Components: Domain: Entities
> Affects Versions: 0.1.0-incubating
> Environment: Windows 7, Maven 2, Eclipse 3.6.1
> Reporter: Jeff Schultz
> Assignee: Dan Haywood
>
> Generate project as below. Import into Eclipse. Annotate
> ToDoItem.getDescription with @MaxLength(10). Run DnD viewer. Observe that
> the Description ignores the MaxLength validation. Same problem with
> validateDescription method. Same problem with HTML viewer.
> Unless I'm doing something wrong, this is a bug.
> $ mvn -U archetype:generate -D
> archetypeCatalog=http://incubator.apache.org/isis -D
> archetypeGroupId=org.apache.isis.support -D
> archetypeArtifactId=quickstart-archetype
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO] org.apache.maven.plugins: checking for updates from central
> [INFO] org.codehaus.mojo: checking for updates from central
> [INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for
> updates from central
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Maven Default Project
> [INFO] task-segment: [archetype:generate] (aggregator-style)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing archetype:generate
> [INFO] No goals needed for project - skipping
> [INFO] [archetype:generate {execution: default-cli}]
> [INFO] Generating project in Interactive mode
> [INFO] Archetype
> [org.apache.isis.support:quickstart-archetype:0.1.0-incubating-SNAPSHOT ->
> https://repository.apache.org/content/groups/snapshots-group/] found in
> catalog http://incubator.apache.org/isis
> [INFO] snapshot
> org.apache.isis.support:quickstart-archetype:0.1.0-incubating-SNAPSHOT:
> checking for updates from quickstart-archetype-repo
> Define value for property 'groupId': : com.mycompany.mygroup
> Define value for property 'artifactId': : myapp
> Define value for property 'version': 1.0-SNAPSHOT:
> Define value for property 'package': com.mycompany.mygroup:
> Confirm properties configuration:
> groupId: com.mycompany.mygroup
> artifactId: myapp
> version: 1.0-SNAPSHOT
> package: com.mycompany.mygroup
> Y: y
> [INFO] Parent element not overwritten in D:\x\myapp\dom\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\fixture\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\objstore-default\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\quickrun\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\viewer-html\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\viewer-wicket\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\viewer-restful\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\viewer-scimpi\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\tests-junit\pom.xml
> [INFO] Parent element not overwritten in D:\x\myapp\tests-bdd\pom.xml
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 25 seconds
> [INFO] Finished at: Thu Mar 17 00:14:39 EST 2011
> [INFO] Final Memory: 16M/175M
> [INFO]
> ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira