-
1. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
fbricon Jan 10, 2012 6:50 AM (in response to rfinlayson)Have you installed the JBoss Packaging Maven configurators feature from the JBoss tools update site?
Do you see the JBoss Sar facet available from any project properties > Project facets (indicates SAR support is installed/started)
Also, can you please create a bug report at https://issues.jboss.org/browse/JBIDE, attaching a test project so we can reproduce the problem
-
2. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
rob.stryker Jan 11, 2012 3:01 AM (in response to fbricon)Judging by the stack trace, he has a reference with a null url. This almost always violates spec, unless the reference is consumed rather than used. Either way, it's obvious that ExportedClassFolderReferenceResolver should at least guard against the possibility of a null reference url.
I'm committing a simple guard check. The logic here is that if the url is null, it cannot possibly be an ExportedClassFolderReferenceResolver reference, since all such references have a url beginning with module:/org.jboss.ide.eclipse.as.wtp.core.vcf.exportedClassFolders
A null reference url cannot be an ExportedClassFolderReferenceResolver. The null check will ensure this method returns false.
-
3. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
chmanosh Sep 25, 2012 2:45 PM (in response to rob.stryker)Hi,
I also have the same issue, I could not use maven SAR project inside eclipse (Tried Helios, indigo and even Juno with latest jboss tools dev build). Infact I have to close SAR project in order to add any other web/esb projects to JBoss EAP. Has this ever been resolved?
I am also attaching the maven code to recreate the issue. One thing I observed is maven jboss packaging m2e plugin is not generating the eclipse files correctly for SAR. Contents of the "org.eclipse.wst.common.component", in .setting folder, is missing an attribute 'handle'(in this case it should be handle="module:/resource/test-common/test-common"). With out the "handle" attribute, i could not open "deployment Assembly" page in properties (right click on sar project -> properties -> Deployment Assembly). Once I have the handle defined i could open Deployment Assembly page and can add SAR project shows up in the list to add to the server.
Here is the .settings/"org.eclipse.wst.common.component" file contents
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="test-sar">
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
<dependent-module archiveName="test-common-1.0-SNAPSHOT.jar" deploy-path="/lib">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="target/classes"/>
</wb-module>
</project-modules>
Can someone please take a look into it. Please let me know if you need any more details.
-
test-maven-sar.zip 5.3 KB
-
-
4. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
fbricon Sep 26, 2012 5:43 AM (in response to chmanosh)Thanks for the test project, now I can reproduce the problem.
Please open a bug on JBT's maven component https://issues.jboss.org/browse/JBIDE/component/12312576, while I'm looking into it.
-
5. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
fbricon Sep 26, 2012 10:03 AM (in response to fbricon)Until this is fixed (JBT 4.0.0.Beta1), here's a workaround for you :
- right click on the sar dependency
- click on Project Facets, convert to Faceted form
- add the Utility Facet.
- repeat for all your sar dependencies
- in the navigator view, open <sar-project>/.settings/org.eclipse.wst.common.component and remove all <dependent-module>s
- update the maven configuration of <sar-project>
-
6. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
dgolovin Sep 26, 2012 2:10 PM (in response to rob.stryker) -
7. Re: jboss-packaging-maven-plugin jboss-sar + m2e + JBT = NPE
fbricon Oct 2, 2012 6:02 AM (in response to fbricon)A fixed jboss-sar configurator is available on the nightly build update site : http://download.jboss.org/jbosstools/builds/staging/jbosstools-4.0_trunk.component--maven/all/
It requires m2e-wtp 0.16.0