You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeremy Whiting <wh...@hotmail.com> on 2009/04/23 16:08:08 UTC

Re: eclipse and maven discrepancies

Hi,
  I had the same problem running caveat emptor in eclipse. The explanation
was touched on earlier in this thread but not identified as the reason.

 The compiled classes have been placed alongside the source file folders in
Eclipse. And this means the class files cannot be loaded for the TestNG
framework because the classes are expected to be in the default place for a
Maven enabled project

test/classes

  To things working uncheck the checkbox called "Allow output folders for
source folders". This will copy the compiled classes (and resource) put into
test/classes.
  You can find the "Allow output folders for source folders" checkbox in  >
Java Build Path > Source (tab)

 And make sure the output folder is:
yourprojectname/target/classes

  Good luck.

Regards,
Jeremy


rolfst wrote:
> 
> Hi Wayne,
> 
> I have the tests working in eclipse, but not in maven.
> And even then eclipse and maven need to work together because of some
> problems in project building with eclipse.
> 
> As I've stated before for some reason my maven build fails with testng
> because surefire and testng and the embedded container do not work well
> together.
> 
> in the log I see that jboss finds the sessionbeans I've created. but when
> I
> do a lookup the only thing I am able to retrieve is the user transaction.
> every other object (entitymanagerfactory, sessionbeans) could not be
> retrieved from jndi
> 
> any clue?
> Rolf
> 
> On 4/2/07, Wayne Fay <wa...@gmail.com> wrote:
>>
>> Rolf, just wondering how far along you got in converting the
>> CaveatEmptor JPA/EJB3/Hibernate app from Ant to Maven... I've been
>> working on this myself some this morning.
>>
>> Were you ever 100% successful? Assuming you were, we should send your
>> modified zip to Hibernate for inclusion on their download page.
>>
>> Also, why is the JBoss stuff only available on the Andromda repo? I'd
>> hope JBoss would host it, or perhaps even Central.
>>
>> Wayne
>>
>> On 4/2/07, Thorsten Heit <th...@gmx.de> wrote:
>> > Hi Rolf,
>> >
>> >
>> > > this is not a junit test but a testng.
>> > > Transactions are handled in the testmethods themselves.
>> > > The error messages are not describing the real error.
>> > > The problem is that for some reason during the maven execution of the
>> > > test.
>> > > Testng and the embeddable ejb container  have some conflicts but  I
>> don't
>> > > see why
>> > > I  know this only by looking at the first  error  and  having
>> commented
>> > > out
>> > > a line in the second test (transaction.begin) than the second test
>> fails
>> > > by
>> > > stating that a session bean was not bound/found.
>> >
>> > Sorry, but I don't know TestNG, only JUnit... According to the
>> exception
>> I'd assume that there _is_ a problem with correctly opening and closing
>> the
>> transaction. If not, then at least with the initialization and/or
>> shutdown
>> of your test class / test method...
>> >
>> > Without knowing your source I'm wondering whether your failing test
>> class can run standalone or relies on others for doing its checks, for
>> example via static initializers, during init/shutdown etc. Have you
>> checked
>> that?
>> >
>> >
>> > Cheers
>> >
>> > Thorsten
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/eclipse-and-maven-discrepancies-tp9733929p23197348.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org