Cactus
  1. Cactus
  2. CACTUS-216

Maven plugin in Cactus 1.7 does not respect java plugin settings

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Maven Integration
    • Labels:
      None
    • Environment:
      windows, maven 1.0.2

      Description

      Maven plugin in Cactus 1.7 is using default compilation settings even so there is maven.compile.target and maven.compile.source properties set in the project.properties file on parent project referenced with <extend>../project.xml</extend>, and not even properties from project.properties in current directory.

      This is a problem is JAVA_HOME is pointing to JDK 1.5 and maven.compile.target is set to 1.3 or 1.4. Cactus test classes are being compiled for 1.5 target by default.

        Activity

        Hide
        Felipe Leme added a comment -

        That's weird, it should work as of the fix for CACTUS-161

        Show
        Felipe Leme added a comment - That's weird, it should work as of the fix for CACTUS-161
        Hide
        Eugene Kuleshov added a comment -

        Is there anything I should try?

        I've added the following in compile goal:

        <j:when test="$

        {cactusSourcePresent == 'true'}

        ">
        <ant:echo message="###### $

        {pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.target')}

        "/>
        <ant:javac destdir="$

        {cactus.target.classes.dir}

        "

        And here is what I see in the debug log:

        cactus:compile:
        [mkdir] Created dir: C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes
        Plugin context for maven-java-plugin already initialised for this base context
        [echo] ###### 1.3
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        Plugin context for maven-java-plugin already initialised for this base context
        [javac] [DEBUG] fileset: Setup scanner in dir C:\dev\javatx\commonj\commonj-it1\src\test-cactus with patternSet

        { includes: [] excludes: [**/package.html] }

        [javac] [VERBOSE] org\javatx\cj\work\XWorkFacadeImplTest.java added as org/javatx/cj/work/XWorkFacadeImplTest.class doesn't exist.
        [javac] [VERBOSE] org\javatx\cj\work\XWorkManagerFactoryTest.java added as org/javatx/cj/work/XWorkManagerFactoryTest.class doesn't exist.
        [javac] Compiling 2 source files to C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes
        [javac] [VERBOSE] Using modern compiler
        [javac] [VERBOSE] Compilation arguments:
        '-d'
        'C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes'
        '-classpath'
        'C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes;C:\Documents and Settings\Administrator\.maven\repository\javatx\ejbs\xcommonj-ejb-0.1.2.jar;C:\Documents and Settings\Administrator\.maven\repository\jmock\jars\jmock-1.0.1.jar;C:\dev\javatx\commonj\lib\commonj-twm.jar;C:\Documents and Settings\Administrator\.maven\repository\log4j\jars\log4j-1.2.8.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\Documents and Settings\Administrator\.maven\repository\cactus\jars\cactus-13-1.7.jar;C:\Documents and Settings\Administrator\.maven\repository\commons-httpclient\jars\commons-httpclient-2.0.2.jar;C:\Documents and Settings\Administrator\.maven\repository\commons-logging\jars\commons-logging-1.0.4.jar;C:\Documents and Settings\Administrator\.maven\repository\aspectj\jars\aspectjrt-1.2.1.jar;C:\Documents and Settings\Administrator\.maven\repository\xjavadoc\jars\xjavadoc-1.1.jar;C:\Documents and Settings\Administrator\.maven\repository\xdoclet\jars\xdoclet-bea-module-1.2.3.jar;C:\Documents and Settings\Administrator\.maven\repository\xdoclet\jars\xdoclet-ejb-module-1.2.3.jar;C:\Documents and Settings\Administrator\.maven\repository\xdoclet\jars\xdoclet-web-module-1.2.3.jar;C:\Documents and Settings\Administrator\.maven\repository\cactus\jars\cactus-ant-13-1.7.jar;C:\Documents and Settings\Administrator\.maven\repository\junit\jars\junit-3.8.1.jar;C:\Documents and Settings\Administrator\.maven\repository\httpunit\jars\httpunit-1.6.jar;C:\Documents and Settings\Administrator\.maven\repository\nekohtml\jars\nekohtml-0.9.1.jar;C:\dev\javatx\commonj\commonj-it1;C:\Documents and Settings\Administrator\.maven\repository\rhino\jars\js-1.5R4.1.jar;C:\dev\javatx\commonj\commonj-it1\target\classes;C:\prog\maven-1.0.2\lib\forehead-1.0-beta-5.jar'
        '-sourcepath'
        'C:\dev\javatx\commonj\commonj-it1\src\test-cactus'
        '-g'

        Show
        Eugene Kuleshov added a comment - Is there anything I should try? I've added the following in compile goal: <j:when test="$ {cactusSourcePresent == 'true'} "> <ant:echo message="###### $ {pom.getPluginContext('maven-java-plugin').getVariable('maven.compile.target')} "/> <ant:javac destdir="$ {cactus.target.classes.dir} " And here is what I see in the debug log: cactus:compile: [mkdir] Created dir: C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes Plugin context for maven-java-plugin already initialised for this base context [echo] ###### 1.3 Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context Plugin context for maven-java-plugin already initialised for this base context [javac] [DEBUG] fileset: Setup scanner in dir C:\dev\javatx\commonj\commonj-it1\src\test-cactus with patternSet { includes: [] excludes: [**/package.html] } [javac] [VERBOSE] org\javatx\cj\work\XWorkFacadeImplTest.java added as org/javatx/cj/work/XWorkFacadeImplTest.class doesn't exist. [javac] [VERBOSE] org\javatx\cj\work\XWorkManagerFactoryTest.java added as org/javatx/cj/work/XWorkManagerFactoryTest.class doesn't exist. [javac] Compiling 2 source files to C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes [javac] [VERBOSE] Using modern compiler [javac] [VERBOSE] Compilation arguments: '-d' 'C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes' '-classpath' 'C:\dev\javatx\commonj\commonj-it1\target\test-cactus-classes;C:\Documents and Settings\Administrator\.maven\repository\javatx\ejbs\xcommonj-ejb-0.1.2.jar;C:\Documents and Settings\Administrator\.maven\repository\jmock\jars\jmock-1.0.1.jar;C:\dev\javatx\commonj\lib\commonj-twm.jar;C:\Documents and Settings\Administrator\.maven\repository\log4j\jars\log4j-1.2.8.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\Documents and Settings\Administrator\.maven\repository\cactus\jars\cactus-13-1.7.jar;C:\Documents and Settings\Administrator\.maven\repository\commons-httpclient\jars\commons-httpclient-2.0.2.jar;C:\Documents and Settings\Administrator\.maven\repository\commons-logging\jars\commons-logging-1.0.4.jar;C:\Documents and Settings\Administrator\.maven\repository\aspectj\jars\aspectjrt-1.2.1.jar;C:\Documents and Settings\Administrator\.maven\repository\xjavadoc\jars\xjavadoc-1.1.jar;C:\Documents and Settings\Administrator\.maven\repository\xdoclet\jars\xdoclet-bea-module-1.2.3.jar;C:\Documents and Settings\Administrator\.maven\repository\xdoclet\jars\xdoclet-ejb-module-1.2.3.jar;C:\Documents and Settings\Administrator\.maven\repository\xdoclet\jars\xdoclet-web-module-1.2.3.jar;C:\Documents and Settings\Administrator\.maven\repository\cactus\jars\cactus-ant-13-1.7.jar;C:\Documents and Settings\Administrator\.maven\repository\junit\jars\junit-3.8.1.jar;C:\Documents and Settings\Administrator\.maven\repository\httpunit\jars\httpunit-1.6.jar;C:\Documents and Settings\Administrator\.maven\repository\nekohtml\jars\nekohtml-0.9.1.jar;C:\dev\javatx\commonj\commonj-it1;C:\Documents and Settings\Administrator\.maven\repository\rhino\jars\js-1.5R4.1.jar;C:\dev\javatx\commonj\commonj-it1\target\classes;C:\prog\maven-1.0.2\lib\forehead-1.0-beta-5.jar' '-sourcepath' 'C:\dev\javatx\commonj\commonj-it1\src\test-cactus' '-g'

          People

          • Assignee:
            Unassigned
            Reporter:
            Eugene Kuleshov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development