[MAGNOLIA-1459] Can't import project on Eclipse wtp with JDK 1.4.2 Created: 12/Apr/07  Updated: 23/Jan/13  Resolved: 13/Apr/07

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: 3.0.2
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Capitaine Harold Assignee: Fabrizio Giustina
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP Pro, tomcat 5.0, JDK 1.4.2.12, maven 2.5, eclipse wtp 3.2.2


Attachments: Text File pom.patch    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

This procedure is based on a fresh install procedure:

  • Be sure that there is no .m2 directory
  • download the jar of jcr, then type "mvn install:install-file -DgroupId=javax.jcr -DartifactId=jcr -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/the/jar"
  • Type the following command in the source directory of the project: mvn clean eclipse:clean eclipse:eclipse -Dwtpversion=1.5

You can import the project into eclipse but the project is not runnable with the embedded server because of the project facet that is set to 5.0 instead of 1.4

A workaround and a tricky way to avoid this problem is to change a specific value in the main pom.xml (see the file attached).
Under the artifactId tag which is set to the value maven-compiler-plugin, set the values of the tag target and source to 1.4.

And if you want to generate the war, just type :
mvn install -Dmaven.test.skip=true
It's necessary because the tests don't work anymore.



 Comments   
Comment by Magnolia International [ 12/Apr/07 ]

How exactly is that a problem? It is a fact (which will not change) that we require java5 to compile and execute the tests, so what are you expecting to be changed ?

This looks to me like a "how to" which could possibly have its place on the wiki (although I don't see why a developer would not have java5 installed), not an issue ?

Comment by Philipp Bracher [ 13/Apr/07 ]

in case you use 1.4.2 follow this instructions, but the test should run by default and they use for the sake of mocking classes with 1.5

Generated at Mon Feb 12 03:27:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.