You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2014/04/25 10:07:04 UTC

SLING-3520 - Consolidate archetype plugin versions in a parent pom

Hi,

I've raised SLING-3520 to track the consolidation of plugin versions
we use in the generated archetypes. I have a proof-of-concept patch
attached, so feel free to comment on it.

If no one objects, I will make the changes early next week.

Robert

Re: SLING-3520 - Consolidate archetype plugin versions in a parent pom

Posted by Robert Munteanu <ro...@lmn.ro>.
On Fri, Apr 25, 2014 at 5:34 PM, Robert Munteanu <ro...@lmn.ro> wrote:
> On Fri, Apr 25, 2014 at 5:27 PM, Justin Edelson
> <ju...@justinedelson.com> wrote:
>> Hi Robert,
>> Is this dependent upon some new feature of the archetype plugin? I
>> could have sworn I tried to do something like this before and failed.
>
> Actually it's not about the archetype plugin. I tried using the
> archetype plugin for tihs until someone on stackoverflow instructed me
> to use plain-old resource filtering. [1]
>
>>
>> I do see one minor, but annoying, problem. If you look at the pom.xml
>> file generated while running the archetype IT, it has this in it:
>>
>> <outputDirectory>/Users/justin/KeplerWorkspace/sling-builder/tooling/maven/archetypes/bundle/target/classes</outputDirectory>
>>
>> (well, not exactly that, but you get what I'm saying).
>>
>> This seems to only happen while running the IT. Normal execution
>> doesn't have this problem.
>>
>> This isn't too big of a problem today, but would be an issue if we
>> added more ITs to the archetypes. Any ideas if there is a way to fix
>> it?
>
> Right now some archetypes have a reference directory which contains
> the exact output which must be generated by using the archetype. I
> would suggest using the postBuildHookScript [1], which is indeed new
> in 2.2, and verify that the execution was successful. For instance:
>
> - no warnings printed in the log
> - files are placed in their locations as expected ( e.g. for the
> bundle plugin we expect a java .class file and a DS .xml file )
>
> Anyway, I'll take a look and see if this can be fixed.

I was able to fix this and attached a new revision of the patch to SLING-3520.

I've also updated the 'normal' IT to verify that no warnings are
generated when the plugin is used to generate a project. To do this I
also fixed some minor issues in the bundle plugin.

Next steps:

- update new archetype parent pom to work for all projects
- update plugin versions from archetype parent pom
- release archetype parent pom 1
- include the parent pom for all plugins

Robert

>
> Robert
>
> [1]: https://stackoverflow.com/questions/23264594/managing-common-values-for-multiple-maven-archetypes
> [2]: https://maven.apache.org/archetype/maven-archetype-plugin/integration-test-mojo.html#postBuildHookScript
>
>>
>> Otherwise, I'm +1 on rolling this out.
>>
>> Regards,
>> Justin
>>
>> On Fri, Apr 25, 2014 at 4:07 AM, Robert Munteanu <ro...@apache.org> wrote:
>>> Hi,
>>>
>>> I've raised SLING-3520 to track the consolidation of plugin versions
>>> we use in the generated archetypes. I have a proof-of-concept patch
>>> attached, so feel free to comment on it.
>>>
>>> If no one objects, I will make the changes early next week.
>>>
>>> Robert
>
>
>
> --
> Sent from my (old) computer



-- 
Sent from my (old) computer

Re: SLING-3520 - Consolidate archetype plugin versions in a parent pom

Posted by Robert Munteanu <ro...@lmn.ro>.
On Fri, Apr 25, 2014 at 5:27 PM, Justin Edelson
<ju...@justinedelson.com> wrote:
> Hi Robert,
> Is this dependent upon some new feature of the archetype plugin? I
> could have sworn I tried to do something like this before and failed.

Actually it's not about the archetype plugin. I tried using the
archetype plugin for tihs until someone on stackoverflow instructed me
to use plain-old resource filtering. [1]

>
> I do see one minor, but annoying, problem. If you look at the pom.xml
> file generated while running the archetype IT, it has this in it:
>
> <outputDirectory>/Users/justin/KeplerWorkspace/sling-builder/tooling/maven/archetypes/bundle/target/classes</outputDirectory>
>
> (well, not exactly that, but you get what I'm saying).
>
> This seems to only happen while running the IT. Normal execution
> doesn't have this problem.
>
> This isn't too big of a problem today, but would be an issue if we
> added more ITs to the archetypes. Any ideas if there is a way to fix
> it?

Right now some archetypes have a reference directory which contains
the exact output which must be generated by using the archetype. I
would suggest using the postBuildHookScript [1], which is indeed new
in 2.2, and verify that the execution was successful. For instance:

- no warnings printed in the log
- files are placed in their locations as expected ( e.g. for the
bundle plugin we expect a java .class file and a DS .xml file )

Anyway, I'll take a look and see if this can be fixed.

Robert

[1]: https://stackoverflow.com/questions/23264594/managing-common-values-for-multiple-maven-archetypes
[2]: https://maven.apache.org/archetype/maven-archetype-plugin/integration-test-mojo.html#postBuildHookScript

>
> Otherwise, I'm +1 on rolling this out.
>
> Regards,
> Justin
>
> On Fri, Apr 25, 2014 at 4:07 AM, Robert Munteanu <ro...@apache.org> wrote:
>> Hi,
>>
>> I've raised SLING-3520 to track the consolidation of plugin versions
>> we use in the generated archetypes. I have a proof-of-concept patch
>> attached, so feel free to comment on it.
>>
>> If no one objects, I will make the changes early next week.
>>
>> Robert



-- 
Sent from my (old) computer

Re: SLING-3520 - Consolidate archetype plugin versions in a parent pom

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi Robert,
Is this dependent upon some new feature of the archetype plugin? I
could have sworn I tried to do something like this before and failed.

I do see one minor, but annoying, problem. If you look at the pom.xml
file generated while running the archetype IT, it has this in it:

<outputDirectory>/Users/justin/KeplerWorkspace/sling-builder/tooling/maven/archetypes/bundle/target/classes</outputDirectory>

(well, not exactly that, but you get what I'm saying).

This seems to only happen while running the IT. Normal execution
doesn't have this problem.

This isn't too big of a problem today, but would be an issue if we
added more ITs to the archetypes. Any ideas if there is a way to fix
it?

Otherwise, I'm +1 on rolling this out.

Regards,
Justin

On Fri, Apr 25, 2014 at 4:07 AM, Robert Munteanu <ro...@apache.org> wrote:
> Hi,
>
> I've raised SLING-3520 to track the consolidation of plugin versions
> we use in the generated archetypes. I have a proof-of-concept patch
> attached, so feel free to comment on it.
>
> If no one objects, I will make the changes early next week.
>
> Robert