You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dirk Olmes <di...@xanthippe.ping.de> on 2007/03/01 11:41:45 UTC

Re: How to generate sources from templates

> On 28 Feb 07, at 8:21 AM 28 Feb 07, Rodrigo Ruiz wrote:
>
>> Hi everybody,
>>
>> I need to generate text files from filtered resources, but I do not
>> want
>> them to be copied to the target/classes folder. The files are C header
>> templates that I want to filter using some properties defined through
>> maven profiles.
>>
>> Is there a way to do this apart from using the ant plugin?

> You probably want to use something like Velocity which is real
> templating solution. The archetype mechanism  uses it and so does the
> remote resources plugin. You could lift one of those to create your
> own velocity plugin which would be idea in my mind.

This reminds me ... would it be a good idea to have a generic velocity
plugin that allows to filter template files? E.g. imagine a custom (shell)
script to execute the final artifact that needs the current version merged
in. (I know, there's other ways to do it but said script would be more
than what maven-appassembler-plugin would be able to generate).

-dirk

-- 
Anyway kids, have fun, play nicely, be good. And remember - if it ain't
broke, hit it again.


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


Re: How to stop Maven downloading a particular jar under any circumstances

Posted by Rod Mclaughlin <Ro...@omnimedix.org>.
Thanks Tamas. I have got the Proximity web app running in Tomcat and 
preventing the download of cglib-full with Maven Reloaded in IDEA by 
putting anything which thinks it needs cglib-full in 
$TOMCAT-USER-HOME/proximity/ext-free/storage
eg.
sudo mvn deploy:deploy-file 
-Durl=file:///var/root/proximity/ext-free/storage \
                  -DrepositoryId=extFree 
-Dfile=/my/local/file/cglib-2.1_3.jar \
                  -DgroupId=cglib -DartifactId=cglib -Dversion=2.1_3 
-Dpackaging=jar
and I have
         <settings> <mirrors>
              <mirror>
                    <id>Proximity</id>
                    <mirrorOf>central</mirrorOf>
                    <name>Proximity mirrored central</name>
                    
<url>http://OUR_TOMCAT_SERVER:8080/proximity/repository</url>
              </mirror>
            </mirrors> ....... </settings>
in my $HOME/.m2/settings.xml



Tamás Cservenák wrote:
> Hi,
>
> briefly: you have to "spoof" the artifact with Proximity instead of
> forcing Maven2 to NOT download the specified artfiact. I think it is
> impossible to "point out" one artifact to not get downloaded (thus
> offline mode will not help).
>
> Just take proximity as is, it is prepared for these kind of stuff:
> install the needed cglib into extFree or extNonFree. It will "spoof"
> the central repo, thus the actual CGLIB.
>
> The current version is RC8.
>
> http://proximity.abstracthorizon.org/
>
> Hope helps,
> ~t~
>
>
> On 3/2/07, Wayne Fay <wa...@gmail.com> wrote:
>> Its perhaps a bit more complex than you might like, but I imagine you
>> could make it work if you had a Maven Proxy (ie Proximity) set up.
>> Then you would need to configure your local Maven instances to use the
>> Proxy rather than connecting directly to various repos on the Net.
>>
>> I don't know for sure (never needed this functionality) but I'd expect
>> that Proximity probably has this available somewhere in its
>> configuration...
>>
>> Wayne
>>
>> On 3/1/07, Rod Mclaughlin <Ro...@omnimedix.org> wrote:
>> > Does anyone know how to tell Maven 2
>> > DO NOT DOWNLOAD THIS *!*&^ JAR FILE UNDER ANY CIRCUMSTANCES?
>> >
>> > We have had a problem with cglib-full-2.0.2.jar - there is a lot about
>> > this issue on the web, so I won't go  into it. We know how to exclude
>> > the dependency from another dependency:
>> >             <dependency>
>> >             <groupId>rome</groupId>
>> >             <artifactId>rome</artifactId>
>> >             <version>0.8</version>
>> >             <exclusions>
>> >             <exclusion>
>> >             <groupId>cglib</groupId>
>> >             <artifactId>cglib-full</artifactId>
>> >             </exclusion>
>> >             </exclusions>
>> >             </dependency>
>> > and this works fine from command line mvn install, but when you do mvn
>> > idea:idea, maven brazenly fetches the cglib-full jar, and it's no 
>> end of
>> > trouble deleting it and trying to tell Maven Reloaded within IDEA 
>> not to
>> > get the thing again.
>> >
>> > Thanks for any input
>> > >
>> > >
>> > > 
>> ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> >
>> >
>> > --
>> > Rod McLaughlin
>> > Omnimedix Institute
>> > Rod.McLaughlin@omnimedix.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Rod McLaughlin
Rod.McLaughlin@omnimedix.org
.m2/repository/org/omnimedix/mclaughlin/rod/1.0-SNAPSHOT/rod-1.0-SNAPSHOT.jar


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


Re: How to stop Maven downloading a particular jar under any circumstances

Posted by Tamás Cservenák <t....@gmail.com>.
Hi,

briefly: you have to "spoof" the artifact with Proximity instead of
forcing Maven2 to NOT download the specified artfiact. I think it is
impossible to "point out" one artifact to not get downloaded (thus
offline mode will not help).

Just take proximity as is, it is prepared for these kind of stuff:
install the needed cglib into extFree or extNonFree. It will "spoof"
the central repo, thus the actual CGLIB.

The current version is RC8.

http://proximity.abstracthorizon.org/

Hope helps,
~t~


On 3/2/07, Wayne Fay <wa...@gmail.com> wrote:
> Its perhaps a bit more complex than you might like, but I imagine you
> could make it work if you had a Maven Proxy (ie Proximity) set up.
> Then you would need to configure your local Maven instances to use the
> Proxy rather than connecting directly to various repos on the Net.
>
> I don't know for sure (never needed this functionality) but I'd expect
> that Proximity probably has this available somewhere in its
> configuration...
>
> Wayne
>
> On 3/1/07, Rod Mclaughlin <Ro...@omnimedix.org> wrote:
> > Does anyone know how to tell Maven 2
> > DO NOT DOWNLOAD THIS *!*&^ JAR FILE UNDER ANY CIRCUMSTANCES?
> >
> > We have had a problem with cglib-full-2.0.2.jar - there is a lot about
> > this issue on the web, so I won't go  into it. We know how to exclude
> > the dependency from another dependency:
> >             <dependency>
> >             <groupId>rome</groupId>
> >             <artifactId>rome</artifactId>
> >             <version>0.8</version>
> >             <exclusions>
> >             <exclusion>
> >             <groupId>cglib</groupId>
> >             <artifactId>cglib-full</artifactId>
> >             </exclusion>
> >             </exclusions>
> >             </dependency>
> > and this works fine from command line mvn install, but when you do mvn
> > idea:idea, maven brazenly fetches the cglib-full jar, and it's no end of
> > trouble deleting it and trying to tell Maven Reloaded within IDEA not to
> > get the thing again.
> >
> > Thanks for any input
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Rod McLaughlin
> > Omnimedix Institute
> > Rod.McLaughlin@omnimedix.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How to stop Maven downloading a particular jar under any circumstances

Posted by Wayne Fay <wa...@gmail.com>.
Its perhaps a bit more complex than you might like, but I imagine you
could make it work if you had a Maven Proxy (ie Proximity) set up.
Then you would need to configure your local Maven instances to use the
Proxy rather than connecting directly to various repos on the Net.

I don't know for sure (never needed this functionality) but I'd expect
that Proximity probably has this available somewhere in its
configuration...

Wayne

On 3/1/07, Rod Mclaughlin <Ro...@omnimedix.org> wrote:
> Does anyone know how to tell Maven 2
> DO NOT DOWNLOAD THIS *!*&^ JAR FILE UNDER ANY CIRCUMSTANCES?
>
> We have had a problem with cglib-full-2.0.2.jar - there is a lot about
> this issue on the web, so I won't go  into it. We know how to exclude
> the dependency from another dependency:
>             <dependency>
>             <groupId>rome</groupId>
>             <artifactId>rome</artifactId>
>             <version>0.8</version>
>             <exclusions>
>             <exclusion>
>             <groupId>cglib</groupId>
>             <artifactId>cglib-full</artifactId>
>             </exclusion>
>             </exclusions>
>             </dependency>
> and this works fine from command line mvn install, but when you do mvn
> idea:idea, maven brazenly fetches the cglib-full jar, and it's no end of
> trouble deleting it and trying to tell Maven Reloaded within IDEA not to
> get the thing again.
>
> Thanks for any input
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Rod McLaughlin
> Omnimedix Institute
> Rod.McLaughlin@omnimedix.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


How to stop Maven downloading a particular jar under any circumstances

Posted by Rod Mclaughlin <Ro...@omnimedix.org>.
Does anyone know how to tell Maven 2
DO NOT DOWNLOAD THIS *!*&^ JAR FILE UNDER ANY CIRCUMSTANCES?

We have had a problem with cglib-full-2.0.2.jar - there is a lot about 
this issue on the web, so I won't go  into it. We know how to exclude 
the dependency from another dependency:
            <dependency>
            <groupId>rome</groupId>
            <artifactId>rome</artifactId>
            <version>0.8</version>
            <exclusions>
            <exclusion>
            <groupId>cglib</groupId>
            <artifactId>cglib-full</artifactId>
            </exclusion>
            </exclusions>
            </dependency>
and this works fine from command line mvn install, but when you do mvn 
idea:idea, maven brazenly fetches the cglib-full jar, and it's no end of 
trouble deleting it and trying to tell Maven Reloaded within IDEA not to 
get the thing again.

Thanks for any input
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Rod McLaughlin
Omnimedix Institute
Rod.McLaughlin@omnimedix.org


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


Re: How to generate sources from templates

Posted by Jason van Zyl <ja...@maven.org>.
On 1 Mar 07, at 5:41 AM 1 Mar 07, Dirk Olmes wrote:

>> On 28 Feb 07, at 8:21 AM 28 Feb 07, Rodrigo Ruiz wrote:
>>
>>> Hi everybody,
>>>
>>> I need to generate text files from filtered resources, but I do not
>>> want
>>> them to be copied to the target/classes folder. The files are C  
>>> header
>>> templates that I want to filter using some properties defined  
>>> through
>>> maven profiles.
>>>
>>> Is there a way to do this apart from using the ant plugin?
>
>> You probably want to use something like Velocity which is real
>> templating solution. The archetype mechanism  uses it and so does the
>> remote resources plugin. You could lift one of those to create your
>> own velocity plugin which would be idea in my mind.
>
> This reminds me ... would it be a good idea to have a generic velocity
> plugin that allows to filter template files?

All the mojos reuse the Plexus velocity component, but putting a mojo  
wrapper around would probably be very useful.

Jason.

> E.g. imagine a custom (shell)
> script to execute the final artifact that needs the current version  
> merged
> in. (I know, there's other ways to do it but said script would be more
> than what maven-appassembler-plugin would be able to generate).
>
> -dirk
>
> -- 
> Anyway kids, have fun, play nicely, be good. And remember - if it  
> ain't
> broke, hit it again.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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