JiBX
  1. JiBX
  2. JIBX-355

maven-jibx-plugin doesn't seem to regard classes in src/test/java

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JiBX 1.2.3
    • Component/s: maven plugin
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Spring OXM has integration for JiBX and thus there are a lot of test cases regarding it. I am currently trying to port the Ant based build to Maven and fail as the compiler seems to assume the classes to be bound-compiled on the src/main/java path.

      If I move the classes from the package in the src/test/java path into src/main/java the compilation works fine. Returned into src/test/java I get a:

      [INFO] [jibx:bind {execution: compile-jibx-beans}]
      [INFO] Running JiBX binding compiler (single-module mode) on 1 binding file(s)
      Error: Cannot find information for class org.springframework.oxm.jibx.Flights; on mapping element at (line 3, col 74, in binding.xml)
      Error: Cannot find information for class org.springframework.oxm.jibx.FlightType; on mapping element at (line 9, col 76, in binding.xml)
      

      Regards, Ollie.

        Activity

        Hide
        Don Corley added a comment -

        Sample binding test case

        Show
        Don Corley added a comment - Sample binding test case
        Hide
        Miguel Almeida added a comment -

        Don,
        I've tried your approach - changing the CVS plugin version to 1.2.3-SNAPSHOT before installing, but I'm getting the error:
        [INFO] Attempted to access the artifact junit:junit:jar:4.7:test; which has not yet been resolved

        when I run the jibx:test-bind -P !jibxProfile,jibx-test goal

        (the active profile is
        <profile>
        <id>jibx-test</id>
        <build>
        <plugins>
        <plugin>
        <groupId>org.jibx</groupId>
        <artifactId>maven-jibx-plugin</artifactId>
        <version>1.2.3-SNAPSHOT</version>
        <!-- <version>1.2.2</version>-->

        <configuration>
        <modules>
        <module>information:pv-information-persistance</module>
        <module>.reporting:pv-reporting-persistance</module>
        </modules>
        <directory>src/main/resources/jibx</directory>
        <includes>
        <include>*-bindingTest.xml</include>
        <include>*-binding.xml</include>
        </includes>
        <verbose>true</verbose>
        </configuration>
        <executions>
        <execution>
        <phase>process-test-classes</phase>
        <goals>
        <goal>test-bind</goal>
        </goals>
        </execution>
        </executions>
        </plugin>
        </plugins>

        The junit:jar is another dependency I have in the pom (if I remove it, it'll complain on the next dependency I have there).

        Show
        Miguel Almeida added a comment - Don, I've tried your approach - changing the CVS plugin version to 1.2.3-SNAPSHOT before installing, but I'm getting the error: [INFO] Attempted to access the artifact junit:junit:jar:4.7:test; which has not yet been resolved when I run the jibx:test-bind -P !jibxProfile,jibx-test goal (the active profile is <profile> <id>jibx-test</id> <build> <plugins> <plugin> <groupId>org.jibx</groupId> <artifactId>maven-jibx-plugin</artifactId> <version>1.2.3-SNAPSHOT</version> <!-- <version>1.2.2</version>--> <configuration> <modules> <module>information:pv-information-persistance</module> <module>.reporting:pv-reporting-persistance</module> </modules> <directory>src/main/resources/jibx</directory> <includes> <include>*-bindingTest.xml</include> <include>*-binding.xml</include> </includes> <verbose>true</verbose> </configuration> <executions> <execution> <phase>process-test-classes</phase> <goals> <goal>test-bind</goal> </goals> </execution> </executions> </plugin> </plugins> The junit:jar is another dependency I have in the pom (if I remove it, it'll complain on the next dependency I have there).
        Hide
        Don Corley added a comment -

        Miguel,
        I'm have problems recreating this error.
        If there is any way you could attach a simplified sample that exhibits the same behavior, I'm sure I can fix this bug.
        The error message is making me think that I'm not resolving transitive dependencies correctly for a test case.
        Thanks,
        Don

        Show
        Don Corley added a comment - Miguel, I'm have problems recreating this error. If there is any way you could attach a simplified sample that exhibits the same behavior, I'm sure I can fix this bug. The error message is making me think that I'm not resolving transitive dependencies correctly for a test case. Thanks, Don
        Hide
        Miguel Almeida added a comment -

        Don:

        I am trying this again. I did the following:

        1) downloaded the CVS of maven-plugin, like instructed
        2) mvn installed it
        3) downloaded test case
        4) tried mvn jibx:test-bind.

        I get an mvn error, though:

        mvn jibx:test-bind
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] Building jibx-ota-test-bind (Bind test - from spring oxm project)
        [INFO] task-segment: [jibx:test-bind]
        [INFO] ------------------------------------------------------------------------
        [INFO] [jibx:test-bind

        {execution: default-cli}

        ]
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Attempted to access the artifact org.jibx:jibx-run:jar:1.2.2:compile; which has not yet been resolved

        [INFO] ------------------------------------------------------------------------
        [INFO] For more information, run Maven with the -e switch
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 2 seconds
        [INFO] Finished at: Fri Sep 24 09:48:11 WEST 2010
        [INFO] Final Memory: 15M/292M
        [INFO] ------------------------------------------------------------------------

        Is there something missing from the test-case configuration?

        Show
        Miguel Almeida added a comment - Don: I am trying this again. I did the following: 1) downloaded the CVS of maven-plugin, like instructed 2) mvn installed it 3) downloaded test case 4) tried mvn jibx:test-bind. I get an mvn error, though: mvn jibx:test-bind [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building jibx-ota-test-bind (Bind test - from spring oxm project) [INFO] task-segment: [jibx:test-bind] [INFO] ------------------------------------------------------------------------ [INFO] [jibx:test-bind {execution: default-cli} ] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Attempted to access the artifact org.jibx:jibx-run:jar:1.2.2:compile; which has not yet been resolved [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Fri Sep 24 09:48:11 WEST 2010 [INFO] Final Memory: 15M/292M [INFO] ------------------------------------------------------------------------ Is there something missing from the test-case configuration?
        Hide
        Don Corley added a comment -

        Miguel,
        This is a strange error. I'm not sure if the runtime version is correct (in my code).
        If there is any way you could attach a simplified sample that exhibits the same behavior, including the POM file, I'm sure I can fix this bug.
        Thanks,
        Don

        Show
        Don Corley added a comment - Miguel, This is a strange error. I'm not sure if the runtime version is correct (in my code). If there is any way you could attach a simplified sample that exhibits the same behavior, including the POM file, I'm sure I can fix this bug. Thanks, Don

          People

          • Assignee:
            Don Corley
            Reporter:
            Oliver Gierke
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: