Issue 168 in maven-alfresco-archetypes: The AlfrescoPerson does not work in Maven SDK 1.1.1

9 views
Skip to first unread message

maven-alfres...@googlecode.com

unread,
Dec 2, 2013, 10:30:48 AM12/2/13
to maven-a...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 168 by m.swe...@aca-it.be: The AlfrescoPerson does not work in
Maven SDK 1.1.1
http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=168

What steps will reproduce the problem?
1. Create a fresh project with the Maven SDK 1.1.1
2. Create a test using the AlfrescoPerson rule to create a temporary user
3. The test will fail, because it cannot find the bean "testUserComponent".

What is the expected output? What do you see instead?

The rule should still work (just like in Maven SDK version 1.0.2), but it
complains about the bean that cannot be found.

What version of the product are you using? On what operating system?

Maven SDK 1.1.1. on OSX with Maven 3.1.1 and Alfresco 4.2.e.

Please provide any additional information below.

The bean is defined in the file "community-integration-test-context.xml". I
added it to my resources and referenced it in the @ContextConfiguration
annotation to work around this problem. However this should work out of the
box.

I also noticed that it is difficult to make it work out of the box, because
it is hard getting to the application context before the JUnit rule is
initialised. To fix it:

* My test implements ApplicationContextAware
* I have a custom ApplicationContextInit class which has a setter for the
ApplicationContext and a simple getter. I instantiate it as a private
variable on my test class.
* I pass the ApplicationContext within my test in the setApplicationContext
method provided by the ApplicationContextAware interface
* I am then able to pass the ApplicationContextInit instance to the
AlfrescoPerson rule.

This is also necessary to be able to use the TemporaryNodes rule. I feel
that it shouldn't be so hard trying to make the default test utility
classes to work.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

maven-alfres...@googlecode.com

unread,
Dec 10, 2013, 8:06:58 AM12/10/13
to maven-a...@googlegroups.com

Comment #1 on issue 168 by m.swe...@aca-it.be: The AlfrescoPerson does not
An issue has been created: http://issues.alfresco.com/jira/browse/ALF-20644

maven-alfres...@googlecode.com

unread,
Jul 18, 2014, 4:19:53 PM7/18/14
to maven-a...@googlegroups.com
Updates:
Status: Accepted
Owner: samuel.l...@alfresco.com
Labels: Milestone-Release-sdk-2.0.0

Comment #2 on issue 168 by colum...@gmail.com: The AlfrescoPerson does not
Sam, you are assigned to the related
http://issues.alfresco.com/jira/browse/ALF-20644
so assigning this to you if you don't mind.

Can you have a look at this?
Reply all
Reply to author
Forward
0 new messages