You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
2. You must be registered with OTN and have accepted the license agreement to access and use the
96
-
Oracle Maven Repository. This can be done with either a new or an existing OTN user account by
97
-
accessing the http://maven.oracle.com site and selecting the registration link.
98
-
After registering, then you just need to configure your local Maven environment with the details
99
-
of the Oracle Maven Repository, including the information that relates to the authentication model
100
-
specifying your OTN user name and password.
101
-
102
-
#### Configure Maven
103
-
104
-
#### 1. Encrypt your OTN Password.
105
-
106
-
You need to configure Maven to use the Oracle Maven Repository. This involves telling Maven about the repository and providing the necessary information to authenticate to the repository.
107
-
The following steps show you how to save your OTN password in your `settings.xml` file so that you do not have to specify it manually every time.
108
-
Oracle recommends that you encrypt your password, using the utilities provided with Maven.
109
-
110
-
Here are the steps to encrypt your password and save it in your settings. For more information, refer to [Maven Password Encryption](http://maven.apache.org/guides/mini/guide-encryption.html).
111
-
112
-
```
113
-
mvn --encrypt-master-password my_master_password
114
-
```
115
-
The output will be a string similar to this:
116
-
117
-
`{abcdefghijklmnopqrstuvwxyz123=}`
118
-
119
-
Save this value in your Maven `settings-security.xml` file.
120
-
121
-
A copy of your `~/.m2/settings-security.xml` file will look like this:
122
-
```
123
-
<settingsSecurity>
124
-
<master>{abcdefghijklmnopqrstuvwxyz123=}</master>
125
-
</settingsSecurity>
126
-
```
127
-
128
-
Now that you have a master password defined, you can encrypt your OTN password using the following command:
129
-
```
130
-
mvn --encrypt-password my_OTN_password
131
-
```
132
-
The output will be another string that looks like this:
133
-
134
-
`{==thisIs12My34_OTN_45_encrypted==}`
135
-
136
-
This will be the password that you provide in the `server` section of your `settings.xml` file when you configure the HTTP Wagon.
137
-
138
-
#### 2. Add the Oracle Maven Repository to your `settings.xml` file.
139
-
140
-
Add a repository definition to your Maven `settings.xml` file. The repository definition should look like the following:
141
-
142
-
```
143
-
<profiles>
144
-
<profile>
145
-
<id>main</id>
146
-
<activation>
147
-
<activeByDefault>true</activeByDefault>
148
-
</activation>
149
-
<repositories>
150
-
<repository>
151
-
<id>maven.oracle.com</id>
152
-
<url>https://maven.oracle.com</url>
153
-
<layout>default</layout>
154
-
<releases>
155
-
<enabled>true</enabled>
156
-
</releases>
157
-
</repository>
158
-
</repositories>
159
-
160
-
<pluginRepositories>
161
-
<pluginRepository>
162
-
<id>maven.oracle.com</id>
163
-
<url>https://maven.oracle.com</url>
164
-
</pluginRepository>
165
-
</pluginRepositories>
166
-
</profile>
167
-
</profiles>
168
-
```
169
-
170
-
The Maven `settings.xml` file requires additional settings to support the Oracle Maven Repository.
171
-
To configure the HTTP Wagon, add the following `<server>` element to the `<servers>` section of the Maven `settings.xml` file.
0 commit comments