Error running Maven Tests with powermock and junit

2011-07-15 Thread Chiara
Hi,
I am not being able to run Powermock through maven. 
I've an ejb 2.0 project and i've put under test folder my test's classes.

Here's the test:

*@RunWith(PowerMockRunner.class)
public class AdapterTest{

@Test
public void testForSqlDate() {
   ..*

I haven't configured anyting special for running my test. My pom references
the following deps:

   
 *   * junit | junit | 4.8.2
* org.easymock |easymock |3.0
* org.powermock | powermock-easymock-release-full |1.4.7*


This part of pom is like this : 

*...
   dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.8.2/version
typejar/type
scopetest/scope
/dependency
dependency
groupIdorg.easymock/groupId
artifactIdeasymock/artifactId
version3.0/version
typejar/type
scopetest/scope
/dependency
dependency
groupIdorg.powermock/groupId
artifactIdpowermock-easymock-release-full/artifactId
version1.4.7/version
typejar/type
classifierfull/classifier
scopetest/scope
/dependency
...*

When i run Maven Test i obtain the following error :

*---
 T E S T S
---
Running TestSuite
Running TestSuite
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.454 sec
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
*


why it doesn't recognise my tests??

Pls help me, i'm new in maven..

Thk's a lot

Chiara




--
View this message in context: 
http://maven.40175.n5.nabble.com/Error-running-Maven-Tests-with-powermock-and-junit-tp4590688p4590688.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



RE: Error running Maven Tests with powermock and junit

2011-07-15 Thread Chiara

Hi, yes i've put all test under this folder.
I don't know what to do seriously.. 'cause if i try to run test using run as 
junit tests it works..

Date: Fri, 15 Jul 2011 06:42:28 -0700
From: ml-node+4590720-191037357-230...@n5.nabble.com
To: chiara_sime...@hotmail.it
Subject: Re: Error running Maven Tests with powermock and junit



On Fri, Jul 15, 2011 at 9:35 AM, Chiara [hidden email] wrote:

 Hi,

 I am not being able to run Powermock through maven.

 I've an ejb 2.0 project and i've put under test folder my test's classes.


Everything looked ok to me.  But to make sure.. Did you put the tests

in project root/src/test/java ?


-- 

Greg Akins

http://twitter.com/akinsgre

-

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]










If you reply to this email, your message will be added to the 
discussion below:

http://maven.40175.n5.nabble.com/Error-running-Maven-Tests-with-powermock-and-junit-tp4590673p4590720.html



To unsubscribe from Error running Maven Tests with powermock 
and junit, click here.
  

--
View this message in context: 
http://maven.40175.n5.nabble.com/Error-running-Maven-Tests-with-powermock-and-junit-tp4590673p4590726.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Error running Maven Tests with powermock and junit

2011-07-15 Thread Chiara
Hi,
I am not being able to run Powermock through maven. 
I've an ejb 2.0 project and i've put under test folder my test's classes.

Here's the test:

*@RunWith(PowerMockRunner.class)
public class AdapterTest{

@Test
public void testForSqlDate() {
   ..*

I haven't configured anyting special for running my test. My pom references
the following deps:

   
 *   * junit | junit | 4.8.2
* org.easymock |easymock |3.0
* org.powermock | powermock-easymock-release-full |1.4.7*


This part of pom is like this : 

*...
   dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.8.2/version
typejar/type
scopetest/scope
/dependency
dependency
groupIdorg.easymock/groupId
artifactIdeasymock/artifactId
version3.0/version
typejar/type
scopetest/scope
/dependency
dependency
groupIdorg.powermock/groupId
artifactIdpowermock-easymock-release-full/artifactId
version1.4.7/version
typejar/type
classifierfull/classifier
scopetest/scope
/dependency
...*

When i run Maven Test i obtain the following error :

*---
 T E S T S
---
Running TestSuite
Running TestSuite
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.454 sec
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
*


why it doesn't recognise my tests??

Pls help me, i'm new in maven..

Thk's a lot

Chiara




--
View this message in context: 
http://maven.40175.n5.nabble.com/Error-running-Maven-Tests-with-powermock-and-junit-tp4590673p4590673.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



RE: Error running Maven Tests with powermock and junit

2011-07-15 Thread Chiara

Yes 'cause my test class is AdapterTest.java

I have to add some specific plugin ??

Plugin i've added to project are :

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdwas6-maven-plugin/artifactId
version1.1.2/version
executions
execution
goals
goalejbdeploy/goal
/goals
/execution
/executions
configuration
wasHome${was61.home}/wasHome
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-ejb-plugin/artifactId
version2.3/version
configuration
ejbVersion2.1/ejbVersion
generateClienttrue/generateClient
archive
manifest
addClasspathtrue/addClasspath
/manifest
indexfalse/index
addMavenDescriptorfalse/addMavenDescriptor
/archive
/configuration
/plugin 

thk a lot

Date: Fri, 15 Jul 2011 07:05:39 -0700
From: ml-node+4590805-1772571158-230...@n5.nabble.com
To: chiara_sime...@hotmail.it
Subject: Re: Error running Maven Tests with powermock and junit



Does your class containing the tests matches the default include 
patterns?

  

http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#includes

includes

include**/Test*.java/include

include**/*Test.java/include

include**/*TestCase.java/include

/includes


Guillaume


Le 15/07/2011 15:51, Greg Akins a écrit :

 On Fri, Jul 15, 2011 at 9:44 AM, Chiara[hidden email]  wrote:

 Hi, yes i've put all test under this folder.

 I don't know what to do seriously.. 'cause if i try to run test using run as 
 junit tests it works..

 So the only change you make.. after the JUnit tests run, is to add the

 @RunWith(PowerMockRunner.class) attribute?



 And then the tests are not recognized?





-

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]










If you reply to this email, your message will be added to the 
discussion below:

http://maven.40175.n5.nabble.com/Error-running-Maven-Tests-with-powermock-and-junit-tp4590673p4590805.html



To unsubscribe from Error running Maven Tests with powermock 
and junit, click here.
  

--
View this message in context: 
http://maven.40175.n5.nabble.com/Error-running-Maven-Tests-with-powermock-and-junit-tp4590673p4590845.html
Sent from the Maven - Users mailing list archive at Nabble.com.

ClassNotFoundException:xml

2003-08-14 Thread Chiara Farges
Hi,
I just installed the latest Maven release.. And as you can see, i am 
just trying to run a simple aspectwerkz sample.. I am getting this 
java.lang.ClassNotFoundException: xml
. Please help..
 
Below is the exception stack..
 
Thanks,
Chiara
 
C:\eclipse\workspace\aspectwerkzmaven aspectwerkz:samples:caching
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-beta-10
java.lang.ClassNotFoundException: xml
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at 
org.apache.commons.jelly.parser.XMLParser.createTag(XMLParser.java:10
39)
at 
org.apache.commons.jelly.parser.XMLParser.startElement(XMLParser.java
:647)
at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:320)
at 
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:207)
at 
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:174)
at 
org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:111)
at 
org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:139)
at 
org.apache.maven.plugin.PluginManager.loadPlugin(PluginManager.java:7
34)
at 
org.apache.maven.plugin.PluginManager.prepDynamicTagLib(PluginManager
.java:611)
at 
org.apache.maven.plugin.PluginManager.prepDynaTagLibs(PluginManager.j
ava:586)
at 
org.apache.maven.plugin.PluginManager.loadPlugin(PluginManager.java:6
86)
at 
org.apache.maven.plugin.PluginManager.prepDynamicTagLib(PluginManager
.java:611)
at 
org.apache.maven.plugin.PluginManager.loadJellyScript(PluginManager.j
ava:471)
at 
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
384)
at 
org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:525)
at org.apache.maven.cli.App.main(App.java:1088)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:543)
at com.werken.forehead.Forehead.main(Forehead.java:573)
java.lang.ClassNotFoundException: xml
at 
org.apache.commons.jelly.parser.XMLParser.createSAXException(XMLParse
r.java:1234)
at 
org.apache.commons.jelly.parser.XMLParser.createTag(XMLParser.java:10
44)
at 
org.apache.commons.jelly.parser.XMLParser.startElement(XMLParser.java
:647)
at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:320)
at 
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:207)
at 
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:174)
at 
org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:111)
at 
org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:139)
at 
org.apache.maven.plugin.PluginManager.loadPlugin