The second one is closer. It should actually be
<testResources><testResource></testResource></testResources>
Sorry for the bad doco - I will get it polished up shortly.
<targetPath/is relative, so what you have here is not appropriate,
and is not needed regardless (the base it is copied to is the
destination directory).
Cheers,
Brett
5/6/05, Hugo Palma <hpalma (AT) digitalis (DOT) ptwrote:
Still can't make it work.
I didn't mention in the first post but i'm using the <testResources>
element as parent to resource.
So my pom looks like:
<build>
<testResources>
<resources>
<resource>
<directory>src/sql</directory>
<targetPath>${maven.build.dest}</targetPath>
</resource>
</resources>
</testResources>
</build>
and i've tried:
<build>
<testResources>
<resource>
<directory>src/sql</directory>
<targetPath>${maven.build.dest}</targetPath>
</resource>
</testResources>
</build>
with no success. The error i get is:
Error processing projects for
the rea
ctor:
at (DefaultMaven.java:117)
at (MavenCli.java:233)
at (Native Method)
at
(NativeMethodAccessorImpl.
java:39)
at
(DelegatingMethodAcces
sorImpl.java:25)
at (Method.java:324)
at
(Launcher.java:303)
at (Launcher.java:243)
at
(Launcher.java:416)
at (Launcher.java:363)
Caused by: Error
while readin
g model from file 'C:\java\projectos\Digitalis\pom.xml'.
at
(Default
MavenProjectBuilder.java:470)
at
le()
at
(DefaultMave
nProjectBuilder.java:117)
at (DefaultMaven.java:266)
at
(DefaultMaven.java:170)
at (DefaultMaven.java:102)
9 more
Caused by:
TEXT must b
e immediately followed by END_TAG and not START_TAG (position: START_TAG
seen
.<resources>\r\n\t\t\t\t<resource@144:15)
at
(MXParser.java:105
9)
at
(MavenXpp3Re
ader.java:133)
at
(MavenXpp3Re
ader.java:886)
at
(MavenXpp3Reader.j
ava:1660)
at
()
Thanks for the help
Hugo
Kenney Westerhof wrote:
Fri, 6 May 2005, Brett Porter wrote:
>
>
>
>5/6/05, Hugo Palma <hpalma (AT) digitalis (DOT) ptwrote:
>>
>>
I'm trying to reference a resource like i did in Maven 1 using the
resource element like this:
<resource>
<directory>src/test/otherResources</directory>
<includes>
<includexml</include>
</includes>
</resource>
>>nested inside <resources /inside <build/this should work.
>>
>>
>>
But it seems that in Maven 2 the only child element <resourceaccepts
is the <targetPathelement.
>>Where did you get that information from is there an error in the
>>docs? targetPath is the only one not allowed in m2 :)
>>
>>
>
>Not according to Resource.java in maven-model :)
>
>In addition to Brett, here's some more information, extracted from the
>sources:
>
>Resource (<resource/>) has an optional child <targetPath/element;
>Resource extends FileSet which adds the <directory/element;
>FileSet extends PatternSet which adds <includes/and <excludes/tags;
>
>The includes and excludes are both List's, and are built by nested
><include/and <exclude/tags respectively. Pretty much maven1 style.
>
>so the complete set will be:
>
><project>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<targetPath>whatever/</targetPath>
<includes>
<includexcfg</include>
</includes>
<excludes>
<excludeexample</exclude>
</excludes>
</resource>
</resources>
</build>
></project>
>
>This is not clear in
(could use some
>indenting and '/' in the ending tags for clarity, there).
>
>
>Kenney Westerhof
>http://www.neonics.com
>GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
>
>To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
>For additional commands, e-mail: users-help (AT) maven (DOT) apache.org
>
>
>
>
To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
For additional commands, e-mail: users-help (AT) maven (DOT) apache.org