For some reason arquillan cannot see javax.inject.Inject, and this is what
is causing your problems.
in org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher#enrich the
check for isClassPresent to see if @Inject is available on the class path
is failing. This is most likely due to a problem with the module definition.
I am not sure if I will have time to work out a fix before my plane leaves.
Stuart
On Fri, Nov 2, 2012 at 12:20 PM, Lincoln Baxter, III <
lincolnbaxter(a)gmail.com> wrote:
Re-copying lost cc's. Sorry about that.
On Thu, Nov 1, 2012 at 9:20 PM, Lincoln Baxter, III <
lincolnbaxter(a)gmail.com> wrote:
> Ah thanks. Correct you are, that would be a problem :) Can you work
> around this for now by removing the FAR plugin from the reactor build? I'll
> check in the change in a moment.
>
>
>
> On Thu, Nov 1, 2012 at 9:18 PM, Stuart Douglas <
> stuart.w.douglas(a)gmail.com> wrote:
>
>> Basically far-maven-plugin has a dep on the parent, however the parent
>> has a dep on far-maven-plugin.
>>
>> It will work fine if you already have the parent in your local repo.
>>
>> [INFO] Scanning for projects...
>>> Downloading:
http://snapshots.repository.**
>>>
codehaus.org/org/jboss/forge/**far-maven-plugin/maven-**metadata.xml<h...
>>> Downloading:
https://repository.jboss.org/**nexus/content/repositories/
>>>
**snapshots/org/jboss/forge/far-**maven-plugin/maven-metadata.**xml<https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/forge/far-maven-plugin/maven-metadata.xml>
>>> Downloading:
http://twdata-m2-repository.**
>>>
googlecode.com/svn/org/jboss/**forge/far-maven-plugin/maven-**
>>>
metadata.xml<http://twdata-m2-repository.googlecode.com/svn/org/jboss/...
>>> Downloading:
https://repository.jboss.org/**
>>> nexus/content/groups/public-**jboss/org/jboss/forge/far-**
>>>
maven-plugin/maven-metadata.**xml<https://repository.jboss.org/nexus/c...
>>> Downloading:
http://repo1.maven.org/maven2/**org/jboss/forge/far-maven-
>>>
**plugin/maven-metadata.xml<http://repo1.maven.org/maven2/org/jboss/forge/far-maven-plugin/maven-metadata.xml>
>>> Downloading:
http://snapshots.repository.**
>>>
codehaus.org/org/jboss/forge/**forge-parent/2.0.0-SNAPSHOT/**
>>>
maven-metadata.xml<http://snapshots.repository.codehaus.org/org/jboss/...
>>> Downloading:
http://twdata-m2-repository.**
>>>
googlecode.com/svn/org/jboss/**forge/forge-parent/2.0.0-**
>>>
SNAPSHOT/maven-metadata.xml<http://twdata-m2-repository.googlecode.com...
>>> Downloading:
https://repository.jboss.org/**
>>> nexus/content/groups/public-**jboss/org/jboss/forge/forge-**
>>>
parent/2.0.0-SNAPSHOT/maven-**metadata.xml<https://repository.jboss.or...
>>> Downloading:
https://repository.jboss.org/**nexus/content/repositories/
>>> **snapshots/org/jboss/forge/**forge-parent/2.0.0-SNAPSHOT/**
>>>
maven-metadata.xml<https://repository.jboss.org/nexus/content/reposito...
>>> Downloading:
http://snapshots.repository.**
>>>
codehaus.org/org/jboss/forge/**forge-parent/2.0.0-SNAPSHOT/**
>>>
forge-parent-2.0.0-SNAPSHOT.**pom<http://snapshots.repository.codehaus...
>>> Downloading:
http://twdata-m2-repository.**
>>>
googlecode.com/svn/org/jboss/**forge/forge-parent/2.0.0-**
>>>
SNAPSHOT/forge-parent-2.0.0-**SNAPSHOT.pom<http://twdata-m2-repository...
>>> Downloading:
https://repository.jboss.org/**
>>> nexus/content/groups/public-**jboss/org/jboss/forge/forge-**
>>>
parent/2.0.0-SNAPSHOT/forge-**parent-2.0.0-SNAPSHOT.pom<https://reposi...
>>> Downloading:
https://repository.jboss.org/**nexus/content/repositories/
>>> **snapshots/org/jboss/forge/**forge-parent/2.0.0-SNAPSHOT/**
>>>
forge-parent-2.0.0-SNAPSHOT.**pom<https://repository.jboss.org/nexus/c...
>>> [ERROR] The build could not read 2 projects -> [Help 1]
>>> [ERROR]
>>> [ERROR] The project org.jboss.forge:forge-example-**plugin:2.0.0-SNAPSHOT
>>> (/Users/stuartdouglas/**workspace/forge/forge-example-**plugin/pom.xml)
>>> has 2 errors
>>> [ERROR] Unresolveable build extension: Error resolving version for
>>> plugin 'org.jboss.forge:far-maven-**plugin' from the repositories
>>> [local (/Users/stuartdouglas/.m2/**repository),
>>> codehaus-plugins-snapshots
(
http://snapshots.repository.**codehaus.org/<http://snapshots.repositor...),
>>> twdata-m2-repository
(
http://twdata-m2-repository.**googlecode.com/svn/<http://twdata-m2-rep...),
>>> jboss-public-repository-group (
https://repository.jboss.org/**
>>>
nexus/content/groups/public-**jboss/<https://repository.jboss.org/nexu...),
>>> jboss-snapshots-repository-**group (
https://repository.jboss.org/**
>>>
nexus/content/repositories/**snapshots/<https://repository.jboss.org/n...),
>>> central
(
http://repo1.maven.org/**maven2)<http://repo1.maven.org/maven2)>]:
>>> Plugin not found in any plugin repository -> [Help 2]
>>> [ERROR] Unknown packaging: far @ line 12, column 15
>>> [ERROR]
>>> [ERROR] The project org.jboss.forge:forge-**
>>> otherexample-plugin:2.0.0-**SNAPSHOT (/Users/stuartdouglas/**
>>> workspace/forge/forge-**otherexample-plugin/pom.xml) has 2 errors
>>> [ERROR] Unresolveable build extension: Plugin
>>> org.jboss.forge:far-maven-**plugin:2.0.0-SNAPSHOT or one of its
>>> dependencies could not be resolved: Failed to collect dependencies for
>>> org.jboss.forge:far-maven-**plugin:jar:2.0.0-SNAPSHOT (): Failed to
>>> read artifact descriptor for
org.jboss.forge:far-maven-**plugin:jar:2.0.0-SNAPSHOT:
>>> Failure to find org.jboss.forge:forge-parent:**pom:2.0.0-SNAPSHOT in
>>>
http://snapshots.repository.**codehaus.org/<http://snapshots.repositor...
cached in the local repository, resolution will not be reattempted
>>> until the update interval of codehaus-plugins-snapshots has elapsed or
>>> updates are forced -> [Help 3]
>>> [ERROR] Unknown packaging: far @ line 11, column 15
>>> [ERROR]
>>> [ERROR] To see the full stack trace of the errors, re-run Maven with
>>> the -e switch.
>>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>>> [ERROR]
>>> [ERROR] For more information about the errors and possible solutions,
>>> please read the following articles:
>>> [ERROR] [Help 1]
http://cwiki.apache.org/**confluence/display/MAVEN/**
>>>
ProjectBuildingException<http://cwiki.apache.org/confluence/display/MA...
>>> [ERROR] [Help 2]
http://cwiki.apache.org/**confluence/display/MAVEN/**
>>>
PluginVersionResolutionExcepti**on<http://cwiki.apache.org/confluence/...
>>> [ERROR] [Help 3]
http://cwiki.apache.org/**confluence/display/MAVEN/**
>>>
PluginResolutionException<http://cwiki.apache.org/confluence/display/M...
>>>
>>
>>
>>
>> Lincoln Baxter, III wrote:
>>
>>> Could you copy the error in here? I believe you just need to build the
>>> far-maven-plugin/ project first.
>>>
>>>
>>> On Thu, Nov 1, 2012 at 9:01 PM, Stuart Douglas
>>> <stuart.w.douglas(a)gmail.com
<mailto:stuart.w.douglas@**gmail.com<stuart.w.douglas@gmail.com>>>
>>> wrote:
>>>
>>> It looks like you have circular dependencies in that branch that
>>> means it is not buildable with a clean maven repository (remove all
>>> org.jboss.forge artifacts from your local repo and you should see
>>> what I mean).
>>>
>>>
>>>
>>> Stuart
>>>
>>> Lincoln Baxter, III wrote:
>>>
>>> FYI - This is how it should look when you reproduce the problem.
>>> What's
>>> happening in this case is that Forge is starting up just fine
>>> in the
>>> test, but for some reason the ContainerServiceExtension is not
>>> intercepting the service classes deployed in one of the addons.
>>>
>>> This makes me think that the system classloader is being scanned
>>> properly, but that there is a subtle problem with the module
>>> structure
>>> defined by AddonModuleLoader that is preventing these classes
>>> from being
>>> scanned. Either that, or the ModularURLScanner class requires
>>> modifications to work within the Surefire environment.
>>>
>>> ------------------------------**__-------------------------
>>>
>>> T E S T S
>>> ------------------------------**__-------------------------
>>> Running org.example.__**AddonDependencyTest
>>> Starting addon(s) [dependency:main]
>>> Nov 1, 2012 7:12:23 PM org.jboss.weld.bootstrap.__**
>>> WeldBootstrap
>>>
>>> <clinit>
>>> INFO: WELD-000900 2.0.0 (Alpha3)
>>> Nov 1, 2012 7:12:24 PM org.jboss.weld.bootstrap.__**
>>> WeldBootstrap
>>>
>>> startContainer
>>> INFO: WELD-000101 Transactional services not available.
>>> Injection of
>>> @Inject UserTransaction not available. Transactional observers
>>> will be
>>> invoked synchronously.
>>> Nov 1, 2012 7:12:24 PM
>>> org.jboss.weld.interceptor.__**util.InterceptionTypeRegistry
>>> <clinit>
>>>
>>> WARNING: Class 'javax.ejb.PostActivate' not found,
interception
>>> based on
>>> it is not enabled
>>> Nov 1, 2012 7:12:24 PM
>>> org.jboss.weld.interceptor.__**util.InterceptionTypeRegistry
>>> <clinit>
>>>
>>> WARNING: Class 'javax.ejb.PrePassivate' not found,
interception
>>> based on
>>> it is not enabled
>>> Starting container [dependency:main]
>>> Services loaded from addon module [dependency:main] - [class
>>> org.example.published.__**PublishedService]
>>> Starting addon(s) [919307ca-cd39-46a6-a641-__**
>>> ff50055f6db2:main]
>>> Nov 1, 2012 7:12:27 PM org.jboss.weld.bootstrap.__**
>>> WeldBootstrap
>>>
>>> startContainer
>>> INFO: WELD-000101 Transactional services not available.
>>> Injection of
>>> @Inject UserTransaction not available. Transactional observers
>>> will be
>>> invoked synchronously.
>>> Starting container [919307ca-cd39-46a6-a641-__**
>>> ff50055f6db2:main]
>>> 2012-11-01 19:12:27.558:INFO:oejs.Server:**
>>> __jetty-8.1.5.v20120716
>>> 2012-11-01 19:12:27.622:INFO:oejs.__**AbstractConnector:Started
>>> SelectChannelConnector@127.0._**_0.1:4141
>>>
<http://**SelectChannelConnector@127.0.**0.1:4141<http://SelectChannelConnector@127.0.0.1:4141>
>>> >
>>> <
http://__**SelectChannelConnector@127.0._**_0.1:4141
>>>
>>>
<http://**SelectChannelConnector@127.0.**0.1:4141<http://SelectChannelConnector@127.0.0.1:4141>
>>> >>
>>>
>>> Remote test server started.
>>> Exception in thread "919307ca-cd39-46a6-a641-__**
>>> ff50055f6db2:main"
>>> org.jboss.forge.container.__**exception.ContainerException:
>>> [Thread -
>>> 919307ca-cd39-46a6-a641-__**ff50055f6db2:main] Error invoking
>>> Task
>>>
>>> within
>>> ClassLoader [ModuleClassLoader for Module
>>> "919307ca-cd39-46a6-a641-__**ff50055f6db2:main" from
>>> AddonModuleLoader]
>>> at
>>> org.jboss.forge.container.__**util.ClassLoaders.executeIn(__**
>>> ClassLoaders.java:33)
>>> at
>>> org.jboss.forge.container.__**AddonRunnable.run(__**
>>> AddonRunnable.java:41)
>>> at java.lang.Thread.run(Thread.__**java:680)
>>> Caused by: java.lang.NullPointerException
>>> at
>>> org.example.consuming.__**ConsumingService.getMessage(__**
>>> ConsumingService.java:25)
>>> at
>>> org.example.consuming.__**ConsumingService.postStartup(_**
>>> _ConsumingService.java:20)
>>> at sun.reflect.__**NativeMethodAccessorImpl.__**
>>> invoke0(Native
>>> Method)
>>> at
>>> sun.reflect.__**NativeMethodAccessorImpl.__**invoke(__**
>>> NativeMethodAccessorImpl.java:**__39)
>>> at
>>> sun.reflect.__**DelegatingMethodAccessorImpl._**_invoke(__**
>>> DelegatingMethodAccessorImpl._**_java:25)
>>> at java.lang.reflect.Method.__**invoke(Method.java:597)
>>> at
>>> org.jboss.weld.util.__**reflection.SecureReflections$_**
>>> _13.work(SecureReflections.__**java:267)
>>> at
>>> org.jboss.weld.util.__**reflection.__**
>>> SecureReflectionAccess.run(__**SecureReflectionAccess.java:__**52)
>>> at
>>> org.jboss.weld.util.__**reflection.__**
>>> SecureReflectionAccess.__**runAsInvocation(__**
>>> SecureReflectionAccess.java:__**137)
>>> at
>>> org.jboss.weld.util.__**reflection.SecureReflections._**
>>> _invoke(SecureReflections.**java:__263)
>>> at
>>> org.jboss.weld.annotated.__**runtime.__**
>>> InvokableAnnotatedMethod.__**invokeOnInstance(__**
>>> InvokableAnnotatedMethod.java:**__82)
>>> at
>>> org.jboss.weld.injection.__**MethodInjectionPoint.__**
>>> invokeOnInstanceWithSpecialVal**__ue(MethodInjectionPoint.**java:__97)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.sendEvent(_**
>>> _ObserverMethodImpl.java:259)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.sendEvent(_**
>>> _ObserverMethodImpl.java:246)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.notify(__**
>>> ObserverMethodImpl.java:221)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.notify(__**
>>> ObserverMethodImpl.java:225)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.__**notifyObserver(__
>>> **ObserverNotifier.java:129)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.__**
>>> notifyObservers(__**ObserverNotifier.java:97)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.fireEvent(__**
>>> ObserverNotifier.java:77)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.fireEvent(__**
>>> ObserverNotifier.java:70)
>>> at
>>> org.jboss.weld.manager.__**BeanManagerImpl.fireEvent(__**
>>> BeanManagerImpl.java:625)
>>> at
>>> org.jboss.forge.container.__**ContainerControlImpl.start(__**
>>> ContainerControlImpl.java:54)
>>> at
>>> org.jboss.forge.container.__**ContainerControlImpl.__**
>>> bootstrap(__**ContainerControlImpl.java:37)
>>> at sun.reflect.__**NativeMethodAccessorImpl.__**
>>> invoke0(Native
>>> Method)
>>> at
>>> sun.reflect.__**NativeMethodAccessorImpl.__**invoke(__**
>>> NativeMethodAccessorImpl.java:**__39)
>>> at
>>> sun.reflect.__**DelegatingMethodAccessorImpl._**_invoke(__**
>>> DelegatingMethodAccessorImpl._**_java:25)
>>> at java.lang.reflect.Method.__**invoke(Method.java:597)
>>> at
>>> org.jboss.weld.util.__**reflection.SecureReflections$_**
>>> _13.work(SecureReflections.__**java:267)
>>> at
>>> org.jboss.weld.util.__**reflection.__**
>>> SecureReflectionAccess.run(__**SecureReflectionAccess.java:__**52)
>>> at
>>> org.jboss.weld.util.__**reflection.__**
>>> SecureReflectionAccess.__**runAsInvocation(__**
>>> SecureReflectionAccess.java:__**137)
>>> at
>>> org.jboss.weld.util.__**reflection.SecureReflections._**
>>> _invoke(SecureReflections.**java:__263)
>>> at
>>> org.jboss.weld.annotated.__**runtime.__**
>>> InvokableAnnotatedMethod.__**invokeOnInstance(__**
>>> InvokableAnnotatedMethod.java:**__82)
>>> at
>>> org.jboss.weld.injection.__**MethodInjectionPoint.__**
>>> invokeOnInstanceWithSpecialVal**__ue(MethodInjectionPoint.**java:__97)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.sendEvent(_**
>>> _ObserverMethodImpl.java:259)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.sendEvent(_**
>>> _ObserverMethodImpl.java:246)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.notify(__**
>>> ObserverMethodImpl.java:221)
>>> at
>>> org.jboss.weld.event.__**ObserverMethodImpl.notify(__**
>>> ObserverMethodImpl.java:225)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.__**notifyObserver(__
>>> **ObserverNotifier.java:129)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.__**
>>> notifyObservers(__**ObserverNotifier.java:97)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.fireEvent(__**
>>> ObserverNotifier.java:77)
>>> at
>>> org.jboss.weld.event.__**ObserverNotifier.fireEvent(__**
>>> ObserverNotifier.java:70)
>>> at
>>> org.jboss.weld.manager.__**BeanManagerImpl.fireEvent(__**
>>> BeanManagerImpl.java:625)
>>> at
>>> org.jboss.forge.container.__**AddonRunnable$1.call(__**
>>> AddonRunnable.java:57)
>>> at
>>> org.jboss.forge.container.__**util.ClassLoaders.executeIn(__**
>>> ClassLoaders.java:29)
>>> ... 2 more
>>> Stopping addon(s) [919307ca-cd39-46a6-a641-__**
>>> ff50055f6db2:main]
>>>
>>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
>>> 8.032
>>> sec <<< FAILURE!
>>>
>>>
>>>
>>> On Thu, Nov 1, 2012 at 3:51 PM, Lincoln Baxter, III
>>> <lincolnbaxter(a)gmail.com
<mailto:lincolnbaxter@gmail.**com<lincolnbaxter@gmail.com>
>>> >
>>> <mailto:lincolnbaxter@gmail.__**com
>>>
>>> <mailto:lincolnbaxter@gmail.**com
<lincolnbaxter(a)gmail.com>>>>
>>> wrote:
>>>
>>> Hey Everyone!
>>>
>>> I've been working on Forge 2.0, and it looks like I've
hit
>>> a very
>>> strange problem that I am having difficulty solving. It
>>> involves
>>> Surefire Maven Plugin and the Forge Arquillian tests.
>>>
>>> The tests work fine in eclipse, because Eclipse launches
>>> using a
>>> real java classpath, however...
>>>
>>> Because of how Surefire handles classloading
>>> <
http://maven.apache.org/__**plugins/maven-surefire-plugin/**
>>>
__examples/class-loading.html<http://maven.apache.org/__plugins/maven-...
>>>
>>> <
http://maven.apache.org/**plugins/maven-surefire-plugin/**
>>>
examples/class-loading.html<http://maven.apache.org/plugins/maven-sure...
>>> >>,
>>>
>>> Forge is not properly finding classes, booting weld, and
>>> loading
>>> addons. I've gotten close to a solution a few times, but
>>> I've not
>>> been able to find the exact concoction that gets things
>>> working.
>>>
>>> Anyone have experience with this feel like taking a look?
>>>
>>> Just check out the Forge 2.0 branch from
>>>
https://github.com/forge/core, first *cd* into the
>>> maven-far-plugin
>>>
>>> directory, install it with `mvn clean install`, then return
>>> to the
>>> main directory and run `mvn clean install`, you should then
>>> see the
>>> failures I am describing.
>>>
>>> Thanks!
>>>
>>> --
>>> Lincoln Baxter, III
>>>
http://ocpsoft.org
>>> "Simpler is better."
>>>
>>>
>>>
>>>
>>> --
>>> Lincoln Baxter, III
>>>
http://ocpsoft.org
>>> "Simpler is better."
>>>
>>>
>>>
>>>
>>> --
>>> Lincoln Baxter, III
>>>
http://ocpsoft.org
>>> "Simpler is better."
>>>
>>
>
>
> --
> Lincoln Baxter, III
>
http://ocpsoft.org
> "Simpler is better."
>
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."