记事本

常用Maven Repository

Repository
oracle https://maven.oracle.com
jboss https://repository.jboss.org/nexus/content/groups/public/
https://repository.jboss.org/nexus/content/repositories/fs-releases
redhat https://maven.repository.redhat.com/ga/
http://maven.repository.redhat.com/techpreview/all/
pentaho http://public.nexus.pentaho.org/content/repositories/pentaho-public-release-repos/

说明:访问Oracle Repository需要账号,配置步骤如下:

  1. 在.m2下创建文件settings-security.xml来保存master密码

使用下面的命令生成master密码:

mvn -encrypt-master-password <any_master_password>
或
mvn -emp <any_master_password>

settings-security.xml内容如下:

<settingsSecurity>
  <master>{By8wW7YcTxAHof0MF4Z3wPKboywhGJvxHD9m0NvHA2U=}</master>
</settingsSecurity>
  1. 配置settings.xml

使用下面命令加密用户密码:

mvn -encrypt-password <any_master_password>
或
mvn -ep <any_master_password>

配置用户和repository:

<servers>
  <server>
    <id>maven.oracle.com</id>
    <username>[email protected]</username>
    <password>{pnwmhVnzdM8H3UAneUKLmaHGZCoaprbMQ/Ac5UktvsM=}</password>
    <configuration>
      <basicAuthScope>
        <host>ANY</host>
        <port>ANY</port>
        <realm>OAM 11g</realm>
      </basicAuthScope>
      <httpConfiguration>
        <all>
          <params>
            <property>
              <name>http.protocol.allow-circular-redirects</name>
              <value>%b,true</value>
            </property>
          </params>
        </all>
      </httpConfiguration>
    </configuration>
  </server>
</servers>

<profiles>
  <profile>
    <id>main</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <repositories>
      <repository>
        <id>maven.oracle.com</id>
        <url>https://maven.oracle.com</url>
        <layout>default</layout>
        <releases>
          <enabled>true</enabled>
        </releases>
      </repository>
    </repositories>
  </profile>
</profiles>
  1. 配置POM依赖
<dependency>
    <groupId>com.oracle.jdbc</groupId>
    <artifactId>ojdbc6</artifactId>
    <version>11.2.0.4</version>
    <exclusions>
        <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
        </exclusion>
    </exclusions>
</dependency>

参考文档:
Get Oracle JDBC drivers and UCP from Oracle Maven Repository
Configuring the Oracle Maven Repository
Password Encryption
Oracle Database JDBC driver

安装Jenkins时显示“该Jenkins实例似乎已离线”解决办法
输入以下网址:
http://localhost:8080/jenkins/pluginManager/advanced
将升级站点改为http协议:
http://updates.jenkins.io/update-center.json
然后重新启动Jenkins即可。

Tomcat 9: org.apache.catalina.webresources.Cache.getResource Unable to add the resource to the cache for web application because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
cacheMaxSize默认为10M,要增大配置,在conf\context.xml中添加

<Resources cachingAllowed="true" cacheMaxSize="100000"/>

Sonar导入备份数据后不能显示
Sonar使用了Elasticsearch,删除$SQ_HOME/data/es5目录,重启sonar

资源网站

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章