Re: [maven-dependency-plugin] Issues with multiple invocations of dependency:upack goal (readonly local parameter)

2009-10-10 Thread Brian Fox
This is likely because there is some conflict from calling the plugin
from your plugin. You can have multiple invocations of the dependency
plugin from the pom without issues. Calling and extending plugins in
M2 is essentially a grey area, looks like you found the edge to black
;-)

On Fri, Oct 9, 2009 at 4:55 AM, kkarad kka...@gmail.com wrote:

 Hi all,

 I 've got a pom type parent project which includes 4 modules (child
 projects)

 Each module produces a jar file and during the deployment phase the
 maven-dependency-plugin unpacks it to a specific location (the
 dependency:unpack goal is called indirectly from my own custom plugin).

 At the 2nd dependency:unpack call (module2) build fails with error message:

 Error configuring: org.apache.maven.plugins:maven-dependency-plugin. Reason:
 ERROR: Cannot override read-only parameter: local in goal: dependency:unpack

 My understanding is that the read-only parameter local (which I dont
 use/set it) is initialised by the 1st dependency:unpack call (in module1).
 Therefore the 2nd dependency:unpack invocation fails because the local
 parameter is already set.

 Do you know if this is a bug or a problem on my side? How can I fix it?

 The mave-dependency-plugin version is 2.1

 The flow of the build is as follows:

 clean deploy
 [module1:clean]
 [module1:deploy]
 [module1:myplugin:mygoal] -- calls indirectly dependency:unpack using
 @execute lifecycle=my-lifecycle phase=deploy
 [module2:clean]
 [module2:deploy]
 [module2:dependency:unpack] -- -- calls indirectly dependency:unpack using
 @execute lifecycle=my-lifecycle phase=deploy but build fails
 ...

 The custom lifecycle xml is :
 lifecycles
    lifecycle
        idmy-lifecycle/id
        phases
            phase
                iddeploy/id
                executions
                    execution
                        goals

 goalcom.mycomp.myapp:maven-my-plugin:get/goal
                        /goals
                        configuration
                            ...
                        /configuration
                    /execution
                    execution
                        goals

 goalorg.apache.maven.plugins:maven-dependency-plugin:unpack/goal
                        /goals
                        configuration
                            artifactItems
                                artifactItem
                                    groupId${deployedGroupId}/groupId

 artifactId${deployedArtifactId}/artifactId
                                    version${deployedVersion}/version

 classifier${deployedClassifier}/classifier
                                    type${deployedType}/type

 overWrite${deploymentOverwrite}/overWrite

 outputDirectory${deploymentFolder}/outputDirectory
                                /artifactItem
                            /artifactItems
                        /configuration
                    /execution
                /executions
            /phase
        /phases
    /lifecycle
 /lifecycles

 --
 View this message in context: 
 http://www.nabble.com/-maven-dependency-plugin--Issues-with-multiple-invocations-of-dependency%3Aupack-goal-%28readonly-%22local%22-parameter%29-tp25817744p25817744.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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



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



[maven-dependency-plugin] Issues with multiple invocations of dependency:upack goal (readonly local parameter)

2009-10-09 Thread kkarad

Hi all,

I 've got a pom type parent project which includes 4 modules (child
projects)

Each module produces a jar file and during the deployment phase the
maven-dependency-plugin unpacks it to a specific location (the
dependency:unpack goal is called indirectly from my own custom plugin).

At the 2nd dependency:unpack call (module2) build fails with error message:

Error configuring: org.apache.maven.plugins:maven-dependency-plugin. Reason:
ERROR: Cannot override read-only parameter: local in goal: dependency:unpack

My understanding is that the read-only parameter local (which I dont
use/set it) is initialised by the 1st dependency:unpack call (in module1).
Therefore the 2nd dependency:unpack invocation fails because the local
parameter is already set.

Do you know if this is a bug or a problem on my side? How can I fix it?

The mave-dependency-plugin version is 2.1

The flow of the build is as follows:

 clean deploy
[module1:clean]
[module1:deploy]
[module1:myplugin:mygoal] -- calls indirectly dependency:unpack using
@execute lifecycle=my-lifecycle phase=deploy
[module2:clean]
[module2:deploy]
[module2:dependency:unpack] -- -- calls indirectly dependency:unpack using
@execute lifecycle=my-lifecycle phase=deploy but build fails
...

The custom lifecycle xml is :
lifecycles
lifecycle
idmy-lifecycle/id
phases
phase
iddeploy/id
executions
execution
goals
   
goalcom.mycomp.myapp:maven-my-plugin:get/goal
/goals
configuration
...
/configuration
/execution
execution
goals
   
goalorg.apache.maven.plugins:maven-dependency-plugin:unpack/goal
/goals
configuration
artifactItems
artifactItem
groupId${deployedGroupId}/groupId
   
artifactId${deployedArtifactId}/artifactId
version${deployedVersion}/version
   
classifier${deployedClassifier}/classifier
type${deployedType}/type
   
overWrite${deploymentOverwrite}/overWrite
   
outputDirectory${deploymentFolder}/outputDirectory
/artifactItem
/artifactItems
/configuration
/execution
/executions
/phase
/phases
/lifecycle
/lifecycles

-- 
View this message in context: 
http://www.nabble.com/-maven-dependency-plugin--Issues-with-multiple-invocations-of-dependency%3Aupack-goal-%28readonly-%22local%22-parameter%29-tp25817744p25817744.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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