[ 
http://jira.codehaus.org/browse/MECLIPSE-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=167026#action_167026
 ] 

Quintin Kerby commented on MECLIPSE-521:
----------------------------------------

I've encountered the same issue.

Webapp -> Service Utility -> DAO utility

I need the DAO Utility module on the path for runtime, but want to keep web 
programmers from referencing it directly, so I set it as optional compile scope 
in the Service Utility and runtime scope for the webapp.

The build puts everything in the right place, but when I try to publish using 
WTP it refuses to put my runtime scope jar in the path.  If I remove the DAO 
dependency from the webapp pom altogether and remove the optional attribute in 
the Service Utility, it publishes fine.  But then my webapp classes can compile 
directly using the DAO Utility, and that is undesirable.

> A materialized scope: runtime dependency project is not available in webapp 
> classloader
> ---------------------------------------------------------------------------------------
>
>                 Key: MECLIPSE-521
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-521
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: WTP support
>         Environment: Running latest m2eclipse, 
> http://m2eclipse.sonatype.org/update-dev/ on Eclipse Version: 3.4.1 Ganymede
>            Reporter: Jakob Ericsson
>
> We have a standard war-packaging pom file that use projects with both default 
> dependency (compile) scope and runtime dependency scope.
> If I do not materialize the the runtime dependencies everything works fine 
> but as soon as I materialize a runtime project my webapp get 
> ClassNotFoundException, i.e. my materialized dependency (with runtime) is not 
> added to the classpath.
> If I change my runtime dependency scope to default, materialized project is 
> added to the classpath and everything works fine.

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

        

Reply via email to