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 Mon, 25 Feb 2013 21:59:49 GMT
> 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.

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


Mime
View raw message