[
https://jira.codehaus.org/browse/MWAS-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292518#comment-292518
]
Benjamin Cartereau commented on MWAS-67:
----------------------------------------
In my case, I made it work by doing so:
- Add a javadoc flag for the class EjbDeployMojo
("@requiresDependencyResolution compile" in addition to
"@requiresDependencyResolution runtime")
- Write :
dependencySet.addAll( getMavenProject().getCompileClasspathElements() );
dependencySet.addAll( getMavenProject().getRuntimeClasspathElements() );
instead of :
dependencySet.addAll( executedProject.getCompileClasspathElements() );
dependencySet.addAll( executedProject.getRuntimeClasspathElements() );
> WsEJBDeploy fails with Maven3 - missing all runtime and compile dependencies
> ----------------------------------------------------------------------------
>
> Key: MWAS-67
> URL: https://jira.codehaus.org/browse/MWAS-67
> Project: Maven 2.x WebSphere 6 Plugin
> Issue Type: Bug
> Affects Versions: 1.1.1
> Environment: Windows XP
> Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
> IBM WebSphere Application Server 6.1.0.35
> IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3...)
> Reporter: Erlend Mongstad
> Assignee: David J. M. Karlsen
> Attachments: EjbDeployMojo.java, ejb.tar
>
>
> WSEJBDeploy fails when run with Maven 3. Works fine with Maven 2
> Output from plugin's logfile:
> Maven 2
> [wsejbdeploy] Executing 'C:\Program
> Files\IBM\SDP70\runtimes\base_v61\java\jre\bin\java.exe' with arguments:
> [wsejbdeploy] '-Dwebsphere.lib.dir=C:\Program
> Files\IBM\SDP70\runtimes\base_v61/lib'
> [wsejbdeploy] '-Ditp.loc=C:\Program
> Files\IBM\SDP70\runtimes\base_v61\deploytool\itp'
> [wsejbdeploy] '-Dwas.install.root=C:\Program
> Files\IBM\SDP70\runtimes\base_v61'
> .........
> [wsejbdeploy] '-cp'
> [wsejbdeploy] '<project>\target\classes;<+all compile and runtime
> dependencies>'
> [wsejbdeploy] '-keep'
> [wsejbdeploy] '-trace'
> [wsejbdeploy] '-log'
> Maven 3
> [wsejbdeploy] Executing 'C:\Program
> Files\IBM\SDP70\runtimes\base_v61\java\jre\bin\java.exe' with arguments:
> [wsejbdeploy] '-Dwebsphere.lib.dir=C:\Program
> Files\IBM\SDP70\runtimes\base_v61/lib'
> [wsejbdeploy] '-Ditp.loc=C:\Program
> Files\IBM\SDP70\runtimes\base_v61\deploytool\itp'
> [wsejbdeploy] '-Dwas.install.root=C:\Program
> Files\IBM\SDP70\runtimes\base_v61'
> .........
> [wsejbdeploy] '-cp'
> [wsejbdeploy] '<project>\target\classes'
> [wsejbdeploy] '-keep'
> [wsejbdeploy] '-trace'
> [wsejbdeploy] '-log'
> Maven 3 then fails with errors such as this:
> [wsejbdeploy] [*Error] <project>: The project was not built since its build
> path is incomplete. Cannot find the class file for <external class>. Fix the
> build path then try building this project
> The classpath given to the deploy tool is missing all runtime and compile
> dependencies when run with Maven 3. I have tested with a change in the
> EjbDeployMojo class:
> From
> dependencySet.addAll(
> executedProject.getCompileClasspathElements() );
> dependencySet.addAll(
> executedProject.getRuntimeClasspathElements() );
> to
> dependencySet.addAll(
> getMavenProject().getRuntimeClasspathElements() );
> dependencySet.addAll(
> getMavenProject().getRuntimeClasspathElements() );
> and that works.
> I guess further testing must be done to ensure that this doesn't break ejb
> deploy for other projects.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email