I want my Employee has User as bellow
import org.isisaddons.module.security.dom.role.ApplicationRole;
import org.isisaddons.module.security.dom.user.ApplicationUser;
import org.isisaddons.module.security.dom.user.ApplicationUserRepository;
@Column(allowsNull = "true")
@Property(editing = Editing.ENABLED)
@Getter @Setter
private ApplicationUser user;
public List<ApplicationUser> choicesUser() {
return applicationUserRepository.allUsers();
}
public List<ApplicationRole> getUserRoles() {
return user!=null? Lists.newArrayList(user.getRoles()):Lists.newArrayList();
}
@Action()
public Employee createUser(
@ParameterLayout(named = "Username") final String username,
@ParameterLayout(named = "Password") final Password password,
@ParameterLayout(named = "Repeat Password") final Password repeatPassword,
final ApplicationRole initialRole,
final Boolean enable,
final String emailAddress) {
ApplicationUser applicationUser = applicationUserRepository.newLocalUser(username, password, repeatPassword, initialRole, enable, emailAddress);
this.setUser(applicationUser);
return this;
}
When I run on IDE it run fine and everything work as expected, but then I run mvn clean install
, it errors as bellow, when I remove code above it build just fine. Are there anything else that I have missed?
[INFO] calling @PostConstruct on all domain services
[WARNING] NOT configured
[ERROR]
[ERROR]
[ERROR]
[ERROR] @DomainObject annotation on org.isisaddons.module.security.dom.role.ApplicationRole specifies unknown repository 'org.isisaddons.module.security.dom.role.ApplicationRoleRepository'
[ERROR] @DomainObject annotation on org.isisaddons.module.security.dom.user.ApplicationUser specifies unknown repository 'org.isisaddons.module.security.dom.user.ApplicationUserRepository'
[ERROR]
[ERROR]
[ERROR]
[INFO] calling @PreDestroy on all domain services
[INFO] shutting down org.apache.isis.core.metamodel.specloader.SpecificationLoader@1f041bad
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Incode QuickStart .................................. SUCCESS [ 0.279 s]
[INFO] Incode QuickStart Base Module ...................... SUCCESS [ 2.480 s]
[INFO] Employment Module .................................. FAILURE [ 11.695 s]
[INFO] Incode QuickStart App Definition ................... SKIPPED
[INFO] Incode QuickStart Webapp ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.022 s
[INFO] Finished at: 2017-11-06T11:09:35+07:00
[INFO] Final Memory: 59M/457M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.isis.tool:isis-maven-plugin:1.15.1:validate (default) on project pApp-module-employment: 2 meta-model problems found. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :pApp-module-employment
Please Help, I also remove !
on pom on swagger by follow another question with similar issue, but it doesn't work !!!