Maven 1
  1. Maven 1
  2. MAVEN-1474

exceptions writing classes that use DOM

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      WinXPSP2, JDK/J2SE 1.5/5.0
    • Number of attachments :
      0

      Description

      When compiling without Maven, everything works fine.

      When compiling with Maven, it says that getTextContent and setTextContent (DOM) are not found.

      maven.compile.source=1.5
      maven.compile.target=1.5

      java:compile:
      [echo] Compiling to E:\devel\excp/target/classes
      [javac] Compiling 13 source files to E:\devel\excp\target\classes
      E:\devel\excp\src\java\org\eoti\tools\excp\cfg\DOMWrapper.java:108: cannot find symbol
      symbol : method setTextContent(java.lang.String)
      location: interface org.w3c.dom.Element
      cp.setTextContent(url.toExternalForm());
      ^
      E:\devel\excp\src\java\org\eoti\tools\excp\cfg\EXCPDomNode.java:57: cannot find symbol
      symbol : method getTextContent()
      location: interface org.w3c.dom.Node
      public String getText()

      {return node.getTextContent().trim();}

      ^
      2 errors

      BUILD FAILED

        Activity

        Hide
        Brett Porter added a comment -

        This is probably because Maven is endorsing other xml libraries, but those are not in the compilation classpath so you miss out on both fronts.

        Does setting
        maven.compile.fork=true

        help?

        Show
        Brett Porter added a comment - This is probably because Maven is endorsing other xml libraries, but those are not in the compilation classpath so you miss out on both fronts. Does setting maven.compile.fork=true help?
        Hide
        Malachi de AElfweald added a comment -

        I thought the problem would be something like that, just wasn't sure how to fix it.

        Your suggestion did work. Thanks.

        Show
        Malachi de AElfweald added a comment - I thought the problem would be something like that, just wasn't sure how to fix it. Your suggestion did work. Thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            Malachi de AElfweald
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: