You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Sag <ds...@epo.org> on 2006/03/10 11:46:34 UTC
custom src directory layout - how to get it to not checkstyle/javadoc the
tests too.
Hi All,
I am beginning now to migrate many of our projects to maven 2, but I am
not permitted to move the location of the stuff in the src directory as
CVS is unable to retain the history in this case and we have no plans to
move to something more useful such as subversion.
the directory structure we have is
pom.xml
src/
- org/
-- epo/
-- etc
- site/
-- apt/
--- index.apt
-- fml/
--- faq.fml
-- site.xml
-test/
-- java/
--- org/
---- epo/
----- etc
i tried setting my <sourceDirectory> to src/ but the compiler then tries
to build everything in the test directory as well.
so i tell maven2 to exclude src/test and src/site from the main compile
goal
<excludes>
<exclude>**/test/**</exclude>
<exclude>**/site/**</exclude>
</excludes>
into my parent pom's compiler config,
and that works fine, but now cobertura is not instrumenting any of my
classes (or indeed even being invoked as far as i can tell)
running mvn site however pretends to generate a cobertura report but it
just ends up being blank - this is a showstopper for me.
cobertura generates the following error:
net.sourceforge.cobertura.reporting.ComplexityCalculator - cannot find
source file during CNN computation ...
so clearly cobertura is not finding the source files. (i have added a
comment to this effect to http://jira.codehaus.org/browse/MCOBERTURA-2)
the following problems are annoying but i have live with them for now:
also the javadocs are being generated for the test classes. there is no
<excludes> config for the javadoc tool according to the documentation. i
tried adding an excludes config as per the compiler plugin but, while it
threw no error, neither did it actually have any effect.
checkstyle's excludes config param uses a different syntax to the
compiler's excludes syntax and the format is not documented. is it a
comma separated list of paths? either way i tried adding
<excludes>**/test/**</excludes> but that made no difference at all.
pmd reports fail as they are looking for the src in src/main/java and
ignoring the sourceDirectory (but PMD is being a pain anyway so i am not
so concerned with this at the moment)
it seems to me that the <sourceDirectory> tag could do with having some
in-build excludes and includes sub-tags
Kind regards,
Dave Sag
Re: custom src directory layout - how to get it to not checkstyle/javadoc
the tests too.
Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> The M2 standards are src/main/java and src/test/java:
> http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
>
> Only mentioning because I saw src/java listed by someone as the Maven default...
Erm, yes, indeed, that was me. Sorry for the unnecessary confusion; I
should drink fewer coffee before writing mails... ;-)
Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
iD8DBQFEFt8wQvObkgCcDe0RAuPRAKD40NQla39oIpUu5YcEK4QwM0S/IACbBBCW
dIjmdurIW6bRdVwfe77G/4E=
=Dogg
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: custom src directory layout - how to get it to not checkstyle/javadoc the tests too.
Posted by Stephen Duncan <st...@gmail.com>.
The M2 standards are src/main/java and src/test/java:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Only mentioning because I saw src/java listed by someone as the Maven default...
-Stephen
On 3/14/06, David Sag <ds...@epo.org> wrote:
> Thorsten Heit <th...@xtramind.com> wrote on 10-03-2006 13:46:19:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi,
> >
> > > the directory structure we have is
> > >
> > > pom.xml
> > > src/
> > > - org/
> >
> > Maven uses src/java/... per default. Have you tried that?
> >
>
> unfortunately I do not have permission to change the folder heirarchy for
> our projects. This is mostly because:
> 1) we have hundreds of projects
> 2) we have hundreds of developers
> 3) we use CVS not SVN internally and CVS don't do folder heirarchy changes
> while preserving version histories.
>
> I am able to move the tests into the m2 preferred folder heirarchy however
> as we have SFA tests in any of our projects.
>
> I wonder if I would be better off with a heirarchy more like
> pom.xml
> src/
> - org/...
> test/
> - java/
> -- org/...
>
> that would certainly keep the tests apart from the main source, but I'd
> really rather at least start the process of moving to the m2 preferred
> arrangement.
>
> thoughts?
>
> dave
>
>
--
Stephen Duncan Jr
www.stephenduncanjr.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: custom src directory layout - how to get it to not checkstyle/javadoc
the tests too.
Posted by David Sag <ds...@epo.org>.
"Wayne Fay" <wa...@gmail.com> wrote on 10-03-2006 18:00:22:
> Easiest answer is to move to Subversion. There are tools to facilitate
> this so you can save your history out of CVS.
>
easier said than done here I am afraid. certainly that's what I have done
for all of my personal and freelance projects, but in here at the EPO we
face considerable technological inertia. getting permission to begin to
migrate projects from ant builds to maven 2 was a huge effort here. if i
was the supreme executive dark lord of development i'd have replaced our
lotus notes based bug tracker with jira, cvs with svn and cruise-control
with continuum too. they are battles i'll not win here as such
wide-ranging changes affect many hundreds of developers across many
departments and I am a but a mere contractor.
Hell it took some doing just to get an english language keyboard instead
of the standard swiss-german one they issue you with here. Even now I
can't properly enter single or double quotes and have to copy and paste
should I need one. In fact when I aksed the help-desk people about it
they just laughed and told me the single quote key has been remapped as so
many of our staff have characters like 'é' or 'ü' in their names. (and
they wonder why i prefer to work on my mac!)
as an old boss of mine used to say "politiics is the art of the possible."
cheers
dave
> Then restructure your project.
>
> Wayne
>
>
> On 3/10/06, Thorsten Heit <th...@xtramind.com> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi,
> >
> > > the directory structure we have is
> > >
> > > pom.xml
> > > src/
> > > - org/
> >
> > Maven uses src/java/... per default. Have you tried that?
> >
> >
> > Regards
> >
> > Thorsten
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.2.1 (MingW32)
> >
> > iD8DBQFEEXUbQvObkgCcDe0RAurvAJ9R6yQpsS7OKSBa+mnJkkwvNkTVTQCfWdx9
> > PKyRi1m9fa9lNLqFYjMP1uU=
> > =Jkxh
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
Re: custom src directory layout - how to get it to not checkstyle/javadoc the tests too.
Posted by Wayne Fay <wa...@gmail.com>.
Easiest answer is to move to Subversion. There are tools to facilitate
this so you can save your history out of CVS.
Then restructure your project.
Wayne
On 3/10/06, Thorsten Heit <th...@xtramind.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> > the directory structure we have is
> >
> > pom.xml
> > src/
> > - org/
>
> Maven uses src/java/... per default. Have you tried that?
>
>
> Regards
>
> Thorsten
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.1 (MingW32)
>
> iD8DBQFEEXUbQvObkgCcDe0RAurvAJ9R6yQpsS7OKSBa+mnJkkwvNkTVTQCfWdx9
> PKyRi1m9fa9lNLqFYjMP1uU=
> =Jkxh
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: custom src directory layout - how to get it to not checkstyle/javadoc
the tests too.
Posted by David Sag <ds...@epo.org>.
Thorsten Heit <th...@xtramind.com> wrote on 10-03-2006 13:46:19:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> > the directory structure we have is
> >
> > pom.xml
> > src/
> > - org/
>
> Maven uses src/java/... per default. Have you tried that?
>
unfortunately I do not have permission to change the folder heirarchy for
our projects. This is mostly because:
1) we have hundreds of projects
2) we have hundreds of developers
3) we use CVS not SVN internally and CVS don't do folder heirarchy changes
while preserving version histories.
I am able to move the tests into the m2 preferred folder heirarchy however
as we have SFA tests in any of our projects.
I wonder if I would be better off with a heirarchy more like
pom.xml
src/
- org/...
test/
- java/
-- org/...
that would certainly keep the tests apart from the main source, but I'd
really rather at least start the process of moving to the m2 preferred
arrangement.
thoughts?
dave
Re: custom src directory layout - how to get it to not checkstyle/javadoc
the tests too.
Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
> the directory structure we have is
>
> pom.xml
> src/
> - org/
Maven uses src/java/... per default. Have you tried that?
Regards
Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
iD8DBQFEEXUbQvObkgCcDe0RAurvAJ9R6yQpsS7OKSBa+mnJkkwvNkTVTQCfWdx9
PKyRi1m9fa9lNLqFYjMP1uU=
=Jkxh
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org