Liferay Issues

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Test Sessions Access more options
    • Getting Started
ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)
  • ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)
  • LEP-4273

Default to Eclipse JDT (ecj) compiler

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 4.4.0
  • Component/s: None
  • Labels:
    None
  • Similar Issues:
    Show 5 results 

    LEP-1903Issue with the default Reports portlet code in build-service.......
    LEP-834Source-compiled Version
    LEP-5611Add description attribute to common Ant tasks in Plugins SDK so that Eclipse will always show them to the developer
    LEP-1825compiling lifray 4.2 source with JDK 1.4 fails (class file has wrong version 49.0, should be 48.0)
    LEP-385How custumize the Liferay using the Eclipse?

Description

Use the Eclipse JDT (ecj) compiler by default instead of jikes. Place ecj.jar in %ANT_HOME%/lib so
that the Eclipse JDT classes are visible to Ant.

For more information, see
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm

This has numerous benefits:

1. Eclipse JDT is comparable in performance to jikes
2. Eclipse JDT supports up to java 1.7. jikes development seems to have been replaced by Eclipse JDT development
3. this enables use of hot code replacement when using the eclipse debugger (ie change some code in a method, eclipse auto-reloads the class with out redeploy or restart)
4. license allows redistribution (ie distribute a customized ant that includes JDT)

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions Summary
  • Commits
Hide
Permalink
Brian Chan added a comment - 19/Nov/07 9:46 AM

Mike, does this work in Windows? And this is all I have to do ? Put ecj.jar in ant\lib ? Do I need to change ourr build.properties from jikes to ecj or modern or anything?

Show
Brian Chan added a comment - 19/Nov/07 9:46 AM Mike, does this work in Windows? And this is all I have to do ? Put ecj.jar in ant\lib ? Do I need to change ourr build.properties from jikes to ecj or modern or anything?
Hide
Permalink
Brian Chan added a comment - 22/Nov/07 2:47 PM

I modified our ant tasks so that if ECJ doesn't exist, it'll fail gracefully with a nice message. It'll also auto copy the ecj.jar to the correct ant lib directory, so that the next time you run it, ECJ is there. Basically, it'll automatically install ECJ for the user.

Show
Brian Chan added a comment - 22/Nov/07 2:47 PM I modified our ant tasks so that if ECJ doesn't exist, it'll fail gracefully with a nice message. It'll also auto copy the ecj.jar to the correct ant lib directory, so that the next time you run it, ECJ is there. Basically, it'll automatically install ECJ for the user.
Hide
Permalink
David Truong added a comment - 12/Dec/07 3:40 PM

you also have to add a target and source to build.properties and also in the args of javac if you want to compile for 1.5 or higher

Show
David Truong added a comment - 12/Dec/07 3:40 PM you also have to add a target and source to build.properties and also in the args of javac if you want to compile for 1.5 or higher
Hide
Permalink
Jeffrey Blattman added a comment - 15/Jan/08 9:15 AM

i do not believe this is the right solution. you can't assume that $

{ant.home}

/lib is writable. for example, consider osx w/ netbeans installed in /Applications. in this case, ant.home is /Applications/NetBeans/NetBeans 6.0.app/Contents/Resources/NetBeans/java1/ant, which is not writable by the user.

that being said, i am not sure how to affect this change correctly, except asking the user to manually copy the file.

i am not sure why liferay has a dependency on ecj.

Show
Jeffrey Blattman added a comment - 15/Jan/08 9:15 AM i do not believe this is the right solution. you can't assume that $ {ant.home} /lib is writable. for example, consider osx w/ netbeans installed in /Applications. in this case, ant.home is /Applications/NetBeans/NetBeans 6.0.app/Contents/Resources/NetBeans/java1/ant, which is not writable by the user. that being said, i am not sure how to affect this change correctly, except asking the user to manually copy the file. i am not sure why liferay has a dependency on ecj.
Hide
Permalink
Brian Chan added a comment - 15/Jan/08 10:11 AM

Jeff,

That's a very good point.

We used to default to jikes, but since it's not actively developed anymore, we switched to ecj.

Basically, it makes it so that you can compile faster than just using the native jdk.

What we should do is default to modern (default jdk) and then give instructions on how to use ecj (ie, modify build.properties property "javac.compiler" and copy the ecj.jar to ant lib).

I'll make that change so we can more easily use netbeans per LEP-4784.

Show
Brian Chan added a comment - 15/Jan/08 10:11 AM Jeff, That's a very good point. We used to default to jikes, but since it's not actively developed anymore, we switched to ecj. Basically, it makes it so that you can compile faster than just using the native jdk. What we should do is default to modern (default jdk) and then give instructions on how to use ecj (ie, modify build.properties property "javac.compiler" and copy the ecj.jar to ant lib). I'll make that change so we can more easily use netbeans per LEP-4784 .
Hide
Permalink
Brian Chan added a comment - 15/Jan/08 2:32 PM

See LEP-4792

Show
Brian Chan added a comment - 15/Jan/08 2:32 PM See LEP-4792

People

  • Assignee:
    SE Support
    Reporter:
    Michael Young
Vote (0)
Watch (1)

Dates

  • Created:
    17/Nov/07 4:17 PM
    Updated:
    15/Jan/08 2:32 PM
    Resolved:
    15/Jan/08 2:32 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.2.11#854-sha1:ef00d61)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Liferay. Try JIRA - bug tracking software for your team.