jira.codehaus.org

  • Log In Access more options
    • Online Help
    • 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)
  • Maven 1.x Java Plugin
  • MPJAVA-18

maven-java-plugin-1.3 needs patch to generate code for prior version.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Windows XP
    Running java 1.4.2_03
    Compiling for java 1.3.1_09

Description

I believe that the following code is required in maven-java-pluging-1.3/plugin.jelly to get the java compiler to generate code for a prior release:

<j:if test="${context.getVariable('maven.compile.bootclasspath') != null}">
<ant:bootclasspath>
<ant:pathelement path="${maven.compile.bootclasspath}"/>
</ant:bootclasspath>
</j:if>

<j:if test="${context.getVariable('maven.compile.extdirs') != null}">
<ant:bootclasspath>
<ant:pathelement path="${maven.compile.extdirs}"/>
</ant:bootclasspath>
</j:if>

In addition, I use the following statements in my ~/build.properties:

maven.compile.source=1.3
maven.compile.target=1.3

  1. jce/jdk only required for 1.3 and less
    jce_path=c:/javasoft/jce-1_2_2
    jdk_path=c:/javasoft/j2sdk-1_3_1-09
    maven.compile.bootclasspath=${jdk_path}/lib/tools.jar;${jdk_path}/lib/dt.jar;${jdk_path}/jre/lib/rt.jar;${jdk_path}/jre/lib/jaws.jar;${jdk_path}/jre/lib/i18n.jar;${jce_path}/lib/jce1_2_2.jar

Thanks,

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    patch.diff
    27/Apr/04 2:14 AM
    1 kB
    Lynn Richards

Issue Links

is depended upon by

Bug - A problem which impairs or prevents the functions of the product. MAVEN-1244 plugin issues to fix for RC3

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brett Porter added a comment - 24/Apr/04 10:02 PM

Not sure I understand why this is needed. Can you give some reasons, and a proper cvs diff -u patch?

Show
Brett Porter added a comment - 24/Apr/04 10:02 PM Not sure I understand why this is needed. Can you give some reasons, and a proper cvs diff -u patch?
Hide
Permalink
Lynn Richards added a comment - 27/Apr/04 2:12 AM

When using the following 1.3 compiler settings without the fix, the following code compiles successfully:

maven.compile.source=1.3
maven.compile.target=1.3

public class TestException extends Exception {

public Throwable getThrowable() { return getCause(); }

}

However, if you drop this code into an appserver with a 1.3 jre (e.g., WebSphere 5.0.x), the getCause() method results in a runtime exception because it requires a 1.4 jre to run. If you have the fix, the code generates a compile-time error.

Thanks,

Show
Lynn Richards added a comment - 27/Apr/04 2:12 AM When using the following 1.3 compiler settings without the fix, the following code compiles successfully: maven.compile.source=1.3 maven.compile.target=1.3 public class TestException extends Exception { public Throwable getThrowable() { return getCause(); } } However, if you drop this code into an appserver with a 1.3 jre (e.g., WebSphere 5.0.x), the getCause() method results in a runtime exception because it requires a 1.4 jre to run. If you have the fix, the code generates a compile-time error. Thanks,
Hide
Permalink
Lynn Richards added a comment - 27/Apr/04 2:14 AM

Here is the diff

Show
Lynn Richards added a comment - 27/Apr/04 2:14 AM Here is the diff
Hide
Permalink
Brett Porter added a comment - 07/May/04 9:02 PM

applied. thanks.

Show
Brett Porter added a comment - 07/May/04 9:02 PM applied. thanks.

People

  • Assignee:
    Brett Porter
    Reporter:
    Lynn Richards
Vote (0)
Watch (1)

Dates

  • Created:
    08/Apr/04 3:27 PM
    Updated:
    07/May/04 9:02 PM
    Resolved:
    07/May/04 9:02 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.