Maven 1.1 JUnit vs Integration tests

2005-09-17 Thread Mark Slater
I'm using Maven 1.1 right now, and I'd like to separate my JUnit unit  
tests from my JUnit integration tests. The former test only a single  
class/layer of the app, while the latter test from the service layer  
to the database. I'm using Spring and JDO2, and the app is a web  
services app. I want to have one set of integration tests that are  
internal to the services (ie. Axis and Tomcat are not involved) and  
another that goes all the way from the web service to the db. But I  
don't want those test to run every time because they take far longer  
to run (minutes compared to seconds... for each test).


Is there a plugin that would let me do this? Or are there JUnit  
plugin properties that specify JUnit integration tests that don't use  
cactus (the properties I found ... maven.iutest.* seem to assume the  
use of a webapp to perform the tests)?


Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven 1.1 JUnit vs Integration tests

2005-09-17 Thread Mark Slater

Whoops, sorry. I'm using Maven 1.0.2 actually.

Mark

On Sep 17, 2005, at 11:51 AM, Mark Slater wrote:

I'm using Maven 1.1 right now, and I'd like to separate my JUnit  
unit tests from my JUnit integration tests. The former test only a  
single class/layer of the app, while the latter test from the  
service layer to the database. I'm using Spring and JDO2, and the  
app is a web services app. I want to have one set of integration  
tests that are internal to the services (ie. Axis and Tomcat are  
not involved) and another that goes all the way from the web  
service to the db. But I don't want those test to run every time  
because they take far longer to run (minutes compared to seconds...  
for each test).


Is there a plugin that would let me do this? Or are there JUnit  
plugin properties that specify JUnit integration tests that don't  
use cactus (the properties I found ... maven.iutest.* seem to  
assume the use of a webapp to perform the tests)?


Mark




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cactus plugin classpath for compilation

2004-06-04 Thread Mark Slater
I've got a multiproject-based Maven setup. Currently, there's only one EJB 
(more coming after I get all the build kinks like this one ironed out), and 
that gets built into an EAR.

/
+-root/
  +-project.xml
  +-project.properties
  +-maven.xml
+-EJB/
  +-project.xml
  +-project.properties
  +-maven.xml
  +-src/
+-java/
  +-mycp/
+-MyBean.java
+-EAR/
  +-project.xml
  +-project.properties
  +-maven.xml
  +-src/
+-test-cactus/
  +-mycp/
+-test/
  +-MyBeanTest.java

I may be misunderstanding how/where to put and run the cactus tests... my 
first inclination was to put it in the EJB folder next to the Bean 
implementation. However, that project's goal is a .jar file (with the EJB), so 
I can't build an EAR there also. But when I run maven cactus:test-ear in the 
EAR/ directory, or maven multiproject:site in the / directory (which runs 
the cactus:test-ear goal in the EAR/ directory), javac is unable to find the 
EJB's jar file, even though I have it configured as a dependency in EAR/
project.xml.

I've got a preGoal on cactus:compile that echos a bunch of classpaths, which 
are all empty: ${cactus.classpath}, ${maven.classpath}, 
${maven.ear.classpath}, ${maven.war.classpath}, ${classpath}, 
${maven.dependency.classpath}

Is there a way I can explicitly add the EJB's jar file (which is in the local 
repository), or is there a way to get cactus to create a correct EAR file for 
testing as a goal of the EJB project and still have the normal goal create 
the standard EJB jar file?

Thanks!

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Maven XDoclet plug-in examples?

2004-05-24 Thread Mark Slater
I'm a little disappointed by the quality of the Maven/XDoclet integration 
documentation out there. There seem to be a lot of good starts, but nothing in 
the way of a complete solution. I've found the three Wiki pages, Maven Magic, 
and a few other pages, and most of them make it look easy enough, but when I 
try to duplicate their successes, it doesn't work so well for me.

I'm using Maven 1.0rc2 (moving to rc3, but I'm not sure it's going to make a 
difference in this), and XDoclet 1.2.1. While I can get a maven.xml script to 
invoke XDoclet like an Ant task, it doesn't seem to do all the steps the 
tutorials expect it to (generating the application.xml file, for example). So 
I tried to use the maven-xdoclet-plugin, and I get the following message:

[echo] Running ejb:install for Testing EJB Module
Tag library requested that is not present: 'maven' in plugin: 'maven-xdoclet-
plugin-1.2.1'

I found some discussions that suggested this was a namespace problem, but 
changing the namespaces in the plugin.jelly didn't help. All I know is that 
I'm not getting any generated code.

And finally, the build fails with this message:

xdoclet:ejbdoclet:

[echo] Compiling to {my_path}/root/../TestingEjb/target/classes

BUILD FAILED
File.. {my_home}/.maven/plugins/maven-multiproject-plugin-1.3/plugin.jelly
Element... maven:reactor
Line.. 216
Column 9
Unable to obtain goal [multiproject:install-callback] -- {my_home}/.maven/
plugins/maven-java-plugin-1.4/plugin.jelly:53:48: ant:javac srcdir 
{my_path}/TestingEjb/target/xdoclet/ejbdoclet does not exist!

Now, I've seen some people suggest that the XDoclet plugin is... lacking (in 
terms of documentation, I'd certainly agree). Perhaps I shouldn't be using it 
and should stick to the ant task style of running XDoclet? Are there any 
projects that I can examine where maven is building a bunch of EJBs for 
deployment on JBoss? I got the J2EE sample project off the Wiki, but that 
seems to require an EJB client project for each bean, and I don't see a good 
reason for it.

Perhaps I'm posting to the wrong group and need to talk on the XDoclet user's 
list?

Any help would be appreciated!

Thanks,

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiproject as a sub-project?

2004-05-19 Thread Mark Slater
I'm setting up my first Maven project, and trying to plan for the 
future. The main project will be a collection of web applications 
(separate ones), so I want to configure the project so that the main 
project will build all the web apps (sub-projects), which in turn build 
all of their EJBs, WARs, EARs, JARs, etc. To do that, I figured the 
main project would use a multiproject, and each sub-project top level 
would as well. However, when I tried to set that up, the sub-project 
only generated overview information for the site documentation, it 
doesn't compile its code, or generate the reports based on the compiled 
code. If I run Maven in the sub-project, it does compile its code.

I guess I'm surprised that the multiproject goal can't be recursive, 
because I see no reason as to why it couldn't/shouldn't be. Maybe I'm 
reading the docs wrong? Has anyone managed to set up this kind of 
project? Or do I just have to resign myself to building each 
sub-project separately, or making a custom goal or something like that?

Thanks!
Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Multiproject as a sub-project?

2004-05-19 Thread Mark Slater
I'm seeing a lot of that PDF, seems to be a popular presentation. Slide 
21 seems to indicate that a custom goal in the project's maven.xml file 
can use the reactor plugin to build all the sub-projects. However, I've 
read that the reactor plugin is old, and multiproject is new (hence 
preferred); did I misunderstand?

The other question is, how do I get the sub-projects, if they are built 
in this way, to share a generated site? I have only one project site, 
for the main project, but I'd like all the sub-projects to be listed in 
the main one, and have links to them as well.

Thanks,
Mark
Subject: Multiproject as a sub-project?
From: [EMAIL PROTECTED] 
[EMAIL PROTECTED]
Date: Wed, 19 May 2004 11:32:22 +0200
Content-Type: text/plain; charset=iso-8859-1

take a look at this architecture which could solve your problems :
http://www.pivolis.com/pdf/J2EE_projects_Maven_V1.1.pdf
Nicolas,

Mark Slater [EMAIL PROTECTED]
19/05/2004 11:23
Veuillez répondre à Maven Users List
Pour :  [EMAIL PROTECTED]
cc :
Objet : Multiproject as a sub-project?
I'm setting up my first Maven project, and trying to plan for the
future. The main project will be a collection of web applications
(separate ones), so I want to configure the project so that the main
project will build all the web apps (sub-projects), which in turn 
build
all of their EJBs, WARs, EARs, JARs, etc. To do that, I figured the
main project would use a multiproject, and each sub-project top level
would as well. However, when I tried to set that up, the sub-project
only generated overview information for the site documentation, it
doesn't compile its code, or generate the reports based on the 
compiled
code. If I run Maven in the sub-project, it does compile its code.

I guess I'm surprised that the multiproject goal can't be recursive,
because I see no reason as to why it couldn't/shouldn't be. Maybe I'm
reading the docs wrong? Has anyone managed to set up this kind of
project? Or do I just have to resign myself to building each
sub-project separately, or making a custom goal or something like 
that?

Thanks!
Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


exec dir=... executable=....../exec ignores dir?

2004-05-14 Thread Mark Slater
I'm trying to create a site:scriptdeploy goal that will run a custom 
script to deploy a site (in my case, I need to use WebDAV to put files 
onto the server and I really don't have time to write the plugin).

So I'm editing the plugin.jelly for maven-site-plugin-1.5, and I've 
added the goal. That's working without a problem. Where it has issues 
is in the exec call:

exec dir=${basedir} 
executable=${maven.site.deploy.script.executable} failonerror=true
	arg line=${maven.site.deploy.script.arguments}
/exec

I've defined the properties in my project.properties file; the script 
sits in the same directory. However, when I run maven site:scriptdeploy 
to test the setup, I get:

Execute failed: java.io.IOException: cadaver_site_deploy.sh: not found

If I change my exec call to

exec executable=${basedir}/${maven.site.deploy.script.executable} 
failonerror=true
	arg line=${maven.site.deploy.script.arguments}
/exec

The build succeeds. So, on one hand, I could do it that way, but it's 
non-portable (Windows vs. UNIX file separators). It occurs to me that I 
might be misunderstanding the meaning of the dir attribute, and I 
haven't been able to find the documentation that describes it. Any 
insights, or is this better suited to the developer list?

Thanks!

Mark

PS. Regarding my previous post, I was finally able to get maven to 
download it's maven.jar file by reinstalling it (dunno what was wrong 
with the first instal though); and I found a post somewhere that 
pointed out the need to set the changelog system to use svn instead of 
cvs.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Can't download maven.jar and setting up subversion access

2004-05-13 Thread Mark Slater
I've just installed maven for the first time, and I have two questions.

I've created my project.xml file. Right now, that's all the project has  
until the repository is set up. But I wanted to see what kind of web  
site it would generate, so I ran it with maven xdoc, and every time I  
run it the result is this:

maven xdoc
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2
Attempting to download maven.jar.
WARNING: Failed to download maven.jar.
The build cannot continue because of the following unsatisfied  
dependency:

maven.jar (no download url specified)

Total time: 6 seconds
Finished at: Thu May 13 04:49:40 PDT 2004
Now, the first time I ran it, at least two other jar files were  
downloaded (now lost beyond the scrollback buffer), so I know the  
problem isn't network connection or inability to download things in  
general. And I did find the maven.jar file in  
/usr/local/maven-1.0-rc2/lib/ (I'm running on MacOS X). So I'm guessing  
that I missed a classpath variable or something dumb like that.

The other question I have is how do I set up subversion access. Right  
now, there is no anonymous access to the subversion repository, and I  
really don't want to put my password in the project file because it's  
my shell password, and there seems to be something really really wrong  
about putting passwords into a build file. Also, I was hoping someone  
could validate my connection tag since the docs spend lots of time  
talking about CVS, and only mention that SVN is supported.

developerConnectionscm:svn:http://svn.computer.edu/project_repos// 
developerConnection

Obviously, once I have a repository, I can figure this out for myself;  
I'm much more concerned about the maven.jar issue. I mention the SVN  
stuff here more to gripe about the lack of documentation for SVN  
support; it took 10 minutes of searching the maven site and google  
before I finally decided SVN support is integrated and not just  
planned.

Thanks!

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]