Traccar error compile Project

I'm trying to compile the Traccar project using Netbeans.
But you are giving this error
```
cd C:\traccar.demo\traccar-master; "JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55" cmd /c """C:\Program Files\NetBeans 8.0.1\java\maven\bin\mvn.bat" -Dmaven.ext.class.path="C:\Program Files\NetBeans 8.0.1\java\maven-nblib\netbeans-eventspy.jar" -Dfile.encoding=UTF-8 install""
Scanning for projects...

Building traccar 4.7-SNAPSHOT

Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-enforcer-plugin/1.4.1/maven-enforcer-plugin-1.4.1.pom


BUILD FAILURE

Total time: 10.411s
Finished at: Sun Jan 26 21:47:09 GMT-03:00 2020
Final Memory: 3M/15M

Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:1.4.1: Could not transfer artifact org.apache.maven.plugins:maven-enforcer-plugin:pom:1.4.1 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-enforcer-plugin/1.4.1/maven-enforcer-plugin-1.4.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
```

Anton Tananaev5 years ago

Looks like you need to update your maven:

https://stackoverflow.com/questions/59763531/maven-dependencies-are-failing-with-a-501-error

Or even better - use gradle.

I did all the steps of the informed publication but now it is returning this error, I really admire your work if you can help me I thank you from the heart

cd C:\traccar.demo\traccar-master; "JAVA_HOME=C:\\Program Files (x86)\\Java\\jdk1.7.0_55" M2_HOME=C:\\traccar.demo\\traccar-master\\apache-maven-3.6.3 cmd /c "\"\"C:\\traccar.demo\\traccar-master\\apache-maven-3.6.3\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0.1\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 install\""
'"C:\traccar.demo\traccar-master\apache-maven-3.6.3\bin\mvn.bat"' nÆo ‚ reconhecido como um comando interno
ou externo, um programa oper vel ou um arquivo em lotes.
Nitish Khadaria5 years ago

@Leonardo Emanuel Fernandes Claudino
Use gradle tool for making jar.

Command - ./gradlew build

ak20155 years ago

"Effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS."
so you have to force maven to use https.
Open C:\Program Files\NetBeans 8.0.2\java\maven\conf\settings.xml
and paste below code in between mirrors tag

<mirror>
<id>maven-mirror</id>
<name>Maven Mirror</name>
<url>https://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>

It will force maven to use https://repo.maven.apache.org/maven2 url.
Cheers!

Sumit4 years ago

I used following steps in NetBeans:

  1. Go to project files
  2. create settings.xml file
  3. Add following lines
<mirrors>
      <mirror>
              <id>maven-mirror</id>
              <name>Maven Mirror</name>
              <url>https://repo.maven.apache.org/maven2</url>
              <mirrorOf>central</mirrorOf>
      </mirror>
</mirrors>

Project Image