<div dir="ltr">Looks like that is actually the problem. If you want to use ProjectScoped and respond to new-project or project changed events, you might consider using this event instead:<div><br></div><div><a href="https://github.com/forge/core/blob/master/shell-api/src/main/java/org/jboss/forge/shell/events/ProjectChanged.java">https://github.com/forge/core/blob/master/shell-api/src/main/java/org/jboss/forge/shell/events/ProjectChanged.java</a><br>
</div><div><br></div><div style>But you will still need to avoid @Injecting this in the Facet.</div><div><br></div><div style>~Lincoln</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 28, 2013 at 3:23 PM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I should have provided a full stack trace. Silly me!<div><br></div><div><div><font face="courier new, monospace">[no project] Desktop $ new-project --named example2</font></div>
<div><font face="courier new, monospace"> ? Use [/Users/lb3/Desktop/example2] as project directory? [Y/n] </font></div>
<div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example2</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example2/pom.xml</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example2/src/main/java</font></div>

<div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example2/src/test/java</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example2/src/main/resources</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example2/src/test/resources</font></div>

<div><font face="courier new, monospace">***ERROR*** Exception encountered: (type &quot;set VERBOSE false&quot; to disable stack traces)</font></div><div><font face="courier new, monospace">org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type org.jboss.forge.shell.project.ProjectScoped</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:667)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.as.forge.ProjectConfiguration$Proxy$_$$_WeldClientProxy.getJbossHome(ProjectConfiguration$Proxy$_$$_WeldClientProxy.java)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.as.forge.AS7ServerFacet.isInstalled(AS7ServerFacet.java:92)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.project.services.ProjectFactory.createProject(ProjectFactory.java:146)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.plugins.builtin.NewProjectPlugin.create(NewProjectPlugin.java:205)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at java.lang.reflect.Method.invoke(Method.java:601)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.command.Execution.perform(Execution.java:141)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at java.lang.reflect.Method.invoke(Method.java:601)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at java.lang.reflect.Method.invoke(Method.java:601)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172)</font></div>

<div><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>at java.lang.Thread.run(Thread.java:722)</font></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Apr 28, 2013 at 3:21 PM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If that&#39;s the case, then just use the `protected Project` or `public getProject()` in the Facet instead! :D</div>

<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 28, 2013 at 11:33 AM, George Gastaldi <span dir="ltr">&lt;<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Check if you&#39;re not using @Inject Project project; inside a facet. I get this error by doing this.</div>


<div><br>Em 28/04/2013, ās 11:20, &quot;Lincoln Baxter, III&quot; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt; escreveu:<br><br></div><div><div><blockquote type="cite">
<div><div dir="ltr">Hey James,<div><br></div><div>I&#39;ve had a chance to try this out, and it seems like your plugin changes introduce a scenario where `new-project` fails:</div><div><br></div><div><div><font face="courier new, monospace"> </font></div>



<div><font face="courier new, monospace">[no project] Desktop $ new-project --named example</font></div><div><font face="courier new, monospace"> ? Use [/Users/lb3/Desktop/example] as project directory? [Y/n] </font></div>



<div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example/pom.xml</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example/src/main/java</font></div>



<div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example/src/test/java</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example/src/main/resources</font></div><div><font face="courier new, monospace">Wrote /Users/lb3/Desktop/example/src/test/resources</font></div>



<div><font face="courier new, monospace">***ERROR*** Exception encountered: WELD-001303 No active contexts for scope type org.jboss.forge.shell.project.ProjectScoped (type &quot;set VERBOSE true&quot; to enable stack traces)</font></div>



<div><font face="courier new, monospace">[no project] Desktop $ cd example/</font></div><div><font face="courier new, monospace">[generated-pom] example $ ls</font></div><div><font face="courier new, monospace">[generated-pom] example $ project</font></div>



<div><font face="courier new, monospace"> name: generated-pom</font></div><div><font face="courier new, monospace"> groupId:  org.jboss.forge.generated</font></div><div><font face="courier new, monospace"> final artifact:  generated-pom-1.0.0-SNAPSHOT.jar</font></div>



<div><font face="courier new, monospace"> packaging:  jar</font></div><div><font face="courier new, monospace"> dir:  /Users/lb3/Desktop/example</font></div><div><font face="courier new, monospace">[generated-pom] example $ </font></div>



<div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 23, 2013 at 5:44 PM, James R. Perkins <span dir="ltr">&lt;<a href="mailto:jperkins@redhat.com" target="_blank">jperkins@redhat.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Just bumping this to see if anyone had a chance to review it.<div><br>
    <br>
    <div>On 04/04/2013 07:23 PM, Lincoln Baxter,
      III wrote:<br>
    </div>
    </div><div><div><blockquote type="cite">
      <div dir="ltr">Hey James! I&#39;ll take a look when I&#39;m back from this
        trip, but I&#39;m sure it&#39;s great :)<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Apr 4, 2013 at 8:52 PM, James
          R. Perkins <span dir="ltr">&lt;<a href="mailto:jperkins@redhat.com" target="_blank">jperkins@redhat.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello All,<br>
              I&#39;ve spent some time the past 2 weeks attempting to clean
              up the AS7 plugin. The goal was to clear up the confusing
              prompts and fix bugs with the initial approach.<br>
              <br>
              I also added a couple new commands:<br>
              - override: This command allows you to override the
              hostname and port for managing servers listening on
              different hostnames or ports.<br>
              - print-console: This option prints the console output
              captured if the server was started with the as7 start
              command.<br>
              <br>
              I will follow up with a PR documenting the plugin better.<br>
              <br>
              If anyone feels like reviewing and/or testing the plugin
              to make sure it makes sense I would greatly appreciate it.
              The PR is located here <a href="https://github.com/forge/plugin-jboss-as/pull/8" target="_blank">https://github.com/forge/plugin-jboss-as/pull/8</a>.<span><font color="#888888"><br>
                  <pre cols="72">-- 
James R. Perkins
JBoss by Red Hat</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            forge-dev mailing list<br>
            <a href="mailto:forge-dev@lists.jboss.org" target="_blank">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>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        Lincoln Baxter, III<br>
        <a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>
        &quot;Simpler is better.&quot;
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
forge-dev mailing list
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
James R. Perkins
JBoss by Red Hat</pre>
  </div></div></div>

<br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">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></blockquote></div><br><br clear="all"><div><br></div>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>



&quot;Simpler is better.&quot;
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>forge-dev mailing list</span><br><span><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a></span><br>


<span><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></span></div></blockquote></div></div></div><br>_______________________________________________<br>



forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">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></blockquote></div><br><br clear="all"><div><br></div>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>


&quot;Simpler is better.&quot;
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;
</div>