You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@apache.org> on 2005/09/14 06:09:24 UTC

[m1] trouble with relative paths and dist:prepare-src-filesystem

I'm having trouble with relative paths for source code.  Whatever constructs
the path to the source code for compilation is able to deal with the
relative path... but not dist:prepare-src-filesystem.

Is there a way to "convert" maven.src.dir into an absolute path at build
time?  Here's what's happening:

Project directory structure:
shale/
     build/
          project.xml
          core-library/
                project.xml
                project.properties
          other-sub-project/
      core-library/
          src/

The build files live under 'build' in a directory structure that reflects
what I wish the actual project looked like.  Since I can't rearrange the
project, [have to live with an existing Ant build] this was suggested by
another developer and is working well except for the empty source
distributions.

So, core-library/project.properties has:
maven.src.dir=../../core-library/src

which properly backs up from core-library to build to shale and then down to
the 'actual' core-library/src.  And all is well *if* you run 'dist' from
build/core-library.

But when you use the reactor to execute 'dist' on each sub-project from 
'build', this part of maven-dist-plugin's plugin.jelly does not see the 
source code:

    <!-- Copy Source -->
    <util:available file="${maven.src.dir}">
      <ant:copy todir="${maven.dist.src.assembly.dir}/src">
        <ant:fileset dir="${maven.src.dir}" />
      </ant:copy>
    </util:available>

I suspect that it's starting from 'build' instead of 'build/core-library'
and so is not getting to the right place.  Does anyone see an easy
workaround for this?

Thanks,
-- 
Wendy Smoak



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org