maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wouter Boers" <wgbo...@gmail.com>
Subject Re: Maven2 incorrectly locates sources
Date Wed, 10 Jan 2007 14:41:32 GMT
Hi Siegfried,

@2: Yes I know its not the preferred/recommended way to set up maven. I
don't like it either but as said before its a migration project so sometimes
you have to cut corners.

As for the ${basedir}/../.. that helped. Don't ask me why but it did solve
the problem so thanks for the pointer. Shame I did not think of that :)

Any explanation why this does work... I always want/like to know why.

Regards, Wouter

On 1/10/07, Siegfried Goeschl <siegfried.goeschl@it20one.at> wrote:
>
> Hi,
>
> 1) you can try to run help:effective-pom and help:effective-settings to
> look at your complete POM and current settings
>
> 2) looking at your snippet it seems that the source code is NOT located
> in the project but in somewhere else in the directory tree. This is not
> the recommended way to setup a Maven project. Maybe using
> ${basedir}/../.. might help.
>
> Cheers,
>
> Siegfried Goeschl
>
>
>
> Wouter Boers wrote:
> > Hi,
> >
> > I am migrating a rather large project to maven2 and while doing that I
> run
> > into a very strange problem I cannot explain.
> >
> > The source directory location cannot be changed due to migration issues
> > so I
> > set the source dir in the pom.xml as follows:
> >
> >  <build>
> >
> >
> <sourceDirectory>../../code/basisverzekeringApplicationModuleCode/</sourceDirectory>
> >
> >  </build>
> >
> > When compiling the sources (mvn clean compile with jdk 1.4.2_08) maven
> > finds
> > 1006 source files and fails to build while in the IDE (eclipse) no
> problem
> > exists.
> >
> > So just for test purposed I manually copied the sources to the default
> > location (src/main/java) and used:
> >
> >  <build>
> >    <!--
> >
> >
> <sourceDirectory>../../code/basisverzekeringApplicationModuleCode/</sourceDirectory>
> >
> >    -->
> >  </build>
> >
> > To my surprise, maven located 1018 files and compiled successfully!
> >
> > Can someone explain to me why with the sourcedirectory set maven found
> 1006
> > files and with the default, maven located 1018 files.
> >
> > Obviously its missing some sources files and hence fails to  compile but
> > why
> > it is missing the files? Are there default filters ative when setting
> > setting the source directory.
> >
> > I have 'verbosed' the compiler
> >
> >      <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-compiler-plugin</artifactId>
> >        <configuration>
> >          <compilerArguments>
> >            <verbose />
> >          </compilerArguments>
> >          <configuration>
> >            <source>1.4</source>
> >            <target>1.4</target>
> >          </configuration>
> >        </configuration>
> >      </plugin>
> >
> > so see with files maven passes to the compiler and I indeed can see
> which
> > files its missing but I have no clue why (no pattern in the filenames of
> > the
> > missing files).
> >
> > And to make matters worse, if I use jdk 1.5 the difference is even more
> > shocking. Maven then only find 894 files instead of the required 1018.
> >
> > Do anyone have any clue because I am lost here completely.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message