[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2371) Integration testing Seam components with Maven

Siarhei Dudzin (JIRA) jira-events at lists.jboss.org
Fri May 30 16:41:46 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2371?page=comments#action_12415078 ] 
            
Siarhei Dudzin commented on JBSEAM-2371:
----------------------------------------

Jason, El-api is in provided scope, it is also in provided scope in jboss-seam-2.0.1.GA.pom. Provided scope *is* used within test phase (http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope) and even propagated through transitive dependencies. So the scope is *not* the problem.

I've cleaned up my local repository, made sure I have java 5 as runtime (java -version).
After that I did 'mvn clean install' on top level. All tests passed! 
After that all artifacts supposed to be in my local repo, so just to make sure I've ran 'mvn test' from the web module and it passed! I simply can not break the build!
I checked testproject-master/testproject-web/target/surefire-reports/TEST-TestSuite.xml and property surefire.test.class.path does contain el-api-1.0.jar which in turn does have the ELResolver.
In this file I also see that all the jar's are sorted properly. 

This is what I get if I run 'mvn dependency:tree -Dverbose -Dincludes=javax.el' from the web module:
[dependency:tree]
testproject.group.testproject:testproject-web:war:1.0-SNAPSHOT
\- org.jboss.seam:jboss-seam:jar:2.0.1.GA:provided (scope not updated to compile)
   \- org.jboss.el:jboss-el:jar:2.0.1.GA:provided
      \- javax.el:el-api:jar:1.0:provided
It clearly shows how javax.el is resolved for the project.

So it does seem to be your local problem.

Although putting el-api in test scope fixes your problem, it's not the real problem! Because provided dependencies are used in test phase and they are also propagated as transient you *should* have had el-api in your test classpath.

There are a number of possible reasons why you might have the problem:
* you modified a pom and the dependency tree is now different
* you have another project in your local repo with the same groupId/artifactId which somehow conflicts with any of the artifacts
* you have custom settings.xml which define different repositories which might give you an artifact with different transitive dependencies

There might be more but these are that popped up in my mind as I counted to 3 :)

p.s. may be it is a good idea to post such kind of problems on forum? This JIRA issue is getting very long and maven tests aren't even officially supported yet! :)

> Integration testing Seam components with Maven
> ----------------------------------------------
>
>                 Key: JBSEAM-2371
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2371
>             Project: Seam
>          Issue Type: Task
>          Components: Test Harness, Build
>    Affects Versions: 2.0.0.GA
>         Environment: Maven 2.0.7
>            Reporter: Siarhei Dudzin
>            Priority: Critical
>             Fix For: 2.1.0.BETA1
>
>         Attachments: maven-seam-microcontainer-testng-template.zip, tech-stack-1.0.1.pom, testproject-master-JBSEAM-2371.zip
>
>
> Various users have reported integration testing with Seam is not working in 'Mavenized' projects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list