0

We have a git repository at work. I need to provide maven coordinates of the artefact in the README.md file.

The maven coordinates are:

\<dependency\>
   \<groupId\>com.company.dept.project.team\</groupId\>
   \<artifactId\>LibraryName\</artifactId\>
   \<version\>1.0\</version\>
\</dependency\>

However when I updated the README.md and pushed the changes to git. I can only see

<dependency><groupId>com.company.dept.project.team</groupId>   <artifactId>LibraryName</artifactId><version>1.0</version></dependency>

Can someone help in displaying the actual coordinates in different lines as shown below?

<dependency>
   <groupId>com.company.dept.project.team</groupId>
   <artifactId>LibraryName</artifactId>
   <version>1.0</version>
</dependency>
phd
  • 82,685
  • 13
  • 120
  • 165
Vikas Saxena
  • 1,073
  • 1
  • 12
  • 21

1 Answers1

2

I guess you are talking about a README.md for a GitHub project. Simply using two spaces at the end of a line inserts a line break, but still does not display the code as code. To accomplish this use a code block with syntax highlighting as described in the GitHub documentation:

```xml
<dependency>
   <groupId>com.company.dept.project.team</groupId>
   <artifactId>LibraryName</artifactId>
   <version>1.0</version>
</dependency>
```

This will result in

<dependency>
   <groupId>com.company.dept.project.team</groupId>
   <artifactId>LibraryName</artifactId>
   <version>1.0</version>
</dependency>
Waylan
  • 37,164
  • 12
  • 83
  • 109
gucce
  • 597
  • 4
  • 12