You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Tim Moloney <t....@verizon.net> on 2006/10/31 06:30:10 UTC

Can maven-ant-plugin create a Felix bundle?

Is it possible for maven-ant-plugin to generate a build.xml file that 
will create a Felix bundle?

Without changing my pom.xml, I ran "mvn ant:ant: to generate a build.xml 
file.  Running ant on that build.xml does create a jar file that 
installs and resolves in Felix but it certainly doesn't execute.

Documentation on maven-ant-plugin is a bit slim.  It just describes the 
one goal (ant:ant) with its two parameters (localRepository and project||).

Perhaps I'm expecting too much from maven-ant-plugin?

Tim Moloney


Re: Can maven-ant-plugin create a Felix bundle?

Posted by Tim Moloney <t....@verizon.net>.
If an Ant build file is generated at the same as the sources are 
released, then Maven is completely removed from the build process.

Marcel Offermans wrote:
> Hello Tim,
>
> On Nov 8, 2006, at 15:57 , Tim Moloney wrote:
>
>> My hope was to use Maven to do development of a project on an 
>> Internet-connected machine.  Then, when the project is released, I 
>> would also release the project's sources, an ant build.xml file, and 
>> all the project's dependencies.  This would be the smallest complete 
>> set of requirements for someone to build the project from source.  
>> This set of requirements would be much less than those required to 
>> build the project using Maven.
>
> In my personal opinion, this is certainly a worth-while thing to do. I 
> agree with your observations about Maven pulling in lots of resources 
> when doing a build.
>
> For public releases, this might be a problem. I am not a Maven expert, 
> but let's assume we do a source release of Felix now and three years 
> from now we get this archive and try to build it again. The only truly 
> reproducable way to do that is to make sure that both the Maven 
> version and the versions of all required dependencies are exactly the 
> same as they were at the time of the release. That also means we need 
> to specify which Maven version to use when we create a release. 
> Currently, I don't see how we can do that (and how even to "freeze" 
> snapshot versions of dependencies, which seems to be completely 
> impossible). The only work-around would be to include a full copy of 
> Maven and all its dependencies in each release.
>
> Greetings, Marcel
>
>


RE: Can maven-ant-plugin create a Felix bundle?

Posted by LECAN Damien <Da...@B2i.fr>.
Hello,

> The only truly reproducable way to do that is to make sure that both  
> the Maven version and the versions of all required dependencies are  
> exactly the same as they were at the time of the release. That also  
> means we need to specify which Maven version to use when we create a  
> release.
In your pom, you can specify (the mininum only) Maven version needed
http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_prerequisites

> (and how even to  
> "freeze" snapshot versions of dependencies, which seems to be  
> completely impossible).
You cannot make a release with snapshot dependencies.

> The only work-around would be to include a  
> full copy of Maven and all its dependencies in each release.
Most of the Maven process is manage by plugins and you can specify a precise version of plugins to use in the pom of your project. Maven core itself is actually missing...

Hope it helps,

Damien

Re: Can maven-ant-plugin create a Felix bundle?

Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Tim,

On Nov 8, 2006, at 15:57 , Tim Moloney wrote:

> My hope was to use Maven to do development of a project on an  
> Internet-connected machine.  Then, when the project is released, I  
> would also release the project's sources, an ant build.xml file,  
> and all the project's dependencies.  This would be the smallest  
> complete set of requirements for someone to build the project from  
> source.  This set of requirements would be much less than those  
> required to build the project using Maven.

In my personal opinion, this is certainly a worth-while thing to do.  
I agree with your observations about Maven pulling in lots of  
resources when doing a build.

For public releases, this might be a problem. I am not a Maven  
expert, but let's assume we do a source release of Felix now and  
three years from now we get this archive and try to build it again.  
The only truly reproducable way to do that is to make sure that both  
the Maven version and the versions of all required dependencies are  
exactly the same as they were at the time of the release. That also  
means we need to specify which Maven version to use when we create a  
release. Currently, I don't see how we can do that (and how even to  
"freeze" snapshot versions of dependencies, which seems to be  
completely impossible). The only work-around would be to include a  
full copy of Maven and all its dependencies in each release.

Greetings, Marcel


Re: Can maven-ant-plugin create a Felix bundle?

Posted by Felix Meschberger <Fe...@day.com>.
Hi Tim,

> For those without access to the Internet, this is a problem.

This just shows how used I am to have permanent Internet connection.... :-)

> Perhaps this is just too much to ask.

Maybe just because nobody knows. Your insights and findings might
probably be worth some lines in the wiki ...

Regards
Felix

Re: Can maven-ant-plugin create a Felix bundle?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Tim Moloney wrote:
> Thanks for the reply.
>
> I too primarily use Maven since I think that Maven is awesome.  
> However, it is not nearly as pervasive as Ant and it is a bit "needy".
>
> It needs access to the Internet, not only to get project dependencies, 
> but to also get all of Maven plugins, which can be quite a lot.  For 
> those without access to the Internet, this is a problem.  Granted, you 
> can initially build on an Internet-connect machine, then move the 
> local repository to the disconnected machine.  However, the local 
> repository includes a lot of dependencies for someone who just needs 
> to build the software but not do development.
>
> My hope was to use Maven to do development of a project on an 
> Internet-connected machine.  Then, when the project is released, I 
> would also release the project's sources, an ant build.xml file, and 
> all the project's dependencies.  This would be the smallest complete 
> set of requirements for someone to build the project from source.  
> This set of requirements would be much less than those required to 
> build the project using Maven.
>
> Perhaps this is just too much to ask.  Thanks again for the reply.

Personally, I would love this capability. That is how I would like to 
Felix releases. I hate having to depend on network connectivity to have 
the build work. I want our releases to be completely self-contained. So, 
if this were available, we would definitely consider using it for future 
Felix releases too.

-> richard

>
> Tim Moloney
>
>
> Felix Meschberger wrote:
>> Hi Tim,
>>
>> I have none, sorry, as I stopped using ant the moment I went maven :-)
>>
>> Regards
>> Felix
>>
>> On 11/8/06, Tim Moloney <t....@verizon.net> wrote:
>>> No suggestions or comments?
>>>
>>>
>>> On Monday, 30 October 2006, Tim Moloney wrote:
>>> > Is it possible for maven-ant-plugin to generate a build.xml file that
>>> > will create a Felix bundle?
>>> >
>>> > Without changing my pom.xml, I ran "mvn ant:ant: to generate a
>>> > build.xml file.  Running ant on that build.xml does create a jar file
>>> > that installs and resolves in Felix but it certainly doesn't execute.
>>> >
>>> > Documentation on maven-ant-plugin is a bit slim.  It just describes
>>> > the one goal (ant:ant) with its two parameters (localRepository and
>>> > project||).
>>> >
>>> > Perhaps I'm expecting too much from maven-ant-plugin?
>>> >
>>> > Tim Moloney
>>> >
>>> >
>>>
>>>
>>
>

Re: Can maven-ant-plugin create a Felix bundle?

Posted by Tim Moloney <t....@verizon.net>.
I just starting playing with bnd this evening.  I will definitely 
investigate this further.

Thanks for the tip.  :)

Peter Kriens wrote:
> The bnd program is also an ant task. It should be quite
> straightforward to take the pom and transfer this to a bnd file, the
> <instruction> elements of the maven plugin are the same as the bnd
> files headers. Your ant script then only has to compile the sources
> and run the bnd task.
>
> http://www.aqute.biz/Code/Bnd
>
> Kind regards,
>
>      Peter Kriens
>      
> TM> Thanks for the reply.
>
> TM> I too primarily use Maven since I think that Maven is awesome.  However,
> TM> it is not nearly as pervasive as Ant and it is a bit "needy".
>
> TM> It needs access to the Internet, not only to get project dependencies,
> TM> but to also get all of Maven plugins, which can be quite a lot.  For 
> TM> those without access to the Internet, this is a problem.  Granted, you
> TM> can initially build on an Internet-connect machine, then move the local
> TM> repository to the disconnected machine.  However, the local repository
> TM> includes a lot of dependencies for someone who just needs to build the
> TM> software but not do development.
>
> TM> My hope was to use Maven to do development of a project on an 
> TM> Internet-connected machine.  Then, when the project is released, I would
> TM> also release the project's sources, an ant build.xml file, and all the
> TM> project's dependencies.  This would be the smallest complete set of 
> TM> requirements for someone to build the project from source.  This set of
> TM> requirements would be much less than those required to build the project
> TM> using Maven.
>
> TM> Perhaps this is just too much to ask.  Thanks again for the reply.
>
> TM> Tim Moloney
>
>
> TM> Felix Meschberger wrote:
>   
>>> Hi Tim,
>>>
>>> I have none, sorry, as I stopped using ant the moment I went maven :-)
>>>
>>> Regards
>>> Felix
>>>
>>> On 11/8/06, Tim Moloney <t....@verizon.net> wrote:
>>>       
>>>> No suggestions or comments?
>>>>
>>>>
>>>> On Monday, 30 October 2006, Tim Moloney wrote:
>>>>         
>>>>> Is it possible for maven-ant-plugin to generate a build.xml file that
>>>>> will create a Felix bundle?
>>>>>
>>>>> Without changing my pom.xml, I ran "mvn ant:ant: to generate a
>>>>> build.xml file.  Running ant on that build.xml does create a jar file
>>>>> that installs and resolves in Felix but it certainly doesn't execute.
>>>>>
>>>>> Documentation on maven-ant-plugin is a bit slim.  It just describes
>>>>> the one goal (ant:ant) with its two parameters (localRepository and
>>>>> project||).
>>>>>
>>>>> Perhaps I'm expecting too much from maven-ant-plugin?
>>>>>
>>>>> Tim Moloney
>>>>>
>>>>>
>>>>>           
>>>>         
>
>
>   


Re[2]: Can maven-ant-plugin create a Felix bundle?

Posted by Peter Kriens <Pe...@aQute.biz>.
The bnd program is also an ant task. It should be quite
straightforward to take the pom and transfer this to a bnd file, the
<instruction> elements of the maven plugin are the same as the bnd
files headers. Your ant script then only has to compile the sources
and run the bnd task.

http://www.aqute.biz/Code/Bnd

Kind regards,

     Peter Kriens
     
TM> Thanks for the reply.

TM> I too primarily use Maven since I think that Maven is awesome.  However,
TM> it is not nearly as pervasive as Ant and it is a bit "needy".

TM> It needs access to the Internet, not only to get project dependencies,
TM> but to also get all of Maven plugins, which can be quite a lot.  For 
TM> those without access to the Internet, this is a problem.  Granted, you
TM> can initially build on an Internet-connect machine, then move the local
TM> repository to the disconnected machine.  However, the local repository
TM> includes a lot of dependencies for someone who just needs to build the
TM> software but not do development.

TM> My hope was to use Maven to do development of a project on an 
TM> Internet-connected machine.  Then, when the project is released, I would
TM> also release the project's sources, an ant build.xml file, and all the
TM> project's dependencies.  This would be the smallest complete set of 
TM> requirements for someone to build the project from source.  This set of
TM> requirements would be much less than those required to build the project
TM> using Maven.

TM> Perhaps this is just too much to ask.  Thanks again for the reply.

TM> Tim Moloney


TM> Felix Meschberger wrote:
>> Hi Tim,
>>
>> I have none, sorry, as I stopped using ant the moment I went maven :-)
>>
>> Regards
>> Felix
>>
>> On 11/8/06, Tim Moloney <t....@verizon.net> wrote:
>>> No suggestions or comments?
>>>
>>>
>>> On Monday, 30 October 2006, Tim Moloney wrote:
>>> > Is it possible for maven-ant-plugin to generate a build.xml file that
>>> > will create a Felix bundle?
>>> >
>>> > Without changing my pom.xml, I ran "mvn ant:ant: to generate a
>>> > build.xml file.  Running ant on that build.xml does create a jar file
>>> > that installs and resolves in Felix but it certainly doesn't execute.
>>> >
>>> > Documentation on maven-ant-plugin is a bit slim.  It just describes
>>> > the one goal (ant:ant) with its two parameters (localRepository and
>>> > project||).
>>> >
>>> > Perhaps I'm expecting too much from maven-ant-plugin?
>>> >
>>> > Tim Moloney
>>> >
>>> >
>>>
>>>
>>


-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599


Re: Can maven-ant-plugin create a Felix bundle?

Posted by Tim Moloney <t....@verizon.net>.
Thanks for the reply.

I too primarily use Maven since I think that Maven is awesome.  However, 
it is not nearly as pervasive as Ant and it is a bit "needy".

It needs access to the Internet, not only to get project dependencies, 
but to also get all of Maven plugins, which can be quite a lot.  For 
those without access to the Internet, this is a problem.  Granted, you 
can initially build on an Internet-connect machine, then move the local 
repository to the disconnected machine.  However, the local repository 
includes a lot of dependencies for someone who just needs to build the 
software but not do development.

My hope was to use Maven to do development of a project on an 
Internet-connected machine.  Then, when the project is released, I would 
also release the project's sources, an ant build.xml file, and all the 
project's dependencies.  This would be the smallest complete set of 
requirements for someone to build the project from source.  This set of 
requirements would be much less than those required to build the project 
using Maven.

Perhaps this is just too much to ask.  Thanks again for the reply.

Tim Moloney


Felix Meschberger wrote:
> Hi Tim,
>
> I have none, sorry, as I stopped using ant the moment I went maven :-)
>
> Regards
> Felix
>
> On 11/8/06, Tim Moloney <t....@verizon.net> wrote:
>> No suggestions or comments?
>>
>>
>> On Monday, 30 October 2006, Tim Moloney wrote:
>> > Is it possible for maven-ant-plugin to generate a build.xml file that
>> > will create a Felix bundle?
>> >
>> > Without changing my pom.xml, I ran "mvn ant:ant: to generate a
>> > build.xml file.  Running ant on that build.xml does create a jar file
>> > that installs and resolves in Felix but it certainly doesn't execute.
>> >
>> > Documentation on maven-ant-plugin is a bit slim.  It just describes
>> > the one goal (ant:ant) with its two parameters (localRepository and
>> > project||).
>> >
>> > Perhaps I'm expecting too much from maven-ant-plugin?
>> >
>> > Tim Moloney
>> >
>> >
>>
>>
>


Re: Can maven-ant-plugin create a Felix bundle?

Posted by Felix Meschberger <Fe...@day.com>.
Hi Tim,

I have none, sorry, as I stopped using ant the moment I went maven :-)

Regards
Felix

On 11/8/06, Tim Moloney <t....@verizon.net> wrote:
> No suggestions or comments?
>
>
> On Monday, 30 October 2006, Tim Moloney wrote:
> > Is it possible for maven-ant-plugin to generate a build.xml file that
> > will create a Felix bundle?
> >
> > Without changing my pom.xml, I ran "mvn ant:ant: to generate a
> > build.xml file.  Running ant on that build.xml does create a jar file
> > that installs and resolves in Felix but it certainly doesn't execute.
> >
> > Documentation on maven-ant-plugin is a bit slim.  It just describes
> > the one goal (ant:ant) with its two parameters (localRepository and
> > project||).
> >
> > Perhaps I'm expecting too much from maven-ant-plugin?
> >
> > Tim Moloney
> >
> >
>
>

Re: Can maven-ant-plugin create a Felix bundle?

Posted by Tim Moloney <t....@verizon.net>.
No suggestions or comments?


On Monday, 30 October 2006, Tim Moloney wrote:
> Is it possible for maven-ant-plugin to generate a build.xml file that 
> will create a Felix bundle?
>
> Without changing my pom.xml, I ran "mvn ant:ant: to generate a 
> build.xml file.  Running ant on that build.xml does create a jar file 
> that installs and resolves in Felix but it certainly doesn't execute.
>
> Documentation on maven-ant-plugin is a bit slim.  It just describes 
> the one goal (ant:ant) with its two parameters (localRepository and 
> project||).
>
> Perhaps I'm expecting too much from maven-ant-plugin?
>
> Tim Moloney
>
>