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

Skip to first unread message

Dec 2, 2013, 10:30:48 AM12/2/13
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 168 by The AlfrescoPerson does not work in
Maven SDK 1.1.1

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

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:

Dec 10, 2013, 8:06:58 AM12/10/13

Comment #1 on issue 168 by The AlfrescoPerson does not
An issue has been created:

Jul 18, 2014, 4:19:53 PM7/18/14
Status: Accepted
Labels: Milestone-Release-sdk-2.0.0

Comment #2 on issue 168 by The AlfrescoPerson does not
Sam, you are assigned to the related
so assigning this to you if you don't mind.

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