Hide Forgot
Description of problem: The RTGov quickstarts org.eclipse.jdt.core.prefs include hardcoded references to Java 1.5: ./activityclient/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 ./sla/report/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 ./sla/monitor/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 ./sla/epn/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 ./ordermgmt/ip/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 ./policy/async/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 ./policy/sync/.settings/org.eclipse.jdt.core.prefs org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.source=1.5 As a result, build errors are seen when the projects are imported as-is into JBDS7: Dynamic Web Module 3.0 requires Java 1.6 or newer. Version-Release number of selected component (if applicable): ER6 How reproducible: 100% Steps to Reproduce: 1. Import RTGov quickstarts into JBDS 2. 3. Actual results: Dynamic Web Module 3.0 requires Java 1.6 or newer. Expected results: No errors - all quickstarts should import and run cleanly in JBDS. Additional info:
Not sure JBDS is to blame for that https://github.com/Governance/rtgov/blob/master/samples/jbossas/pom.xml#L186
The reference to 1.5 Java is in the pom: <!-- Specify the compiler options and settings --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <showDeprecation>false</showDeprecation> <showWarnings>false</showWarnings> </configuration> </plugin>
Changing the reference in the pom.xml file from Java 1.5 to Java 1.7 resolves the initial error - but then presents an error of: JavaServer Faces 2.0 requires Dynamic Web Module 2.5 or newer. See attached screenshot - setting the facet version to 2.5 results in an error of: Cannot change version of project facet Dynamic Web Module to 2.5
Somehow or other I got past the dynamic web module error (I think by building it outside of JBDS). I then ran into an error stating that it was missing the @ApplicationPath annotation - disabling the JAX-RS validator or setting that particular activator to a Warning resolved this. Suggest either documenting the change to JAX-RS or updating the RTGov sample.
perhaps this should be in another BZ. samples-jbossas-sla-report also includes an error that it is missing persistence.xml That can be changed to a warning in Preferences/Java Persistence/JPA/Errors / Warnings This should be doc'd or fixed in the quickstart
Reference to JDK 1.5 has been removed. The persistence.xml file does exist in src/test/resources/META-INF. To overcome this error, it is necessary to add this location as a 'source folder' and then select the 'Maven->Update Project...' on the 'samples-jbossas-sla-report' project. Unclear why the JavaServer Faces errors occur on the 'samples-jbossas-sla-monitor' project - but if you do 'Maven->Update Project...' on that project (sometimes it has to be done twice) then the errors go - so think this is an Eclipse/maven issue. Also note: if using the maven Eclipse plugin (e.g. mvn eclipse:eclipse) the Eclipse projects can be imported (as a general project) without any issues. So apart from the JDK 1.5 fix, the other errors will require docs. How do I mark this BZ to ensure this happens?
Gary Brown <gary> updated the status of jira RTGOV-314 to Resolved
Doc changes required when describing importing rtgov quickstarts into JBDS-IS: The "samples-jbossas-sla-report" complains about a missing persistence.xml file. This file exists within the project, but is not directly within the classpath, so to fix this issue you will need to add the folder "src/test/resources/META-INF" as a source folder, and then select the "Maven->Update Project..." menu item on the "samples-jbossas-sla-report" project. If JavaServer Faces errors appear associated with the "samples-jbossas-sla-monitor" project, then select the "Maven->Update Project..." menu item on the project. This may need to be performed twice, if the errors do not disappear after performing the action once.
Made additional change, based on a workaround link found by Alan, so the JavaServer Faces errors no longer appear - so only docs required for the first (para) issue related to missing persistence.xml.
Verified with FSW 6.0.0.ER7 + JBDS-IS 7.0.0.CR1. Note that there is another error after importing RTGov quickstarts into JBDS, reported as new bug at https://bugzilla.redhat.com/show_bug.cgi?id=1043447
Gary Brown <gary> updated the status of jira RTGOV-314 to Closed