Responses inline.<br><br>Thanks,<br>Lincoln<br><br><div class="gmail_quote">On Thu, Mar 1, 2012 at 4:38 PM, Richard Kennard <span dir="ltr">&lt;<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lincoln,<br>
<br>
Can I ask you to clarify some things:<br>
<br>
1. When you say &#39;compile time dependency&#39; do you mean &lt;scope&gt;provided&lt;/scope&gt; or &lt;scope&gt;compile&lt;/scope&gt;? I note that hibernate-jpa-api.jar is already<br>
shipped with Forge, so I&#39;d be keen to reuse that rather than embed a new JAR if possible?<br></blockquote><div><br>Either should be fine. Don&#39;t worry about re-using dependencies. The idea of Modular classloading is that you can clutter all you want and things will still be isolated here. We&#39;re also not concerned with wasting space at this point since plugins are installed separately from the runtime.<br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2. Which JAR should I be attaching to? hibernate-jpa-api.jar or persistence-api.jar? Because I don&#39;t think the latter is shipped with Forge?<br></blockquote><div><br>Either, see above.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
3. I&#39;ve hit half a dozen gotchas like this between unit tests and testing &#39;for real&#39;. I know I&#39;ve mentioned this before, but it really brings home the need<br>
for an integration test environment for Forge that is more realistic than forge-test-harness. It&#39;d be awesome if we could move in that direction.<br></blockquote><div><br>It would be awesome :) however, if you could identify specific gotchas, that would help until this becomes a reality.<br>
<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
<br>
Richard.<br>
<div class="im"><br>
On 2/03/2012 4:22 AM, Lincoln Baxter, III wrote:<br>
&gt; Add the javax.persistence APIs as a compile time dependency to your plugin&#39;s POM. This is expected behavior AFAIK.<br>
&gt;<br>
&gt; Unfortunately, I believe you are probably seeing these classes resolve in your IDE because of this pom.xml entry:<br>
&gt;<br>
&gt; &lt;dependency&gt;<br>
&gt; &lt;groupId&gt;org.jboss.forge&lt;/groupId&gt;<br>
&gt; &lt;artifactId&gt;forge-javaee-impl&lt;/artifactId&gt;<br>
&gt; &lt;version&gt;${forge.version}&lt;/version&gt;<br>
&gt; &lt;scope&gt;test&lt;/scope&gt;<br>
&gt; &lt;/dependency&gt;<br>
&gt;<br>
&gt; Which is needed for testing... Damn the IDEs.<br>
&gt;<br>
&gt; ~Lincoln<br>
&gt;<br>
</div><div><div class="h5">&gt; On Thu, Mar 1, 2012 at 1:41 AM, Richard Kennard &lt;<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a> &lt;mailto:<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a>&gt;&gt; wrote:<br>

&gt;<br>
&gt;     Hi guys,<br>
&gt;<br>
&gt;     I&#39;m struggling to get the AeroGear plugin working. It runs fine in unit tests, but when packaged as a standalone plugin I get the error below.<br>
&gt;<br>
&gt;     It appears my module does not have access to javax.persistence.* (hibernate-jpa-2.0-api-1.0.1.Final.jar or similar). How do I declare this dependency?<br>
&gt;<br>
&gt;     Regards,<br>
&gt;<br>
&gt;     Richard.<br>
&gt;<br>
&gt;     ---<br>
&gt;<br>
&gt;     [test] test $ scaffold from-entity  com.test.model.* --scaffoldType aerogear<br>
&gt;     java.lang.reflect.InvocationTargetException<br>
&gt;             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
&gt;             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
&gt;             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&gt;             at java.lang.reflect.Method.invoke(Method.java:597)<br>
&gt;             at org.jboss.forge.shell.command.Execution.perform(Execution.java:149)<br>
&gt;             at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)<br>
&gt;             at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)<br>
&gt;             at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:829)<br>
&gt;             at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:852)<br>
&gt;             at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:642)<br>
&gt;             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
&gt;             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
&gt;             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&gt;             at java.lang.reflect.Method.invoke(Method.java:597)<br>
&gt;             at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)<br>
&gt;             at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)<br>
&gt;             at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)<br>
&gt;             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
&gt;             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
&gt;             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&gt;             at java.lang.reflect.Method.invoke(Method.java:597)<br>
&gt;             at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)<br>
&gt;             at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)<br>
&gt;             at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)<br>
&gt;             at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)<br>
&gt;             at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)<br>
&gt;             at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)<br>
&gt;             at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)<br>
&gt;             at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)<br>
&gt;             at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)<br>
&gt;             at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)<br>
&gt;             at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)<br>
&gt;             at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)<br>
&gt;             at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)<br>
&gt;             at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:120)<br>
&gt;             at java.lang.Thread.run(Thread.java:662)<br>
&gt;     Caused by: java.lang.NoClassDefFoundError: javax/persistence/Lob<br>
&gt;             at org.metawidget.inspector.jpa.JpaInspector.inspectProperty(JpaInspector.java:86)<br>
&gt;             at org.metawidget.inspector.impl.BaseObjectInspector.inspectTraits(BaseObjectInspector.java:343)<br>
&gt;             at org.metawidget.inspector.impl.BaseObjectInspector.inspectAsDom(BaseObjectInspector.java:243)<br>
&gt;             at org.metawidget.inspector.impl.BaseObjectInspector.inspectAsDom(BaseObjectInspector.java:69)<br>
&gt;             at org.metawidget.inspector.composite.CompositeInspector.runInspector(CompositeInspector.java:241)<br>
&gt;             at org.metawidget.inspector.composite.CompositeInspector.runInspectors(CompositeInspector.java:220)<br>
&gt;             at org.metawidget.inspector.composite.CompositeInspector.inspectAsDom(CompositeInspector.java:167)<br>
&gt;             at org.metawidget.inspector.composite.CompositeInspector.inspectAsDom(CompositeInspector.java:151)<br>
&gt;             at org.metawidget.inspector.composite.CompositeInspector.inspectAsDom(CompositeInspector.java:53)<br>
&gt;             at org.metawidget.pipeline.base.BasePipeline.inspectAsDom(BasePipeline.java:344)<br>
&gt;             at org.metawidget.statically.StaticMetawidget.inspect(StaticMetawidget.java:305)<br>
&gt;             at org.metawidget.statically.StaticMetawidget.write(StaticMetawidget.java:251)<br>
&gt;             at org.jboss.forge.scaffold.aerogear.AeroGearScaffold.generateFromEntity(AeroGearScaffold.java:218)<br>
&gt;             at org.jboss.forge.scaffold.plugins.ScaffoldPlugin.generateFromEntity(ScaffoldPlugin.java:174)<br>
&gt;             ... 36 more<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     forge-dev mailing list<br>
</div></div>&gt;     <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>&gt;<br>
<div class="HOEnZb"><div class="h5">&gt;     <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Lincoln Baxter, III<br>
&gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &quot;Keep it Simple&quot;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; forge-dev mailing list<br>
&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br>
_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>