[
http://jira.codehaus.org/browse/JIBX-407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240352#action_240352
]
Don Corley commented on JIBX-407:
---------------------------------
Miguel,
Yes, you are correct. Running the jibx:bind goal on Module2 will give you an
error.
Here is why:
module2 needs access to the module1 PROJECT (not the module1 DISTRIBUTION) to
access the binding file. If you build the module2 project by itself, it only
knows where the module1.jar DISTRIBUTION file is in the maven repository.
Remember that the binding.xml file does not even have to be in the distribution
(.jar) file for jibx to work, and in fact you put it in a different location in
your jar.
A multi-module build needs access to the actual PROJECT.
This should not be a problem for tightly integrated sub-projects such as yours.
Just build from the main project:
cd projectA
mvn install
(module2 builds fine, since projectA contains module1 and module2)
If you MUST build module2 by itself, you will have to create a direct reference
to the binding file in the other project:
${basedir}/../module1/target/classes/jibx/person-binding.xml
I hope this answers your question. This is one of those confusing maven cases.
Don
> multi-modules not being detected with maven-jibx-plugin in Eclipse
> ------------------------------------------------------------------
>
> Key: JIBX-407
> URL: http://jira.codehaus.org/browse/JIBX-407
> Project: JiBX
> Issue Type: Bug
> Components: eclipse-plugin
> Affects Versions: JiBX 1.2.2
> Environment: Linux
> Eclipse Helios
> Reporter: Miguel Almeida
> Assignee: Don Corley
> Attachments: testCase.zip
>
>
> The project structure is:
> projectA:
> |module1
> |module2
> module1 - database classes
> module2 - services (depends on projectA, maven speaking).
> Test case:
> - jibx plugin configured in Module2
> - person-binding.xml in src/main/resources/jibx of Module1
> - Class Person in Module1
> - Plugin configured like:
> <modules>
>
> <module>org.projects:module1</module>
> </modules>
>
> <directory>src/main/resources/jibx</directory>
> <includes>
> <include>*-binding.xml</include>
> - Run the jibx-bind goal in Module2
> Expected result:
> Jibx would pick the -binding file in Module1, because the configuration has a
> reference to it
> Actual result:
> [INFO] Not running JiBX binding compiler (restricted multi-module mode) - no
> binding files
> I attach a sample case. It consists of the Eclipse projects referenced here.
> To check the behavior:
> - Put the projects in a workspace
> - Run the jibx:bind goal in Eclipse on Module2.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs