You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Steve Ariantaj <st...@tvworks.com> on 2009/03/25 18:55:04 UTC

Maven 2.1.0 regression issue w/ testResources outputDirectory

I'm getting the following error with maven 2.1.0. Pom chunk pasted
below.
  <build>
    <testResources>
 
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>

Did outputDirectory element's name/order got changed in 2.1.0? This was
working fine in 2.0.9. 


[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: unknown
POM Location:
/home/steve/tva/packaging/mss/installers/components/mss/pom.xml

Reason: Parse error reading POM. Reason: Unrecognised association:
'outputDirectory' (position: START_TAG seen ...<testResources>\n
<outputDirectory>... @81:24)  for project unknown at
/home/steve/tva/packaging/mss/installers/components/mss/pom.xml


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading
POM. Reason: Unrecognised association           : 'outputDirectory'
(position: START_TAG seen ...<testResources>\n      <outputDirectory>...
@81:24)  for p           roject unknown at
/home/steve/tva/packaging/mss/installers/components/mss/pom.xml
        at
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:432)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:300)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Parse
error reading POM. Reason: Unrecogn           ised association:
'outputDirectory' (position: START_TAG seen ...<testResources>\n
<outputDirectory>..           . @81:24)  for project unknown at
/home/steve/tva/packaging/mss/installers/components/mss/pom.xml
        at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMav
enProjectBuilder.java:16           20)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMav
enProjectBuilder.java:15           81)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileI
nternal(DefaultMavenProj           ectBuilder.java:506)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenPr
ojectBuilder.java:200)
        at
org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:632)
        at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:515)
        at
org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:419)
        ... 11 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
Unrecognised association: 'outputDirec           tory' (position:
START_TAG seen ...<testResources>\n      <outputDirectory>... @81:24)
        at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Reade
r.java:749)
        at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reade
r.java:1996)
        at
org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java
:3912)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMav
enProjectBuilder.java:16           16)
        ... 17 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Mar 25 10:28:19 PDT 2009
[INFO] Final Memory: 2M/14M
[INFO]
------------------------------------------------------------------------

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


RE: Maven 2.1.0 regression issue w/ testResources outputDirectory

Posted by Steve Ariantaj <st...@tvworks.com>.
Thanks Jason and Dennis!

-----Original Message-----
From: Jason Chaffee [mailto:jason.chaffee@zilliontv.tv] 
Sent: Wednesday, March 25, 2009 1:51 PM
To: Maven Developers List
Subject: RE: Maven 2.1.0 regression issue w/ testResources
outputDirectory

I believe this is a parameter for the plugin configuration itself.  For
example,

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          ...
          <outputDirectory>foo/bar</outputDirectory>
          ...
        </configuration>
      </plugin>
    </plugins>
    ...
  </build>
  ...
</project>



-----Original Message-----
From: Dennis Lundberg [mailto:dennisl@apache.org] 
Sent: Wednesday, March 25, 2009 2:08 PM
To: Maven Developers List
Subject: Re: Maven 2.1.0 regression issue w/ testResources
outputDirectory

outputDirectory is a plugin configuration parameter.
See this page for how it can be used:
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-res
ources.html

Steve Ariantaj wrote:
> Thanks for your quick reply, Benjamin.
> 
> According to the resource plugin v2.3, 
>
http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
> o.html
> 
> there is a required outputDirectory parameter:
>
http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
> o.html#outputDirectory
> 
> and it used to work in 2.0.9. For now, I've removed it and it seems to
> work without it, it'd be good to reconcile the documentation w/ the
> model. I'd be happy to do this (I haven't done it before, so I'll need
> instructions).
> 
> Steve
> 
> -----Original Message-----
> From: Benjamin Bentmann [mailto:benjamin.bentmann@udo.edu] 
> Sent: Wednesday, March 25, 2009 12:07 PM
> To: Maven Developers List
> Subject: Re: Maven 2.1.0 regression issue w/ testResources
> outputDirectory
> 
> Steve Ariantaj wrote:
> 
>> I'm getting the following error with maven 2.1.0. Pom chunk pasted
>> below.
>>   <build>
>>     <testResources>
>>
>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
>> Did outputDirectory element's name/order got changed in 2.1.0? This
> was
>> working fine in 2.0.9. 
> 
> Compare the Maven Model Reference [0]:
> 
>    <testResources>
>      <testResource>
>        <targetPath/>
>        <filtering/>
>        <directory/>
>        <includes/>
>        <excludes/>
>      </testResource>
>    </testResources>
> 
> There is no <outputDirectory> element as a child of <testResources>.
> 
> 
> Benjamin
> 
> 
> [0] http://maven.apache.org/ref/2.0.8/maven-model/maven.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

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


Re: Maven 2.1.0 regression issue w/ testResources outputDirectory

Posted by Dennis Lundberg <de...@apache.org>.
outputDirectory is a plugin configuration parameter.
See this page for how it can be used:
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html

Steve Ariantaj wrote:
> Thanks for your quick reply, Benjamin.
> 
> According to the resource plugin v2.3, 
> http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
> o.html
> 
> there is a required outputDirectory parameter:
> http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
> o.html#outputDirectory
> 
> and it used to work in 2.0.9. For now, I've removed it and it seems to
> work without it, it'd be good to reconcile the documentation w/ the
> model. I'd be happy to do this (I haven't done it before, so I'll need
> instructions).
> 
> Steve
> 
> -----Original Message-----
> From: Benjamin Bentmann [mailto:benjamin.bentmann@udo.edu] 
> Sent: Wednesday, March 25, 2009 12:07 PM
> To: Maven Developers List
> Subject: Re: Maven 2.1.0 regression issue w/ testResources
> outputDirectory
> 
> Steve Ariantaj wrote:
> 
>> I'm getting the following error with maven 2.1.0. Pom chunk pasted
>> below.
>>   <build>
>>     <testResources>
>>
> <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
>> Did outputDirectory element's name/order got changed in 2.1.0? This
> was
>> working fine in 2.0.9. 
> 
> Compare the Maven Model Reference [0]:
> 
>    <testResources>
>      <testResource>
>        <targetPath/>
>        <filtering/>
>        <directory/>
>        <includes/>
>        <excludes/>
>      </testResource>
>    </testResources>
> 
> There is no <outputDirectory> element as a child of <testResources>.
> 
> 
> Benjamin
> 
> 
> [0] http://maven.apache.org/ref/2.0.8/maven-model/maven.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

RE: Maven 2.1.0 regression issue w/ testResources outputDirectory

Posted by Jason Chaffee <ja...@zilliontv.tv>.
I believe this is a parameter for the plugin configuration itself.  For example,

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          ...
          <outputDirectory>foo/bar</outputDirectory>
          ...
        </configuration>
      </plugin>
    </plugins>
    ...
  </build>
  ...
</project>

-----Original Message-----
From: Steve Ariantaj [mailto:steve_ariantaj@tvworks.com] 
Sent: Wednesday, March 25, 2009 12:28 PM
To: Maven Developers List
Subject: RE: Maven 2.1.0 regression issue w/ testResources outputDirectory


Thanks for your quick reply, Benjamin.

According to the resource plugin v2.3, 
http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
o.html

there is a required outputDirectory parameter:
http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
o.html#outputDirectory

and it used to work in 2.0.9. For now, I've removed it and it seems to
work without it, it'd be good to reconcile the documentation w/ the
model. I'd be happy to do this (I haven't done it before, so I'll need
instructions).

Steve

-----Original Message-----
From: Benjamin Bentmann [mailto:benjamin.bentmann@udo.edu] 
Sent: Wednesday, March 25, 2009 12:07 PM
To: Maven Developers List
Subject: Re: Maven 2.1.0 regression issue w/ testResources
outputDirectory

Steve Ariantaj wrote:

> I'm getting the following error with maven 2.1.0. Pom chunk pasted
> below.
>   <build>
>     <testResources>
>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
> 
> Did outputDirectory element's name/order got changed in 2.1.0? This
was
> working fine in 2.0.9. 

Compare the Maven Model Reference [0]:

   <testResources>
     <testResource>
       <targetPath/>
       <filtering/>
       <directory/>
       <includes/>
       <excludes/>
     </testResource>
   </testResources>

There is no <outputDirectory> element as a child of <testResources>.


Benjamin


[0] http://maven.apache.org/ref/2.0.8/maven-model/maven.html

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


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


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


Re: Maven 2.1.0 regression issue w/ testResources outputDirectory

Posted by Benjamin Bentmann <be...@udo.edu>.
Steve Ariantaj wrote:

> According to the resource plugin v2.3, 
> http://maven.apache.org/plugins/maven-resources-plugin/testResources-mojo.html
> 
> there is a required outputDirectory parameter:
> http://maven.apache.org/plugins/maven-resources-plugin/testResources-mojo.html#outputDirectory

The mojo parameter is still existent but it doesn't map to XML in the 
way you did.

Explicit plugin configuration would go into the <configuration> element. 
In case of the outputDirectory parameter of the Resources Plugin, it's 
value defaults to the expression ${project.build.testOutputDirectory}, 
i.e. the mojo is implicitly configured from the contents of
   <project>/<build>/<testOutputDirector>

So, the documentation should be alright with regard to the model. Maybe 
[0] can shed some additional light on plugin configuration.


Benjamin


[0] http://maven.apache.org/guides/mini/guide-configuring-plugins.html

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


RE: Maven 2.1.0 regression issue w/ testResources outputDirectory

Posted by Steve Ariantaj <st...@tvworks.com>.
Thanks for your quick reply, Benjamin.

According to the resource plugin v2.3, 
http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
o.html

there is a required outputDirectory parameter:
http://maven.apache.org/plugins/maven-resources-plugin/testResources-moj
o.html#outputDirectory

and it used to work in 2.0.9. For now, I've removed it and it seems to
work without it, it'd be good to reconcile the documentation w/ the
model. I'd be happy to do this (I haven't done it before, so I'll need
instructions).

Steve

-----Original Message-----
From: Benjamin Bentmann [mailto:benjamin.bentmann@udo.edu] 
Sent: Wednesday, March 25, 2009 12:07 PM
To: Maven Developers List
Subject: Re: Maven 2.1.0 regression issue w/ testResources
outputDirectory

Steve Ariantaj wrote:

> I'm getting the following error with maven 2.1.0. Pom chunk pasted
> below.
>   <build>
>     <testResources>
>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
> 
> Did outputDirectory element's name/order got changed in 2.1.0? This
was
> working fine in 2.0.9. 

Compare the Maven Model Reference [0]:

   <testResources>
     <testResource>
       <targetPath/>
       <filtering/>
       <directory/>
       <includes/>
       <excludes/>
     </testResource>
   </testResources>

There is no <outputDirectory> element as a child of <testResources>.


Benjamin


[0] http://maven.apache.org/ref/2.0.8/maven-model/maven.html

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


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


Re: Maven 2.1.0 regression issue w/ testResources outputDirectory

Posted by Benjamin Bentmann <be...@udo.edu>.
Steve Ariantaj wrote:

> I'm getting the following error with maven 2.1.0. Pom chunk pasted
> below.
>   <build>
>     <testResources>
>       <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
> 
> Did outputDirectory element's name/order got changed in 2.1.0? This was
> working fine in 2.0.9. 

Compare the Maven Model Reference [0]:

   <testResources>
     <testResource>
       <targetPath/>
       <filtering/>
       <directory/>
       <includes/>
       <excludes/>
     </testResource>
   </testResources>

There is no <outputDirectory> element as a child of <testResources>.


Benjamin


[0] http://maven.apache.org/ref/2.0.8/maven-model/maven.html

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