Hi All,
I am kind of stuck with build and deployment please help me with this.
To achieve Encryption/Decryption functionality I have to modify
JPAMessage.java file and add another file CustomJPAMessage.java. The fix I
made uses JASYPT Library as well.
The steps I followed are below:
In Eclipse I have checked-out the JPA project:
http://svn.apache.org/repos/asf/james/mailbox/trunk/jpa
Opened JPA project in Eclipse as a JAVA project
Completed the modifications.
Opened command-prompt and ran the package command mvn clean package
Artifacts got generated with name: apache-james-mailbox-jpa-0.4-SNAPSHOT.jar
& apache-james-mailbox-jpa-0.4-SNAPSHOT-tests.jar
I took the back-up of existing
"apache-james-mailbox-jpa-0.2-M2-20110401.040755-51.jar" file and place the
"apache-james-mailbox-jpa-0.4-SNAPSHOT.jar" in my Apache James server
library path.
When i am trying to start James server it complains about missing classes.
"Caused by: java.lang.ClassNotFoundException:
org.apache.james.mailbox.jpa.mail.JPACachingUidProvider".
I compared the JAR file size and found the new one (67KB) is less than the
original one (74KB).
Any suggestions on making build and deployments? I have attached the
modified java files and pom.xml including JASYPT library to this email.
Thanks,
Sai
<?xml version="1.0" encoding="ISO-8859-15"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>apache-james-mailbox</artifactId>
<groupId>org.apache.james</groupId>
<version>0.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.james</groupId>
<artifactId>apache-james-mailbox-jpa</artifactId>
<name>Apache James JPA Mailbox</name>
<dependencies>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-james-mailbox-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-james-mailbox-store</artifactId>
</dependency>
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
</dependency>
<dependency>
<groupId>${javax.mail.groupId}</groupId>
<artifactId>${javax.mail.artifactId}</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-james-mailbox-api</artifactId>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-james-mailbox-store</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
<artifactId>jasypt</artifactId>
<version>1.7.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>openjpa-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<includes>org/apache/james/mailbox/jpa/*/model/**/*.class</includes>
<addDefaultConstructor>true</addDefaultConstructor>
<enforcePropertyRestrictions>true</enforcePropertyRestrictions>
<toolProperties>
<property>
<name>log</name>
<value>TOOL=TRACE</value>
</property>
<property>
<name>metaDataFactory</name>
<value>jpa(Types=org.apache.james.mailbox.jpa.mail.model.JPAUserFlag;org.apache.james.mailbox.jpa.mail.model.JPAHeader;org.apache.james.mailbox.jpa.mail.model.JPAMailbox;org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage;org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage;org.apache.james.mailbox.jpa.mail.model.openjpa.JPAStreamingMessage;org.apache.james.mailbox.jpa.mail.model.JPAProperty;org.apache.james.mailbox.jpa.user.model.JPASubscription)</value>
</property>
</toolProperties>
</configuration>
<executions>
<execution>
<id>enhancer</id>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]