I checked out your changes now, but the class parsing issue from target/classes is still there.
You can test this yourself if you go cd samples/guess and run $> mvn clean package -Pjetty jetty:run and try to login. What happens: OWB finds target/guess/WEB-INF/beans.xml but cannot find WEB-INF/classes there. That's because the jetty-maven-plugin keeps the classes in target/classes to allow hot-deploy and debug/compile on the fly. So I probably wont call this an OWB bug! My simple trick was to add an empty META-INF/beans.xml to src/main/resources which is also necessary if the classes gets bundled into a WEB-INF/lib/classes.jar with the archiveClasses flag of the war plugin [1]. LieGrue, strub [1] http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#archiveClasses --- Gurkan Erdogdu <[email protected]> schrieb am Sa, 18.4.2009: > Von: Gurkan Erdogdu <[email protected]> > Betreff: Re: [jira] Created: (OWB-90) cannot find beans when working locally > with jetty:run > An: [email protected] > Datum: Samstag, 18. April 2009, 10:47 > >>>Can't we only store the > URIs instead of URLs? > > Yeap, it is good idea. we can change it. > > Gurkan > > > > > ________________________________ > From: Mark Struberg <[email protected]> > To: [email protected] > Sent: Saturday, April 18, 2009 10:39:34 AM > Subject: Re: [jira] Created: (OWB-90) cannot find beans > when working locally with jetty:run > > > Thanks for catching that. > Usually I run a full build on a clean checkout after bigger > checkin. But I was an GPRS only the last days. > Can't we only store the URIs instead of URLs? > This would be more resource friendly I think. > > LieGrue, > strub > > --- Gurkan Erdogdu <[email protected]> > schrieb am Sa, 18.4.2009: > > > Von: Gurkan Erdogdu <[email protected]> > > Betreff: Re: [jira] Created: (OWB-90) cannot find > beans when working locally with jetty:run > > An: [email protected], > [email protected] > > Datum: Samstag, 18. April 2009, 7:44 > > > > Hi; > > > > I think that new XML beans.xml loading is not working > > correctly anymore. Because, I got > FileNotFoundExceptions in > > the openwebbeans.tck tests. Problem is that beans.xml > maybe > > in the jar file, but FileInputStream does not find > file with > > given file name > > > > For example in class TCKMetaDataDiscoveryImpl > > > > public void addBeanXml(URL url) > > { > > > Asserts.assertNotNull(url); > > > > addWebBeansXmlLocation(url.getFile()); > > } > > > > url.getFile --> > > > file:/x.jar!/org/jboss/testharness/impl/packaging/jsr299/default/beans.xml > > > > But when FileInputStream get this as input parameter, > > throws Exception. > > > > SOLUTION > > ------------------------ > > > > In class MetaDataDiscoveryService, I changed "public > > Set<String> getWebBeansXmlLocations();" to > "public > > Set<URL> getWebBeansXmlLocations();" and updated > other > > codes accordingly. > > > > Now, it works correctly. Mark could you re-check for > jetty > > container ? > > > > PS : After changing the codes, please check that all > of the > > other maven modules are compiled correctly :) > > > > Thanks; > > > > Gurkan > > > > > > > > > > ________________________________ > > From: Mark Struberg (JIRA) <[email protected]> > > To: [email protected] > > Sent: Saturday, April 18, 2009 1:32:14 AM > > Subject: [jira] Created: (OWB-90) cannot find beans > when > > working locally with jetty:run > > > > cannot find beans when working locally with jetty:run > > ----------------------------------------------------- > > > > > > Key: OWB-90 > > > > URL: https://issues.apache.org/jira/browse/OWB-90 > > > > Project: OpenWebBeans > > Issue > Type: Bug > > > Components: Injection > > and Lookup > > Affects Versions: M1 > > > Reporter: Mark > > Struberg > > > Assignee: Gurkan > > Erdogdu > > > > > > OWB cannot find any beans while running locally in > jetty > > because the beans.xml resides in target/guess/WEB-INF > and > > the classes are in target/classes which isn't scanned > > therefor! > > > > Maybe we can introduce some fix for this in > > WarMetaDataDiscoveryImpl::createURLFromWARFile()? > > > > A possible workaround in the meantime is to also add > an > > empty src/main/resources/META-INF/beans.xml > > > > > > -- > > This message is automatically generated by JIRA. > > - > > You can reply to this email to add a comment to the > issue > > online. > > > > > > > > >
