Hi Tim,
We do something similar. Our "run-time" configuration extends the
"compile-time" one. We use the "cachepath" ant task to create the
classpath for the compile time dependencies, and then the
"cachefileset" task to create a fileset of jars to copy into the WAR
file.
so our ivy xml has something like this:
...
<configurations>
<conf name="compile" extends="war"/>
<conf name="war" />
</configurations>
<dependencies>
<dependency org="javax.servlet" name="servlet-api" rev="2.4"
conf="compile->default"/>
<dependency org="ojdbc14" name="ojdbc14" rev="10.2.0.4"
conf="compile->default"/>
<dependency org="stax" name="stax" rev="1.2.0" conf="war->default"/>
<dependency org="jcommon" name="jcommon" rev="0.8.2" conf="war->default"/>
....
and the ant scripts use:
...
<ivy:cachepath pathid="classpath" conf="compile" />
<ivy:cachefileset setid="webimpact-lib" conf="war" />
...
But keeping the configurations completely separate is ok too. The only
reason you're getting the error (i think) is because you should use a
semicolon instead of a colon.
i.e. conf="dev->default;install->default"
And you can also specify multiple configurations on the left hand side
of the "->" to save time
i.e. conf="dev,install->default"
Regards,
Gareth
On Tue, Nov 24, 2009 at 1:25 PM, Timothy Aston <[email protected]> wrote:
>
>
> I feel like this is a basic question. I'm still quite new to Ivy and
> haven't fully grasped all the concepts yet, so maybe there is a totally
> different way of doing this.
>
> My situation is that I've got some dependencies that I need for both
> compiling and running. Thus far, I've had one configuration for
> compile-time dependencies, and a second one for run-time dependencies.
> This makes it quite simple since I can just point at one folder for my
> compile classpath, and the other folder for my runtime (a WAR file). What
> I was thinking is that I could just specify something like:
>
> conf="dev->default, install->default"
>
> on my dependency, but that gives an error.
>
> Is there a better way of achieving this?
>
>
> -Tim
>