I've just found another solution when using Tomcat 5.0.x and JDK 1.5,
without changing the pom.xml file !
1. Make sure that your %USERPROFILE%/.m2 doesn't exist
2. Make sure you've got maven 2.0.5 (mvn -version)
3. Make sure you've got Eclipse WTP 3.2 at least
4. Checkout the magnolia SVN trunk
5. mvn eclipse:eclipse -Dwtpversion=1.5 (you can add
-DdownloadSources=true if you want to have the sources of the
dependencies jars in order to debug well in Eclipse)
6. Install manually the jcr-1.0.jar following the instructions of
maven (download http://www.day.com/maven/jsr170/jars/jcr-1.0.jar
then, mvn install:install-file -DgroupId=javax.jcr
-DartifactId=jcr -Dversion=1.0 -Dpackaging=jar
-Dfile=/path/to/the/jar )
7. mvn eclipse:eclipse -Dwtpversion=1.5 again
8. In Eclipse, add the M2_REPO variable pointing to your
.m2/repository (Window > Preferences > Java > Build Path >
Classpath variables)
9. Add a new server runtime using the JDK 1.5 and Tomcat 5.0
10. Add a new server using that server runtime
11. Create a folder "stopped" inside $TOMCAT_HOME/common/endorsed and
put all the jars which are in the "endorsed" folder, inside the
"stopped" folder. You'll then have those files :
$TOMCAT_HOME/common/endorsed/stopped/xercesImpl.jar and
$TOMCAT_HOME/common/endorsed/stopped/xml-apis.jar
12. Add the magnolia web-app in the server in Eclipse
13. Start the server
And you're done !
Cheers,
Anthony
Anthony OGIER a écrit :
> Hi Ivar,
>
> I hope you didn't try the "shooting your head" option yet :-)
> I found something interesting for the Eclipse WTP problem.
> Look in the main pom.xml, you should find an <execution/> tag, which contains
> a <configuration/> with <target>1.5</target>. You just have to replace 1.5
> with 1.4, and then do a "mvn eclipse:clean eclipse:eclipse -Dwtpversion=1.0"
> (or 1.5 it's the same).
> Then, import all your projects in Eclipse, add a new Tomcat 5.0 server with
> JDK 1.4 (because in JDK 5.0 there is a problem with the XML parser because
> Tomcat has one embeded which conflict with the JDK bundled one).
> Then, you can add magnolia to the server ! Et voilà !
> Ah, just one last thing : if you want to compile the project with maven in
> order to get the .war file, do the command "mvn clean install
> -Dmaven.test.skip=true" ...
>
> Cheers,
> Anthony
>
> On Fri, 6 Apr 2007 23:07:32 +0200, "Master Magnolia" <[EMAIL PROTECTED]>
> wrote:
>
>> Hi people!
>>
>> Thank you for your quick answer and some good points, but this is the
>> problem.
>> I have tried all stuff I could find. Even mvn eclipse:eclipse doesn't
>> really work.
>>
>> Files that are generated are .project and .classpath including
>> org.eclipse.jdt.core.prefs file in .settings folder which you can find
>> attached in m***project1.zip. Compiled Magnolia subprojects can be
>> found as jars which is not ok IMHO and project is not recognized as
>> DWP, therefore unnranable. .project file does not contain subproject
>> info at all which can be found in the other try. It is not important
>> which versions of mgnl I use for generating JARS cos I have
>> successfully generated all versions (trunk, branch and tagged).
>>
>> In the other one you can see that project files are different and
>> recognizable by the eclipse WTP as DWP, but works only with referenced
>> JARs generated by the mvn into M2_REPO folder like the first try
>> (**1.zip) but also some additional files in .settings folder. Take a
>> look specially in org.eclipse.wst.common.component where you can see
>> all the dependecies including sources from subprojects. Even if you
>> try to change "deploy-path="/WEB-INF/lib"
>> handle="module:/resource/magnolia-subprojects*" into WEB-INF/classes
>> no desirable results. :-(
>>
>> I have played around with it but with no luck. In the older versions
>> of WTP <1.5 file is called .component with the same function.
>>
>> (According to my opinion it's quite messy don't you think?)
>> These files obviously should be manually checked and updated.
>>
>> Still no luck with it.
>>
>> Happy holidays and finally I have someone to talk about it...
>>
>> Ivar
>>
>> p.s. I can upload these files if someone interested.
>>
>> ----------------------------------------------------------------
>> for list details see
>> http://www.magnolia.info/en/developer.html
>> ----------------------------------------------------------------
>>
>
>
>
> ----------------------------------------------------------------
> for list details see
> http://www.magnolia.info/en/developer.html
> ----------------------------------------------------------------
>
>
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------