-
Notifications
You must be signed in to change notification settings - Fork 393
draft create
for Maven projects gets confused by the mvnw
and mvnw.cmd
files: "Draft detected the primary language as Shell..."
#523
Comments
draft create
for Maven' mvnwdraft create
for Maven projects gets confused by the mvnw
file: "Draft detected the primary language as Shell..."
Seem to be related to the file pkg/linguist/static.go that comes from https://github.com/github/linguist/blob/v6.0.1/lib/linguist/languages.yml I'll try to declare https://github.com/github/linguist/blob/v6.0.1/lib/linguist/languages.yml#L4274 |
draft create
for Maven projects gets confused by the mvnw
file: "Draft detected the primary language as Shell..."draft create
for Maven projects gets confused by the mvnw
and mvnw.cmd
files: "Draft detected the primary language as Shell..."
Given that mvnw is primarily written in bash, one could argue that linguist is "working as intended" in this case since it has not been trained against Specifically, this should work for your example:
That way, Does that help clarify things? |
Thanks @bacongobbler . I'll try to get "mvnw" added to https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml |
FYI I have just submitted github-linguist/linguist#4042 |
Sounds good! Now that merge has made its way into linguist, it shouldn't be too hard to re-train our bayesian classifier based on that. |
Problem Description
Java Maven projects using Takari's
mvnw
wrapper don't get properly discovered bydraft create
. They are seen as "Shell" applications.Takari's
mvnw
wrapper is a very popular extension to Maven, it is included by default by Spring initializer (http://start.spring.io/) and by other leading Java projectTo reproduce
git clone https://github.com/Azure/draft.git cd draft/examples/example-java wget https://raw.githubusercontent.com/takari/maven-wrapper/maven-wrapper-0.3.0/mvnw draft create
Error message
Desired Message
Workaround
Before running
draft create
, temporarily movemvnw
andmvnw.cmd
outside of the project. Oncedraft create
is successful, movemvnw
andmvnw.cmd
back in the project.The text was updated successfully, but these errors were encountered: