Author: fbricon
Date: 2012-01-22 12:32:08 -0500 (Sun, 22 Jan 2012)
New Revision: 38019
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
Log:
JBIDE-10677 : If Seam Facet version is unavailable, don't bail but fallback to latest
version instead.
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2012-01-22
13:12:35 UTC (rev 38018)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2012-01-22
17:32:08 UTC (rev 38019)
@@ -280,9 +280,16 @@
}
}
- private IProjectFacetVersion getSeamFacetVersion(String seamVersion) {
+ private IProjectFacetVersion getSeamFacetVersion(String seamVersion) throws
CoreException {
String version = seamVersion.substring(0, 3);
- return seamFacet.getVersion(version);
+ IProjectFacetVersion facetVersion = null;
+ try {
+ facetVersion = seamFacet.getVersion(version);
+ } catch (Exception e) {
+ MavenSeamActivator.log(e, "Seam version "+ version+ " is not
supported, using latest supported facet version instead");
+ facetVersion = seamFacet.getLatestVersion();
+ }
+ return facetVersion;
}
private void installEarFacets(IFacetedProject fproj,IProgressMonitor monitor) throws
CoreException {