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.
7 answers
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.
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.
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
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>../module2</module>
</modules>
and modules pom.xml :
<parent>
<artifactId>artifact</artifactId>
<groupId>group</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
And that's it, Jazz SCM can now store your maven modules as individual component
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: &quot;Sharing Projects&quot;." 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="&lt;init&gt;"/>
<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>
<?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: &quot;Sharing Projects&quot;." 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="&lt;init&gt;"/>
<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>
Thanks Lucas. This issue has been fixed in 3.0.
For details, see 126332: NPEs occur if sandbox nested within an Eclipse project.
For details, see 126332: NPEs occur if sandbox nested within an Eclipse project.