Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Maven Multi-Module Project in RTC Source Control

Has anyone been able to utilize RTC Source Control on a multi-module maven project created using the m2eclipse plugin to share module projects as individual components? As far as I can tell, RTC source control cannot handle the nested project structure. I am getting a NullPointerException when I try and share a module project with a component.


0 votes



7 answers

Permanent link
I'm also interested !

What are the best practices for sharing a Maven project/module ?

0 votes


Permanent link
Can you provide more details about the NPE? Ideally file it as a bug against RTC, but if it's easier you can just post it here and I'll do so.

For running Maven builds, you can create a Maven build definition, pointing it at the main POM. I'd be interested to hear whether this works for multi-module projects too, and your thoughts on how we can improve our Maven support.

0 votes


Permanent link
I'd be interested to hear whether this works for multi-module projects too, and your thoughts on how we can improve our Maven support.


Nick, if you want to see a perfect integration between Maven and a build engine then take a look at Hudson.

0 votes


Permanent link
I found a solution

In a standard maven multi-module project, we have a hierarchical project layout, module directories are in the parent directory

The solution is to place module directories on the same level as the parent.

So parent pom.xml must contains :

<modules>
<module>../module1</module>
<module>../module2</module>

</modules>

and modules pom.xml :

<parent>
<artifactId>artifact</artifactId>
<groupId>group</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>

And that's it, Jazz SCM can now store your maven modules as individual component

0 votes


Permanent link
Thanks for clarifying. It still shouldn't fail with an NPE if you have some other organization though. Can you provide details about that failure?

0 votes


Permanent link
As example, this is the NPE thrown:


<?xml version="1.0" encoding="UTF-8"?>
<error-report locale="en_US" product-bundle-version="8.0.0.v20101115" product-id="com.ibm.rational.rsa4ws.product.v80.ide" product-name="Rational Software Architect for WebSphere Software" time="Fri Feb 04 14:14:41 GYT 2011" version="1.2">
<about Version="8.0.1" mapping0="$BUILD_ID" mapping1="8.0.1"/>
<platform platform-arch="x86" platform-name="Windows XP" platform-version="5.1 build 2600 Service Pack 3"/>
<status code="2" message="An internal error occurred during: "Sharing Projects"." plugin-id="org.eclipse.core.jobs" plugin-version="3.5.1.R36x_v20100824" severity="4">
<exception type="java.lang.NullPointerException">
<trace class="org.eclipse.core.runtime.Path" method="<init>"/>
<trace class="com.ibm.team.filesystem.client.internal.MetadataUpdateJob$UpdateRequest" method="getLockPath"/>
<trace class="com.ibm.team.filesystem.client.internal.MetadataUpdateJob" method="queue"/>
<trace class="com.ibm.team.filesystem.client.internal.MetadataUpdateJob" method="queueUpdate"/>
<trace class="com.ibm.team.filesystem.client.internal.ManagedFileStore" method="requestBackgroundMetadataUpdate"/>
<trace class="com.ibm.team.filesystem.client.internal.ManagedFileStore" method="mkdir"/>
<trace class="org.eclipse.core.internal.resources.ResourceTree" method="moveProjectContent"/>
<trace class="org.eclipse.core.internal.resources.ResourceTree" method="standardMoveProject"/>
<trace class="org.eclipse.core.internal.resources.Project" method="move"/>
<trace class="com.ibm.team.filesystem.rcp.core.internal.resources.ApoRepositoryProvider" method="configureProject"/>
<trace class="org.eclipse.team.core.RepositoryProvider" method="configure"/>
<trace class="org.eclipse.team.core.RepositoryProvider" method="map"/>
<trace class="com.ibm.team.filesystem.rcp.core.internal.resources.ApoRepositoryProvider" method="map"/>
<trace class="com.ibm.team.filesystem.rcp.core.internal.resources.ApoRepositoryProvider" method="map"/>
<trace class="com.ibm.team.internal.filesystem.ui.wizards.sharing.SharingWizardInput" method="performMap"/>
<trace class="com.ibm.team.internal.filesystem.ui.wizards.sharing.SharingWizardInput" method="access$1"/>
<trace class="com.ibm.team.internal.filesystem.ui.wizards.sharing.SharingWizardInput$2" method="run"/>
<trace class="org.eclipse.core.internal.resources.Workspace" method="run"/>
<trace class="org.eclipse.core.internal.resources.Workspace" method="run"/>
<trace class="com.ibm.team.internal.filesystem.ui.wizards.sharing.SharingWizardInput" method="autoconnectProjects"/>
<trace class="com.ibm.team.internal.filesystem.ui.wizards.sharing.SharingWizard$2" method="filesystemRun"/>
<trace class="com.ibm.team.filesystem.ui.operations.FileSystemUIOperation" method="repositoryRun"/>
<trace class="com.ibm.team.repository.rcp.ui.operations.RepositoryOperation" method="run"/>
<trace class="com.ibm.team.repository.rcp.ui.operations.JobRunner" method="run"/>
<trace class="com.ibm.team.repository.rcp.ui.operations.JobRunner$1" method="run"/>
<trace class="org.eclipse.core.internal.jobs.Worker" method="run"/>
</exception>
</status>
</error-report>

0 votes


Permanent link
Thanks Lucas. This issue has been fixed in 3.0.
For details, see 126332: NPEs occur if sandbox nested within an Eclipse project.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 29 '10, 10:18 a.m.

Question was seen: 12,622 times

Last updated: Mar 29 '10, 10:18 a.m.

Confirmation Cancel Confirm