On 4/6/06, Martin Cooper <[EMAIL PROTECTED]> wrote:
> > We tried a couple of things with <resources> such as:
> > <targetPath>../${pom.artifactId}/WEB-INF/src/main/java</targetPath>
> > and
> > <targetPath>${basedir}/${pom.artifactId
> > }/WEB-INF/src/main/java</targetPath>
> > but each would work for one developer and not another. Strange.
>
>
> I'm probably misunderstanding, but why not just:
>
> <targetPath>${project.build.directory}/${pom.artifactId
> }/WEB-INF/src/main/java</targetPath>
Looks like I missed 'target' in the second path, it should have been
${basedir}/target/...
And with that,
<targetPath>${basedir}/target/${pom.artifactId}/WEB-INF/src/main/java</targetPath>
I get this error:
[INFO] Error copying resources
Embedded error: c:\svn\struts\current\action\apps\cookbook\target\classes\c:\svn
\struts\current\action\apps\cookbook\target\struts-cookbook\WEB-INF\src\main\jav
a\examples\bean\ExampleBean.java (The filename, directory name, or volume label
syntax is incorrect)
(<finalName> is defined as ${pom.artifactId} for this build, so that
the war files are named without version numbers.)
I tried Martin's suggestion, but it just put the sources in
(literally) WEB-INF/classes/${project.build.directory}/struts-cookbook/...
Very strange that ${project.build.directory} wasn't evaluated, I
think it works elsewhere. But this suffers from the same problem that
the path is relative to WEB-INF/classes.
So, since <resource>s are meant to be under target/classes, which ends
up in WEB-INF/classes, trying to place things directly under WEB-INF
with <resource> is causing problems.
All I need to do is copy some files from one place to another during
the build... ISTR trying this once before though and not finding a
Maven-approved solution. Perhaps the antrun plugin would work?
That or I've been staring at this too long and I'm missing something
really simple.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]