maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Pluciński <plucinski.mari...@gmail.com>
Subject Re: Compiling maven plugin and using it in the same project.
Date Sat, 02 Mar 2013 15:53:16 GMT
Sorry for the late answer, I did not work on this project in a last few days.

> One simple solution to this problem would be to use a MRM (maven repository
> manager)
> You deploy the plugins in it, and the users just use them as any others
> maven plugins.
> This make sense particulary if you are the only one to modify it and if the
> plugins lifecyle are decoupled from the project lifecyle.

Sounds pretty easy, but I it does not exactly match my situation. As far as I understand,
using MRM I would be responsible for providing repository server available all the time, in
case of anyone needs to build the project. This does not sound good - my project will have
a limited  number of users, so providing the continuous service just for hosting "a few jars"
is completely uneconomical solution.

In the future, I am going to develop plugins outside this project, and make them available
for wider audience. That moment, it will be good to provide some repository (or maybe put
code into Maven Central). But now - I would prefer to have all required code inside source
package (except, of course, contents coming from Central repo).

> This make sense particulary if (...) and if the plugins lifecyle are decoupled from the
project lifecyle.

Unfortunately, they are included in project lifecycle. In this moment, I need them to strictly
match my project's needs. So, as I said, maybe in the future it will apply, but now I'd need
other solution.

Thanks,
Mariusz Plucinski



Wiadomość napisana przez Adrien Rivard <adrien.rivard@gmail.com> w dniu 25 lut 2013,
o godz. 23:35:

> On Mon, Feb 25, 2013 at 10:59 PM, Mariusz Pluciński <
> plucinski.mariusz@gmail.com> wrote:
> 
>>> Why would you want to build a plug-in each time?
>>> Plug-ins are usually very stable and don't change from one year to the
>> next.
>>> 
>>> What is the underlying problem that you are trying to solve that
>> requires a new plug-in each time.
>> 
>> 
>> Yes, plugins used extensively by various people are usually very stable
>> and don't change. But this is not my case.
>> 
>> However, my plugins are not yet stable, and I am doing various changes in
>> it. I said "plugins", as I currently have written two additional plugins
>> for my project (maybe the third one will appear too). Anyway, they are not
>> yet stable, and I often need to fix various things in them. Until now, I
>> was doing it by two-steps: 1) compile & install my plugins; 2) compile my
>> project. I have thought, that it would be good to have them both built in
>> one step. But then, the problem described in first post appeared.
>> 
>> If you are asking about what are those plugins: the one does
>> bytecode-level modifications on compiled classes. It is quite similar to
>> feature called 'relocations' available in maven-shade-plugin, but doing
>> changes that Shade cannot do. The second one is the plugin for compiling
>> classes written in Jasmin (JVM Assembler).
>> 
>> The second thing is that I want to allow my users to build project only by
>> typing "mvm package<enter>" and get everything ready. I can of course,
>> write a README with detailed instruction and so on, but I would prefer to
>> avoid it, if possible. Additionally, I would prefer not to mess local
>> repository and keep everything in source code tree, as I did until now.
>> 
>> 
> One simple solution to this problem would be to use a MRM (maven repository
> manager)
> You deploy the plugins in it, and the users just use them as any others
> maven plugins.
> This make sense particulary if you are the only one to modify it and if the
> plugins lifecyle are decoupled from the project lifecyle.
> 
> 
> 
>> I have created quite dirty solution using exec-plugin to do two calls of
>> "mvn" in sequence. But it looks horrible and I will use it only as a last
>> resort.
>> 
>> 
>>> Are you using Maven 2 or 3? I'm guessing 2.x…
>> 
>> No, I am using latest version of Maven 3:
>> 
>> $ mvn -version
>> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
>> Maven home: /usr/share/maven
>> Java version: 1.7.0_10, vendor: Oracle Corporation
>> Java home:
>> /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre
>> Default locale: pl_PL, platform encoding: UTF-8
>> OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac"
>> 
>> I should have put this into my first post, sorry.
>> 
>> 
>>> What version of Maven? As far as I know, this should generally work
>>> with m3 but not m2.
>> 
>> 
>> Sorry, but in my case it does not work. Were there any particular changes
>> in Maven, introduced to make it possible?
>> 
>> Thanks,
>> Mariusz Plucinski
>> 
>> 
>> 
>> Wiadomość napisana przez Ron Wheeler <rwheeler@artifact-software.com> w
>> dniu 25 lut 2013, o godz. 21:55:
>> 
>>> Why would you want to build a plug-in each time?
>>> Plug-ins are usually very stable and don't change from one year to the
>> next.
>>> 
>>> What is the underlying problem that you are trying to solve that
>> requires a new plug-in each time.
>>> 
>>> 
>>> 
>>> On 25/02/2013 3:18 PM, Mariusz Pluciński wrote:
>>>> Hello,
>>>> 
>>>> I would like to ask, is there any way to have two project: maven plugin
>> and project using the plugin as submodules of the same root project, and
>> compile them just by "mvn package" (orinstall) called for root project?
>>>> 
>>>> I have tried to do it this way, but got an error:
>>>> 
>>>> Unresolveable build extension: Plugin <plugin project id was here>
or
>> one of its dependencies could not be resolved: Could not find artifact
>> <again the same id>.
>>>> 
>>>> In case of dependencies, there is no problem to find artifact being
>> submodule parallel to currently built project - maven understands, that it
>> should build e.g. dependency jar before building the dependent one. Is it
>> possible to make him do this with plugin?
>>>> 
>>>> Best regards,
>>>> Mariusz Pluciński
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Ron Wheeler
>>> President
>>> Artifact Software Inc
>>> email: rwheeler@artifact-software.com
>>> skype: ronaldmwheeler
>>> phone: 866-970-2435, ext 102
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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
>> 
>> 
> 
> 
> -- 
> Adrien Rivard


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


Mime
View raw message