You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by eyal edri <ey...@gmail.com> on 2009/12/29 14:20:50 UTC
Maven + JUnit, what's the best approach?
I'm new to Java and maven and currently in the process of building the
entire infrastructure for java development in the company.
i'm not quite familiar with JUnit, but i know maven makes it easy for you by
creating default test tree and test classes in each project.
where can i read about best practices regarding writing unit tests for my
java apps using JUnit with MAVEN?
thanks.
--
Eyal Edri
Re: Maven + JUnit, what's the best approach?
Posted by eyal edri <ey...@gmail.com>.
On Tue, Dec 29, 2009 at 4:15 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
> Hi,
>
>
> actually i've already setup a few things:
>>
>> - artifactory
>> - hudson
>> - scm (tesing accurev)
>> - maven2
>> - issue tracking is currently bugzilla, but might be jira
>>
>> i'm looking at the default test classes maven creates, are they obsolete?
>>
> Maven does not create Test Classes...
> It does if you choose 'quickstart' project ...
>
> i saw that maven added junit 3.8.1 instead of 4.x as a dependency and
>> auto generated this code:
>>
>> should i change the junit in the pom to 4.7?
>>
> Yes you should, cause if you use JUnit 4.X instead of 3.8 ?
>
>
>
> in some junit examples they use annotations (@Test), which doesn't work
>> with
>> that code..
>>
> You have to use JUnit 4.X instead and configure to use Java 1.5 at least to
> be able to use Annotations...
> i did that, i assume i need to delete the code maven crated and write a new
> one.
>
i had to use the mvn cli to update the junit from 3.8.1 to 4.7 and run
mvn eclipse:eclipse.
only then i was able to use the code from the example.
thanks.
> Add a part
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.6</source>
> <target>1.6</target>
> <debug>true</debug>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> in your pom to compile with 1.5 or as in this example with 1.6...
>
>
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
> Hauptstrasse 177 USt.IdNr: DE191347579
> 52146 Würselen http://www.soebes.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Eyal Edri
Re: Maven + JUnit, what's the best approach?
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
> actually i've already setup a few things:
>
> - artifactory
> - hudson
> - scm (tesing accurev)
> - maven2
> - issue tracking is currently bugzilla, but might be jira
>
> i'm looking at the default test classes maven creates, are they obsolete?
Maven does not create Test Classes...
> i saw that maven added junit 3.8.1 instead of 4.x as a dependency and
> auto generated this code:
>
> should i change the junit in the pom to 4.7?
Yes you should, cause if you use JUnit 4.X instead of 3.8 ?
> in some junit examples they use annotations (@Test), which doesn't work with
> that code..
You have to use JUnit 4.X instead and configure to use Java 1.5 at least
to be able to use Annotations...
Add a part
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<debug>true</debug>
</configuration>
</plugin>
</plugins>
</build>
in your pom to compile with 1.5 or as in this example with 1.6...
Kind regards
Karl Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven + JUnit, what's the best approach?
Posted by Justin Edelson <ju...@gmail.com>.
CollabNet provides support contracts for Subversion.
On Dec 29, 2009, at 2:34 PM, eyal edri <ey...@gmail.com> wrote:
> yea..by managed, i meant support from a vendor.
>
> You don't have to convince me.. i'm the developer :)
> you need to convince the r&d manager that going to put all the
> company's
> source code
> in an open source project, which if there is a problem... might not
> someone
> to yell at :)
>
> btw: don't fall off your chair.. but we've been using starteam 6
> (from 2005)
> so far...
>
> but.., i hope i'll managed to convince them... i just need strong
> points..
>
> if you say it works good with maven & hudson.. then it's a good
> start...
>
> On Tue, Dec 29, 2009 at 8:15 PM, Karl Heinz Marbaise <khmarbaise@gmx.de
> >wrote:
>
>> Hi,
>>
>>
>> I ran away from starteam into accurev.... :(
>>>
>>> is there any other good managed (commerical) SCM out there that
>>> works with
>>> linux?
>>>
>> Why do you need a commerical tool ? Why not using Subversion ....
>>
>> Greate community, really good documentation (for free)...which is
>> supported
>> by many many tools (IDE, Maven, Hudson, etc. )...
>>
>>
>> And what did you understand under "managed" ? Support contract ?
>>
>>
>> Kind regards
>> Karl Heinz Marbaise
>> --
>> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
>> Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
>> Hauptstrasse 177 USt.IdNr: DE191347579
>> 52146 Würselen http://www.soebes.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> Eyal Edri
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven + JUnit, what's the best approach?
Posted by eyal edri <ey...@gmail.com>.
yea..by managed, i meant support from a vendor.
You don't have to convince me.. i'm the developer :)
you need to convince the r&d manager that going to put all the company's
source code
in an open source project, which if there is a problem... might not someone
to yell at :)
btw: don't fall off your chair.. but we've been using starteam 6 (from 2005)
so far...
but.., i hope i'll managed to convince them... i just need strong points..
if you say it works good with maven & hudson.. then it's a good start...
On Tue, Dec 29, 2009 at 8:15 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
> Hi,
>
>
> I ran away from starteam into accurev.... :(
>>
>> is there any other good managed (commerical) SCM out there that works with
>> linux?
>>
> Why do you need a commerical tool ? Why not using Subversion ....
>
> Greate community, really good documentation (for free)...which is supported
> by many many tools (IDE, Maven, Hudson, etc. )...
>
>
> And what did you understand under "managed" ? Support contract ?
>
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
> Hauptstrasse 177 USt.IdNr: DE191347579
> 52146 Würselen http://www.soebes.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Eyal Edri
Re: Maven + JUnit, what's the best approach?
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
> I ran away from starteam into accurev.... :(
>
> is there any other good managed (commerical) SCM out there that works with
> linux?
Why do you need a commerical tool ? Why not using Subversion ....
Greate community, really good documentation (for free)...which is
supported by many many tools (IDE, Maven, Hudson, etc. )...
And what did you understand under "managed" ? Support contract ?
Kind regards
Karl Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Maven + JUnit, what's the best approach?
Posted by Jeff Jensen <je...@upstairstechnology.com>.
I suggest looking at Perforce. It is the best SCM I've used (cvs, svn, vss, clearcase, pvcs, starteam, and a couple other no-names I can't remember).
-----Original Message-----
From: eyal edri [mailto:eyal.edri@gmail.com]
Sent: Tuesday, December 29, 2009 12:11 PM
To: Maven Users List
Subject: Re: Maven + JUnit, what's the best approach?
I ran away from starteam into accurev.... :(
is there any other good managed (commerical) SCM out there that works with
linux?
Eyal.
On Tue, Dec 29, 2009 at 6:31 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> 2009/12/29 eyal edri <ey...@gmail.com>
>
> > thanks,
> >
> > actually i've already setup a few things:
> >
> > - artifactory
> > - hudson
> > - scm (tesing accurev)
> >
>
> IMHO, accurev is a pile of ____ esp if you want to use Maven. There are
> some architectural decisions that they made which make use with Maven a
> pain.
>
> Subversion is great with Maven, and it's free too....
>
> Also having migrated our 11 years worth of source control from Accurev to
> Subversion (including writing a tool [which my employers will not let me
> publish] to extract the full history into Subversion) I would not
> personally
> touch Accurev with a 1000 foot barge pole.
>
> I know others feel differently, and these are my personal opinions, but
> anywho, just thought you'd appreciate the feedback
>
> -Stephen
>
> P.S.
> 1. You cannot export a tree into a subfolder of a workspace (makes using
> the maven release plugin a nightmare)
> 2. You cannot have a workspace as a subfolder of another workspace (makes
> aggregator style projects a pain... You can solve this by using
> include/exclude rules and some partial view stuff... but that only works if
> you only use one depot...)
> 3. Snapshot/workspace names must be unique at any point in time... and you
> cannot delete snapshots... makes tagging a pain... try re-rolling a release
> with maven-release-plugin
> 4. AFAIK, Maven release plugin does not work yet with Accurev (as the SCM
> support for maven was not where it needed to be before we ditched Accurev)
> I
> had written an SCM implementation [which I cannot share] but it was
> impossible to get it to work with the release-plugin's workflow
>
> > - maven2
> > - issue tracking is currently bugzilla, but might be jira
> >
> > i'm looking at the default test classes maven creates, are they obsolete?
> > i saw that maven added junit 3.8.1 instead of 4.x as a dependency and
> > auto generated this code:
> >
> > *import junit.framework.Test;
> > import junit.framework.TestCase;
> > import junit.framework.TestSuite;
> >
> > /**
> > * Unit test for simple App.
> > */
> > public class DbUtilTest
> > extends TestCase
> > {
> > /**
> > * Create the test case
> > *
> > * @param testName name of the test case
> > */
> > public DbUtilTest( String testName )
> > {
> > super( testName );
> > }
> >
> > /**
> > * @return the suite of tests being tested
> > */
> > public static Test suite()
> > {
> > return new TestSuite( DbUtilTest.class );
> > }
> >
> > /**
> > * Rigorous Test :-)
> > */
> > public void testApp()
> > {
> > assertTrue( true );
> > }
> >
> > }*
> >
> >
> > should i change the junit in the pom to 4.7?
> > in some junit examples they use annotations (@Test), which doesn't work
> > with
> > that code..
> >
> > i'm a bit confused...
> >
> >
> >
> > On Tue, Dec 29, 2009 at 3:58 PM, Ognjen Blagojevic <ognjen@etf.bg.ac.rs
> > >wrote:
> >
> > > eyal edri wrote:
> > >
> > >> I'm new to Java and maven and currently in the process of building the
> > >> entire infrastructure for java development in the company.
> > >>
> > >> i'm not quite familiar with JUnit, but i know maven makes it easy for
> > you
> > >> by
> > >> creating default test tree and test classes in each project.
> > >>
> > >> where can i read about best practices regarding writing unit tests for
> > my
> > >> java apps using JUnit with MAVEN?
> > >>
> > >> thanks.
> > >>
> > >
> > > Start with:
> > >
> > > http://maven.apache.org/guides/getting-started/index.html
> > > http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial
> > >
> > > I you are building an infrastructure, aside from JUnit and Maven
> > knowledge,
> > > you will (probably) need to install, in order of importance:
> > >
> > > 1. Version control system such as Subversion
> > > 2. Maven ropository, such as Apache Archiva, Artifactory or Nexus
> > > 3. Mailing list manager, such as Mailman
> > > 4. Issue tracking system, such as Trac
> > > 5. Continuos integration system, such as Apache Continuum
> > >
> > > Regards,
> > > Ognjen
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Eyal Edri
> >
>
--
Eyal Edri
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven + JUnit, what's the best approach?
Posted by eyal edri <ey...@gmail.com>.
I ran away from starteam into accurev.... :(
is there any other good managed (commerical) SCM out there that works with
linux?
Eyal.
On Tue, Dec 29, 2009 at 6:31 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> 2009/12/29 eyal edri <ey...@gmail.com>
>
> > thanks,
> >
> > actually i've already setup a few things:
> >
> > - artifactory
> > - hudson
> > - scm (tesing accurev)
> >
>
> IMHO, accurev is a pile of ____ esp if you want to use Maven. There are
> some architectural decisions that they made which make use with Maven a
> pain.
>
> Subversion is great with Maven, and it's free too....
>
> Also having migrated our 11 years worth of source control from Accurev to
> Subversion (including writing a tool [which my employers will not let me
> publish] to extract the full history into Subversion) I would not
> personally
> touch Accurev with a 1000 foot barge pole.
>
> I know others feel differently, and these are my personal opinions, but
> anywho, just thought you'd appreciate the feedback
>
> -Stephen
>
> P.S.
> 1. You cannot export a tree into a subfolder of a workspace (makes using
> the maven release plugin a nightmare)
> 2. You cannot have a workspace as a subfolder of another workspace (makes
> aggregator style projects a pain... You can solve this by using
> include/exclude rules and some partial view stuff... but that only works if
> you only use one depot...)
> 3. Snapshot/workspace names must be unique at any point in time... and you
> cannot delete snapshots... makes tagging a pain... try re-rolling a release
> with maven-release-plugin
> 4. AFAIK, Maven release plugin does not work yet with Accurev (as the SCM
> support for maven was not where it needed to be before we ditched Accurev)
> I
> had written an SCM implementation [which I cannot share] but it was
> impossible to get it to work with the release-plugin's workflow
>
> > - maven2
> > - issue tracking is currently bugzilla, but might be jira
> >
> > i'm looking at the default test classes maven creates, are they obsolete?
> > i saw that maven added junit 3.8.1 instead of 4.x as a dependency and
> > auto generated this code:
> >
> > *import junit.framework.Test;
> > import junit.framework.TestCase;
> > import junit.framework.TestSuite;
> >
> > /**
> > * Unit test for simple App.
> > */
> > public class DbUtilTest
> > extends TestCase
> > {
> > /**
> > * Create the test case
> > *
> > * @param testName name of the test case
> > */
> > public DbUtilTest( String testName )
> > {
> > super( testName );
> > }
> >
> > /**
> > * @return the suite of tests being tested
> > */
> > public static Test suite()
> > {
> > return new TestSuite( DbUtilTest.class );
> > }
> >
> > /**
> > * Rigorous Test :-)
> > */
> > public void testApp()
> > {
> > assertTrue( true );
> > }
> >
> > }*
> >
> >
> > should i change the junit in the pom to 4.7?
> > in some junit examples they use annotations (@Test), which doesn't work
> > with
> > that code..
> >
> > i'm a bit confused...
> >
> >
> >
> > On Tue, Dec 29, 2009 at 3:58 PM, Ognjen Blagojevic <ognjen@etf.bg.ac.rs
> > >wrote:
> >
> > > eyal edri wrote:
> > >
> > >> I'm new to Java and maven and currently in the process of building the
> > >> entire infrastructure for java development in the company.
> > >>
> > >> i'm not quite familiar with JUnit, but i know maven makes it easy for
> > you
> > >> by
> > >> creating default test tree and test classes in each project.
> > >>
> > >> where can i read about best practices regarding writing unit tests for
> > my
> > >> java apps using JUnit with MAVEN?
> > >>
> > >> thanks.
> > >>
> > >
> > > Start with:
> > >
> > > http://maven.apache.org/guides/getting-started/index.html
> > > http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial
> > >
> > > I you are building an infrastructure, aside from JUnit and Maven
> > knowledge,
> > > you will (probably) need to install, in order of importance:
> > >
> > > 1. Version control system such as Subversion
> > > 2. Maven ropository, such as Apache Archiva, Artifactory or Nexus
> > > 3. Mailing list manager, such as Mailman
> > > 4. Issue tracking system, such as Trac
> > > 5. Continuos integration system, such as Apache Continuum
> > >
> > > Regards,
> > > Ognjen
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Eyal Edri
> >
>
--
Eyal Edri
Re: Maven + JUnit, what's the best approach?
Posted by Stephen Connolly <st...@gmail.com>.
2009/12/29 eyal edri <ey...@gmail.com>
> thanks,
>
> actually i've already setup a few things:
>
> - artifactory
> - hudson
> - scm (tesing accurev)
>
IMHO, accurev is a pile of ____ esp if you want to use Maven. There are
some architectural decisions that they made which make use with Maven a
pain.
Subversion is great with Maven, and it's free too....
Also having migrated our 11 years worth of source control from Accurev to
Subversion (including writing a tool [which my employers will not let me
publish] to extract the full history into Subversion) I would not personally
touch Accurev with a 1000 foot barge pole.
I know others feel differently, and these are my personal opinions, but
anywho, just thought you'd appreciate the feedback
-Stephen
P.S.
1. You cannot export a tree into a subfolder of a workspace (makes using
the maven release plugin a nightmare)
2. You cannot have a workspace as a subfolder of another workspace (makes
aggregator style projects a pain... You can solve this by using
include/exclude rules and some partial view stuff... but that only works if
you only use one depot...)
3. Snapshot/workspace names must be unique at any point in time... and you
cannot delete snapshots... makes tagging a pain... try re-rolling a release
with maven-release-plugin
4. AFAIK, Maven release plugin does not work yet with Accurev (as the SCM
support for maven was not where it needed to be before we ditched Accurev) I
had written an SCM implementation [which I cannot share] but it was
impossible to get it to work with the release-plugin's workflow
> - maven2
> - issue tracking is currently bugzilla, but might be jira
>
> i'm looking at the default test classes maven creates, are they obsolete?
> i saw that maven added junit 3.8.1 instead of 4.x as a dependency and
> auto generated this code:
>
> *import junit.framework.Test;
> import junit.framework.TestCase;
> import junit.framework.TestSuite;
>
> /**
> * Unit test for simple App.
> */
> public class DbUtilTest
> extends TestCase
> {
> /**
> * Create the test case
> *
> * @param testName name of the test case
> */
> public DbUtilTest( String testName )
> {
> super( testName );
> }
>
> /**
> * @return the suite of tests being tested
> */
> public static Test suite()
> {
> return new TestSuite( DbUtilTest.class );
> }
>
> /**
> * Rigorous Test :-)
> */
> public void testApp()
> {
> assertTrue( true );
> }
>
> }*
>
>
> should i change the junit in the pom to 4.7?
> in some junit examples they use annotations (@Test), which doesn't work
> with
> that code..
>
> i'm a bit confused...
>
>
>
> On Tue, Dec 29, 2009 at 3:58 PM, Ognjen Blagojevic <ognjen@etf.bg.ac.rs
> >wrote:
>
> > eyal edri wrote:
> >
> >> I'm new to Java and maven and currently in the process of building the
> >> entire infrastructure for java development in the company.
> >>
> >> i'm not quite familiar with JUnit, but i know maven makes it easy for
> you
> >> by
> >> creating default test tree and test classes in each project.
> >>
> >> where can i read about best practices regarding writing unit tests for
> my
> >> java apps using JUnit with MAVEN?
> >>
> >> thanks.
> >>
> >
> > Start with:
> >
> > http://maven.apache.org/guides/getting-started/index.html
> > http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial
> >
> > I you are building an infrastructure, aside from JUnit and Maven
> knowledge,
> > you will (probably) need to install, in order of importance:
> >
> > 1. Version control system such as Subversion
> > 2. Maven ropository, such as Apache Archiva, Artifactory or Nexus
> > 3. Mailing list manager, such as Mailman
> > 4. Issue tracking system, such as Trac
> > 5. Continuos integration system, such as Apache Continuum
> >
> > Regards,
> > Ognjen
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Eyal Edri
>
Re: Maven + JUnit, what's the best approach?
Posted by eyal edri <ey...@gmail.com>.
thanks,
actually i've already setup a few things:
- artifactory
- hudson
- scm (tesing accurev)
- maven2
- issue tracking is currently bugzilla, but might be jira
i'm looking at the default test classes maven creates, are they obsolete?
i saw that maven added junit 3.8.1 instead of 4.x as a dependency and
auto generated this code:
*import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class DbUtilTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public DbUtilTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( DbUtilTest.class );
}
/**
* Rigorous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}*
should i change the junit in the pom to 4.7?
in some junit examples they use annotations (@Test), which doesn't work with
that code..
i'm a bit confused...
On Tue, Dec 29, 2009 at 3:58 PM, Ognjen Blagojevic <og...@etf.bg.ac.rs>wrote:
> eyal edri wrote:
>
>> I'm new to Java and maven and currently in the process of building the
>> entire infrastructure for java development in the company.
>>
>> i'm not quite familiar with JUnit, but i know maven makes it easy for you
>> by
>> creating default test tree and test classes in each project.
>>
>> where can i read about best practices regarding writing unit tests for my
>> java apps using JUnit with MAVEN?
>>
>> thanks.
>>
>
> Start with:
>
> http://maven.apache.org/guides/getting-started/index.html
> http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial
>
> I you are building an infrastructure, aside from JUnit and Maven knowledge,
> you will (probably) need to install, in order of importance:
>
> 1. Version control system such as Subversion
> 2. Maven ropository, such as Apache Archiva, Artifactory or Nexus
> 3. Mailing list manager, such as Mailman
> 4. Issue tracking system, such as Trac
> 5. Continuos integration system, such as Apache Continuum
>
> Regards,
> Ognjen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Eyal Edri
Re: Maven + JUnit, what's the best approach?
Posted by Ognjen Blagojevic <og...@etf.bg.ac.rs>.
eyal edri wrote:
> I'm new to Java and maven and currently in the process of building the
> entire infrastructure for java development in the company.
>
> i'm not quite familiar with JUnit, but i know maven makes it easy for you by
> creating default test tree and test classes in each project.
>
> where can i read about best practices regarding writing unit tests for my
> java apps using JUnit with MAVEN?
>
> thanks.
Start with:
http://maven.apache.org/guides/getting-started/index.html
http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial
I you are building an infrastructure, aside from JUnit and Maven
knowledge, you will (probably) need to install, in order of importance:
1. Version control system such as Subversion
2. Maven ropository, such as Apache Archiva, Artifactory or Nexus
3. Mailing list manager, such as Mailman
4. Issue tracking system, such as Trac
5. Continuos integration system, such as Apache Continuum
Regards,
Ognjen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven + JUnit, what's the best approach?
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
> I'm new to Java and maven and currently in the process of building the
> entire infrastructure for java development in the company.
>
> i'm not quite familiar with JUnit, but i know maven makes it easy for you by
> creating default test tree and test classes in each project.
You should follow the folder structure
src/main/java ...
src/main/resources
src/test/java ...
src/test/resources
Further details here:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
>
> where can i read about best practices regarding writing unit tests for my
> java apps using JUnit with MAVEN?
Just write them as usual JUnit Test Cases....
Than you can simple do mvn test to run the test cases or use
Eclipse/Netbeans etc. run them from the IDE instead...
Kind regards
Karl Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org