You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Stephen Gargan (JIRA)" <ji...@apache.org> on 2011/09/18 04:11:09 UTC

[jira] [Created] (AVRO-890) Maven archetype for creating Avro service projects

Maven archetype for creating Avro service projects 
---------------------------------------------------

                 Key: AVRO-890
                 URL: https://issues.apache.org/jira/browse/AVRO-890
             Project: Avro
          Issue Type: Improvement
          Components: java
    Affects Versions: 1.5.4
            Reporter: Stephen Gargan
            Assignee: Stephen Gargan
            Priority: Minor
             Fix For: 1.6.0


I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.

Once built, it can be added to the local archetypes catalog via
mvn archetype:crawl

and then will be available via the generate plugin
mvn archetype:generate

or it can be invoked directly as follows
mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   

The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.

I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Stephen Gargan <st...@gmail.com>.
Understandable. If you're worried about polluting the repo with suspect
artifacts you can run mvn build-helper:remove-project-artifact to remove
them afterwards.  Just a suggestion.


On Wed, Sep 21, 2011 at 12:12 AM, Doug Cutting <cu...@apache.org> wrote:

> On 09/20/2011 04:09 PM, Stephen Gargan wrote:
> > Its very curious that the build could not find the maven plugin. I've
> just
> > made a clean checkout with the patch and the 'mvn verify' goal ran fine.
> Do
> > you have a copy of the plugin in your local repo?
>
> No, I do not have a copy in my local repo.
>
> > Generating the sample project as part of the build references the
> > maven-plugin. I'm thinking that the archetype plugin must fork a new
> maven
> > build for the sample and its this build that needs the plugin installed.
> > Without the jar in the local repo neither the 'integration-test' or
> 'verify'
> > goals will succeed. The 'test' goal will pass because the sample project
> is
> > not generated or built and tying the generation to this phase will still
> > fail without the maven-plugin installed locally.
> >
> > You should not have any issues running the install goal, its the default
> > goal I usually run for maven builds; are you experiencing problems? If
> you
> > prefer not to I can remove the the integration testing from the build.
> Let
> > me know.
>
> Install works fine, but I prefer not to use it when testing patches.
>
> Doug
>

Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Doug Cutting <cu...@apache.org>.
On 09/20/2011 04:09 PM, Stephen Gargan wrote:
> Its very curious that the build could not find the maven plugin. I've just
> made a clean checkout with the patch and the 'mvn verify' goal ran fine. Do
> you have a copy of the plugin in your local repo?

No, I do not have a copy in my local repo.

> Generating the sample project as part of the build references the
> maven-plugin. I'm thinking that the archetype plugin must fork a new maven
> build for the sample and its this build that needs the plugin installed.
> Without the jar in the local repo neither the 'integration-test' or 'verify'
> goals will succeed. The 'test' goal will pass because the sample project is
> not generated or built and tying the generation to this phase will still
> fail without the maven-plugin installed locally.
> 
> You should not have any issues running the install goal, its the default
> goal I usually run for maven builds; are you experiencing problems? If you
> prefer not to I can remove the the integration testing from the build. Let
> me know.

Install works fine, but I prefer not to use it when testing patches.

Doug

Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Stephen Gargan <st...@gmail.com>.
Doug,

Its very curious that the build could not find the maven plugin. I've just
made a clean checkout with the patch and the 'mvn verify' goal ran fine. Do
you have a copy of the plugin in your local repo?

Generating the sample project as part of the build references the
maven-plugin. I'm thinking that the archetype plugin must fork a new maven
build for the sample and its this build that needs the plugin installed.
Without the jar in the local repo neither the 'integration-test' or 'verify'
goals will succeed. The 'test' goal will pass because the sample project is
not generated or built and tying the generation to this phase will still
fail without the maven-plugin installed locally.

You should not have any issues running the install goal, its the default
goal I usually run for maven builds; are you experiencing problems? If you
prefer not to I can remove the the integration testing from the build. Let
me know.

regards,

Steve.

On Tue, Sep 20, 2011 at 10:26 PM, Doug Cutting (JIRA) <ji...@apache.org>wrote:

>
>    [
> https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109004#comment-13109004]
>
> Doug Cutting commented on AVRO-890:
> -----------------------------------
>
> When I run 'mvn integration-test' it fails with:
>
> [ERROR] Plugin org.apache.avro:avro-maven-plugin:1.6.0-SNAPSHOT or one of
> its dependencies could not be resolved: Could not find artifact
> org.apache.avro:avro-maven-plugin:jar:1.6.0-SNAPSHOT -> [Help 1]
>
> But if I instead run 'mvn install' then it runs integration tests.  I
> generally don't run 'install' since I don't want to confuse myself by having
> working versions in my local maven repo.
>
> What can I do to get the archetype tests run without installing?  I
> generally run 'mvn clean test' before each commit, and that's what the
> Jenkins build server runs after each commit, so my preference would be for
> the archetype code to be tested then too.  Is there an alternative that I
> should use that does not install artifacts in my local repo?  I tried
> 'verify', but it also fails with the above message.  Could we somehow fix
> things so that 'verify' works?
>
> > Maven archetype for creating Avro service projects
> > ---------------------------------------------------
> >
> >                 Key: AVRO-890
> >                 URL: https://issues.apache.org/jira/browse/AVRO-890
> >             Project: Avro
> >          Issue Type: Improvement
> >          Components: java
> >    Affects Versions: 1.5.4
> >            Reporter: Stephen Gargan
> >            Assignee: Stephen Gargan
> >            Priority: Minor
> >              Labels: archetype, maven
> >             Fix For: 1.6.0
> >
> >         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
> >
> >
> > I've put together the beginnings of an maven archetypes subproject in the
> java module to help folks kickstart avro projects. The first archetype
> creates a simple avro based ordering service using the netty transport and
> includes an integration test for the service. The service is very naive,
> though its really only the plumbing that is important and the example is
> illustrative enough to get people going.
> > Once built, it can be added to the local archetypes catalog via
> > mvn archetype:crawl
> > and then will be available via the generate plugin
> > mvn archetype:generate
> > or it can be invoked directly as follows
> > mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype
> -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple
> -DartifactId=simple-service -Dversion=1.0-SNAPSHOT
> > The parent pom contains common config for generating a pom for the
> archetype that references the current avro build version. This takes some
> slight of hand with maven resources to insert the version and will be
> reusable for other archetypes in the future.
> > I intend putting together a map-reduce archetype soon and am open to
> suggestions for other archetypes that might be useful. Perhaps one that
> included the code from AVRO-883 to kick start a basic serialization project?
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Scott Carey <sc...@apache.org>.
I think we can bind it to 'install' -- it will then run after all the
things it depends on have run 'install'.  It might end up running the test
after it packages and installs to the local repo and then fail, but that
is acceptable for the archetype IMO.  It won't 'deploy' without the test
completing however.

-Scott

On 9/21/11 4:29 PM, "Stephen Gargan" <st...@gmail.com> wrote:

>This sounds good, we'll need to veto the normal integration-testing but I
>think removing the archetype build extension will take care of this. To
>insure it runs before 'install' it might make sense to bind it to the
>'verify' stage. I'll play around with it and see what can be done.
>
>
>On Wed, Sep 21, 2011 at 11:54 PM, Scott Carey <sc...@apache.org>
>wrote:
>
>>
>> On 9/21/11 3:48 PM, "Doug Cutting" <cu...@apache.org> wrote:
>>
>> >On 09/21/2011 02:55 PM, Stephen Gargan wrote:
>> >> As a suggestion, I could try to veto the integration testing as part
>>of
>> >>the
>> >> normal build and separate it into a profile. The profile could be run
>> >>during
>> >> development but otherwise be omitted from builds. It would remove the
>> >> independent verification you get from the continuous integration,
>>but it
>> >> might be acceptable in this situation as the sample projects are
>>pretty
>> >> static.
>> >
>> >Could we change it so that this integration test is only run with 'mvn
>> >install' and not with 'mvn verify'?
>>
>> I think we can do that by binding the execution phase of the integration
>> test to install.  If that works, it would be the best option IMO -- we
>> won't catch problems with simple 'mvn test', but will surely before a
>> release.  These samples will rarely need to change anyway, and if so the
>> change should be minor.
>>
>> >
>> >Doug
>>
>>
>>



Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Stephen Gargan <st...@gmail.com>.
This sounds good, we'll need to veto the normal integration-testing but I
think removing the archetype build extension will take care of this. To
insure it runs before 'install' it might make sense to bind it to the
'verify' stage. I'll play around with it and see what can be done.


On Wed, Sep 21, 2011 at 11:54 PM, Scott Carey <sc...@apache.org> wrote:

>
> On 9/21/11 3:48 PM, "Doug Cutting" <cu...@apache.org> wrote:
>
> >On 09/21/2011 02:55 PM, Stephen Gargan wrote:
> >> As a suggestion, I could try to veto the integration testing as part of
> >>the
> >> normal build and separate it into a profile. The profile could be run
> >>during
> >> development but otherwise be omitted from builds. It would remove the
> >> independent verification you get from the continuous integration, but it
> >> might be acceptable in this situation as the sample projects are pretty
> >> static.
> >
> >Could we change it so that this integration test is only run with 'mvn
> >install' and not with 'mvn verify'?
>
> I think we can do that by binding the execution phase of the integration
> test to install.  If that works, it would be the best option IMO -- we
> won't catch problems with simple 'mvn test', but will surely before a
> release.  These samples will rarely need to change anyway, and if so the
> change should be minor.
>
> >
> >Doug
>
>
>

Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Scott Carey <sc...@apache.org>.
On 9/21/11 3:48 PM, "Doug Cutting" <cu...@apache.org> wrote:

>On 09/21/2011 02:55 PM, Stephen Gargan wrote:
>> As a suggestion, I could try to veto the integration testing as part of
>>the
>> normal build and separate it into a profile. The profile could be run
>>during
>> development but otherwise be omitted from builds. It would remove the
>> independent verification you get from the continuous integration, but it
>> might be acceptable in this situation as the sample projects are pretty
>> static.
>
>Could we change it so that this integration test is only run with 'mvn
>install' and not with 'mvn verify'?

I think we can do that by binding the execution phase of the integration
test to install.  If that works, it would be the best option IMO -- we
won't catch problems with simple 'mvn test', but will surely before a
release.  These samples will rarely need to change anyway, and if so the
change should be minor.

>
>Doug



Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Doug Cutting <cu...@apache.org>.
On 09/21/2011 02:55 PM, Stephen Gargan wrote:
> As a suggestion, I could try to veto the integration testing as part of the
> normal build and separate it into a profile. The profile could be run during
> development but otherwise be omitted from builds. It would remove the
> independent verification you get from the continuous integration, but it
> might be acceptable in this situation as the sample projects are pretty
> static.

Could we change it so that this integration test is only run with 'mvn
install' and not with 'mvn verify'?

Doug

Re: [jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by Stephen Gargan <st...@gmail.com>.
The only issue with pointing it at a released plugin is that the generated
samples would not then reference the most recent build; projects generated
with the 1.6.0 archetype would generate a project referencing a 1.5.X
plugin. I completely agree that having a separate release cycle just for
this would be troublesome.

As a suggestion, I could try to veto the integration testing as part of the
normal build and separate it into a profile. The profile could be run during
development but otherwise be omitted from builds. It would remove the
independent verification you get from the continuous integration, but it
might be acceptable in this situation as the sample projects are pretty
static.

How do you feel about this?

On Wed, Sep 21, 2011 at 9:45 PM, Scott Carey (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109861#comment-13109861]
>
> Scott Carey commented on AVRO-890:
> ----------------------------------
>
> For a released artifact, this is not a problem.  The archetype will work
> fine because it won't point to a SNAPSHOT.
>
> In the case of testing the archetype then, it either needs to point to a
> released version, or we must install avro-maven-plugin before the archetype
> plugin forks the build.
>
> Or we could release it and version the archetype separately from the main
> project, but that has many other serious drawbacks.
>
> > Maven archetype for creating Avro service projects
> > ---------------------------------------------------
> >
> >                 Key: AVRO-890
> >                 URL: https://issues.apache.org/jira/browse/AVRO-890
> >             Project: Avro
> >          Issue Type: Improvement
> >          Components: java
> >    Affects Versions: 1.5.4
> >            Reporter: Stephen Gargan
> >            Assignee: Stephen Gargan
> >            Priority: Minor
> >              Labels: archetype, maven
> >             Fix For: 1.6.0
> >
> >         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
> >
> >
> > I've put together the beginnings of an maven archetypes subproject in the
> java module to help folks kickstart avro projects. The first archetype
> creates a simple avro based ordering service using the netty transport and
> includes an integration test for the service. The service is very naive,
> though its really only the plumbing that is important and the example is
> illustrative enough to get people going.
> > Once built, it can be added to the local archetypes catalog via
> > mvn archetype:crawl
> > and then will be available via the generate plugin
> > mvn archetype:generate
> > or it can be invoked directly as follows
> > mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype
> -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple
> -DartifactId=simple-service -Dversion=1.0-SNAPSHOT
> > The parent pom contains common config for generating a pom for the
> archetype that references the current avro build version. This takes some
> slight of hand with maven resources to insert the version and will be
> reusable for other archetypes in the future.
> > I intend putting together a map-reduce archetype soon and am open to
> suggestions for other archetypes that might be useful. Perhaps one that
> included the code from AVRO-883 to kick start a basic serialization project?
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] [Updated] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Stephen Gargan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Gargan updated AVRO-890:
--------------------------------

    Attachment: archetypes.patch

Based on Scott's comments on the dev list, I've made a patch where the archetype integration is attached to the install phase.  It does install the archetype before the integration test run so there is a small chance of polluting the local repo with a broken build runs but if this is kept in mind this should be fine. The 'clean test' and 'clean verify' builds now run without executing the tests and resolving the maven-plugin.

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108067#comment-13108067 ] 

Doug Cutting commented on AVRO-890:
-----------------------------------

Looks neat!

I'm no Maven expert, but noticed a few things that might be improved.
 - The Maven module names should probably be named "Apache Avro ...", not just "Avro ...", to be consistent with the other Avro modules.
 - Would it be possible to have the 'mvn test' for the archetypes module generate a project and build it?  That'd be a good way to make sure that it stays up-to-date.
 - I generated a project.  It includes a test (great!) but when I ran 'mvn test' in the project it didn't run the test.  If I ran 'mvn test -Dtest=SimpleOrderServiceIntegrationTest' then it did run the test, and it passed.  Shouldn't it run the test by default?

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Stephen Gargan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108240#comment-13108240 ] 

Stephen Gargan commented on AVRO-890:
-------------------------------------

Doug,

It turns out there is a pretty nifty integration-test goal in the archetypes plugin that will generate and build a sample project. I've updated the build to use this.

The reason the test doesn't run in the test phase is that its an integration test. Its run with the failsafe plugin and executes in the integration-test phase of the build. The idea is that you'd test the service classes as normal (in isolation, with unit tests and mocks) in the test phase and then test the entire service end to end in the integration-test phase. If you run hte build with mvn integration-test, you should see the test run.

The way the failsafe plugin splits up the testing is very flexible; it makes it easy to start a server once in the the pre-itegration test phase and then run a large test suite against the single server instance. This can save a lot of time if the service is complex and expensive to setup. I didn't want to muddy the sample with this kind of detail but its simple enough to modify the build to do it.

I've changed the names in the poms and uploaded a patch (twice it seems! both are the same) with the changes.  

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Scott Carey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109861#comment-13109861 ] 

Scott Carey commented on AVRO-890:
----------------------------------

For a released artifact, this is not a problem.  The archetype will work fine because it won't point to a SNAPSHOT.

In the case of testing the archetype then, it either needs to point to a released version, or we must install avro-maven-plugin before the archetype plugin forks the build.  

Or we could release it and version the archetype separately from the main project, but that has many other serious drawbacks.

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Doug Cutting (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting resolved AVRO-890.
-------------------------------

      Resolution: Fixed
    Hadoop Flags: Reviewed

I tested this.  It works great.  I committed it.

Thanks, Stephen!
                
> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Scott Carey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109021#comment-13109021 ] 

Scott Carey commented on AVRO-890:
----------------------------------

All targets before 'install' should work without having any SNAPSHOT artifacts in your local repo.  This ensures that all build actions occur from code in the Maven reactor, and not cached outputs in the local repo.  If it requires "install" then the build may not be reproducible without running 'install'.

I am not sure if it is configuration on our end, or a bug in the failsafe plugin.  Usually these sorts of errors are plugin bugs -- plugins looking for artifacts in the local repo instead of the maven reactor.  If it is a configuration issue, it may have something to do with <pluginManagement> or the scoping of the avro-maven-plugin dependency.


> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109004#comment-13109004 ] 

Doug Cutting commented on AVRO-890:
-----------------------------------

When I run 'mvn integration-test' it fails with:

[ERROR] Plugin org.apache.avro:avro-maven-plugin:1.6.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.apache.avro:avro-maven-plugin:jar:1.6.0-SNAPSHOT -> [Help 1]

But if I instead run 'mvn install' then it runs integration tests.  I generally don't run 'install' since I don't want to confuse myself by having working versions in my local maven repo.

What can I do to get the archetype tests run without installing?  I generally run 'mvn clean test' before each commit, and that's what the Jenkins build server runs after each commit, so my preference would be for the archetype code to be tested then too.  Is there an alternative that I should use that does not install artifacts in my local repo?  I tried 'verify', but it also fails with the above message.  Could we somehow fix things so that 'verify' works?

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Stephen Gargan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Gargan updated AVRO-890:
--------------------------------

    Attachment: archetypes.patch

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112180#comment-13112180 ] 

Doug Cutting commented on AVRO-890:
-----------------------------------

Here are some options I see:
 # Leave things as they are in the current patch, so that 'mvn verify' from the top-level fails but 'mvn install' works.
 # Disable the integration tests so that 'mvn verify' works.
 # Change the the archetype module to depend on a released version of Avro.  If we then make an incompatible change that breaks the archetype it would not be identified by 'mvn verify', but at least some testing would be done to the archetype.  Maybe we could have it use the released version or later, so that, if you run 'mvn install' then it will test using the current snapshot?

What other options do folks see?  Of these I currently prefer (3).

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Stephen Gargan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109094#comment-13109094 ] 

Stephen Gargan commented on AVRO-890:
-------------------------------------

The issue is with the sample project generating source from the protocol
files via the maven-plugin, the failsafe plugin would not run till later.
The archetype plugin forks a separate build and the reactor artifacts are
not available to it, this is why it tries to resolve it from the local repo.
There does not seem to be a way currently to give the new build access to
the current reactor artifacts.




> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch, archetypes.patch, archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AVRO-890) Maven archetype for creating Avro service projects

Posted by "Stephen Gargan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Gargan updated AVRO-890:
--------------------------------

    Attachment: archetypes.patch

> Maven archetype for creating Avro service projects 
> ---------------------------------------------------
>
>                 Key: AVRO-890
>                 URL: https://issues.apache.org/jira/browse/AVRO-890
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.4
>            Reporter: Stephen Gargan
>            Assignee: Stephen Gargan
>            Priority: Minor
>              Labels: archetype, maven
>             Fix For: 1.6.0
>
>         Attachments: archetypes.patch
>
>
> I've put together the beginnings of an maven archetypes subproject in the java module to help folks kickstart avro projects. The first archetype creates a simple avro based ordering service using the netty transport and includes an integration test for the service. The service is very naive, though its really only the plumbing that is important and the example is illustrative enough to get people going.
> Once built, it can be added to the local archetypes catalog via
> mvn archetype:crawl
> and then will be available via the generate plugin
> mvn archetype:generate
> or it can be invoked directly as follows
> mvn archetype:generate -DarchetypeArtifactId=avro-service-archetype -DarchetypeGroupId=org.apache.avro -DgroupId=org.simple -DartifactId=simple-service -Dversion=1.0-SNAPSHOT   
> The parent pom contains common config for generating a pom for the archetype that references the current avro build version. This takes some slight of hand with maven resources to insert the version and will be reusable for other archetypes in the future.
> I intend putting together a map-reduce archetype soon and am open to suggestions for other archetypes that might be useful. Perhaps one that included the code from AVRO-883 to kick start a basic serialization project?  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira