mirror of https://github.com/apache/archiva.git
Adding JPA provider as user manager
This commit is contained in:
parent
0cc2733ca0
commit
b7174c4440
|
@ -831,6 +831,18 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-orm</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -969,6 +981,8 @@
|
||||||
<additionalClasspathDirs>
|
<additionalClasspathDirs>
|
||||||
<additionalClasspathDir>${basedir}/src/test/tomcat</additionalClasspathDir>
|
<additionalClasspathDir>${basedir}/src/test/tomcat</additionalClasspathDir>
|
||||||
</additionalClasspathDirs>
|
</additionalClasspathDirs>
|
||||||
|
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -981,6 +995,27 @@
|
||||||
<artifactId>mail</artifactId>
|
<artifactId>mail</artifactId>
|
||||||
<version>${javaxMailVersion}</version>
|
<version>${javaxMailVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.openjpa</groupId>
|
||||||
|
<artifactId>openjpa</artifactId>
|
||||||
|
<version>${openjpaVersion}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
<artifactId>geronimo-jpa_2.0_spec</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||||
|
<version>1.1.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.serp</groupId>
|
||||||
|
<artifactId>serp</artifactId>
|
||||||
|
<version>1.15.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,14 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xmlns:util="http://www.springframework.org/schema/util"
|
xmlns:util="http://www.springframework.org/schema/util" xmlns:jee="http://www.springframework.org/schema/jee"
|
||||||
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||||
http://www.springframework.org/schema/context
|
http://www.springframework.org/schema/context
|
||||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||||
http://www.springframework.org/schema/util
|
http://www.springframework.org/schema/util
|
||||||
http://www.springframework.org/schema/util/spring-util-3.0.xsd"
|
http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
|
||||||
default-lazy-init="true">
|
default-lazy-init="true">
|
||||||
|
|
||||||
<context:annotation-config/>
|
<context:annotation-config/>
|
||||||
|
@ -48,5 +49,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<jee:jndi-lookup id="dataSource" jndi-name="java:/comp/env/jdbc/redbackjpa" />
|
||||||
|
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||||
|
<property name="dataSource" ref="dataSource" />
|
||||||
|
<property name="jpaVendorAdapter" >
|
||||||
|
<bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
|
@ -143,6 +143,12 @@
|
||||||
<res-auth>Container</res-auth>
|
<res-auth>Container</res-auth>
|
||||||
<res-sharing-scope>Shareable</res-sharing-scope>
|
<res-sharing-scope>Shareable</res-sharing-scope>
|
||||||
</resource-ref>
|
</resource-ref>
|
||||||
|
<resource-ref>
|
||||||
|
<res-ref-name>jdbc/redbackjpa</res-ref-name>
|
||||||
|
<res-type>javax.sql.DataSource</res-type>
|
||||||
|
<res-auth>Container</res-auth>
|
||||||
|
<res-sharing-scope>Shareable</res-sharing-scope>
|
||||||
|
</resource-ref>
|
||||||
<resource-ref>
|
<resource-ref>
|
||||||
<res-ref-name>mail/Session</res-ref-name>
|
<res-ref-name>mail/Session</res-ref-name>
|
||||||
<res-type>javax.mail.Session</res-type>
|
<res-type>javax.mail.Session</res-type>
|
||||||
|
|
|
@ -24,8 +24,18 @@
|
||||||
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
|
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
|
||||||
url="jdbc:derby:${appserver.base}/database/users;create=true"
|
url="jdbc:derby:${appserver.base}/database/users;create=true"
|
||||||
/>
|
/>
|
||||||
|
<Resource name="jdbc/redbackjpa" auth="Container" type="javax.sql.DataSource"
|
||||||
|
username="sa"
|
||||||
|
password=""
|
||||||
|
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
|
||||||
|
url="jdbc:derby:${appserver.base}/database/jpausers;create=true"
|
||||||
|
/>
|
||||||
<Resource name="mail/Session" auth="Container"
|
<Resource name="mail/Session" auth="Container"
|
||||||
type="javax.mail.Session"
|
type="javax.mail.Session"
|
||||||
mail.smtp.host="localhost"/>
|
mail.smtp.host="localhost"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Context>
|
</Context>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -91,6 +91,7 @@
|
||||||
<javaxMailVersion>1.4</javaxMailVersion>
|
<javaxMailVersion>1.4</javaxMailVersion>
|
||||||
<jettyVersion>8.1.14.v20131031</jettyVersion>
|
<jettyVersion>8.1.14.v20131031</jettyVersion>
|
||||||
<guava.version>16.0.1</guava.version>
|
<guava.version>16.0.1</guava.version>
|
||||||
|
<openjpaVersion>2.4.1</openjpaVersion>
|
||||||
|
|
||||||
<!-- restore when we will be able to use a derby in memory database -->
|
<!-- restore when we will be able to use a derby in memory database -->
|
||||||
<redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl>
|
<redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl>
|
||||||
|
@ -1537,6 +1538,7 @@
|
||||||
<artifactId>jsoup</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
<version>1.7.2</version>
|
<version>1.7.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue