castor >1.0 split code into castor + castor-codegen-antask,
so I tried :

- creating a relocation pom for castor 1.1
- adding castor:castor:1.1 and org.codehaus.castor:castor-codegen-anttask as
dependencies to the plugin

I get the expected warning :
    [WARNING] While downloading castor:castor:1.1
      This artifact has been relocated to org.codehaus.castor:castor:1.1.

But the plugin classpath still refers to castor 0.9.7 :

[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::4 for project:
null:castor-maven-plugin:maven-plugin:1.0 from the repository.
[DEBUG] org.codehaus.mojo:castor-maven-plugin:maven-plugin:1.0:runtime(selected
for runtime)
[DEBUG]   org.codehaus.castor:castor-codegen-anttask:jar:1.1:compile(selected
for compile)
[DEBUG]     org.codehaus.castor:castor-codegen:jar:1.1:compile (selected for
compile)
[DEBUG]       org.codehaus.castor:castor:jar:1.1:compile (selected for
compile)
(...)
[WARNING] While downloading castor:castor:1.1
  This artifact has been relocated to org.codehaus.castor:castor:1.1.

[DEBUG]   org.codehaus.castor:castor:jar:1.1:compile (selected for compile)
(...)
[DEBUG]   castor:castor:jar:0.9.7:runtime (selected for runtime)


And the generated code is still broken.

Nico


2007/8/7, Thorsten Heit <[EMAIL PROTECTED]>:
>
> Hi,
>
> > I'm using castor to generate code.
> > the plugin (mojo) has a dependency on castor:castor:0.9.7
> > This version has a generator bug
> > (http://jira.codehaus.org/browse/CASTOR-742)
> > that is solved in 1.0.4
> >
> > But I can't override the plugin classpath to set version to 1.0.4 as the
> > groupId has been changed since 1.0 to org.codehaus.castor.
> >
> > Any idea on a way to solve this ???
>
> I once had a similar problem: One of the dependencies I was using had a
> dependency to commons-beanutils:commons-beanutils:1.4-dev that doesn't
> exist on central repo; well, at least the directory exists, but is empty. I
> solved it by creating the following pom that I deployed to my internal
> repository:
>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>commons-beanutils</groupId>
>   <artifactId>commons-beanutils</artifactId>
>   <version>1.4-dev</version>
>   <name>commons-beanutils</name>
>   <description>
>     The commons-beanutils package.
>   </description>
>   <distributionManagement>
>     <relocation>
>       <groupId>commons-beanutils</groupId>
>       <artifactId>commons-beanutils</artifactId>
>       <version>1.4</version>
>     </relocation>
>   </distributionManagement>
> </project>
>
> I suggest you try a similar approach: Create a pom for castor:castor, but
> use a different version that doesn't exist on central, say, 0.9.7.1, add
> relocation info for org.codehaus.castor:castor:1.0.4 into it (assuming
> that this version is compatible to 0.9.7) and deploy it to your
> repository. Then add a dependency to this pseudo pom into your main
> pom.xml.
>
> Maven should see that you use a newer version for castor:castor:0.9.7which is 
> used by the plugin, and finally use that instead.
>
>
> HTH
>
> Thorsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to