openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r696020 - /openjpa/branches/1.2.x/openjpa-project/pom.xml
Date Tue, 16 Sep 2008 19:34:41 GMT
Author: mikedd
Date: Tue Sep 16 12:34:41 2008
New Revision: 696020

URL: http://svn.apache.org/viewvc?rev=696020&view=rev
Log:
OPENJPA-695 adding nightly upload profile to branches

Modified:
    openjpa/branches/1.2.x/openjpa-project/pom.xml

Modified: openjpa/branches/1.2.x/openjpa-project/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-project/pom.xml?rev=696020&r1=696019&r2=696020&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-project/pom.xml (original)
+++ openjpa/branches/1.2.x/openjpa-project/pom.xml Tue Sep 16 12:34:41 2008
@@ -79,6 +79,10 @@
         <docbook.target>${project.basedir}/target/manual</docbook.target>
         <docbook.version>1.67.2</docbook.version>
         <local.repository>${settings.localRepository}</local.repository>
+        
+        <!-- authentication for nightly uploads -->
+        <nightly.user.name>${user.name}</nightly.user.name>
+        <nightly.password>passw0rd</nightly.password>
         </properties>
 
         <build>
@@ -303,6 +307,76 @@
                 </pluginRepository>
             </pluginRepositories>
         </profile>
+        <!-- 
+          Upload distribution files, javadoc and manual to openjpa.apache.org/builds/latest.

+          This profile is designed to be run nightly by a continuous build server, but can
+          also be run manually.
+
+          The nightly.user.name and nightly.password properties need to be set prior to using
+          this profile, ie : 
+          $ mvn -Dnightly.user.name=mikedd -Dnightly.password=mikesPassword -Pnightly-upload
package
+          or (using a profile defined in $user.home/.m2/settings.xml )
+          $ mvn -Pnightly-upload,mikes-nightly-credentials package
+          -->
+        <profile>
+            <id>nightly-upload</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <configuration>
+                                    <tasks>
+                                        <mkdir dir="target/site/tempDocs"/>
+                                        <unzip dest="target/site/tempDocs">
+                                            <fileset dir="target/site/downloads">
+                                                <include name="*binary*.zip"/>
+                                            </fileset>
+                                            <patternset>
+                                                <include name="**/javadoc/**"/>
+                                                <include name="**/manual/**"/>
+                                            </patternset>
+                                        </unzip>
+                                        <move todir="target/site/tempDocs/docs">
+                                            <fileset dir="target/site/tempDocs/apache-openjpa-${pom.version}/docs"/>

+                                        </move>
+                                        <scp todir="${nightly.user.name}:${nightly.password}@people.apache.org:/www/openjpa.apache.org/builds/latest-1.2.x/downloads"

+                                             trust="true">
+                                            <fileset dir="target/site/downloads"/>
+                                        </scp>
+                                        
+                                        <scp todir="${nightly.user.name}:${nightly.password}@people.apache.org:/www/openjpa.apache.org/builds/latest-1.2.x/docs"

+                                             trust="true">
+                                            <fileset dir="target/site/tempDocs/docs"/>

+                                        </scp>
+                                        <sshexec host="people.apache.org" 
+                                                 username="${nightly.user.name}" 
+                                                 password="${nightly.password}"
+                                                 command="chmod -R g+w /www/openjpa.apache.org/builds/latest-1.2.x"
+                                                 trust="true"/>
+                                        <delete>
+                                            <fileset dir="target/site/tempDocs"/>
+                                        </delete>
+                                    </tasks>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.apache.ant</groupId>
+                                <artifactId>ant-jsch</artifactId>
+                                <version>1.7.0</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <!-- need to explicitly list dependencies for assembly to work -->



Mime
View raw message