Hi Richard:

Thanks for taking the time to outline the process.  I certainly appreciate
it!  My use of git has been somewhat limited to working on my own
repositories.

Now it makes sense.  I originally cloned the *tomitribe\tomee* repository
and started making my changes to add the Histogram example.  My confusion
was how the relationship between the *tomitribe\tomee* repository and my
own forked version of it.

I will reconstruct everything on my MacBook Pro and continue my work.

Best regards,

Mike.



On Mon, Dec 3, 2018 at 8:47 AM Richard Monson-Haefel <monsonhae...@gmail.com>
wrote:

> Hi Michael,
>
> I might be able to shed some light on this.  The process I've used is as
> follows:
>
> 1. I go to the apache/TomEE git hub page and click on "Fork" (its a button
> on the top right)
> 2. Select your own account and it will clone the entire TomEE repo to your
> own account. On my its monsonhaefel/TomEE
> 3. Now clone your own copy to your local machine by creating a directory
> for it and executing the clone command. You will need the URL for TomEE
> repository on your own account. You can get that by going to your own TomEE
> repo and clicking on the green "Clone or Download" button and copying the
> URL. Once you have the URL you can make a clone using the git clone
> command. In my case it looks as follows:
>     $ git clone https://github.com/monsonhaefel/tomee.git
> 4. Once you have the TomEE repo from your own account on your local
> machine, you can make changes to any file and the stage it and commit it
> when ready.  Basically, you need two commands to commit changes.  The first
> command simply tells git that files that have been changes need to be
> "staged" for commit.
>     $ git add .    //note: if you only want to stage one file replace the
> period with the file name (including path if you are not in the same
> directory as that file) otherwise the period stages all the files that have
> changed.
> Once you have staged the file you can commit as follows:
>     $ git commit -m "This is where you write your comment explaining your
> changes"
> 5. Now that you have committed your changes to your local machine you can
> push them up to your GitHub account and update your personal copy of
> TomEE.  But before you do that its important to make sure your changes
> don't conflict with someone else's changes by doing a pull from the
> original source at the apache/TomEE.  That way if someone else changes the
> same file but got it into the repo before you, you won't overwrite their
> changes. This is a conflict. When you get a conflict you will see a warning
> and can work on a merge which is a whole 'nother topic not covered here. I
> have yet to run into a conflict.  Here is the pull command to check for
> conflicts:
>    $ git pull origin https://github.com/apache/tomee.git
> Notice that I did the pull on the actual TomEE project repository, not my
> local one.
> 6. Assuming all went well and you did not get any warnings about a
> conflict you can now push your changes up to your own GitHub account with
> the following Git command
>    $ git push
> 7. Once you have pushed the code up to your GitHub account you can proceed
> to make a Pull Request.  Just go to your GitHub account and your own TomEE
> page and click on tab named "Pull Request". It will identify the changes
> you made and allow you to title and describe your changes. When you save
> the pull request it will automatically go into the apache/TomEE project for
> others to review and, if your changes are accepted, commit to the main
> project.
>
>
> I've left out some details as I trying to do this on the fly. Also, its
> entirely possible I made some mistakes, but I think the process above
> should get you there.
>
>
>
> On Mon, Dec 3, 2018 at 7:07 AM Michael Redlich <mpre...@gmail.com> wrote:
>
>> Hi Ivan:
>>
>> Ah, OK, cool.  I will indeed do that.
>>
>> Since I’m new to the open-source community, I would appreciate knowing how
>> I would use the forked TomEE repository on my own Github account relative
>> to the repository I cloned on my local machine.
>>
>> I appreciate everyone’s patience as I get myself established!
>>
>> Mike.
>>
>>
>> On Mon, Dec 3, 2018 at 5:50 AM Ivan Junckes Filho <ivanjunc...@gmail.com>
>> wrote:
>>
>> > You need to have your own fork. If you don't have it, just go to the
>> > apache/tomee address and click "Fork".
>> >
>> > After that you need to add another remote branch.
>> >
>> > git remote add <remote-name> <remote-address>
>> >
>> > For example:
>> > git remote add ivan https://github.com/ivanjunckes/tomee.git
>> >
>> > Or if you use a ssh key:
>> > git remote add ivan g...@github.com:ivanjunckes/tomee.git
>> >
>> > They you will do this command to push:
>> > git push <remote-name> <branch-name>
>> >
>> > Replacing the variables would be something like:
>> > git push ivan branch_test
>> >
>> > On Sun, Dec 2, 2018 at 5:30 PM Michael Redlich <mpre...@gmail.com>
>> wrote:
>> >
>> >> Hi Ivan:
>> >>
>> >> I just tried to push a new branch to the tomee git repository.  When I
>> >> executed *git push <remote_name> <branch_name>*, I used my own GitHub
>> >> account for authentication, but knowing that it might fail anyway, I
>> >> received the following message:
>> >>
>> >> *Username for 'https://github.com <https://github.com>': mpredli01*
>> >> *Password for 'https://mpredl...@github.com
>> >> <https://mpredl...@github.com>':*
>> >> *remote: Permission to apache/tomee.git denied to mpredli01.*
>> >> *fatal: unable to access 'https://github.com/apache/tomee.git/
>> >> <https://github.com/apache/tomee.git/>': The requested URL returned
>> error:
>> >> 403*
>> >>
>> >> I assume I would need my own authentication to the tomee git
>> repository?
>> >> Please advise on how to proceed.  Thanks!
>> >>
>> >> Mike.
>> >>
>> >>
>> >>
>> >>
>> >> On Thu, Nov 29, 2018 at 6:41 AM Ivan Junckes Filho <
>> ivanjunc...@gmail.com>
>> >> wrote:
>> >>
>> >>> Hi Michael,
>> >>>
>> >>> These are some commands that may help you.
>> >>>
>> >>> #Create a branch from master
>> >>> git checkout -b <branch-name>
>> >>>
>> >>> #List the remotes you have
>> >>> git remote -v
>> >>>
>> >>> #Create a new remote
>> >>> git remote add <remote-name> <remote-url>
>> >>>
>> >>> #Push to the remote branch
>> >>> git push <remote-name> <branch-name>
>> >>>
>> >>>
>> >>>
>> >>> On Thu, Nov 29, 2018 at 8:25 AM Michael Redlich <mpre...@gmail.com>
>> >>> wrote:
>> >>>
>> >>>> Hi Romain:
>> >>>>
>> >>>> Thanks for all the background information on this!  I certainly
>> >>>> appreciate
>> >>>> it.
>> >>>>
>> >>>> Mike.
>> >>>>
>> >>>> On Wed, Nov 28, 2018 at 10:47 AM Romain Manni-Bucau <
>> >>>> rmannibu...@gmail.com>
>> >>>> wrote:
>> >>>>
>> >>>> > Hello Michael,
>> >>>> >
>> >>>> > in prometheus, histograms are not represented directly like their
>> >>>> class
>> >>>> > and the prometheus representation is done through an endpoint and
>> not
>> >>>> a
>> >>>> > body writer as per microprofile spec - can likely be enhanced but
>> it
>> >>>> is not
>> >>>> > needed today since you rarely want a single metrics in the output
>> (see
>> >>>> >
>> >>>>
>> https://github.com/apache/geronimo-metrics/blob/master/geronimo-metrics-common/src/main/java/org/apache/geronimo/microprofile/metrics/common/prometheus/PrometheusFormatter.java#L140
>> >>>> > for an impl)
>> >>>> >
>> >>>> > Now, geronimo-metrics provides for you the prometheus endpoints so
>> you
>> >>>> > don't need to implement it on your side, did you set the system
>> >>>> property geronimo.metrics.jaxrs.activated=true
>> >>>> > ?
>> >>>> >
>> >>>> > Romain Manni-Bucau
>> >>>> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> >>>> > <https://rmannibucau.metawerx.net/> | Old Blog
>> >>>> > <http://rmannibucau.wordpress.com> | Github
>> >>>> > <https://github.com/rmannibucau> | LinkedIn
>> >>>> > <https://www.linkedin.com/in/rmannibucau> | Book
>> >>>> > <
>> >>>>
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > Le mer. 28 nov. 2018 à 16:43, Ivan Junckes Filho <
>> >>>> ivanjunc...@gmail.com>
>> >>>> > a écrit :
>> >>>> >
>> >>>> >> Hi Michael, could you please push it to a remote branch so I can
>> >>>> take a
>> >>>> >> look?
>> >>>> >>
>> >>>> >> On Wed, Nov 28, 2018 at 1:26 PM Michael Redlich <
>> mpre...@gmail.com>
>> >>>> >> wrote:
>> >>>> >>
>> >>>> >> > Hello everyone:
>> >>>> >> >
>> >>>> >> > I am making progress implementing a Metrics Histogram example.
>> >>>> Please
>> >>>> >> see
>> >>>> >> > the following code:
>> >>>> >> >
>> >>>> >> > @Path("/histogram")
>> >>>> >> > @GET
>> >>>> >> > @Produces(MediaType.TEXT_PLAIN)
>> >>>> >> > // @Produces(MediaType.APPLICATION_JSON)
>> >>>> >> > public Histogram histogramStatus() {
>> >>>> >> >     Metadata metadata = new Metadata("items",
>> MetricType.HISTOGRAM,
>> >>>> >> > "degrees F");
>> >>>> >> >     metadata.setDescription("A histogram of recent
>> temperatures.");
>> >>>> >> >     Histogram temps = metrics.histogram(metadata);
>> >>>> >> >     for(int temp = 80; temp < 100; ++temp) {
>> >>>> >> >         temps.update(temp);
>> >>>> >> >     }
>> >>>> >> >     return temps;
>> >>>> >> > }
>> >>>> >> >
>> >>>> >> >
>> >>>> >> > In APPLICATION_JSON mode (commented), the output is as expected.
>> >>>> >> However,
>> >>>> >> > in TEXT_MODE, I get the following message:
>> >>>> >> >
>> >>>> >> > No message body writer has been found for class
>> >>>> >> > org.apache.geronimo.microprofile.metrics.impl.HistogramImpl,
>> >>>> >> > ContentType: text/plain
>> >>>> >> >
>> >>>> >> > I haven't been able to find a way to correct this, especially
>> >>>> since the
>> >>>> >> > Counter Metric didn't require a body writer.
>> >>>> >> >
>> >>>> >> > I would appreciate any help.  Thanks!
>> >>>> >> >
>> >>>> >> > Mike.
>> >>>> >> >
>> >>>> >> > --
>> >>>> >> > *Code*, *Write*, *Cycle*, *Run*, *Drink*,
>> >>>> >> > *Sleep ... Repeat*
>> >>>> >> >
>> >>>> >> > *InfoQ <https://www.infoq.com/> Java Queue Editor*
>> >>>> >> > https://about.me/mpredli <http://about.me/mpredli/>
>> >>>> >> > https://twitter.com/mpredli
>> >>>> >> > https://redlich.net/
>> >>>> >> > https://javasig.org/
>> >>>> >> > *Laissez Les Bon Temps Rouler*
>> >>>> >> >
>> >>>> >>
>> >>>> >
>> >>>>
>> >>>> --
>> >>>> *Code*, *Write*, *Cycle*, *Run*, *Drink*,
>> >>>> *Sleep ... Repeat*
>> >>>>
>> >>>> *InfoQ <https://www.infoq.com/> Java Queue Editor*
>> >>>> https://about.me/mpredli <http://about.me/mpredli/>
>> >>>> https://twitter.com/mpredli
>> >>>> https://redlich.net/
>> >>>> https://javasig.org/
>> >>>> *Laissez Les Bon Temps Rouler*
>> >>>>
>> >>>
>> >>
>> >> --
>> >> *Code*, *Write*, *Cycle*, *Run*, *Drink*,
>> >> *Sleep ... Repeat*
>> >>
>> >> *InfoQ <https://www.infoq.com/> Java Queue Editor*
>> >> https://about.me/mpredli <http://about.me/mpredli/>
>> >> https://twitter.com/mpredli
>> >> https://redlich.net/
>> >> https://javasig.org/
>> >> *Laissez Les Bon Temps Rouler*
>> >>
>> > --
>> *Code*, *Write*, *Cycle*, *Run*, *Drink*,
>> *Sleep ... Repeat*
>>
>> *InfoQ <https://www.infoq.com/> Java Queue Editor*
>> https://about.me/mpredli <http://about.me/mpredli/>
>> https://twitter.com/mpredli
>> https://redlich.net/
>> https://javasig.org/
>> *Laissez Les Bon Temps Rouler*
>>
>
>
> --
> Richard Monson-Haefel
> https://twitter.com/rmonson
> https://www.linkedin.com/in/monsonhaefel/
>


-- 
*Code*, *Write*, *Cycle*, *Run*, *Drink*,
*Sleep ... Repeat*

*InfoQ <https://www.infoq.com/> Java Queue Editor*
https://about.me/mpredli <http://about.me/mpredli/>
https://twitter.com/mpredli
https://redlich.net/
https://javasig.org/
*Laissez Les Bon Temps Rouler*

Reply via email to