<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    My guess is it's an issue using an @ProjectScoped injection point,
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
href="https://github.com/forge/plugin-jboss-as/blob/master/src/main/java/org/jboss/as/forge/ProjectConfiguration.java">https://github.com/forge/plugin-jboss-as/blob/master/src/main/java/org/jboss/as/forge/ProjectConfiguration.java</a>.<br>
    <br>
    What is the best way to check that a valid ProjectConfiguration was
    injected or am I just doing this wrong?<br>
    <br>
    <div class="moz-cite-prefix">On 04/28/2013 12:23 PM, Lincoln Baxter,
      III wrote:<br>
    </div>
    <blockquote
cite="mid:CAEp_U4FiQVVeUtVRQFkhDgZuAFGaV126CuvXUZBO3e2_ke+O=Q@mail.gmail.com"
      type="cite">
      <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">&nbsp;? Use
              [/Users/lb3/Desktop/example2] as project directory? [Y/n]&nbsp;</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 "set VERBOSE false" 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 class=""
                style="white-space:pre"> </span>at
org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:667)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.as.forge.ProjectConfiguration$Proxy$_$$_WeldClientProxy.getJbossHome(ProjectConfiguration$Proxy$_$$_WeldClientProxy.java)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.as.forge.AS7ServerFacet.isInstalled(AS7ServerFacet.java:92)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.project.services.ProjectFactory.createProject(ProjectFactory.java:146)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.shell.plugins.builtin.NewProjectPlugin.create(NewProjectPlugin.java:205)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              sun.reflect.NativeMethodAccessorImpl.invoke0(Native
              Method)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              java.lang.reflect.Method.invoke(Method.java:601)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.forge.shell.command.Execution.perform(Execution.java:141)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              sun.reflect.NativeMethodAccessorImpl.invoke0(Native
              Method)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              java.lang.reflect.Method.invoke(Method.java:601)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              sun.reflect.NativeMethodAccessorImpl.invoke0(Native
              Method)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              java.lang.reflect.Method.invoke(Method.java:601)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172)</font></div>
          <div><font face="courier new, monospace"><span class=""
                style="white-space:pre"> </span>at
              java.lang.Thread.run(Thread.java:722)</font></div>
        </div>
      </div>
      <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
              moz-do-not-send="true"
              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's the case, then just use the
              `protected Project` or `public getProject()` in the Facet
              instead! :D</div>
            <div class="HOEnZb">
              <div class="h5">
                <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
                        moz-do-not-send="true"
                        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're not using @Inject Project
                          project; inside a facet. I get this error by
                          doing this.</div>
                        <div><br>
                          Em 28/04/2013, &agrave;s 11:20, "Lincoln Baxter, III"
                          &lt;<a moz-do-not-send="true"
                            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'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">&nbsp;</font></div>
                                    <div><font face="courier new,
                                        monospace">[no project] Desktop
                                        $ new-project --named example</font></div>
                                    <div><font face="courier new,
                                        monospace">&nbsp;? Use
                                        [/Users/lb3/Desktop/example] as
                                        project directory? [Y/n]&nbsp;</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 "set VERBOSE true" 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">&nbsp;name: generated-pom</font></div>
                                    <div><font face="courier new,
                                        monospace">&nbsp;groupId:
                                        &nbsp;org.jboss.forge.generated</font></div>
                                    <div><font face="courier new,
                                        monospace">&nbsp;final artifact:
                                        &nbsp;generated-pom-1.0.0-SNAPSHOT.jar</font></div>
                                    <div><font face="courier new,
                                        monospace">&nbsp;packaging: &nbsp;jar</font></div>
                                    <div><font face="courier new,
                                        monospace">&nbsp;dir:
                                        &nbsp;/Users/lb3/Desktop/example</font></div>
                                    <div><font face="courier new,
                                        monospace">[generated-pom]
                                        example $&nbsp;</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
                                        moz-do-not-send="true"
                                        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'll take a look when
                                                I'm back from this trip,
                                                but I'm sure it'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
                                                      moz-do-not-send="true"
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'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
                                                        moz-do-not-send="true"
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
                                                      moz-do-not-send="true"
href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
                                                    <a
                                                      moz-do-not-send="true"
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
                                                  moz-do-not-send="true"
href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>
                                                "Simpler is better." </div>
                                              <br>
                                              <fieldset></fieldset>
                                              <br>
                                              <pre>_______________________________________________
forge-dev mailing list
<a moz-do-not-send="true" href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true"
                                        href="mailto:forge-dev@lists.jboss.org"
                                        target="_blank">forge-dev@lists.jboss.org</a><br>
                                      <a moz-do-not-send="true"
                                        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 moz-do-not-send="true"
                                    href="http://ocpsoft.org"
                                    target="_blank">http://ocpsoft.org</a><br>
                                  "Simpler is better."
                                </div>
                              </div>
                            </blockquote>
                            <blockquote type="cite">
                              <div><span>_______________________________________________</span><br>
                                <span>forge-dev mailing list</span><br>
                                <span><a moz-do-not-send="true"
                                    href="mailto:forge-dev@lists.jboss.org"
                                    target="_blank">forge-dev@lists.jboss.org</a></span><br>
                                <span><a moz-do-not-send="true"
                                    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 moz-do-not-send="true"
                        href="mailto:forge-dev@lists.jboss.org"
                        target="_blank">forge-dev@lists.jboss.org</a><br>
                      <a moz-do-not-send="true"
                        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 moz-do-not-send="true" href="http://ocpsoft.org"
                    target="_blank">http://ocpsoft.org</a><br>
                  "Simpler is better."
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        Lincoln Baxter, III<br>
        <a moz-do-not-send="true" href="http://ocpsoft.org"
          target="_blank">http://ocpsoft.org</a><br>
        "Simpler is better."
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
forge-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
James R. Perkins
JBoss by Red Hat</pre>
  </body>
</html>