@Test
public void installUserWithSingleValuedMVProp() throws Exception {
UserManager mgr = ((JackrabbitSession) admin).getUserManager();
assertNull("test-user-a must not exist", mgr.getAuthorizable(ID_TEST_USER_A));
User u = mgr.createUser(ID_TEST_USER_A, "nonce");
final String authPath = u.getPath();
u.setProperty(NAME_USER_PROPERTY, admin.getValueFactory().createValue("initial"));
admin.getNode(u.getPath()).addNode(NAME_PROFILE_PRIVATE_NODE, NodeType.NT_UNSTRUCTURED);
admin.save();
JcrPackage pack = packMgr.upload(getStream("testpackages/test_user_a_mv.zip"), false);
assertNotNull(pack);
ImportOptions opts = getDefaultOptions();
pack.install(opts);
User userA = (User) mgr.getAuthorizable(ID_TEST_USER_A);
assertNotNull(ID_TEST_USER_A + " must exist", userA);
Node profile = admin.getNode(userA.getPath() + "/profile");
assertTrue(profile.hasProperty("mvProp"));
assertTrue(profile.getProperty("mvProp").isMultiple());
}
I attached the test-mv-prop-user.zip that illustrates the error. In the package serialization the mvprop appears as an array (mvprop="[first]") but the installed type is String.