-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
mvn: add page #1711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mvn: add page #1711
Conversation
The build for this PR has failed with the following error(s):
Please fix the error(s) and push again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
There are some basic changes which needs to be done in this PR. Let's get those out of the way first and we can do the next round of review then.
pages/common/mvn.md
Outdated
@@ -0,0 +1,25 @@ | |||
# mvn | |||
|
|||
> Runnign Apache Maven. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please improve this description to actually say what does apache maven do.
pages/common/mvn.md
Outdated
|
||
> Runnign Apache Maven. | ||
|
||
- Most common usage is to invoke a life cicle phase: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not use multiple commands for a single example. If this is the most common use case, I would recommend to split this into 3 separate examples. And probably you can remove the other examples which are not so commonly used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have remove the two extra lines, it worths less that the next examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tokens ({{}}
) wherever you have user specified variables in the commands.
pages/common/mvn.md
Outdated
@@ -0,0 +1,23 @@ | |||
# mvn | |||
|
|||
> Apache Maven. A build automation tool used for JVM environment projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the 2nd sentence to a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The maven docs describe mvn as:
"Tool for building and managing Java-based projects."
pages/common/mvn.md
Outdated
|
||
> Apache Maven. A build automation tool used for JVM environment projects. | ||
|
||
- Most common usage is to invoke a life cicle phase: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo at cycle.
This description can be improved. No need to mention "Most common usage". It does not say anything about what mvn package
does. Can you expand a bit on what is meant by a life cycle phase ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a little bit difficult to add a phase definition without the maven context, what do you think about this:
"Invoke a Lifecycle phase (a set of steps for the whole project Lifecycle)"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can live with it.
pages/common/mvn.md
Outdated
|
||
- Invoke more that one phase with arguments: | ||
|
||
`mvn clean -P a_profile package clean` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phases should be in tokens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the "a_profile" be in token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
pages/common/mvn.md
Outdated
|
||
`mvn -X clean -P a_profile package clean` | ||
|
||
- Use an alternative pom o directory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o directory ? And please expand pom in brackets.
Common usages I would recommend to be added:
|
pages/common/mvn.md
Outdated
|
||
- Running an spring boot project with remote debug: | ||
|
||
`mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spring-boot:run
is pretty esoteric. A more common maven usage would be to run a main class in your project:
- Run a class with a main method:
mvn exec:java -Dexec.mainClass="{{com.example.Main}}" -Dexec.args="{{arg1 arg2}}"
I am really confused about the @hohonuuli - your description says Both seem very different to me. I am not a mvn user so I do not know much. However from a layman's standpoint, I would say @hohonuuli's description sounds much more clear to me. Combining both PRs, I would recommend to have examples in this order -
|
This example are missing the fact that pass an argument to a phase like profile on package: |
That's right. Please understand that our scope in tldr is really limited and we have to be judicious in the space we use. We have a maximum limit of 8 examples and we usually try to keep it at 6. So we have to think of the most useful and simplest form of the command invocation first and then move on to the complex ones. Keeping that in mind, I did not mention passing an argument to the |
I have tried to join the two PR with the best information, I've tried to add a generic examples of the commands that new members of my teams used to need. |
Hey @jdvr - We always introduce the simplest invocation of the commands first and then move on to more complex ones. You have used Also the language of the command descriptions can be improved slightly. If you don't mind, may I edit the PR ? |
Sure, feel free to edit the PR. compile and clean reference can be removed or replace by |
@jdvr Just a note that I've been using Maven for about 20 years, but I've never once used:
|
Thanks @hohonuuli - I agree with you. I have asked around a couple of people who use maven. And collating all of their feedback, I have made the final changes. It matches almost perfectly with your suggestions. Also, I have added a few more commands which other people have found useful. I had to stretch the page to 8, but I think given the regular usage of the command, it's worth it. EDIT - @jdvr please take a look and let me know if this looks good to you. I have deliberately avoided using the words build life cycle and phases as I think they are beyond the scope of the page. Instead, using simple words to explain what the commands do make more sense to me. |
Yes, it looks great. Sorry for including that options, maybe my scope it is to limited :). |
Over to you @sbrl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok as far as I can tell! I'm not well versed in maven
itself, so I'll trust that you've got all that sorted out, @agnivade / @jdvr / @hohonuuli :P
The page (if new), does not already exist in the repo.
The page (if new), has been added to the correct platform folder:
common/
if it's common to all platforms,linux/
if it's Linux-specific, and so on.The page has 8 or fewer examples.
The PR is appropriately titled:
<command name>: add page
for new pages, or<command name>: <description of changes>
for pages being editedThe page follows the contributing guidelines