DbUnit Problem

Hi all,

I have downloaded Maven and for installation i followed below steps:

1. Unzip maven-2.0.7-bin.zip to the directory you wish to install Maven 2.0.7. These instructions assume you chose C:\Program Files\Apache Software Foundation\maven-2.0.7

2. Add the bin directory to your path, by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then editing the PATH variable in the user variables. eg. "C:\Program Files\Apache Software Foundation\maven-2.0.7\bin";%PATH%

3. In the same dialog, make sure that JAVA_HOME is set to the location of your JDK, eg. C:\Program Files\Java\jdk1.5.0_02

4. Run mvn --version to verify that it is correctly installed.

After this i executed following command

mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

my-app project got created on my machine

but when i execute mvn project

i get following error:

[INFO] Cannot execute mojo: resources. It requires a project with an existing p

m.xml, but the build is not using one.

any solution/suggestion appreciated.

[1181 byte] By [dbunita] at [2007-11-27 8:25:16]
# 1
You need to create a top-level pom if you want to build multiple projects in one go. If you only want to build the module that you built using the archetype, just change into its directory before issuing the mvn command.
dcmintera at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Thanks for your information.Can you please send me sample example.
dbunita at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
No. You make an effort first, show me what went wrong, and I'll help you fix it. No spoon feeding.
dcmintera at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

I installed maven under C:\Program Files\Apache Software Foundation\maven-2.0.7 and add the system variable M2_HOME as well as the $M2_HOME/bin directory to your system path.

so i added M2_HOME to C:\Program Files\Apache Software Foundation\maven-2.0.7\bin and in the settings.xml file i added below code

Path for settings.xml is

C:\Program Files\Apache Software Foundation\maven-2.0.7\conf

<localRepository>${user.dir}/.m2/repository</localRepository>

<interactiveMode>true</interactiveMode>

<usePluginRegistry>false</usePluginRegistry>

<offline>false</offline>

<pluginGroups>

<pluginGroup>org.codehaus.mojo</pluginGroup>

</pluginGroups>

<proxy>

<id>myproxy</id>

<active>true</active>

<protocol>http</protocol>

<host>proxy.somewhere.com</host>

<port>8080</port>

<username>proxyuser</username>

<password>somepassword</password>

<nonProxyHosts>*.google.com|ibiblio.org</nonProxyHosts>

</proxy>

<server>

<id>server001</id>

<username>my_login</username>

<password>my_password</password>

<privateKey>${usr.home}/.ssh/id_dsa</privateKey>

<passphrase>some_passphrase</passphrase>

<filePermissions>664</filePermissions>

<directoryPermissions>775</directoryPermissions>

<configuration></configuration>

</server>

<mirror>

<id>planetmirror.com</id>

<name>PlanetMirror Australia</name>

<url>http://downloads.planetmirror.com/pub/maven2</url>

<mirrorOf>central</mirrorOf>

</mirror>

Path for pom.xml is C:\my-app

and the path for repository is C:\.m2\repository

Please let me know where i am going wrong.

dbunita at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

And what did you try to use as your top level pom? From which directory did you issue the command? Into which directory did you build your archetype? DID you want a multiple-project build, or did you only want the newly created project to build? What command did you issue?

Have some common sense. I can't tell you what went wrong if you don't give me a clear idea of what you were trying to achieve in the first place.

All I can tell you at the moment is that the working directory from which you issued the maven command (or the directory it was pointed to in the unlikely event that you specified it explcitly) didn't contain any pom.xml file - and even that's based upon your paraphrasing of an error message that you may have misrepresented!

dcmintera at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany.app</groupId>

<artifactId>my-app</artifactId>

<packaging>jar</packaging>

<version>1.0-SNAPSHOT</version>

<name>my-app</name>

<url>http://maven.apache.org</url>

<dependencies>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>3.8.1</version>

<scope>test</scope>

</dependency>

</dependencies>

</project>

and its in C:\my-app

dbunita at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7

Did you actually read my reply? And if you did, did you just pick a random question to answer, or did you intend to supply all the information I asked for?

It's your problem, you have to make an effort to reply. Sufficient that I can be bothered to help you. Which, right now, I can't.

dcmintera at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 8
I sent u the information to check whether i am doing the right steps or not....
dbunita at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 9
Fine, sort it out yourself then if you're going to be like that. Remember, it's not my problem.
dcmintera at 2007-7-12 20:14:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...