HTTP access to maven repository is deprecated¶
HTTP access to repo1.maven.org and repo.maven.apache.org is deprecated
In turn it can lead to this error: Return code is: 501, ReasonPhrase:HTTPS Required.
Solution is to use the https maven repository. This can be setup either in the settings.xml file for the developer studio installation, or in the pom file for the transformer project.
- Settings.xml
This file is located in [InstallationPath]\DeveloperStudio10.82\java\maven\conf, and in the section <mirrors> this needs to be added:
<mirror>
<id>internal-repository</id>
<name>Maven Repository Manager running on https://repo1.maven.org/maven2</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>*</mirrorOf>
</mirror>
This is done automatically by Developer Studio, but on some systems it seems this file gets write protected, and then this can be done manually, if the file is accessible for editing.
- Pom.xml
In the pom.xml, this can be added:
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
This is added automatically in the generated_pom.xml when generating code from the tool, but some transformers are written without toolsupport, and might need this added in the pom.xml file manually.