[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-9226) JBossTools hangs when quickfixing : EL Validator cannot run on project a because Validation Builder precedes JBoss Knowledge Base Builder

Libor Zoubek (JIRA) jira-events at lists.jboss.org
Wed Jun 22 10:20:23 EDT 2011


     [ https://issues.jboss.org/browse/JBIDE-9226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Libor Zoubek updated JBIDE-9226:
--------------------------------

           Description:     (was: If a maven project uses web resource filtering and is referencing JSF libraries, then, during the JSF Facet installation, org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate will create the faces-config.xml file in the first resource folder found in .settings/org.eclipse.wst.common.component, for instance :
{noformat} 
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="simple-jsf">
        <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
        <property name="context-root" value="simple-jsf"/>
        <property name="java-output-path" value="/simple-jsf/target/classes"/>
    </wb-module>
</project-modules>
{noformat}

-> target/m2e-wtp/web-resources/WEB-INF/faces-config.xml 

target/ is a derived folder (at least in m2e-core 0.13), and faces-config.xml belongs to the source folders.

The code responsible for this is  
{noformat}
private IPath resolveConfigPath(final IProject project, final String jsfConfigPath) {
  return ComponentCore.createComponent(project).getRootFolder()
			.getUnderlyingFolder().getRawLocation().append(
						new Path(jsfConfigPath));
}
{noformat}

Obviously, we'd need to fix it upstream. Until that happens, if it happens one day, we can take the WDD (Workaround Driven Development) route :
* either we try putting the correct source folder first, if needed, before adding the facet, then reverting the change  once the JSF facet is added. 
* check if the faces-config.xml file has been created under target/m2e-wtp/web-resources/WEB-INF/ and move it back to src/main/webapp/WEB-INF/

First solution seems really gross. I'm inclined to implement the 2nd one.
)
              Priority: Blocker  (was: Major)
    Steps to Reproduce: 
* create a new maven project
* check "Create a simple project (skip archetype selection)"
* fill in the GAV (Group ArtifactId Version) coordinates : x:x:0.0.1-SNAPSHOT
* select war packaging
* click finish
* copy the following content inside the generated pom.xml :
{noformat}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>foo.bar</groupId>
	<artifactId>simple-jsf</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<dependencies>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>1.2_02</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webResources>
						<webResource>
							<directory>${basedir}/src/main/webapp/WEB-INF
							</directory>
							<includes>
								<include>web.xml</include>
							</includes>
							<targetPath>WEB-INF</targetPath>
							<filtering>true</filtering>
						</webResource>
					</webResources>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
{noformat}
* right click on the project, Maven > Update Project Configuration

Problems View still contains 2 errors
 * EL Validator cannot run on project a because Validation Builder precedes JBoss Knowledge Base Builder.
 * JSF Composite Component Validator cannot run on project a because Validation Builder precedes JBoss Knowledge Base Builder.
EXECUTE: quick-fix first error
ASSERT: quick-fix dialog finishes

  was:
* create a new maven project
* check "Create a simple project (skip archetype selection)"
* fill in the GAV (Group ArtifactId Version) coordinates : org.jboss:simple-jsf:0.0.1-SNAPSHOT
* select war packaging
* click finish
* copy the following content inside the generated pom.xml :
{noformat}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>foo.bar</groupId>
	<artifactId>simple-jsf</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<dependencies>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>1.2_02</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webResources>
						<webResource>
							<directory>${basedir}/src/main/webapp/WEB-INF
							</directory>
							<includes>
								<include>web.xml</include>
							</includes>
							<targetPath>WEB-INF</targetPath>
							<filtering>true</filtering>
						</webResource>
					</webResources>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
{noformat}
* right click on the project, Maven > Update Project Configuration

ASSERT WEB-INF/faces-config.xml is generated under src/main/webapp
ASSERT WEB-INF/faces-config.xml is not generated under target/m2e-wtp/web-resources/

     Affects Version/s: 3.3.0.M2
                            (was: 3.2.0.Final)
           Environment: JbossTools installed from http://download.jboss.org/jbosstools/builds/nightly/3.3_stable_branch/2011-06-18_05-30-41-H2/


> JBossTools hangs when quickfixing : EL Validator cannot run on project a because Validation Builder precedes JBoss Knowledge Base Builder
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-9226
>                 URL: https://issues.jboss.org/browse/JBIDE-9226
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: maven
>    Affects Versions: 3.3.0.M2
>         Environment: JbossTools installed from http://download.jboss.org/jbosstools/builds/nightly/3.3_stable_branch/2011-06-18_05-30-41-H2/
>            Reporter: Libor Zoubek
>            Assignee: Fred Bricon
>            Priority: Blocker
>             Fix For: 3.3.0.M2
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list