Re: Trouble running Maven test case

2009-10-04 Thread Lukas Theussl


Even your second mail is not specific enough to help us help you in any 
meaningful
way. You might profit from reading this:

http://catb.org/~esr/faqs/smart-questions.html

As a first guess I'd like to know if jwebunit-htmlunit-plugin is the only 
jwebunit
dependency you added in your pom? If yes it would explain (some of) the
compilation errors, eg junit.WebTestCase is in jwebunit-core, not
jwebunit-htmlunit-plugin. But that's just a guess...

HTH,
-Lukas


laredotornado wrote:

Yes, I should have been more specific.  Here's how I'm making the call ...

maven -Dtestcase=test.AddToMailingListTest test:single 


and what happens is that I'm getting a bunch of compilation errors, even
though the libraries in question are listed as a dependency in my
project.xml file (I have confirmed the jars are getting downloaded) ...

maven -Dtestcase=test.AddToMailingListTest test:single
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.1

build:start:

test:single:
java:prepare-filesystem:

java:init:

java:compile:
[echo] Compiling to
/Users/dalvarado/source/assistanceUtility/webapp/target/classes
[echo]
==

WARNING: maven.compile.target is not set:
using the default value which depends on your JVM

==


java:jar-resources:

test:prepare-filesystem:

test:test-resources:

test:compile:
[javac] Compiling 1 source file to
/Users/dalvarado/source/assistanceUtility/webapp/target/test-classes
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:9:
package net.sourceforge.jwebunit.junit does not exist
[javac] import net.sourceforge.jwebunit.junit.WebTestCase;
[javac] ^
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:11:
cannot find symbol
[javac] symbol: class WebTestCase
[javac] public class AddToMailingListTest extends WebTestCase {
[javac] ^
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:28:
cannot find symbol
[javac] symbol : variable super
[javac] location: class test.AddToMailingListTest
[javac] super.setUp();
[javac] ^
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:30:
cannot find symbol
[javac] symbol : method getTestContext()
[javac] location: class test.AddToMailingListTest
[javac]
getTestContext().setBaseUrl("http://localhost:8080/apps/oit/governor/citizen/assistanceUtility";);
[javac] ^ 


Thanks, - Dave





Neroon wrote:

Hi Dave,

could you give some detail on what the exact error is and on how you
actually 
call 'test:single'?


Maven takes care of your test classpath, so to my knowledge you don't need
to 
set 'maven.test.classpath' if you have everything you need declared as a 
dependency. At least I never had to.


I assume that your unit tests work without any issue when executing 'maven 
test:test' since you not explicitly mentioned it. So the problem probably
is 
with the call for the 'test:single' goal.

Unlike Maven2 where you give only the name of the test class to the
Surefire 
plugin when you want to execute a single unit test, for Maven1 you need to 
specify the fully qualified class name. Would look something like this:

maven test:single -Dtestcase=com.somecompany.someproduct.stuff.TestCase

Cheers,
Siegfried

Am Freitag, 2. Oktober 2009 schrieb laredotornado:

Hi,

I'm using Maven 1.1 with maven-test-plugin-1.8.2.jar.  When I run the
"test:single" target with my test class, I get a bunch of compilation
errors
(all related to jwebunit), despite the fact I have this dependency in my
project.xml ...


net.sourceforge.jwebunit
jwebunit-htmlunit-plugin
1.4


I read somewhere that I'm supposed to set this property ...

maven.test.classpath

when using the maven test plugin.  Although I put this property and the
associated jars in my project.properties file, I still get compilation
errors.  Any ideas how to proceed from here? - Dave

--
View this message in context:
http://www.nabble.com/Trouble-running-Maven-

test-case-tp25722078p25722078.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




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








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



Re: How-to implement Code Quality Analysis on multiple Maven Projects?

2009-10-04 Thread Barrie Treloar
On Sun, Oct 4, 2009 at 4:15 PM, ifsNabble  wrote:
>
> Of course! Here´s the solution we found for our problem:
>
> As described we have the structure
>
> /trunk/projectA/pom.xml
> /trunk/projectAB/pom.xml
> /trunk/project.../pom.xml
> /trunk/projectZ/pom.xml
>
> That makes us able to put a pom.xml in the highest hierarchy folder
> (/trunk/pom.xml).
> This pom.xml uses the maven-build-helper-plugin where you can specify
> additional source folders.
> And due to the fact that we´re on top of folder hierarchy we can use the
> subfolders ("/project.../src/main/java") and create in that way a virtual
> project with many many source folders.

Could you paste the snippet of pom.xml that includes maven-build-helper-plugin.

Concrete examples help people with problems trouble shoot there own :)

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



Re: Trouble running Maven test case

2009-10-04 Thread laredotornado

Yes, I should have been more specific.  Here's how I'm making the call ...

maven -Dtestcase=test.AddToMailingListTest test:single 

and what happens is that I'm getting a bunch of compilation errors, even
though the libraries in question are listed as a dependency in my
project.xml file (I have confirmed the jars are getting downloaded) ...

maven -Dtestcase=test.AddToMailingListTest test:single
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.1

build:start:

test:single:
java:prepare-filesystem:

java:init:

java:compile:
[echo] Compiling to
/Users/dalvarado/source/assistanceUtility/webapp/target/classes
[echo]
==

WARNING: maven.compile.target is not set:
using the default value which depends on your JVM

==


java:jar-resources:

test:prepare-filesystem:

test:test-resources:

test:compile:
[javac] Compiling 1 source file to
/Users/dalvarado/source/assistanceUtility/webapp/target/test-classes
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:9:
package net.sourceforge.jwebunit.junit does not exist
[javac] import net.sourceforge.jwebunit.junit.WebTestCase;
[javac] ^
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:11:
cannot find symbol
[javac] symbol: class WebTestCase
[javac] public class AddToMailingListTest extends WebTestCase {
[javac] ^
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:28:
cannot find symbol
[javac] symbol : variable super
[javac] location: class test.AddToMailingListTest
[javac] super.setUp();
[javac] ^
[javac]
/Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:30:
cannot find symbol
[javac] symbol : method getTestContext()
[javac] location: class test.AddToMailingListTest
[javac]
getTestContext().setBaseUrl("http://localhost:8080/apps/oit/governor/citizen/assistanceUtility";);
[javac] ^ 

Thanks, - Dave





Neroon wrote:
> 
> Hi Dave,
> 
> could you give some detail on what the exact error is and on how you
> actually 
> call 'test:single'?
> 
> Maven takes care of your test classpath, so to my knowledge you don't need
> to 
> set 'maven.test.classpath' if you have everything you need declared as a 
> dependency. At least I never had to.
> 
> I assume that your unit tests work without any issue when executing 'maven 
> test:test' since you not explicitly mentioned it. So the problem probably
> is 
> with the call for the 'test:single' goal.
> Unlike Maven2 where you give only the name of the test class to the
> Surefire 
> plugin when you want to execute a single unit test, for Maven1 you need to 
> specify the fully qualified class name. Would look something like this:
> maven test:single -Dtestcase=com.somecompany.someproduct.stuff.TestCase
> 
> Cheers,
> Siegfried
> 
> Am Freitag, 2. Oktober 2009 schrieb laredotornado:
>> 
>> Hi,
>> 
>> I'm using Maven 1.1 with maven-test-plugin-1.8.2.jar.  When I run the
>> "test:single" target with my test class, I get a bunch of compilation
>> errors
>> (all related to jwebunit), despite the fact I have this dependency in my
>> project.xml ...
>> 
>> 
>> net.sourceforge.jwebunit
>> jwebunit-htmlunit-plugin
>> 1.4
>> 
>> 
>> I read somewhere that I'm supposed to set this property ...
>> 
>> maven.test.classpath
>> 
>> when using the maven test plugin.  Although I put this property and the
>> associated jars in my project.properties file, I still get compilation
>> errors.  Any ideas how to proceed from here? - Dave
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Trouble-running-Maven-
> test-case-tp25722078p25722078.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
>> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Trouble-running-Maven-test-case-tp25722078p25743680.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: Ant Mojo Resources

2009-10-04 Thread yoyomohan

Hi jslinnha,

   I'm stuck in the same problem .pls. can you share the solution for the
problem 'calling scripts from custom ant plugin jar file' only.
 Thanks in advance.
 

jslinnha wrote:
> 
> Hi All, 
>  
> I have created an Ant based plugin that need to call a windows batch
> file.  The batch file is in the plugin projects resources folder and
> thus in the plugin jar.  How can I access this resource path/ batch file
> using the  ant task ?
>  
> Thanks
> 
> Jon
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ant-Mojo-Resources-tp7011696p25740443.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: issue with Hibernate 3 plugin creating H2 plugin in wrong location

2009-10-04 Thread mickknutson

I tried this:
jdbc:h2:file:/Users/mickknutson/svnworkspaces/baselogic/services/data-services/target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE

And this did not work. I still get the database created at 
/Users/mickknutson/target/**

not even 

/Users/mickknutson/taget/h2/**
which is what is more confusing.




mgainty wrote:
> 
> 
> use the absolute path of the module's local target dir so for example
> local target dir is C:/data/test then specify
>  jdbc:h2:file:C:/data/test
> 
> Martin Gainty 
> __ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
>> Date: Thu, 20 Aug 2009 09:25:18 -0400
>> Subject: Re: issue with Hibernate 3 plugin creating H2 plugin in wrong 
>> location
>> From: mickknut...@gmail.com
>> To: users@maven.apache.org
>> 
>> Next, here is my issue piece by piece to get past the grinch.
>> 
>> I have the following hibernate 3 plugin:
>> 
>> ...
>> hibernate3-maven-plugin
>>...
>> 
>> hbm2hbmxml
>> 
>> target/classes
>> 
>> ...
>> 
>> src/test/resources/database.properties
>> ...
>> 
>> hbm2ddl
>> 
>> ...
>> 
>> 
>> Using this h2 URL:
>> jdbc:h2:file:target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE
>> 
>> 
>> I have also tried to pre-pend ${basedir}/ but I still get my h2 database
>> created in:
>> 
>> C:\Documents and Setting\[user id]\target\h2**
>> 
>> How can I get this put into the module's local target dir?
>> 
>> ---
>> Thank You…
>> 
>> Mick Knutson, President
>> 
>> BASE Logic, Inc.
>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>> p. (866) BLiNC-411: (254-6241-1)
>> f. (415) 685-4233
>> 
>> Website: http://baselogic.com
>> Linked IN: http://linkedin.com/in/mickknutson
>> Vacation Rental: http://tahoe.baselogic.com
>> ---
>> 
>> 
>> 
>> On Thu, Aug 20, 2009 at 9:22 AM, Mick Knutson 
>> wrote:
>> 
>> > first off, why does my post keep getting rejected as SPAM?
>> >
>> > ---
>> > Thank You…
>> >
>> > Mick Knutson, President
>> >
>> > BASE Logic, Inc.
>> > Enterprise Architecture, Design, Mentoring & Agile Consulting
>> > p. (866) BLiNC-411: (254-6241-1)
>> > f. (415) 685-4233
>> >
>> > Website: http://baselogic.com
>> > Linked IN: http://linkedin.com/in/mickknutson
>> > Vacation Rental: http://tahoe.baselogic.com
>> > ---
>> >
>> >
> 
> _
> Hotmail® is up to 70% faster. Now good news travels really fast. 
> http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009
> 

-- 
View this message in context: 
http://www.nabble.com/issue-with-Hibernate-3-plugin-creating-H2-plugin-in-wrong-location-tp25061974p25738843.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



issue with hibernate3 plugin create database in wrong location

2009-10-04 Thread Mick Knutson
I am using the hibernate3 plugin to create an h2 database. I use this URL:

jdbc:h2:file:${basedir}/target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE

Then I see it translates to:

*[INFO] Finished at: Sun Oct 04 07:57:17 PDT 2009
[yoursos] INFO [Finalizer] DriverManagerConnectionProvider.close(170) |
cleaning up connection pool: jdbc:h2:file:
/Users/mickknutson/svnworkspaces/baselogic/services/data-services/target
/h2/yoursos;REFERENTIAL_INTEGRITY=FALSE
[INFO] Final Memory: 42M/81M
*


But the plugin keeps creating, and using this in my tests and when I have a
DB change, I have to manually delete this database in order for the changes
to take affect:
*/Users/mickknutson/target/**db*

How can I force the database to only be created in my build target DIR?

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---


Re: Trouble running Maven test case

2009-10-04 Thread Neroon
Hi Dave,

could you give some detail on what the exact error is and on how you actually 
call 'test:single'?

Maven takes care of your test classpath, so to my knowledge you don't need to 
set 'maven.test.classpath' if you have everything you need declared as a 
dependency. At least I never had to.

I assume that your unit tests work without any issue when executing 'maven 
test:test' since you not explicitly mentioned it. So the problem probably is 
with the call for the 'test:single' goal.
Unlike Maven2 where you give only the name of the test class to the Surefire 
plugin when you want to execute a single unit test, for Maven1 you need to 
specify the fully qualified class name. Would look something like this:
maven test:single -Dtestcase=com.somecompany.someproduct.stuff.TestCase

Cheers,
Siegfried

Am Freitag, 2. Oktober 2009 schrieb laredotornado:
> 
> Hi,
> 
> I'm using Maven 1.1 with maven-test-plugin-1.8.2.jar.  When I run the
> "test:single" target with my test class, I get a bunch of compilation errors
> (all related to jwebunit), despite the fact I have this dependency in my
> project.xml ...
> 
> 
> net.sourceforge.jwebunit
> jwebunit-htmlunit-plugin
> 1.4
> 
> 
> I read somewhere that I'm supposed to set this property ...
> 
> maven.test.classpath
> 
> when using the maven test plugin.  Although I put this property and the
> associated jars in my project.properties file, I still get compilation
> errors.  Any ideas how to proceed from here? - Dave
> 
> -- 
> View this message in context: http://www.nabble.com/Trouble-running-Maven-
test-case-tp25722078p25722078.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
> 



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