Sandbox-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 1825 discussions
Author: tchemit
Date: 2009-09-06 21:06:37 +0200 (Sun, 06 Sep 2009)
New Revision: 18
Added:
maven-redmine-plugin/
maven-redmine-plugin/trunk/
maven-redmine-plugin/trunk/LICENSE.txt
maven-redmine-plugin/trunk/README.txt
maven-redmine-plugin/trunk/changelog.txt
maven-redmine-plugin/trunk/pom.xml
maven-redmine-plugin/trunk/src/
maven-redmine-plugin/trunk/src/main/
maven-redmine-plugin/trunk/src/main/java/
maven-redmine-plugin/trunk/src/main/java/org/
maven-redmine-plugin/trunk/src/main/java/org/nuiton/
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/RedmineSession.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Issue.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Project.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Tracker.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/User.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Version.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractGetProjectDataMojo.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractRedmineMojo.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/DataNotFoundException.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GenerateChangesMojo.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectDataMojo.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojo.java
maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/RedmineReportMojo.java
maven-redmine-plugin/trunk/src/main/resources/
maven-redmine-plugin/trunk/src/site/
maven-redmine-plugin/trunk/src/site/apt/
maven-redmine-plugin/trunk/src/site/apt/Todo.apt
maven-redmine-plugin/trunk/src/site/apt/index.apt
maven-redmine-plugin/trunk/src/site/apt/usage.apt
maven-redmine-plugin/trunk/src/site/site.xml
maven-redmine-plugin/trunk/src/test/
maven-redmine-plugin/trunk/src/test/java/
maven-redmine-plugin/trunk/src/test/java/org/
maven-redmine-plugin/trunk/src/test/java/org/nuiton/
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/RedmineSessionTest.java
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/AbstractRedmineMojoTest.java
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GenerateChangesMojoTest.java
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectDataMojoTest.java
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest.java
maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/RedmineReportMojoTest.java
maven-redmine-plugin/trunk/src/test/resources/
maven-redmine-plugin/trunk/src/test/resources/org/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GenerateChangesMojoTest/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GenerateChangesMojoTest/generate-changes.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-trackers.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-users.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-versions.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-files.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-issues.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version.xml
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/RedmineReportMojoTest/
maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/RedmineReportMojoTest/redmine-report.xml
Log:
initial import
Property changes on: maven-redmine-plugin
___________________________________________________________________
Added: svn:ignore
+ target
Property changes on: maven-redmine-plugin/trunk
___________________________________________________________________
Added: svn:ignore
+ target
Added: maven-redmine-plugin/trunk/LICENSE.txt
===================================================================
--- maven-redmine-plugin/trunk/LICENSE.txt (rev 0)
+++ maven-redmine-plugin/trunk/LICENSE.txt 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: maven-redmine-plugin/trunk/README.txt
===================================================================
--- maven-redmine-plugin/trunk/README.txt (rev 0)
+++ maven-redmine-plugin/trunk/README.txt 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,2 @@
+To deploy new version of pom: mvn deploy
+To install localy: mvn install
Added: maven-redmine-plugin/trunk/changelog.txt
===================================================================
--- maven-redmine-plugin/trunk/changelog.txt (rev 0)
+++ maven-redmine-plugin/trunk/changelog.txt 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,5 @@
+maven-redmine-plugin (1.0.0-SNAPSHOT) stable; urgency=low
+
+ * //TODO_FILL_ME
+
+ -- author -- date -R
Added: maven-redmine-plugin/trunk/pom.xml
===================================================================
--- maven-redmine-plugin/trunk/pom.xml (rev 0)
+++ maven-redmine-plugin/trunk/pom.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <version>${helper.version}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas -->
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.5.15</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.0</version>
+ </dependency>
+
+ <!-- tests dependencies -->
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <version>${helper.version}</version>
+ <scope>test</scope>
+ <classifier>tests</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.6</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Redmine maven plugin (new one)</name>
+
+ <description>A plugin to interacts with Redmine's server</description>
+
+ <inceptionYear>2009</inceptionYear>
+
+ <url>http://maven-site.nuiton.org/sandbox/maven-redmine-plugin</url>
+
+ <licenses>
+ <license>
+ <name>Lesser General Public License (LGPL)</name>
+ <url>${maven.license.file}</url>
+ <distribution>local</distribution>
+ </license>
+ </licenses>
+
+ <developers>
+
+ <developer>
+ <name>Tony Chemit</name>
+ <id>tchemit</id>
+ <email>chemit(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+
+ </developers>
+
+ <organization>
+ <name>CodeLutin</name>
+ <url>http://www.codelutin.com/</url>
+ </organization>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>maven-plugin</packaging>
+
+ <properties>
+
+ <!-- the redmine plateform used (nuiton.org or chorem.org) -->
+ <platform>nuiton.org</platform>
+
+ <!-- a proprerty to define the id of the project, in a multi-module
+ project, you must use a hard-cored value, otherwise for modules
+ the artifactId will be expanded , otherwise, no need to override it
+ -->
+ <projectId>${project.artifactId}</projectId>
+
+ <!-- a property to define list id -->
+ <listId>${projectId}</listId>
+
+ <!-- java level is 1.6 -->
+ <maven.compile.source>1.6</maven.compile.source>
+ <maven.compile.target>1.6</maven.compile.target>
+
+ <!-- default encoding -->
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+ <!-- by default, use maven 2 source base dir -->
+ <maven.src.dir>${basedir}/src</maven.src.dir>
+
+ <!-- where to generate sources -->
+ <maven.gen.dir>${project.build.directory}/generated-sources</maven.gen.dir>
+
+ <!-- where to generate test sources -->
+ <maven.test.gen.dir>${project.build.directory}/generated-test-sources</maven.test.gen.dir>
+
+ <!-- locales for the site generation, by default only french -->
+ <maven.site.locales>fr</maven.site.locales>
+
+ <!-- le fichier de license du projet -->
+ <maven.license.file>${project.basedir}/LICENSE.txt</maven.license.file>
+
+ <!-- to allow bad tests -->
+ <maven.test.testFailureIgnore>false</maven.test.testFailureIgnore>
+
+ <!-- to skip tests (can use also profile notests) -->
+ <maven.test.skip>false</maven.test.skip>
+
+ <!-- to control fork mode of tests -->
+ <maven.test.forkMode>once</maven.test.forkMode>
+
+ <!-- to activate generation of reports and javadoc when doing a site -->
+ <maven.reports.generate>true</maven.reports.generate>
+
+ <!-- do not use 2.5 version, it is buggy (crazy aggregate mode !) -->
+ <javadoc.version>2.4</javadoc.version>
+
+ <!-- pour ne pas generer la javadoc (quand on aura un javadoc 2.5) -->
+ <maven.javadoc.skip>false</maven.javadoc.skip>
+
+ <maven.version>2.0.10</maven.version>
+ <helper.version>1.0.3-SNAPSHOT</helper.version>
+
+ <!-- default license to use -->
+ <license.licenseName>lgpl_v3</license.licenseName>
+
+ <!-- release repository url (to be used in site.xml) -->
+ <repository.home.url>http://maven.${platform}/release</repository.home.url>
+
+ <!-- generated changes.xml file -->
+ <maven.changeFile>${maven.gen.dir}/changes/changes.xml</maven.changeFile>
+
+ </properties>
+ <build>
+
+ <defaultGoal>install</defaultGoal>
+
+ <plugins>
+
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <executions>
+ <!-- check that the root module has a changelog.txt file -->
+ <execution>
+ <id>check-project-files</id>
+ <goals>
+ <goal>check-project-files</goal>
+ </goals>
+ <configuration>
+ <verbose>true</verbose>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>${maven.compile.source}</source>
+ <target>${maven.compile.target}</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <testFailureIgnore>${maven.test.testFailureIgnore}</testFailureIgnore>
+ <forkMode>${maven.test.forkMode}</forkMode>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-beta-1</version>
+ <configuration>
+ <warSourceDirectory>${maven.src.dir}/main/webapp</warSourceDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <inherited>true</inherited>
+
+ <configuration>
+ <archive>
+ <!-- cela fait bugger le chargement des service via
+ ServiceLoader donc on desactive -->
+ <!--index>true</index-->
+ <manifest>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ </manifest>
+ <manifestEntries>
+ <url>${pom.url}</url>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1</version>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${javadoc.version}</version>
+ <configuration>
+ <docencoding>${project.reporting.outputEncoding}</docencoding>
+ <encoding>${project.reporting.outputEncoding}</encoding>
+ <charset>${project.reporting.outputEncoding}</charset>
+ <quiet>true</quiet>
+ <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames>
+ <!-- uniquement a partir de javadoc 2.5 -->
+ <!--skip>${maven.javadoc.skip}</skip-->
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <inputEncoding>${project.reporting.outputEncoding}</inputEncoding>
+ <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
+ <generateReports>${maven.reports.generate}</generateReports>
+ <locales>${maven.site.locales}</locales>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-9</version>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <version>${helper.version}</version>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ </plugin>
+
+ <!--
+ The Project Info Reports Plugin has twelve goals:
+ see http://maven.apache.org/plugins/maven-project-info-reports-plugin
+ -->
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.1.2</version>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${javadoc.version}</version>
+ <configuration>
+ <quiet>true</quiet>
+ <docencoding>${project.build.sourceEncoding}</docencoding>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames>
+ </configuration>
+ </plugin>
+
+ <!-- changelog:changelog
+ changelog:dev-activity
+ changelog:file-activity -->
+ <!--FIXME : TC-20090816 : there is a bug with fileactivity
+ in report, trunk url are prefix with tag/xxx-releaseNumber !-->
+ <plugin>
+ <artifactId>maven-changelog-plugin</artifactId>
+ <version>2.1</version>
+ <!--configuration>
+ <displayFileDetailUrl>http://svn.${platform}/svn/${projectId}%FILE%</displayFileDetailUrl>
+ </configuration-->
+ </plugin>
+
+ <!-- Implicit add of reportSet to not generate jira reports -->
+ <plugin>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.1</version>
+ <!--configuration>
+ <issueLinkTemplate>http://www.${platform}/issues/show/%ISSUE%</issueLinkTemplate>
+ <xmlPath>${maven.changeFile}</xmlPath>
+ </configuration-->
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>changes-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <encoding>${project.reporting.outputEncoding}</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <linkXRef>true</linkXRef>
+ <sourceEncoding>${project.reporting.outputEncoding}</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>${maven.compile.target}</targetJdk>
+ </configuration>
+
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+
+ <!-- a voir si on le garde car hudson le fait aussi ? -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+
+ <!-- a tester si c'est viable sur du multi-module -->
+ <!-- il y a une version 2.1 voir pour la conf car sans conf ca plante -->
+ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.2</version>
+ </plugin-->
+ </plugins>
+ </reporting>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+
+ <!-- Build Environment : Environment Information -->
+
+ <issueManagement>
+ <system>redmine</system>
+ <url>http://www.${platform}/projects/sandbox/issues</url>
+ </issueManagement>
+
+ <ciManagement>
+ <system>hudson</system>
+ <url>http://hudson.${platform}/hudson/job/${projectId}</url>
+ </ciManagement>
+
+ <!--Any mailing lists for the project-->
+ <mailingLists>
+ <mailingList>
+ <name>${listId}-commits</name>
+ <subscribe>http://list.${platform}/cgi-bin/mailman/listinfo/${listId}-commits</subscribe>
+ <unsubscribe>http://list.${platform}/cgi-bin/mailman/listinfo/${listId}-commits</unsubscribe>
+ <post>${listId}-commits(a)list.${platform}</post>
+ <archive>http://list.${platform}/pipermail/${listId}-commits/</archive>
+ </mailingList>
+
+ <mailingList>
+ <name>${listId}-devel</name>
+ <subscribe>http://list.${platform}/cgi-bin/mailman/listinfo/${listId}-devel</subscribe>
+ <unsubscribe>http://list.${platform}/cgi-bin/mailman/listinfo/${listId}-devel</unsubscribe>
+ <post>${listId}-devel(a)list.${platform}</post>
+ <archive>http://list.${platform}/pipermail/${listId}-devel/</archive>
+ </mailingList>
+
+ <mailingList>
+ <name>${listId}-users</name>
+ <subscribe>http://list.${platform}/cgi-bin/mailman/listinfo/${listId}-users</subscribe>
+ <unsubscribe>http://list.${platform}/cgi-bin/mailman/listinfo/${listId}-users</unsubscribe>
+ <post>${listId}-users(a)list.${platform}</post>
+ <archive>http://list.${platform}/pipermail/${listId}-users/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <!-- Source control management. -->
+ <scm>
+ <connection>scm:svn:http://svn.nuiton.org/svn/sandbox/maven-redmine-plugin/trunk</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/sandbox/maven-redmine-plugin/trunk</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/sandbox/maven-redmine-plugin/trunk</url>
+ </scm>
+
+</project>
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/RedmineSession.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/RedmineSession.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/RedmineSession.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,215 @@
+package org.nuiton.redmine;
+
+import org.nuiton.redmine.plugin.*;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Arrays;
+
+import org.apache.commons.httpclient.Cookie;
+import org.apache.commons.httpclient.HostConfiguration;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpConnection;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.HttpState;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.StatusLine;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.maven.plugin.logging.Log;
+
+/**
+ * To store a redmine session and exeuctes some requests on redmine.
+ * <p/>
+ * To obtain a session, use the static factory method {@link #getSession(org.apache.maven.plugin.logging.Log, java.net.URL, String, String, boolean)}.
+ *
+ * The method {@link #askData(String[])} retreave some data from redmine,
+ * once logged in.
+ * <p/>
+ * The method {@link #sendData(String[])} send some data to redmine,
+ * once logged in.
+ * <p/>
+ * The method {@link #logout()} close the session to redmine. After this method
+ *
+ * @author chemit
+ * @since 1.0.0
+ */
+public class RedmineSession {
+
+ protected HttpClient client;
+ protected Log log;
+ protected boolean login;
+ protected boolean showRequest;
+
+ public static RedmineSession getSession(Log log, URL url, String username, String password, boolean showRequest) throws IOException, URISyntaxException {
+
+ RedmineSession session = new RedmineSession(log, url, showRequest);
+
+ // ask rest/ping service a ping
+
+ try {
+ String content = session.askContent(new String[]{"rest", "ping"});
+
+ boolean ok = "ping".equals(content);
+ if (!ok) {
+ throw new IOException("can not connect to " + url);
+ }
+ } catch (IOException ex) {
+ throw ex;
+ } catch (DataNotFoundException ex) {
+ // should never happeds
+ log.error(ex.getMessage());
+ }
+
+ // ask rest/login a connection
+
+ String uri = session.getUri("rest", "login");
+
+ HttpMethod gm = session.doRequest(uri, "username", username, "password", password);
+
+ StatusLine sl = gm.getStatusLine();
+ int statusCode = sl.getStatusCode();
+ if (log.isDebugEnabled()) {
+ log.debug("status code " + statusCode + " for " + gm.getPath());
+ }
+
+ if (statusCode != HttpStatus.SC_OK) {
+ gm.releaseConnection();
+ throw new IOException("Got error code <" + statusCode + ":" + sl.getReasonPhrase() + "> on " + gm.getPath());
+ }
+
+ // ok session is logged in
+
+ session.login = true;
+
+ return session;
+ }
+
+ protected RedmineSession(Log log, URL uri, boolean showRequest) {
+ this.showRequest = showRequest;
+ this.log = log;
+ this.client = new HttpClient();
+ HostConfiguration hostConfiguration = new HostConfiguration();
+ hostConfiguration.setHost(uri.getHost());
+ this.client.setHostConfiguration(hostConfiguration);
+ this.client.setState(new HttpState());
+ }
+
+ public boolean isLogin() {
+ return login;
+ }
+
+ public String askData(String[] paths, String... params) throws IOException, DataNotFoundException {
+
+ String uri = getUri(paths);
+ HttpMethod gm = doRequest(uri, params);
+
+ StatusLine sl = gm.getStatusLine();
+ int statusCode = sl.getStatusCode();
+
+ if (log.isDebugEnabled()) {
+ log.debug("status code " + statusCode + " for " + gm.getPath());
+ }
+ String content = gm.getResponseBodyAsString();
+
+ if (statusCode == HttpStatus.SC_NOT_FOUND) {
+ throw new DataNotFoundException("could not retreave some datas : " + content);
+ }
+ if (statusCode != HttpStatus.SC_OK) {
+ log.error(content);
+ releaseConnection(getConnection());
+ throw new IOException("Got error code <" + statusCode + ":" + sl.getReasonPhrase() + "> on " + gm.getPath());
+ }
+ return content;
+ }
+
+ public String sendData(String[] paths, String... params) throws IOException, DataNotFoundException {
+
+ String uri = getUri(paths);
+ HttpMethod gm = doRequest(uri, params);
+
+ StatusLine sl = gm.getStatusLine();
+ int statusCode = sl.getStatusCode();
+
+ if (log.isDebugEnabled()) {
+ log.debug("status code " + statusCode + " for " + gm.getPath());
+ }
+ String content = gm.getResponseBodyAsString();
+
+ if (statusCode != HttpStatus.SC_OK) {
+ log.error(content);
+ releaseConnection(getConnection());
+ throw new IOException("Got error code <" + statusCode + ":" + sl.getReasonPhrase() + "> on " + gm.getPath());
+ }
+ return content;
+ }
+
+ public String askContent(String... paths) throws IOException, DataNotFoundException {
+
+ String content = askData(paths, new String[0]);
+
+ return content;
+ }
+
+ public void logout() throws IOException {
+
+ String uri = getUri("rest", "logout");
+ doRequest(uri);
+ client.getState().clearCookies();
+ releaseConnection(getConnection());
+ this.login = false;
+ }
+
+ protected void releaseConnection(HttpConnection connection) {
+ if (connection != null && connection.isOpen()) {
+ client.getHttpConnectionManager().releaseConnection(connection);
+ }
+ }
+
+ protected HttpConnection getConnection() {
+ return client.getHttpConnectionManager().getConnection(client.getHostConfiguration());
+ }
+
+ protected String getUri(String... paths) {
+ String uri = client.getHostConfiguration().getHostURL();
+ for (String path : paths) {
+ uri += '/' + path;
+ }
+ return uri;
+ }
+
+ protected HttpMethod doRequest(String uri, String... parameters) throws IOException {
+ if (showRequest) {
+ log.info("doRequest " + uri);
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("doRequest with parameters : " + Arrays.toString(parameters));
+ }
+ PostMethod gm = new PostMethod(uri);
+
+ if (parameters.length > 0) {
+
+ // add parameters
+
+ int nbParams = parameters.length / 2;
+ for (int i = 0; i < nbParams; i++) {
+ String key = parameters[2 * i];
+ String value = parameters[2 * i + 1];
+ gm.addParameter(key, value);
+ }
+ }
+
+ if (login) {
+ Cookie[] cookies = client.getState().getCookies();
+ for (Cookie c : cookies) {
+ if (log.isDebugEnabled()) {
+ log.debug("push cookie : " + c.getName() + "=" + c.getValue());
+ }
+ gm.addRequestHeader("Cookie", c.toExternalForm());
+ }
+ }
+
+ client.executeMethod(gm);
+
+ return gm;
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/RedmineSession.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Issue.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Issue.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Issue.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,13 @@
+package org.nuiton.redmine.model;
+
+/**
+ *
+ * @author chemit
+ * @since 1.0.0
+ */
+public class Issue {
+
+ protected String id;
+ protected String description;
+ protected String status;
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Issue.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Project.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Project.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Project.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,16 @@
+package org.nuiton.redmine.model;
+
+/**
+ * redmine project
+ *
+ * @author chemit
+ * @since 1.0.0
+ */
+public class Project {
+
+ protected String id;
+ protected String label;
+ protected String description;
+
+
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Project.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Tracker.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Tracker.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Tracker.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,11 @@
+package org.nuiton.redmine.model;
+
+/**
+ *
+ * @author chemit
+ * @since 1.0.0
+ */
+public class Tracker {
+
+ protected String type;
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Tracker.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/User.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/User.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/User.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,13 @@
+package org.nuiton.redmine.model;
+
+/**
+ *
+ * @author chemit
+ *
+ * @since 1.0.0
+ */
+public class User {
+
+ protected String id;
+ protected String email;
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/User.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Version.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Version.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Version.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,11 @@
+package org.nuiton.redmine.model;
+
+/**
+ *
+ * @author chemit
+ * @since 1.0.0
+ */
+public class Version {
+
+ protected String version;
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/model/Version.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractGetProjectDataMojo.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractGetProjectDataMojo.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractGetProjectDataMojo.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,79 @@
+package org.nuiton.redmine.plugin;
+
+import java.util.Arrays;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * Abstract goal to retreave some datas on a project.
+ *
+ * @author tchemit
+ * @since 1.0.0
+ */
+public abstract class AbstractGetProjectDataMojo extends AbstractRedmineMojo {
+
+ public static interface DataType {
+
+ String getAction();
+ }
+
+ public enum DataFormat {
+
+ json,
+ xml
+ }
+ /**
+ * Project identifier.
+ *
+ * @parameter expression="${projectId}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String projectId;
+ /**
+ * The data format to retreave (all values of enum {@link #DataFormat}) :
+ * <ul>
+ * <li>json</li>
+ * <li>xml</li>
+ * </ul>
+ * <p/>
+ * <p/>
+ *
+ * @parameter expression="${redmine.dataFormat}" default-value="xml"
+ * @required
+ * @since 1.0.0
+ */
+ protected String dataFormat;
+ /**
+ * The action to be send to redmine, will be compute in
+ * {@link #init()} method.
+ */
+ protected String action;
+
+ protected abstract DataType getDataType() throws MojoFailureException;
+
+ @Override
+ protected boolean init() throws Exception {
+
+ action = buildAction();
+
+ return super.init();
+ }
+
+ protected String buildAction() throws MojoFailureException {
+
+ DataType _dataType = getDataType();
+
+ DataFormat _dataFormat = getDataFormat();
+
+ return _dataType.getAction() + "." + _dataFormat.name();
+ }
+
+ protected DataFormat getDataFormat() throws MojoFailureException {
+ try {
+ DataFormat _dataFormat = DataFormat.valueOf(dataFormat);
+ return _dataFormat;
+ } catch (Exception e) {
+ throw new MojoFailureException("could not obtain data format " + dataFormat + " in " + Arrays.toString(DataFormat.values()));
+ }
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractGetProjectDataMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractRedmineMojo.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractRedmineMojo.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractRedmineMojo.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,231 @@
+/**
+ * Copyright 2008 fastConnect.
+ *
+ * This file is part of maven-redmine-plugin Mojo.
+ *
+ * This is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.nuiton.redmine.plugin;
+
+import org.nuiton.redmine.RedmineSession;
+import java.io.IOException;
+import java.net.URL;
+
+import org.apache.maven.model.IssueManagement;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Server;
+import org.apache.maven.settings.Settings;
+import org.nuiton.AbstractPlugin;
+import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
+import org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException;
+
+/**
+ * Provides basic methods to interact with Redmine.
+ */
+public abstract class AbstractRedmineMojo extends AbstractPlugin {
+
+ /**
+ * Dependance du projet.
+ *
+ * @parameter default-value="${project}"
+ * @required
+ * @readonly
+ * @since 1.0.0
+ */
+ protected MavenProject project;
+ /**
+ * Dependance du settings.
+ *
+ * @parameter default-value="${settings}"
+ * @required
+ * @readonly
+ * @since 1.0.0
+ */
+ protected Settings settings;
+ /**
+ * Configuration of issue management.
+ * <p/>
+ * If no redmineUrl defined, will use the issue management to guess the
+ * redmine url.
+ *
+ * @parameter default-value="${project.issueManagement}"
+ * @readonly
+ * @since 1.0.0
+ */
+ protected IssueManagement issueManagement;
+ /**
+ * Server id to use for authentication (must be defined in your setting
+ * and use the maven >= 2.1.0 password encryption mecanism).
+ * <p/>
+ *
+ * @parameter expression="${redmine.serverId}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String serverId;
+ /**
+ * The real basedir redmine url.
+ *
+ * @parameter expression="${redmine.url}"
+ * @since 1.0.0
+ */
+ protected URL redmineUrl;
+ /**
+ * The redmine's server login.
+ *
+ * @parameter expression="${redmine.username}"
+ * @since 1.0.0
+ */
+ protected String redmineUsername;
+ /**
+ * The redmine's server password.
+ *
+ * @parameter expression="${redmine.password}"
+ * @since 1.0.0
+ */
+ protected String redminePassword;
+ /**
+ * Un flag pour activer le mode verbeux.
+ *
+ * @parameter expression="${redmine.verbose}" default-value="${maven.verbose}"
+ * @since 1.0.0
+ */
+ protected boolean verbose;
+ /**
+ * password decypher
+ * @component
+ * @since 1.0.0
+ */
+ protected SecDispatcher sec;
+ /**
+ * redmine session
+ * @since 1.0.0
+ */
+ protected RedmineSession session;
+
+ public AbstractRedmineMojo() {
+ super("skip message");
+ }
+
+ @Override
+ protected boolean ensurePackaging() {
+ // accept all packages
+ return false;
+ }
+
+ @Override
+ protected boolean init() throws Exception {
+
+ if (redmineUrl == null || redmineUrl.toString().isEmpty()) {
+
+ // no redmine url specified, guess it from issueManagement
+
+ String system = issueManagement.getSystem();
+ if (!"redmine".equals(system)) {
+ throw new MojoExecutionException("must use a redmine issueManagment system, but found : " + system);
+ }
+ String url = issueManagement.getUrl();
+ redmineUrl = new URL(url);
+ }
+
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("redmine url " + redmineUrl);
+ }
+
+ if (redmineUsername == null || redmineUsername.trim().isEmpty() || redminePassword == null || redminePassword.trim().isEmpty()) {
+
+ // guess login and password from server in settings
+
+ Server server = settings.getServer(serverId);
+ if (server == null) {
+ throw new MojoFailureException("could not find serverId " + serverId);
+ }
+ redmineUsername = server.getUsername();
+ redminePassword = server.getPassword();
+ try {
+ redminePassword = sec.decrypt(redminePassword);
+ } catch (SecDispatcherException ex) {
+ throw new MojoFailureException("could not decrypt password", ex);
+ }
+ }
+
+ try {
+
+ session = RedmineSession.getSession(getLog(), redmineUrl, redmineUsername, redminePassword, verbose);
+
+ } catch (IOException e) {
+ throw new MojoExecutionException("Unable to login to <" + redmineUrl + "> with user <" + redmineUsername + ">", e);
+ }
+
+ // auth to redmine is ok
+
+ getLog().info("authentication to " + redmineUrl + " done for " + redmineUsername);
+
+ return true;
+ }
+
+ public String getServerId() {
+ return serverId;
+ }
+
+ public void setServerId(String serverId) {
+ this.serverId = serverId;
+ }
+
+ public IssueManagement getIssueManagement() {
+ return issueManagement;
+ }
+
+ public void setIssueManagement(IssueManagement issueManagement) {
+ this.issueManagement = issueManagement;
+ }
+
+ public URL getRedmineUrl() {
+ return redmineUrl;
+ }
+
+ public void setRedmineUrl(URL redmineUrl) {
+ this.redmineUrl = redmineUrl;
+ }
+
+ public Settings getSettings() {
+ return settings;
+ }
+
+ public void setSettings(Settings settings) {
+ this.settings = settings;
+ }
+
+ @Override
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ @Override
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ @Override
+ public MavenProject getProject() {
+ return project;
+ }
+
+ @Override
+ public void setProject(MavenProject project) {
+ this.project = project;
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/AbstractRedmineMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/DataNotFoundException.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/DataNotFoundException.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/DataNotFoundException.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,27 @@
+package org.nuiton.redmine.plugin;
+
+/**
+ * An exception to throw when a data does not exists on redmine.
+ *
+ * @author chemit
+ * @since 1.0.0
+ */
+public class DataNotFoundException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public DataNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ public DataNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DataNotFoundException(String message) {
+ super(message);
+ }
+
+ public DataNotFoundException() {
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/DataNotFoundException.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GenerateChangesMojo.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GenerateChangesMojo.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GenerateChangesMojo.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,18 @@
+package org.nuiton.redmine.plugin;
+
+/**
+ * Generates the changes.xml file from the Redmine's server
+ *
+ * @author tchemit
+ * @goal generate-changes
+ * @requiresProject true
+ *
+ * @since 1.0.0
+ */
+public class GenerateChangesMojo extends AbstractRedmineMojo {
+
+ @Override
+ protected void doAction() throws Exception {
+ //TODO-FILL_ME
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GenerateChangesMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectDataMojo.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectDataMojo.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectDataMojo.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,71 @@
+package org.nuiton.redmine.plugin;
+
+import java.util.Arrays;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * Retreave some datas on a project.
+ *
+ * Given the {@link #dataType}, the {link #dataFormat} and the
+ * {@link #projectId}, will ask to redmine server, all datas required.
+ *
+ * @author tchemit
+ * @goal retreave-project-data
+ * @requiresProject true
+ *
+ * @since 1.0.0
+ */
+public class GetProjectDataMojo extends AbstractGetProjectDataMojo {
+
+ /**
+ * The data type to retreave (all values of enum {@link #DataType} :
+ * <ul>
+ * <li>project</li>
+ * <li>users</li>
+ * <li>trackers</li>
+ * <li>versions</li>
+ * </ul>
+ * <p/>
+ *
+ * @parameter expression="${redmine.projectDataType}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String dataType;
+
+ @Override
+ protected DataType getDataType() throws MojoFailureException {
+ VersionDataType _dataType;
+ try {
+ _dataType = VersionDataType.valueOf(dataType);
+ } catch (Exception e) {
+ throw new MojoFailureException("could not obtain data type " + dataType + " in " + Arrays.toString(VersionDataType.values()));
+ }
+ return _dataType;
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+
+ String result = session.askContent("rest", action, projectId);
+ getLog().info(result);
+ }
+
+ public enum VersionDataType implements DataType {
+
+ project("get_project"),
+ users("get_project_users"),
+ trackers("get_project_trackers"),
+ versions("get_project_versions");
+ final String action;
+
+ private VersionDataType(String action) {
+ this.action = action;
+ }
+
+ @Override
+ public String getAction() {
+ return action;
+ }
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectDataMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojo.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojo.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojo.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,79 @@
+package org.nuiton.redmine.plugin;
+
+import java.util.Arrays;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * Retreave some datas on a project.
+ *
+ * Given the {@link #dataType}, the {link #dataFormat} and the
+ * {@link #projectId}, and {@link #versionId} will ask to redmine server,
+ * all datas required.
+ *
+ * @author tchemit
+ * @goal get-project-version-data
+ * @requiresProject true
+ *
+ * @since 1.0.0
+ */
+public class GetProjectVersionDataMojo extends AbstractGetProjectDataMojo {
+
+ /**
+ * Version identifier.
+ *
+ * @parameter expression="${versionId}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String versionId;
+ /**
+ * The data type to retreave (all values of enum {@link #DataType} :
+ * <ul>
+ * <li>version</li>
+ * <li>issues</li>
+ * <li>files</li>
+ * </ul>
+ * <p/>
+ *
+ * @parameter expression="${redmine.versionDataType}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String dataType;
+
+ @Override
+ protected void doAction() throws Exception {
+
+ String result = session.askData(new String[]{"rest", action, projectId}, "version_name", versionId);
+
+ getLog().info(result);
+ }
+
+ @Override
+ protected DataType getDataType() throws MojoFailureException {
+ VersionDataType _dataType;
+ try {
+ _dataType = VersionDataType.valueOf(dataType);
+ } catch (Exception e) {
+ throw new MojoFailureException("could not obtain data type " + dataType + " in " + Arrays.toString(VersionDataType.values()));
+ }
+ return _dataType;
+ }
+
+ public enum VersionDataType implements DataType {
+
+ version("get_version"),
+ issues("get_version_issues"),
+ files("get_version_files");
+ final String action;
+
+ private VersionDataType(String action) {
+ this.action = action;
+ }
+
+ @Override
+ public String getAction() {
+ return action;
+ }
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/RedmineReportMojo.java
===================================================================
--- maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/RedmineReportMojo.java (rev 0)
+++ maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/RedmineReportMojo.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,19 @@
+package org.nuiton.redmine.plugin;
+
+/**
+ * Generates a report for issues from Redmine's server
+ *
+ * @author tchemit
+ * @goal redmine-report
+ * @requiresProject true
+ * @requiresDirectInvocation
+ *
+ * @since 1.0.0
+ */
+public class RedmineReportMojo extends AbstractRedmineMojo {
+
+ @Override
+ protected void doAction() throws Exception {
+ //TODO-FILL_ME
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/main/java/org/nuiton/redmine/plugin/RedmineReportMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/site/apt/Todo.apt
===================================================================
--- maven-redmine-plugin/trunk/src/site/apt/Todo.apt (rev 0)
+++ maven-redmine-plugin/trunk/src/site/apt/Todo.apt 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,8 @@
+----
+TODO
+----
+----
+2009-0906
+----
+
+Any idea ?
Added: maven-redmine-plugin/trunk/src/site/apt/index.apt
===================================================================
--- maven-redmine-plugin/trunk/src/site/apt/index.apt (rev 0)
+++ maven-redmine-plugin/trunk/src/site/apt/index.apt 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,32 @@
+----
+Introduction
+----
+----
+2009-09-06
+----
+
+maven-redmine-plugin
+
+ //TODO-FILL_ME
+
+
+* Presentation
+
+ //TODO-FILL_ME
+
+* Goals Overview
+
+ The plugin has the following goals:
+
+ //TODO-FILL_ME
+
+
+ * {{{help-mojo.html}help}} display help about the plugin (goals, usage).
+
+* Usage
+
+ Instructions on how to use the Plugin can be found on {{{usage.html}usage}} page
+
+* Examples
+
+ to be done.
Added: maven-redmine-plugin/trunk/src/site/apt/usage.apt
===================================================================
--- maven-redmine-plugin/trunk/src/site/apt/usage.apt (rev 0)
+++ maven-redmine-plugin/trunk/src/site/apt/usage.apt 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,37 @@
+----
+Usage
+----
+----
+2009-09-06
+----
+
+generate-changes goal
+
+------------------------------------------------------------------------------
+
+ //TODO-FILL_ME
+------------------------------------------------------------------------------
+
+* How does it work ?
+
+ //TODO-FILL_ME
+
+
+help goal
+
+ This goal display the help of the plugin (available goals).
+
+ Use it directly (and only) from commandline :
+
+------------------------------------------------------------------------------
+
+ mvn license:help
+------------------------------------------------------------------------------
+
+ To display verbose help :
+
+------------------------------------------------------------------------------
+ mvn license:help -Ddetail
+------------------------------------------------------------------------------
+
+ for full detail see {{{help-mojo.html}help}} detail page.
Added: maven-redmine-plugin/trunk/src/site/site.xml
===================================================================
--- maven-redmine-plugin/trunk/src/site/site.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/site/site.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <publishDate format="dd/MM/yyyy"/>
+
+ <skin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-nuiton-skin</artifactId>
+ <version>1.0.0</version>
+ </skin>
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <bannerRight>
+ <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
+ <href>${project.organization.url}</href>
+ </bannerRight>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
+ </poweredBy>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="${project.url}" />
+ </breadcrumbs>
+
+ <menu name="Utilisateur">
+ <item name="Introduction" href="index.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="Goals" href="plugin-info.html">
+ <item name="${mojoGoal}" href="${mojoGoal}-mojo.html"/>
+ <item name="help" href="help-mojo.html"/>
+ </item>
+ </menu>
+
+ <menu name="Téléchargement">
+ <item href="${repository.home.url}/org/nuiton/maven-redmine-plugin/${project.version}/${project.build.finalName}.jar"
+ name="Librairie (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/maven-redmine-plugin/${project.version}/${project.build.finalName}-javadoc.jar"
+ name="Javadoc (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/maven-redmine-plugin/${project.version}/${project.build.finalName}-sources.jar"
+ name="Sources (jar)"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ </body>
+</project>
Added: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/RedmineSessionTest.java
===================================================================
--- maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/RedmineSessionTest.java (rev 0)
+++ maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/RedmineSessionTest.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,122 @@
+package org.nuiton.redmine;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ *
+ * @author chemit
+ */
+public class RedmineSessionTest {
+
+ protected static SystemStreamLog log;
+ protected static URL redmineURL;
+ protected static final String redmineUsername = "chemit";
+ protected static final String redminePassword = "azer";
+ protected static Boolean skip;
+ protected RedmineSession session;
+
+ /**
+ * Test si on peut se connecter a un serveur Redmine.
+ *
+ * @param redmineURL l'url du serveur redmine
+ * @param redmineUsername le login
+ * @param redminePassword le password
+ * @return <code>true</true> si une connection est possible sur le serveur
+ */
+ public static boolean canAccess(URL redmineURL, String redmineUsername, String redminePassword) {
+ log = new SystemStreamLog();
+ boolean result = false;
+ try {
+ RedmineSession.getSession(log, redmineURL, redmineUsername, redminePassword, true);
+ result = true;
+ } catch (Exception e) {
+ log.warn("can not connect to " + redmineURL + ", test will be skip : " + e.getMessage());
+ }
+ return result;
+ }
+
+ @BeforeClass
+ public static void setUpClass() throws Exception {
+ log = new SystemStreamLog();
+ redmineURL = new URL("http://www.mynuiton.org");
+ skip = !canAccess(redmineURL, redmineUsername, redminePassword);
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() {
+ Assume.assumeTrue(!skip);
+ }
+
+ @After
+ public void tearDown() throws IOException {
+ if (session != null && session.isLogin()) {
+ session.logout();
+ session = null;
+ }
+ }
+
+ @Test(expected = IOException.class)
+ public void testBadHost() throws Exception {
+
+ RedmineSession.getSession(log, new URL("http://www.mynuiton.orgfake-" + System.nanoTime()), null, null, true);
+ }
+
+ @Test(expected = IOException.class)
+ public void testBadLogin() throws Exception {
+ session = RedmineSession.getSession(log, redmineURL, redmineUsername + System.nanoTime(), redminePassword, true);
+ }
+
+ @Test
+ public void testLogin() throws Exception {
+ initSession();
+ session.logout();
+ }
+
+ @Test
+ public void testAskData() throws Exception {
+ initSession();
+ String result = session.askContent("rest", "get_project_users.xml", "one");
+ Assert.assertFalse(result.isEmpty());
+ if (log.isDebugEnabled()) {
+ log.debug(result);
+ }
+ session.logout();
+ Assert.assertFalse(session.isLogin());
+ }
+
+ @Test
+ public void testAskDataAfterClosed() throws Exception {
+ initSession();
+ String result = session.askContent("rest", "get_project_users.xml", "one");
+ Assert.assertFalse(result.isEmpty());
+ if (log.isDebugEnabled()) {
+ log.debug(result);
+ }
+ session.logout();
+ Assert.assertFalse(session.isLogin());
+ try {
+ result = session.askContent("rest", "get_project_users.json", "one");
+ Assert.fail();
+ } catch (IOException e) {
+ Assert.assertTrue(true);
+ }
+ }
+
+ protected void initSession() throws IOException, URISyntaxException {
+ session = RedmineSession.getSession(log, redmineURL, redmineUsername, redminePassword, true);
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/RedmineSessionTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/AbstractRedmineMojoTest.java
===================================================================
--- maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/AbstractRedmineMojoTest.java (rev 0)
+++ maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/AbstractRedmineMojoTest.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,53 @@
+package org.nuiton.redmine.plugin;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.logging.Log;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.nuiton.util.BasePluginTestCase;
+
+/**
+ * @param <P> the goal to test
+ * @author tchemit
+ * @since 1.0.0
+ */
+public abstract class AbstractRedmineMojoTest<P extends AbstractRedmineMojo> extends BasePluginTestCase<P> {
+
+ protected static Log log;
+
+ @AfterClass
+ public static void cleanAfterClass() throws Exception {
+ if (log != null) {
+ log.info("release test " + testDir.getName());
+ log = null;
+ }
+ configItr = null;
+ testDir = null;
+ }
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ Assert.assertNotNull(mojo);
+ boolean canContinue = false;
+ try {
+ if (mojo.init()) {
+ canContinue = true;
+ }
+ mojo.getLog().info("setup done for " + mojo.getProject().getFile().getName());
+ } catch (MojoFailureException ex) {
+ mojo.getLog().warn("can not init mojo" + mojo.getProject().getFile().getName() + ", test will be skip : " + ex.getMessage());
+ throw ex;
+ } catch (MojoExecutionException ex) {
+ mojo.getLog().warn("can not connect to " + mojo.getRedmineUrl() + ", test will be skip : " + ex.getMessage());
+ }
+ if (log == null) {
+ log = mojo.getLog();
+ }
+ Assume.assumeTrue(canContinue);
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/AbstractRedmineMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GenerateChangesMojoTest.java
===================================================================
--- maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GenerateChangesMojoTest.java (rev 0)
+++ maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GenerateChangesMojoTest.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,26 @@
+package org.nuiton.redmine.plugin;
+
+import org.nuiton.util.PluginConfig;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author tchemit
+ * @since 1.0.0
+ */
+public class GenerateChangesMojoTest extends AbstractRedmineMojoTest<GenerateChangesMojo> {
+
+ @BeforeClass
+ public static void initClass() throws Exception {
+
+ initConfigs(GenerateChangesMojoTest.class);
+ }
+
+ @Test
+ @PluginConfig(pomName = "generate-changes.xml", goalName = "generate-changes")
+ public void testGenerateChangesMojo() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GenerateChangesMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectDataMojoTest.java
===================================================================
--- maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectDataMojoTest.java (rev 0)
+++ maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectDataMojoTest.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,50 @@
+package org.nuiton.redmine.plugin;
+
+import org.nuiton.util.PluginConfig;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author tchemit
+ * @since 1.0.0
+ */
+public class GetProjectDataMojoTest extends AbstractRedmineMojoTest<GetProjectDataMojo> {
+
+ @BeforeClass
+ public static void initClass() throws Exception {
+
+ initConfigs(GetProjectDataMojoTest.class);
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-project.xml", goalName = "retreave-project-data")
+ public void testProject() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-project-users.xml", goalName = "retreave-project-data")
+ public void testUsers() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-project-trackers.xml", goalName = "retreave-project-data")
+ public void testTrakers() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-project-versions.xml", goalName = "retreave-project-data")
+ public void testVersions() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectDataMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest.java
===================================================================
--- maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest.java (rev 0)
+++ maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,42 @@
+package org.nuiton.redmine.plugin;
+
+import org.nuiton.util.PluginConfig;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author tchemit
+ * @since 1.0.0
+ */
+public class GetProjectVersionDataMojoTest extends AbstractRedmineMojoTest<GetProjectVersionDataMojo> {
+
+ @BeforeClass
+ public static void initClass() throws Exception {
+
+ initConfigs(GetProjectVersionDataMojoTest.class);
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-version.xml", goalName = "get-project-version-data")
+ public void testVersion() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-version-issues.xml", goalName = "get-project-version-data")
+ public void testIssues() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+
+ @Test
+ @PluginConfig(pomName = "get-version-files.xml", goalName = "get-project-version-data")
+ public void testFiles() throws Exception {
+
+ mojo.doAction();
+ //TODO check file is generated
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/RedmineReportMojoTest.java
===================================================================
--- maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/RedmineReportMojoTest.java (rev 0)
+++ maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/RedmineReportMojoTest.java 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,42 @@
+package org.nuiton.redmine.plugin;
+
+import org.nuiton.util.PluginConfig;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * @author tchemit
+ * @since 1.0.0
+ */
+public class RedmineReportMojoTest extends AbstractRedmineMojoTest<RedmineReportMojo> {
+
+ @BeforeClass
+ public static void initClass() throws Exception {
+ initConfigs(RedmineReportMojoTest.class);
+// initConfigs(RedmineReportMojoTest.class, "testRedmineReportMojo");
+ }
+
+// @AfterClass
+// public static void afterClass() throws Exception {
+// configItr = null;
+// testDir = null;
+// }
+// @Before
+// @Override
+// public void setUp() throws Exception {
+// super.setUp();
+// assertNotNull(mojo);
+// mojo = (RedmineReportMojo) mojo;
+// }
+// @Test
+// public void testDummy() {
+//
+// }
+ @Test
+ @PluginConfig(pomName = "redmine-report.xml", goalName = "redmine-report")
+ public void testRedmineReportMojo() throws Exception {
+
+ mojo.doAction();
+ }
+}
Property changes on: maven-redmine-plugin/trunk/src/test/java/org/nuiton/redmine/plugin/RedmineReportMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GenerateChangesMojoTest/generate-changes.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GenerateChangesMojoTest/generate-changes.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GenerateChangesMojoTest/generate-changes.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-changes</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-trackers.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-trackers.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-trackers.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <dataType>trackers</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>retreave-project-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-users.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-users.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-users.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <dataType>users</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>retreave-project-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-versions.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-versions.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project-versions.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <dataType>versions</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>retreave-project-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectDataMojoTest/get-project.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <dataType>project</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>retreave-project-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-files.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-files.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-files.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <versionId>1.0.0</versionId>
+ <dataType>files</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>get-project-version-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-issues.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-issues.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version-issues.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <versionId>1.0.0</versionId>
+ <dataType>issues</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>get-project-version-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/GetProjectVersionDataMojoTest/get-version.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-generate-changes</artifactId>
+ <version>0</version>
+
+ <name>generate-changes</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ <projectId>one</projectId>
+ <versionId>1.0.0</versionId>
+ <dataType>version</dataType>
+ <dataFormat>xml</dataFormat>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>get-project-version-data</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/RedmineReportMojoTest/redmine-report.xml
===================================================================
--- maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/RedmineReportMojoTest/redmine-report.xml (rev 0)
+++ maven-redmine-plugin/trunk/src/test/resources/org/nuiton/redmine/plugin/RedmineReportMojoTest/redmine-report.xml 2009-09-06 19:06:37 UTC (rev 18)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <groupId>org.nuiton.maven-redmine-plugin</groupId>
+ <artifactId>test-redmine-report</artifactId>
+ <version>0</version>
+
+ <name>redmine-report</name>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-redmine-plugin</artifactId>
+ <configuration>
+ <redmineUrl>http://mynuiton.org</redmineUrl>
+ <redmineUsername>chemit</redmineUsername>
+ <redminePassword>azer</redminePassword>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>redmine-report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
1
0
Author: tchemit
Date: 2009-08-23 17:30:21 +0200 (Sun, 23 Aug 2009)
New Revision: 17
Added:
migration-thirdparty/bin/deploy-third-reloc.sh
migration-thirdparty/bin/generate-third-poms-reloc.sh
Modified:
migration-thirdparty/
migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh
migration-thirdparty/bin/build-nuiton-modify-projects.list.sh
migration-thirdparty/bin/build-third-translations-list.sh
migration-thirdparty/bin/build-third-translations-migrate-list.sh
migration-thirdparty/bin/generate-third-poms.sh
migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh
Log:
add relocation step
Property changes on: migration-thirdparty
___________________________________________________________________
Modified: svn:ignore
- vFile.tmp
order
projectorder
target
*.list
repo*
svn*
resolv*
poms*
+ vFile.tmp
order
projectorder
target
*.list
repo*
svn*
resolv*
poms*
poms2*
*.pom
Modified: migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh
===================================================================
--- migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh 2009-08-20 00:50:45 UTC (rev 16)
+++ migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -6,11 +6,11 @@
d=$(pwd)
for pom in $(cat nuiton-modify-projects.list) ; do
- name=$($d/bin/get-project-type.sh $pom)
- grep $name nuiton-modify-projects-type.list 1>/dev/null
+ type=$($d/bin/get-project-type.sh $pom)
+ grep $type nuiton-modify-projects-type.list 1>/dev/null
if [ $? -gt 0 ] ; then
-# echo "add $name" ;
- echo "$name" >> nuiton-modify-projects-type.list ;
+# echo "add $type" ;
+ echo "$type" >> nuiton-modify-projects-type.list ;
fi ;
done
sort -d nuiton-modify-projects-type.list > nuiton-modify-projects-type.list2
Modified: migration-thirdparty/bin/build-nuiton-modify-projects.list.sh
===================================================================
--- migration-thirdparty/bin/build-nuiton-modify-projects.list.sh 2009-08-20 00:50:45 UTC (rev 16)
+++ migration-thirdparty/bin/build-nuiton-modify-projects.list.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -2,29 +2,44 @@
rm -fr nuiton-modify-projects.list
touch nuiton-modify-projects.list
+d=$(pwd)
for pom in $(cat nuiton-modify-poms.list) ; do
-parent=$(dirname $pom) ;
-parent=$(dirname $parent) ;
-parentpom="$parent/pom.xml" ;
-if [ -e $parentpom ] ; then
+ parent=$(dirname $pom) ;
+ parent=$(dirname $parent) ;
+ parentpom="$parent/pom.xml" ;
+ realpom=""
+ if [ -e $parentpom ] ; then
# echo "[$pom] - parent $parentpom" ;
- grep $parentpom nuiton-modify-projects.list 1>/dev/null ;
- if [ $? -gt 0 ] ; then
-# echo "add parent pom $parentpom" ;
- echo "$parentpom" >> nuiton-modify-projects.list ;
- fi ;
-else
-# echo "[$pom] - standalone" ;
- grep $pom nuiton-modify-projects.list 1>/dev/null ;
- if [ $? -gt 0 ] ; then
-# echo "add standalone pom $pom" ;
- echo "$pom" >> nuiton-modify-projects.list ;
- fi ;
-fi ;
+ realpom=$parentpom
+ else
+ realpom=$pom
+# echo "[$pom] - standalone" ;
+ fi ;
+
+ grep $realpom nuiton-modify-projects.list 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi
+ echo "$realpom" | grep -e "trunk" 1>/dev/null
+ # pom non encore enregistrés
+ if [ $? -eq 0 ] ; then
+ echo "$realpom" >> nuiton-modify-projects.list
+ else
+ # on verifique que la version est deployee
+ version=$($d/bin/get-pom-version.sh $realpom)
+ type=$($d/bin/get-project-type.sh $realpom)
+ groupId="org/nuiton"
+ url="http://maven.nuiton.org/release/$groupId/$type/$version/$type-$version.pom"
+ wget $url -o - 1>/dev/null
+ if [ $? -eq 0 ] ; then
+ # l'url a bien ete trouvee
+ echo "$realpom" >> nuiton-modify-projects.list
+ else
+ echo "$url not found on nuiton, will skip $realpom"
+ fi
+ fi
done
sort -d nuiton-modify-projects.list > nuiton-modify-projects.list2
mv nuiton-modify-projects.list2 nuiton-modify-projects.list
-cat nuiton-modify-projects.list
+#cat nuiton-modify-projects.list
Modified: migration-thirdparty/bin/build-third-translations-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-list.sh 2009-08-20 00:50:45 UTC (rev 16)
+++ migration-thirdparty/bin/build-third-translations-list.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -1,6 +1,6 @@
#!/bin/sh
cat << EOF > third-translations.list
-asm/asm/1.5.3:org.nuiton.thirdparty/asm/1.5.4-SNAPSHOT
+asm/asm/1.5.3:org.nuiton.thirdparty/asm/1.5.4-snapshot
asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty/asm-attrs/1.5.4-snapshot
asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty/asm-util/1.5.4-snapshot
externallib/jGuard-j2ee/0.7.2:org.nuiton.thirdparty/jGuard-j2ee/0.7.2
Modified: migration-thirdparty/bin/build-third-translations-migrate-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-migrate-list.sh 2009-08-20 00:50:45 UTC (rev 16)
+++ migration-thirdparty/bin/build-third-translations-migrate-list.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -20,9 +20,9 @@
if [ $? -eq 0 ] ; then continue ; fi ;
echo "$i" >> third-translations-migrate.list ;
done
-echo "asm/asm/1.5.4-snapshot:org.nuiton.thirdparty/asm/1.5.4-SNAPSHOT" >> third-translations-migrate.list
-echo "asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty/asm-attrs/1.5.4-SNAPSHOT" >> third-translations-migrate.list
-echo "asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty/asm-util/1.5.4-SNAPSHOT" >> third-translations-migrate.list
+echo "asm/asm/1.5.4-snapshot:org.nuiton.thirdparty/asm/1.5.4-snapshot" >> third-translations-migrate.list
+echo "asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty/asm-attrs/1.5.4-snapshot" >> third-translations-migrate.list
+echo "asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty/asm-util/1.5.4-snapshot" >> third-translations-migrate.list
sort -d third-translations-migrate.list > third-translations-migrate.list2
mv third-translations-migrate.list2 third-translations-migrate.list
Added: migration-thirdparty/bin/deploy-third-reloc.sh
===================================================================
--- migration-thirdparty/bin/deploy-third-reloc.sh (rev 0)
+++ migration-thirdparty/bin/deploy-third-reloc.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+options="-DupdateReleaseInfo -Durl=scpexe://nuiton.org/var/lib/maven/release -DrepositoryId=nuiton"
+
+for i in $(cat third-translations-migrate.list) ; do
+ in=$(echo $i | cut -d':' -f1)
+ out=$(echo $i | cut -d':' -f2)
+ g=$(echo $in | cut -d'/' -f1)
+ a=$(echo $in | cut -d'/' -f2)
+ v=$(echo $in | cut -d'/' -f3)
+ g2=$(echo $out | cut -d'/' -f1)
+ a2=$(echo $out | cut -d'/' -f2)
+ v2=$(echo $out | cut -d'/' -f3)
+ parent="repository/${g//.//}/$a/$v"
+ pom="poms2/$a-pom.xml"
+ jar="$a-$v.jar"
+ sources="$a-$v-sources.jar"
+ javadoc="$a-$v-javadoc.jar"
+ echo "$g:$a:$v --> adding relocation infos"
+ echo -n " - deploy $jar ..."
+ mvn deploy:deploy-file -DpomFile=$pom $options -Dfile=$parent/$jar 1>/tmp/maven-deploy.log
+ if [ $? -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "KO"
+ cat /tmp/maven-deploy.log
+ exit 1
+ fi
+ if [ -e $parent/$sources ] ; then
+ echo -n " - deploy sources $sources ..."
+ mvn deploy:deploy-file -DpomFile=$pom -Dclassifier=sources $options -Dfile=$parent/$sources 1>/tmp/maven-deploy.log
+ if [ $? -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "KO"
+ cat /tmp/maven-deploy.log
+ exit 1
+ fi
+ else
+ echo " - no sources to deploy"
+ fi
+ if [ -e $parent/$javadoc ] ; then
+ echo -n " - deploy javadoc $javadoc ..."
+ mvn deploy:deploy-file -DpomFile=$pom -Dclassifier=javadoc $options -Dfile=$parent/$javadoc 1>/tmp/maven-deploy.log
+ if [ $? -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "KO"
+ cat /tmp/maven-deploy.log
+ exit 1
+ fi
+ else
+ echo " - no javadoc to deploy"
+ fi ;
+ echo ""
+done
+
+
Property changes on: migration-thirdparty/bin/deploy-third-reloc.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/generate-third-poms-reloc.sh
===================================================================
--- migration-thirdparty/bin/generate-third-poms-reloc.sh (rev 0)
+++ migration-thirdparty/bin/generate-third-poms-reloc.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+rm -rf poms2
+mkdir poms2
+for i in $(cat third-translations-migrate.list) ; do
+ in=$(echo $i | cut -d':' -f1) ;
+ out=$(echo $i | cut -d':' -f2) ;
+ g=$(echo $in | cut -d'/' -f1) ;
+ a=$(echo $in | cut -d'/' -f2) ;
+ v=$(echo $in | cut -d'/' -f3) ;
+ g2=$(echo $out | cut -d'/' -f1) ;
+ a2=$(echo $out | cut -d'/' -f2) ;
+ v2=$(echo $out | cut -d'/' -f3) ;
+ parent="repository/${g//.//}/$a/$v" ;
+ originalPom="$parent/$a-$v.pom"
+ pom="poms2/$a-pom.xml"
+ jar="$parent/$a-$v.jar"
+ echo "$g:$a:$v --> $g2:$a2:$v2" ;
+ if [ -e $originalPom ] ; then
+ echo " - copy existing pom $originalPom " ;
+ cp $originalPom "poms2/$a-pom-orgi.xml" ;
+ fi ;
+ echo " - generate pom : $pom" ;
+ cat << EOF > $pom
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>$g</groupId>
+ <artifactId>$a</artifactId>
+ <version>$v</version>
+ <distributionManagement>
+ <relocation>
+ <groupId>$g2</groupId>
+ <version>$v2</version>
+ </relocation>
+ </distributionManagement>
+
+</project>
+EOF
+ echo "" ;
+done
+
+
Property changes on: migration-thirdparty/bin/generate-third-poms-reloc.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: migration-thirdparty/bin/generate-third-poms.sh
===================================================================
--- migration-thirdparty/bin/generate-third-poms.sh 2009-08-20 00:50:45 UTC (rev 16)
+++ migration-thirdparty/bin/generate-third-poms.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -29,6 +29,12 @@
<groupId>$g2</groupId>
<artifactId>$a2</artifactId>
<version>$v2</version>
+ <distributionManagement>
+ <relocation>
+ <groupId>$g</groupId>
+ </relocation>
+ </distributionManagement>
+
</project>
EOF
echo "" ;
Modified: migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh
===================================================================
--- migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh 2009-08-20 00:50:45 UTC (rev 16)
+++ migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh 2009-08-23 15:30:21 UTC (rev 17)
@@ -8,6 +8,7 @@
for pom in $poms ; do
echo -n " - build $pom ..."
dir=$(dirname $pom)
+#TODO peut-etre verifier que la version est deployee sur nuiton sinon on s'en fout un peu ?
(cd $dir ; mvn clean install -DperformRelease 1>/tmp/maven-build.log)
if [ $? -eq 0 ] ; then
echo "OK"
1
0
Author: tchemit
Date: 2009-08-20 02:50:45 +0200 (Thu, 20 Aug 2009)
New Revision: 16
Added:
migration-thirdparty/bin/build-nuiton-modify-projects-by-version.list.sh
migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh
migration-thirdparty/bin/build-nuiton-modify-projects-version.list.sh
migration-thirdparty/bin/create-project-type-order.sh
migration-thirdparty/bin/get-pom-version.sh
migration-thirdparty/bin/get-pom.version.sh
migration-thirdparty/bin/get-project-type-order.sh
migration-thirdparty/bin/get-project-type.sh
migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh
migration-thirdparty/bin/sort-poms.sh
Modified:
migration-thirdparty/
migration-thirdparty/bin/nuiton-patch-poms.sh
Log:
step 5 is nearly finish :)
Property changes on: migration-thirdparty
___________________________________________________________________
Modified: svn:ignore
- target
*.list
repo*
svn*
resolv*
poms*
+ vFile.tmp
order
projectorder
target
*.list
repo*
svn*
resolv*
poms*
Added: migration-thirdparty/bin/build-nuiton-modify-projects-by-version.list.sh
===================================================================
--- migration-thirdparty/bin/build-nuiton-modify-projects-by-version.list.sh (rev 0)
+++ migration-thirdparty/bin/build-nuiton-modify-projects-by-version.list.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+rm -fr order nuiton-modify-projects-by-version.list
+touch nuiton-modify-projects-by-version.list
+mkdir order
+d=$(pwd)
+for pom in $(cat nuiton-modify-projects.list) ; do
+ version=$($d/bin/get-pom-version.sh $pom)
+ vFile="order/$version"
+ echo -n " $pom" >> $vFile
+done
+
+for v in $(cat nuiton-modify-projects-version.list) ; do
+# echo "treate version $v"
+ vFile=$($d/bin/sort-poms.sh order/$v)
+# echo "poms found : $vFile"
+ echo "$v:$vFile" >> nuiton-modify-projects-by-version.list ;
+done
+
+
Property changes on: migration-thirdparty/bin/build-nuiton-modify-projects-by-version.list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh
===================================================================
--- migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh (rev 0)
+++ migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+rm -fr nuiton-modify-projects-type.list
+touch nuiton-modify-projects-type.list
+
+d=$(pwd)
+
+for pom in $(cat nuiton-modify-projects.list) ; do
+ name=$($d/bin/get-project-type.sh $pom)
+ grep $name nuiton-modify-projects-type.list 1>/dev/null
+ if [ $? -gt 0 ] ; then
+# echo "add $name" ;
+ echo "$name" >> nuiton-modify-projects-type.list ;
+ fi ;
+done
+sort -d nuiton-modify-projects-type.list > nuiton-modify-projects-type.list2
+mv nuiton-modify-projects-type.list2 nuiton-modify-projects-type.list
+
+
Property changes on: migration-thirdparty/bin/build-nuiton-modify-projects-type.list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/build-nuiton-modify-projects-version.list.sh
===================================================================
--- migration-thirdparty/bin/build-nuiton-modify-projects-version.list.sh (rev 0)
+++ migration-thirdparty/bin/build-nuiton-modify-projects-version.list.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+rm -fr nuiton-modify-projects-version.list
+touch nuiton-modify-projects-version.list
+
+d=$(pwd)
+
+for pom in $(cat nuiton-modify-projects.list) ; do
+ version=$($d/bin/get-pom-version.sh $pom)
+ grep $version nuiton-modify-projects-version.list 1>/dev/null
+ if [ $? -gt 0 ] ; then
+# echo "[$pom] : $version adding this version"
+ echo "$version" >> nuiton-modify-projects-version.list ;
+ fi ;
+done
+cat nuiton-modify-projects-version.list | xargs java -cp \
+~/.m2/repository/org/nuiton/nuiton-utils/1.1.0-rc-9-SNAPSHOT/nuiton-utils-1.1.0-rc-9-SNAPSHOT.jar:~/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/chemit/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar:/home/chemit/.m2/repository/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar org.nuiton.util.VersionUtil \
+2>/dev/null 1> nuiton-modify-projects-version.list2
+mv nuiton-modify-projects-version.list2 nuiton-modify-projects-version.list
+
+
Property changes on: migration-thirdparty/bin/build-nuiton-modify-projects-version.list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/create-project-type-order.sh
===================================================================
--- migration-thirdparty/bin/create-project-type-order.sh (rev 0)
+++ migration-thirdparty/bin/create-project-type-order.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+ORDER="maven-helper-plugin maven-nuiton-skin mavenpom i18n nuiton-utils nuiton-j2r jaxx jrst nuiton-widgets topia"
+
+if [ ! -e projectorder ] ; then
+ # create order files
+ mkdir projectorder
+ n=0
+ for i in $ORDER ; do
+ echo "$n" > projectorder/$i
+ echo "$i" > projectorder/$n
+ n=$(( $n + 1 ))
+ done
+fi
+
Property changes on: migration-thirdparty/bin/create-project-type-order.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/get-pom-version.sh
===================================================================
--- migration-thirdparty/bin/get-pom-version.sh (rev 0)
+++ migration-thirdparty/bin/get-pom-version.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,7 @@
+#!/bin/sh
+pom=$1
+version=$(xmlstarlet sel -N "p=http://maven.apache.org/POM/4.0.0" -t -v "/p:project/p:version" $pom)
+if [ ! -n $version ] ; then
+ version=$(xmlstarlet sel -N "p=http://maven.apache.org/POM/4.0.0" -t -v "/p:project/p:parent/p:version" $pom)
+fi;
+echo $version
Property changes on: migration-thirdparty/bin/get-pom-version.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/get-pom.version.sh
===================================================================
--- migration-thirdparty/bin/get-pom.version.sh (rev 0)
+++ migration-thirdparty/bin/get-pom.version.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,7 @@
+#!/bin/sh
+pom=$1
+version=$(xmlstarlet sel -N "p=http://maven.apache.org/POM/4.0.0" -t -v "/p:project/p:version" $pom)
+if [ ! -n $version ] ; then
+ version=$(xmlstarlet sel -N "p=http://maven.apache.org/POM/4.0.0" -t -v "/p:project/p:parent/p:version" $pom)
+fi;
+echo $version
Property changes on: migration-thirdparty/bin/get-pom.version.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/get-project-type-order.sh
===================================================================
--- migration-thirdparty/bin/get-project-type-order.sh (rev 0)
+++ migration-thirdparty/bin/get-project-type-order.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+d=$(pwd)
+$d/bin/create-project-type-order.sh
+value=$(cat projectorder/$1)
+echo $value
Property changes on: migration-thirdparty/bin/get-project-type-order.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/get-project-type.sh
===================================================================
--- migration-thirdparty/bin/get-project-type.sh (rev 0)
+++ migration-thirdparty/bin/get-project-type.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+pom=$1
+
+parent=$(dirname $pom) ;
+echo "$parent" | grep -e "tags" 1>/dev/null
+if [ $? -eq 0 ] ; then
+ parent=$(dirname $parent)
+fi
+name=$(basename $parent)
+echo "$name"
+
+
Property changes on: migration-thirdparty/bin/get-project-type.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: migration-thirdparty/bin/nuiton-patch-poms.sh
===================================================================
--- migration-thirdparty/bin/nuiton-patch-poms.sh 2009-08-19 20:23:27 UTC (rev 15)
+++ migration-thirdparty/bin/nuiton-patch-poms.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -21,7 +21,7 @@
fi ;
if [ $v != $v2 ] ; then
sed -i -r -e "s/version>$v(.*)/version>$v2\1/" $pom ;
- echo -n " [change v]" ;
+ echo -n " [change version]" ;
fi ;
grep $pom nuiton-modify-poms.list 1>/dev/null ;
if [ $? -gt 0 ] ; then
Added: migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh
===================================================================
--- migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh (rev 0)
+++ migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+while read line
+do
+ v=$(echo $line | cut -d':' -f1)
+ poms=$(echo $line | cut -d':' -f2-)
+ echo "[version $v]"
+ for pom in $poms ; do
+ echo -n " - build $pom ..."
+ dir=$(dirname $pom)
+ (cd $dir ; mvn clean install -DperformRelease 1>/tmp/maven-build.log)
+ if [ $? -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "KO"
+ cat /tmp/maven-build.log
+ exit 1
+ fi
+ done
+done < "nuiton-modify-projects-by-version.list"
+
Property changes on: migration-thirdparty/bin/rebuild-nuiton-modify-projects.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/sort-poms.sh
===================================================================
--- migration-thirdparty/bin/sort-poms.sh (rev 0)
+++ migration-thirdparty/bin/sort-poms.sh 2009-08-20 00:50:45 UTC (rev 16)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+file=$1
+
+d=$(pwd)
+$d/bin/create-project-type-order.sh
+nborder=$(( $(ls | wc -l) / 2 ))
+
+tmpFile="$1.tmp"
+rm -f $tmpFile
+touch $tmpFile
+for o in $(seq $nborder) ; do
+ o=$(( $o - 1 ))
+# echo "treate order $o"
+ for pom in $(cat $file) ; do
+ type=$($d/bin/get-project-type.sh $pom)
+ order=$($d/bin/get-project-type-order.sh $type)
+ if [ $o -eq $order ] ; then
+# echo "$pom : $order"
+ echo "$pom " >> $tmpFile
+ fi
+ done
+done
+value=$(cat $tmpFile)
+rm -f $tmpFile
+echo $value
Property changes on: migration-thirdparty/bin/sort-poms.sh
___________________________________________________________________
Added: svn:executable
+ *
1
0
Author: tchemit
Date: 2009-08-19 22:23:27 +0200 (Wed, 19 Aug 2009)
New Revision: 15
Added:
migration-thirdparty/bin/build-third-original-list.sh
migration-thirdparty/bin/build-third-translations-migrate-list.sh
migration-thirdparty/bin/generate-third-poms.sh
migration-thirdparty/bin/obtain-third-maven-repository.sh
Removed:
migration-thirdparty/bin/build-third-maven-repository.sh
migration-thirdparty/bin/build-third-translations-migrate.list.sh
migration-thirdparty/bin/get-third-original-list.sh
Modified:
migration-thirdparty/
migration-thirdparty/bin/adapt-resolv-dir.sh
migration-thirdparty/bin/build-resolv-dir.sh
migration-thirdparty/bin/build-resolv_safe-dir.sh
migration-thirdparty/bin/build-resolv_unsafe-dir.sh
migration-thirdparty/bin/build-third-translations-list.sh
migration-thirdparty/bin/build-third-translations-unsued-list.sh
migration-thirdparty/bin/deploy-third.sh
Log:
step 1, 2 and 3 is done
Property changes on: migration-thirdparty
___________________________________________________________________
Modified: svn:ignore
- *.list
repo*
svn*
+ target
*.list
repo*
svn*
resolv*
poms*
Modified: migration-thirdparty/bin/adapt-resolv-dir.sh
===================================================================
--- migration-thirdparty/bin/adapt-resolv-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/adapt-resolv-dir.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -3,14 +3,42 @@
echo $i >> resolv_safe/asm=asm=1.5.3 ;
done
rm resolv_unsafe/asm=asm=1.5.3
+
+for i in $(cat resolv_unsafe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.0.1-cl) ; do
+grep -e "$i" resolv_safe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl 1>/dev/null
+if [ $? -eq 0 ] ; then
+ echo $i >> resolv_safe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl ;
+fi ;
+done
+rm resolv_unsafe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.0.1-cl
+
+for i in $(cat resolv_unsafe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1-cl) ; do
+grep -e "$i" resolv_safe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl 1>/dev/null
+if [ $? -eq 0 ] ; then
+ echo $i >> resolv_safe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl ;
+fi ;
+done
+rm resolv_unsafe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1-cl
+
+for i in $(cat resolv_unsafe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl) ; do
+grep -e "$i" resolv_safe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl 1>/dev/null
+if [ $? -eq 0 ] ; then
+ echo $i >> resolv_safe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl ;
+fi ;
+
+done
+rm resolv_unsafe/org.apache.maven.plugins=maven-project-info-reports-plugin=2.1.1-cl
+
for i in $(cat resolv_unsafe/org.swinglabs=swingx=0.9.6 | grep -e "1.5.") ; do
echo $i >> resolv_safe/org.swinglabs=swingx=0.9.6 ;
done
rm resolv_unsafe/org.swinglabs=swingx=0.9.6
+
for i in $(cat resolv_unsafe/org.swinglabs=swingx=0.9.7 | grep -v "1.5.") ; do
echo $i >> resolv_safe/org.swinglabs=swingx=0.9.7 ;
done
rm resolv_unsafe/org.swinglabs=swingx=0.9.7
+
for i in $(cat resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl | grep -v "isis" | grep -v "jrst2") ; do
echo $i >> resolv_safe/sdoc=sdoc=0.5.0-beta-patchcl ;
done
@@ -18,6 +46,7 @@
echo $i >> resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl-2 ;
done
mv resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl-2 resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl
+
for i in $(cat resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54 | grep -v "jrst2") ; do
echo $i >> resolv_safe/uk.co.flamingpenguin=jewelcli=0.54 ;
done
Modified: migration-thirdparty/bin/build-resolv-dir.sh
===================================================================
--- migration-thirdparty/bin/build-resolv-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-resolv-dir.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -7,11 +7,16 @@
a=$(echo $in | cut -d'/' -f2) ;
v=$(echo $in | cut -d'/' -f3) ;
file="resolv/$g=$a=$v" ;
- echo "$g:$a:$v : " ;
+ n=0
+ echo -n "$g:$a:$v : " ;
touch $file ;
for j in $(cat nuiton-all-poms.list) ; do
grep -e "$a" $j 1>/dev/null ;
- if [ $? -eq 0 ] ; then echo "$j" >> $file ; echo " $j"; fi ;
+ if [ $? -eq 0 ] ; then
+ echo "$j" >> $file ;
+ n=$(( $n + 1 )) ;
+ fi ;
done ;
+ echo "$n"
done
Modified: migration-thirdparty/bin/build-resolv_safe-dir.sh
===================================================================
--- migration-thirdparty/bin/build-resolv_safe-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-resolv_safe-dir.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -2,28 +2,30 @@
rm -rf resolv_safe resolved
mkdir resolv_safe
touch resolved
-for file in $(ls resolv) ; do
-g=$(echo $file | cut -d'=' -f1) ;
-a=$echo $file | cut -d'=' -f2) ;
-v=$(echo $file | cut -d'=' -f3) ;
-safeFile="resolv_safe/$file" ;
-nbSafe=0 ;
-touch $safeFile ;
-for pom in $(cat "resolv/$file") ; do
- grep -e "$pom" $safeFile 1>/dev/null ;
+for in in $(ls resolv) ; do
+g=$(echo $in | cut -d'=' -f1) ;
+a=$(echo $in | cut -d'=' -f2) ;
+v=$(echo $in | cut -d'=' -f3) ;
+file="resolv_safe/$in" ;
+nb=0 ;
+touch $file ;
+for pom in $(cat "resolv/$in") ; do
+ grep -e "$pom" $file 1>/dev/null ;
if [ $? -eq 0 ] ; then continue ; fi ;
grep -e "$v" $pom 1>/dev/null ;
if [ $? -eq 0 ] ; then
- echo "$pom" >> $safeFile ;
- echo "$pom" >> resolved ;
- nbSafe=$(( $nbSafe + 1 )) ;
- fi
+ echo "$pom" >> $file ;
+ echo "$pom" >> resolved ;
+ nb=$(( $nb + 1 )) ;
+ fi ;
done ;
-if [ $nbSafe -gt 0 ] ; then
-echo "[$file]" ;
-echo " -- WILL MODIFY poms detected $nbSafe" ;
-cat "$safeFile" ;
-echo "" ;
-else rm $safeFile ;
+echo "[$in] poms to patch : $nb" ;
+if [ $nb -gt 0 ] ; then
+ sort $file > "$file="
+ mv "$file=" $file
+ cat "$file" ;
+ echo "" ;
+else
+ rm $file ;
fi ;
done
Modified: migration-thirdparty/bin/build-resolv_unsafe-dir.sh
===================================================================
--- migration-thirdparty/bin/build-resolv_unsafe-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-resolv_unsafe-dir.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,24 +1,26 @@
#!/bin/sh
rm -rf resolv_unsafe
mkdir resolv_unsafe
-for file in $(ls resolv) ; do
-nbUnsafe=0 ;
-unsafeFile="resolv_unsafe/$file" ;
-touch $unsafeFile ;
-for pom in $(cat "resolv/$file") ; do
+for in in $(ls resolv) ; do
+nb=0 ;
+file="resolv_unsafe/$in" ;
+touch $file ;
+for pom in $(cat "resolv/$in") ; do
grep -e "$pom" resolved 1>/dev/null ;
if [ $? -eq 0 ] ; then continue ; fi ;
- grep -e "$pom" $unsafeFile 1>/dev/null ;
+ grep -e "$pom" $file 1>/dev/null ;
if [ $? -eq 0 ] ; then continue ; fi ;
- echo "$pom" >> $unsafeFile ;
- nbUnsafe=$(( $nbUnsafe + 1 )) ;
+ echo "$pom" >> $file ;
+ nb=$(( $nb + 1 )) ;
done ;
-if [ $nbUnsafe -gt 0 ] ; then
-echo "[$file]" ;
-echo " -- UNSAFE poms detected $nbUnsafe" ;
-cat "$unsafeFile" ;
-echo "" ;
-else rm $unsafeFile ;
+echo "[$in] pom not patched : $nb" ;
+if [ $nb -gt 0 ] ; then
+ sort $file > "$file="
+ mv "$file=" $file
+ cat "$file" ;
+ echo "" ;
+else
+ rm $file ;
fi ;
done
Deleted: migration-thirdparty/bin/build-third-maven-repository.sh
===================================================================
--- migration-thirdparty/bin/build-third-maven-repository.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-third-maven-repository.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,14 +0,0 @@
-#!/bin/sh
-# copy the maven repository for the given artifacts (in file thir-original.list)
-rm -rf repository
-for i in $(cat third-original.list) ; do
-dir="repository/$i"
-mkdir -p $dir ;
-echo "copy files to $dir" ;
-( cd $dir ;
- scp -r publish@nuiton.org:/var/lib/maven/release/$i/* . 1>/dev/null ;
- ls -l *.pom*
- ls -l *.jar*
-)
-done
-
Copied: migration-thirdparty/bin/build-third-original-list.sh (from rev 14, migration-thirdparty/bin/get-third-original-list.sh)
===================================================================
--- migration-thirdparty/bin/build-third-original-list.sh (rev 0)
+++ migration-thirdparty/bin/build-third-original-list.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -0,0 +1,8 @@
+#!/bin/sh
+rm -f third-original.list
+ssh publish(a)nuiton.org '(find /var/lib/maven/release -type d \
+| grep -v "org/nuiton" | grep -v "org/chorem" | grep .*/[0-9] | cut -f6- -d/ )' > third-original.list
+
+sort third-original.list > third-original.list2
+mv third-original.list2 third-original.list
+
Property changes on: migration-thirdparty/bin/build-third-original-list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+
Modified: migration-thirdparty/bin/build-third-translations-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-list.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-third-translations-list.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,32 +1,30 @@
#!/bin/sh
cat << EOF > third-translations.list
-externallib/jregex/1.2_01:org.nuiton.thirdparty.externallib/jregex/1.2_01
-externallib/REngine/0.6-0:org.nuiton.thirdparty.externallib/REngine/0.6-0
-externallib/Rserve/0.6-0:org.nuiton.thirdparty.externallib/Rserve/0.6-0
-externallib/JRI/0.2-4-cl:org.nuiton.thirdparty.externallib/JRI/0.2-4-cl
-externallib/JRI/0.7-0:org.nuiton.thirdparty.externallib/JRI/0.7-0
-externallib/l2fprod-common/0.1:org.nuiton.thirdparty.externallib/l2fprod-common/0.1
-sdoc/sdoc/0.5.0-beta-patchcl:org.nuiton.thirdparty.sdoc/sdoc/0.5.0-beta-patchcl
-org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204
-org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081018:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204
-org.apache.commons/commons-compress/20090504:org.nuiton.thirdparty.commons/commons-compress/20090504
-org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081016:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204
-org.fife/rsyntaxtextarea/1.3.3:org.nuiton.thirdparty.fife/rsyntaxtextarea/1.3.3
-externallib/jGuard-j2ee/0.7.2:XX/jGuard-j2ee/0.7.2
-asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty.externallib/asm-attrs/1.5.4-snapshot
-asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty.externallib/asm-util/1.5.4-snapshot
-org.jdesktop/beansbinding/1.2.1:XX/beansbinding/1.2.1
-org.mortbay.jetty/jetty-test/6.1.8:org.nuiton.thirdparty.jetty/jetty-test/6.1.8
-uk.co.flamingpenguin/jewelcli/0.53:uk.co.flamingpenguin.jewelcli/jewelcli/0.57
-uk.co.flamingpenguin/jewelcli/0.54:uk.co.flamingpenguin.jewelcli/jewelcli/0.57
-org.swinglabs/swingx/0.9.6:org.swinglabs/swingx/1.0
-org.swinglabs/swingx/0.9.7:org.swinglabs/swingx/1.0
-asm/asm/1.5.3:org.nuiton.thirdparty.asm/asm/1.5.4-SNAPSHOT
+asm/asm/1.5.3:org.nuiton.thirdparty/asm/1.5.4-SNAPSHOT
+asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty/asm-attrs/1.5.4-snapshot
+asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty/asm-util/1.5.4-snapshot
+externallib/jGuard-j2ee/0.7.2:org.nuiton.thirdparty/jGuard-j2ee/0.7.2
+externallib/jregex/1.2_01:org.nuiton.thirdparty/jregex/1.2_01
+externallib/JRI/0.2-4-cl:org.nuiton.thirdparty/JRI/0.2-4-cl
+externallib/JRI/0.7-0:org.nuiton.thirdparty/JRI/0.7-0
+externallib/l2fprod-common/0.1:org.nuiton.thirdparty/l2fprod-common/0.1
+externallib/REngine/0.6-0:org.nuiton.thirdparty/REngine/0.6-0
+externallib/Rserve/0.6-0:org.nuiton.thirdparty/Rserve/0.6-0
+org.apache.commons/commons-compress/20090504:org.nuiton.thirdparty/commons-compress/20090504
org.apache.maven.plugins/maven-project-info-reports-plugin/2.0.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
-org.apache.maven.plugins/maven-project-info-reports-plugin/2.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
+org.apache.maven.plugins/maven-project-info-reports-plugin/2.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
+org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081016:org.nuiton.thirdparty/webstart-maven-plugin/1.0-alpha-2-cl_20090204
+org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081018:org.nuiton.thirdparty/webstart-maven-plugin/1.0-alpha-2-cl_20090204
+org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204:org.nuiton.thirdparty/webstart-maven-plugin/1.0-alpha-2-cl_20090204
+org.fife/rsyntaxtextarea/1.3.3:org.nuiton.thirdparty/rsyntaxtextarea/1.3.3
+org.jdesktop/beansbinding/1.2.1:org.nuiton.thirdparty/beansbinding/1.2.1
+org.mortbay.jetty/jetty-test/6.1.8:org.nuiton.thirdparty/jetty-test/6.1.8
+org.swinglabs/swingx/0.9.6:org.swinglabs/swingx/1.0
+org.swinglabs/swingx/0.9.7:org.swinglabs/swingx/1.0
+sdoc/sdoc/0.5.0-beta-patchcl:org.nuiton.thirdparty/sdoc/0.5.0-beta-patchcl
+uk.co.flamingpenguin/jewelcli/0.53:uk.co.flamingpenguin.jewelcli/jewelcli/0.57
+uk.co.flamingpenguin/jewelcli/0.54:uk.co.flamingpenguin.jewelcli/jewelcli/0.57
EOF
sort third-translations.list > third-translations.list2
mv third-translations.list2 third-translations.list
-cat third-translations.list
-
Copied: migration-thirdparty/bin/build-third-translations-migrate-list.sh (from rev 14, migration-thirdparty/bin/build-third-translations-migrate.list.sh)
===================================================================
--- migration-thirdparty/bin/build-third-translations-migrate-list.sh (rev 0)
+++ migration-thirdparty/bin/build-third-translations-migrate-list.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -0,0 +1,30 @@
+#!/bin/bash
+rm -f third-translations-migrate.list
+touch third-translations-migrate.list
+for i in $(cat third-translations-used.list) ; do
+ in=$(echo $i | cut -d':' -f1) ;
+ g=$(echo $in | cut -d'/' -f1) ;
+ a=$(echo $in | cut -d'/' -f2) ;
+ v=$(echo $in | cut -d'/' -f3) ;
+ rep="repository/${g//.//}/$a/$v" ;
+ if [ ! -e "$rep" ] ; then continue ; fi ;
+ echo "$i" | grep -e "jewelcli" 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ echo "$i" | grep -e "swingx" 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ echo "$i" | grep -e "maven-project-info-reports-plugin" 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ echo "$i" | grep -e "webstart" 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ echo "$i" | grep -e "1.0-alpha-2-cl_20081018" 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ echo "$i" >> third-translations-migrate.list ;
+done
+echo "asm/asm/1.5.4-snapshot:org.nuiton.thirdparty/asm/1.5.4-SNAPSHOT" >> third-translations-migrate.list
+echo "asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty/asm-attrs/1.5.4-SNAPSHOT" >> third-translations-migrate.list
+echo "asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty/asm-util/1.5.4-SNAPSHOT" >> third-translations-migrate.list
+sort -d third-translations-migrate.list > third-translations-migrate.list2
+mv third-translations-migrate.list2 third-translations-migrate.list
+
+
+
Property changes on: migration-thirdparty/bin/build-third-translations-migrate-list.sh
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: migration-thirdparty/bin/build-third-translations-migrate.list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-migrate.list.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-third-translations-migrate.list.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,23 +0,0 @@
-#!/bin/sh
-rm -f third-translations-migrate.list
-touch third-translations-migrate.list
-for i in $(cat third-translations-used.list) ; do
-in=$(echo $i | cut -d':' -f1) ;
-out=$(echo $i | cut -d':' -f2) ;
-g=$(echo $in | cut -d'/' -f1) ;
-a=$(echo $in | cut -d'/' -f2) ;
-v=$(echo $in | cut -d'/' -f3) ;
-rep="repository/${g//.//}/$a/$v" ;
-if [ ! -e "$rep" ] ; then continue ; fi ;
-echo "$i" | grep -e "jewelcli" 1>/dev/null ;
-if [ $? -eq 0 ] ; then continue ; fi ;
-echo "$i" | grep -e "swingx" 1>/dev/null ;
-if [ $? -eq 0 ] ; then continue ; fi ;
-echo $i >> third-translations-migrate.list ;
-done
-echo "asm/asm/1.5.4-snapshot:org.nuiton.thirdparty.asm/asm/1.5.4-SNAPSHOT" >> third-translations-migrate.list
-sort -d third-translations-migrate.list > third-translations-migrate.list2
-mv third-translations-migrate.list2 third-translations-migrate.list
-cat third-translations-migrate.list
-
-
Modified: migration-thirdparty/bin/build-third-translations-unsued-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-unsued-list.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/build-third-translations-unsued-list.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,5 +1,5 @@
#!/bin/sh
-rm third-translations-unused.list
+rm -f third-translations-unused.list
touch third-translations-unused.list
for i in $(cat third-translations.list) ; do
in=$(echo $i | cut -d':' -f1) ;
@@ -16,7 +16,6 @@
done ;
if [ $nb -eq 0 ] ; then
echo $i >> third-translations-unused.list ;
- echo "$g:$a:$v UNUSED" ;
fi ;
done
Modified: migration-thirdparty/bin/deploy-third.sh
===================================================================
--- migration-thirdparty/bin/deploy-third.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/deploy-third.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,34 +1,58 @@
-#!/bin/sh
+#!/bin/bash
+options="-DupdateReleaseInfo -Durl=scpexe://nuiton.org/var/lib/maven/release -DrepositoryId=nuiton"
+
for i in $(cat third-translations-migrate.list) ; do
-in=$(echo $i | cut -d':' -f1) ;
-out=$(echo $i | cut -d':' -f2) ;
-g=$(echo $in | cut -d'/' -f1) ;
-a=$(echo $in | cut -d'/' -f2) ;
-v=$(echo $in | cut -d'/' -f3) ;
-g2=$(echo $out | cut -d'/' -f1) ;
-a2=$(echo $out | cut -d'/' -f2) ;
-v2=$(echo $out | cut -d'/' -f3) ;
-parent="repository/${g//.//}/$a/$v" ;
-originalPom="$parent/$a-$v.pom" ;
-usedPom="$parent/pom.xml" ;
-echo "$g:$a:$v --> $g2:$a2:$v2" ;
-if [ -e $originalPom ] ; then
-echo " - use $originalPom to build pom" ;
-cp $originalPom $usedPom ;
-else
-echo " - generate pom :" ;
-cat << EOF > $usedPom
-<?xml version="1.0" encoding="UTF-8"?><project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>$g2</groupId>
- <artifactId>$a2</artifactId>
- <version>$v2</version>
-</project>
-EOF
-cat $usedPom ;
-fi ;
-echo "==================================================================" ;
+ in=$(echo $i | cut -d':' -f1) ;
+ out=$(echo $i | cut -d':' -f2) ;
+ g=$(echo $in | cut -d'/' -f1) ;
+ a=$(echo $in | cut -d'/' -f2) ;
+ v=$(echo $in | cut -d'/' -f3) ;
+ g2=$(echo $out | cut -d'/' -f1) ;
+ a2=$(echo $out | cut -d'/' -f2) ;
+ v2=$(echo $out | cut -d'/' -f3) ;
+ parent="repository/${g//.//}/$a/$v" ;
+ pom="poms/$a-pom.xml" ;
+ jar="$a-$v.jar" ;
+ sources="$a-$v-sources.jar" ;
+ javadoc="$a-$v-javadoc.jar" ;
+ echo "$g:$a:$v --> $g2:$a2:$v2" ;
+ echo -n " - deploy $jar ..."
+ mvn deploy:deploy-file -DpomFile=$pom $options -Dfile=$parent/$jar 1>/tmp/maven-deploy.log
+ if [ $? -eq 0 ] ; then
+ echo "OK" ;
+ else
+ echo "KO" ;
+ cat /tmp/maven-deploy.log ;
+ exit 1 ;
+ fi ;
+ if [ -e $parent/$sources ] ; then
+ echo -n " - deploy sources $sources ..."
+ mvn deploy:deploy-file -DpomFile=$pom -Dclassifier=sources $options -Dfile=$parent/$sources 1>/tmp/maven-deploy.log
+ if [ $? -eq 0 ] ; then
+ echo "OK" ;
+ else
+ echo "KO" ;
+ cat /tmp/maven-deploy.log ;
+ exit 1 ;
+ fi ;
+ else
+ echo " - no sources to deploy" ;
+ fi ;
+ if [ -e $parent/$javadoc ] ; then
+ echo -n " - deploy javadoc $javadoc ..."
+ mvn deploy:deploy-file -DpomFile=$pom -Dclassifier=javadoc $options -Dfile=$parent/$javadoc 1>/tmp/maven-deploy.log
+ if [ $? -eq 0 ] ; then
+ echo "OK" ;
+ else
+ echo "KO" ;
+ cat /tmp/maven-deploy.log ;
+ exit 1 ;
+ fi ;
+ else
+ echo " - no javadoc to deploy" ;
+ fi ;
+ echo "" ;
done
Added: migration-thirdparty/bin/generate-third-poms.sh
===================================================================
--- migration-thirdparty/bin/generate-third-poms.sh (rev 0)
+++ migration-thirdparty/bin/generate-third-poms.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+rm -rf poms
+mkdir poms
+for i in $(cat third-translations-migrate.list) ; do
+ in=$(echo $i | cut -d':' -f1) ;
+ out=$(echo $i | cut -d':' -f2) ;
+ g=$(echo $in | cut -d'/' -f1) ;
+ a=$(echo $in | cut -d'/' -f2) ;
+ v=$(echo $in | cut -d'/' -f3) ;
+ g2=$(echo $out | cut -d'/' -f1) ;
+ a2=$(echo $out | cut -d'/' -f2) ;
+ v2=$(echo $out | cut -d'/' -f3) ;
+ parent="repository/${g//.//}/$a/$v" ;
+ originalPom="$parent/$a-$v.pom" ;
+ pom="poms/$a-pom.xml" ;
+ jar="$parent/$a-$v.jar" ;
+ sources="$parent/$a-$v-sources.jar" ;
+ javadoc="$parent/$a-$v-javadoc.jar" ;
+ echo "$g:$a:$v --> $g2:$a2:$v2" ;
+ if [ -e $originalPom ] ; then
+ echo " - copy existing pom $originalPom " ;
+ cp $originalPom "poms/$a-pom-orgi.xml" ;
+ fi ;
+ echo " - generate pom : $pom" ;
+ cat << EOF > $pom
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>$g2</groupId>
+ <artifactId>$a2</artifactId>
+ <version>$v2</version>
+</project>
+EOF
+ echo "" ;
+done
+
+
Property changes on: migration-thirdparty/bin/generate-third-poms.sh
___________________________________________________________________
Added: svn:executable
+ *
Deleted: migration-thirdparty/bin/get-third-original-list.sh
===================================================================
--- migration-thirdparty/bin/get-third-original-list.sh 2009-08-19 17:01:54 UTC (rev 14)
+++ migration-thirdparty/bin/get-third-original-list.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -1,6 +0,0 @@
-#!/bin/sh
-rm -f third-original.list
-ssh publish(a)nuiton.org '(find /var/lib/maven/release -type d \
-| grep -v "org/nuiton" | grep -v "org/chorem" | grep .*/[0-9] | cut -f6- -d/ )' > third-original.list
-cat third-original.list
-
Copied: migration-thirdparty/bin/obtain-third-maven-repository.sh (from rev 14, migration-thirdparty/bin/build-third-maven-repository.sh)
===================================================================
--- migration-thirdparty/bin/obtain-third-maven-repository.sh (rev 0)
+++ migration-thirdparty/bin/obtain-third-maven-repository.sh 2009-08-19 20:23:27 UTC (rev 15)
@@ -0,0 +1,14 @@
+#!/bin/sh
+# copy the maven repository for the given artifacts (in file thir-original.list)
+rm -rf repository
+for i in $(cat third-original.list) ; do
+dir="repository/$i"
+mkdir -p $dir ;
+echo "copy files to $dir" ;
+( cd $dir ;
+ scp -r publish@nuiton.org:/var/lib/maven/release/$i/* . 1>/dev/null ;
+ ls -l *.pom*
+ ls -l *.jar*
+)
+done
+
Property changes on: migration-thirdparty/bin/obtain-third-maven-repository.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+
1
0
19 Aug '09
Author: tchemit
Date: 2009-08-19 19:01:54 +0200 (Wed, 19 Aug 2009)
New Revision: 14
Added:
migration-thirdparty/
migration-thirdparty/bin/
migration-thirdparty/bin/adapt-resolv-dir.sh
migration-thirdparty/bin/build-nuiton-modify-projects.list.sh
migration-thirdparty/bin/build-resolv-dir.sh
migration-thirdparty/bin/build-resolv_safe-dir.sh
migration-thirdparty/bin/build-resolv_unsafe-dir.sh
migration-thirdparty/bin/build-third-maven-repository.sh
migration-thirdparty/bin/build-third-translations-list.sh
migration-thirdparty/bin/build-third-translations-migrate.list.sh
migration-thirdparty/bin/build-third-translations-unsued-list.sh
migration-thirdparty/bin/build-third-used-list.sh
migration-thirdparty/bin/deploy-third.sh
migration-thirdparty/bin/get-third-original-list.sh
migration-thirdparty/bin/nuiton-patch-poms.sh
migration-thirdparty/bin/nuiton-svn-revert.sh
migration-thirdparty/bin/obtain-nuiton-svn-repository.sh
Log:
add third-party migration scripts
Property changes on: migration-thirdparty
___________________________________________________________________
Added: svn:ignore
+ *.list
repo*
svn*
Added: migration-thirdparty/bin/adapt-resolv-dir.sh
===================================================================
--- migration-thirdparty/bin/adapt-resolv-dir.sh (rev 0)
+++ migration-thirdparty/bin/adapt-resolv-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,31 @@
+#!/bin/sh
+for i in $(cat resolv_unsafe/asm=asm=1.5.3) ; do
+echo $i >> resolv_safe/asm=asm=1.5.3 ;
+done
+rm resolv_unsafe/asm=asm=1.5.3
+for i in $(cat resolv_unsafe/org.swinglabs=swingx=0.9.6 | grep -e "1.5.") ; do
+echo $i >> resolv_safe/org.swinglabs=swingx=0.9.6 ;
+done
+rm resolv_unsafe/org.swinglabs=swingx=0.9.6
+for i in $(cat resolv_unsafe/org.swinglabs=swingx=0.9.7 | grep -v "1.5.") ; do
+echo $i >> resolv_safe/org.swinglabs=swingx=0.9.7 ;
+done
+rm resolv_unsafe/org.swinglabs=swingx=0.9.7
+for i in $(cat resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl | grep -v "isis" | grep -v "jrst2") ; do
+echo $i >> resolv_safe/sdoc=sdoc=0.5.0-beta-patchcl ;
+done
+for i in $(cat resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl | grep -v "trunk" | grep -v "1.0.0") ; do
+echo $i >> resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl-2 ;
+done
+mv resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl-2 resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl
+for i in $(cat resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54 | grep -v "jrst2") ; do
+echo $i >> resolv_safe/uk.co.flamingpenguin=jewelcli=0.54 ;
+done
+for i in $(cat resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54 | grep -e "jrst2") ; do
+echo $i >> resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54-2 ;
+done
+mv resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54-2 resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54
+rm resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.53
+
+
+
Added: migration-thirdparty/bin/build-nuiton-modify-projects.list.sh
===================================================================
--- migration-thirdparty/bin/build-nuiton-modify-projects.list.sh (rev 0)
+++ migration-thirdparty/bin/build-nuiton-modify-projects.list.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+rm -fr nuiton-modify-projects.list
+touch nuiton-modify-projects.list
+for pom in $(cat nuiton-modify-poms.list) ; do
+parent=$(dirname $pom) ;
+parent=$(dirname $parent) ;
+parentpom="$parent/pom.xml" ;
+if [ -e $parentpom ] ; then
+# echo "[$pom] - parent $parentpom" ;
+ grep $parentpom nuiton-modify-projects.list 1>/dev/null ;
+ if [ $? -gt 0 ] ; then
+# echo "add parent pom $parentpom" ;
+ echo "$parentpom" >> nuiton-modify-projects.list ;
+ fi ;
+else
+# echo "[$pom] - standalone" ;
+ grep $pom nuiton-modify-projects.list 1>/dev/null ;
+ if [ $? -gt 0 ] ; then
+# echo "add standalone pom $pom" ;
+ echo "$pom" >> nuiton-modify-projects.list ;
+ fi ;
+fi ;
+done
+sort -d nuiton-modify-projects.list > nuiton-modify-projects.list2
+mv nuiton-modify-projects.list2 nuiton-modify-projects.list
+
+cat nuiton-modify-projects.list
+
+
Added: migration-thirdparty/bin/build-resolv-dir.sh
===================================================================
--- migration-thirdparty/bin/build-resolv-dir.sh (rev 0)
+++ migration-thirdparty/bin/build-resolv-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,17 @@
+#!/bin/sh
+rm -rf resolv
+mkdir resolv
+for i in $(cat third-translations-used.list) ; do
+ in=$(echo $i | cut -d':' -f1) ;
+ g=$(echo $in | cut -d'/' -f1) ;
+ a=$(echo $in | cut -d'/' -f2) ;
+ v=$(echo $in | cut -d'/' -f3) ;
+ file="resolv/$g=$a=$v" ;
+ echo "$g:$a:$v : " ;
+ touch $file ;
+ for j in $(cat nuiton-all-poms.list) ; do
+ grep -e "$a" $j 1>/dev/null ;
+ if [ $? -eq 0 ] ; then echo "$j" >> $file ; echo " $j"; fi ;
+ done ;
+done
+
Added: migration-thirdparty/bin/build-resolv_safe-dir.sh
===================================================================
--- migration-thirdparty/bin/build-resolv_safe-dir.sh (rev 0)
+++ migration-thirdparty/bin/build-resolv_safe-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,29 @@
+#!/bin/sh
+rm -rf resolv_safe resolved
+mkdir resolv_safe
+touch resolved
+for file in $(ls resolv) ; do
+g=$(echo $file | cut -d'=' -f1) ;
+a=$echo $file | cut -d'=' -f2) ;
+v=$(echo $file | cut -d'=' -f3) ;
+safeFile="resolv_safe/$file" ;
+nbSafe=0 ;
+touch $safeFile ;
+for pom in $(cat "resolv/$file") ; do
+ grep -e "$pom" $safeFile 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ grep -e "$v" $pom 1>/dev/null ;
+ if [ $? -eq 0 ] ; then
+ echo "$pom" >> $safeFile ;
+ echo "$pom" >> resolved ;
+ nbSafe=$(( $nbSafe + 1 )) ;
+ fi
+done ;
+if [ $nbSafe -gt 0 ] ; then
+echo "[$file]" ;
+echo " -- WILL MODIFY poms detected $nbSafe" ;
+cat "$safeFile" ;
+echo "" ;
+else rm $safeFile ;
+fi ;
+done
Added: migration-thirdparty/bin/build-resolv_unsafe-dir.sh
===================================================================
--- migration-thirdparty/bin/build-resolv_unsafe-dir.sh (rev 0)
+++ migration-thirdparty/bin/build-resolv_unsafe-dir.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,24 @@
+#!/bin/sh
+rm -rf resolv_unsafe
+mkdir resolv_unsafe
+for file in $(ls resolv) ; do
+nbUnsafe=0 ;
+unsafeFile="resolv_unsafe/$file" ;
+touch $unsafeFile ;
+for pom in $(cat "resolv/$file") ; do
+ grep -e "$pom" resolved 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ grep -e "$pom" $unsafeFile 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ echo "$pom" >> $unsafeFile ;
+ nbUnsafe=$(( $nbUnsafe + 1 )) ;
+done ;
+if [ $nbUnsafe -gt 0 ] ; then
+echo "[$file]" ;
+echo " -- UNSAFE poms detected $nbUnsafe" ;
+cat "$unsafeFile" ;
+echo "" ;
+else rm $unsafeFile ;
+fi ;
+done
+
Added: migration-thirdparty/bin/build-third-maven-repository.sh
===================================================================
--- migration-thirdparty/bin/build-third-maven-repository.sh (rev 0)
+++ migration-thirdparty/bin/build-third-maven-repository.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,14 @@
+#!/bin/sh
+# copy the maven repository for the given artifacts (in file thir-original.list)
+rm -rf repository
+for i in $(cat third-original.list) ; do
+dir="repository/$i"
+mkdir -p $dir ;
+echo "copy files to $dir" ;
+( cd $dir ;
+ scp -r publish@nuiton.org:/var/lib/maven/release/$i/* . 1>/dev/null ;
+ ls -l *.pom*
+ ls -l *.jar*
+)
+done
+
Property changes on: migration-thirdparty/bin/build-third-maven-repository.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/build-third-translations-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-list.sh (rev 0)
+++ migration-thirdparty/bin/build-third-translations-list.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,32 @@
+#!/bin/sh
+cat << EOF > third-translations.list
+externallib/jregex/1.2_01:org.nuiton.thirdparty.externallib/jregex/1.2_01
+externallib/REngine/0.6-0:org.nuiton.thirdparty.externallib/REngine/0.6-0
+externallib/Rserve/0.6-0:org.nuiton.thirdparty.externallib/Rserve/0.6-0
+externallib/JRI/0.2-4-cl:org.nuiton.thirdparty.externallib/JRI/0.2-4-cl
+externallib/JRI/0.7-0:org.nuiton.thirdparty.externallib/JRI/0.7-0
+externallib/l2fprod-common/0.1:org.nuiton.thirdparty.externallib/l2fprod-common/0.1
+sdoc/sdoc/0.5.0-beta-patchcl:org.nuiton.thirdparty.sdoc/sdoc/0.5.0-beta-patchcl
+org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204
+org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081018:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204
+org.apache.commons/commons-compress/20090504:org.nuiton.thirdparty.commons/commons-compress/20090504
+org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081016:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204
+org.fife/rsyntaxtextarea/1.3.3:org.nuiton.thirdparty.fife/rsyntaxtextarea/1.3.3
+externallib/jGuard-j2ee/0.7.2:XX/jGuard-j2ee/0.7.2
+asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty.externallib/asm-attrs/1.5.4-snapshot
+asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty.externallib/asm-util/1.5.4-snapshot
+org.jdesktop/beansbinding/1.2.1:XX/beansbinding/1.2.1
+org.mortbay.jetty/jetty-test/6.1.8:org.nuiton.thirdparty.jetty/jetty-test/6.1.8
+uk.co.flamingpenguin/jewelcli/0.53:uk.co.flamingpenguin.jewelcli/jewelcli/0.57
+uk.co.flamingpenguin/jewelcli/0.54:uk.co.flamingpenguin.jewelcli/jewelcli/0.57
+org.swinglabs/swingx/0.9.6:org.swinglabs/swingx/1.0
+org.swinglabs/swingx/0.9.7:org.swinglabs/swingx/1.0
+asm/asm/1.5.3:org.nuiton.thirdparty.asm/asm/1.5.4-SNAPSHOT
+org.apache.maven.plugins/maven-project-info-reports-plugin/2.0.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
+org.apache.maven.plugins/maven-project-info-reports-plugin/2.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
+org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2
+EOF
+sort third-translations.list > third-translations.list2
+mv third-translations.list2 third-translations.list
+cat third-translations.list
+
Property changes on: migration-thirdparty/bin/build-third-translations-list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/build-third-translations-migrate.list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-migrate.list.sh (rev 0)
+++ migration-thirdparty/bin/build-third-translations-migrate.list.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,23 @@
+#!/bin/sh
+rm -f third-translations-migrate.list
+touch third-translations-migrate.list
+for i in $(cat third-translations-used.list) ; do
+in=$(echo $i | cut -d':' -f1) ;
+out=$(echo $i | cut -d':' -f2) ;
+g=$(echo $in | cut -d'/' -f1) ;
+a=$(echo $in | cut -d'/' -f2) ;
+v=$(echo $in | cut -d'/' -f3) ;
+rep="repository/${g//.//}/$a/$v" ;
+if [ ! -e "$rep" ] ; then continue ; fi ;
+echo "$i" | grep -e "jewelcli" 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo "$i" | grep -e "swingx" 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i >> third-translations-migrate.list ;
+done
+echo "asm/asm/1.5.4-snapshot:org.nuiton.thirdparty.asm/asm/1.5.4-SNAPSHOT" >> third-translations-migrate.list
+sort -d third-translations-migrate.list > third-translations-migrate.list2
+mv third-translations-migrate.list2 third-translations-migrate.list
+cat third-translations-migrate.list
+
+
Added: migration-thirdparty/bin/build-third-translations-unsued-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-translations-unsued-list.sh (rev 0)
+++ migration-thirdparty/bin/build-third-translations-unsued-list.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,25 @@
+#!/bin/sh
+rm third-translations-unused.list
+touch third-translations-unused.list
+for i in $(cat third-translations.list) ; do
+in=$(echo $i | cut -d':' -f1) ;
+g=$(echo $in | cut -d'/' -f1) ;
+a=$(echo $in | cut -d'/' -f2) ;
+v=$(echo $in | cut -d'/' -f3) ;
+nb=0 ;
+for j in $(cat nuiton-all-poms.list) ; do
+ grep -e "$a" $j 1>/dev/null ;
+ if [ $? -eq 0 ] ; then
+ grep -e "$v" $j 1>/dev/null ;
+ if [ $? -eq 0 ] ; then nb=$(($nb + 1)) ; fi ;
+ fi ;
+done ;
+if [ $nb -eq 0 ] ; then
+ echo $i >> third-translations-unused.list ;
+ echo "$g:$a:$v UNUSED" ;
+fi ;
+done
+
+
+
+
Property changes on: migration-thirdparty/bin/build-third-translations-unsued-list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/build-third-used-list.sh
===================================================================
--- migration-thirdparty/bin/build-third-used-list.sh (rev 0)
+++ migration-thirdparty/bin/build-third-used-list.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,23 @@
+#!/bin/sh
+rm -f third-used.list
+for i in $(cat third-original.list | grep -v "jGuard-j2ee" \
+| grep -v "asm-util" | grep -v "asm-attrs" | grep -v "jetty-test" \
+ | grep -v "beansbinding" | grep -v "1.0-alpha-2-cl_20081016") ; do
+echo $i >> third-used.list ;
+done
+rm -f third-translations-used.list
+for i in $(cat third-translations.list) ; do
+echo $i | grep jGuard-j2ee 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i | grep asm-attrs 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i | grep asm-util 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i | grep jetty-test 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i | grep beansbinding 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i | grep 1.0-alpha-2-cl_20081016 1>/dev/null ;
+if [ $? -eq 0 ] ; then continue ; fi ;
+echo $i >> third-translations-used.list ;
+done
Added: migration-thirdparty/bin/deploy-third.sh
===================================================================
--- migration-thirdparty/bin/deploy-third.sh (rev 0)
+++ migration-thirdparty/bin/deploy-third.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+for i in $(cat third-translations-migrate.list) ; do
+in=$(echo $i | cut -d':' -f1) ;
+out=$(echo $i | cut -d':' -f2) ;
+g=$(echo $in | cut -d'/' -f1) ;
+a=$(echo $in | cut -d'/' -f2) ;
+v=$(echo $in | cut -d'/' -f3) ;
+g2=$(echo $out | cut -d'/' -f1) ;
+a2=$(echo $out | cut -d'/' -f2) ;
+v2=$(echo $out | cut -d'/' -f3) ;
+parent="repository/${g//.//}/$a/$v" ;
+originalPom="$parent/$a-$v.pom" ;
+usedPom="$parent/pom.xml" ;
+echo "$g:$a:$v --> $g2:$a2:$v2" ;
+if [ -e $originalPom ] ; then
+echo " - use $originalPom to build pom" ;
+cp $originalPom $usedPom ;
+else
+echo " - generate pom :" ;
+cat << EOF > $usedPom
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>$g2</groupId>
+ <artifactId>$a2</artifactId>
+ <version>$v2</version>
+</project>
+EOF
+cat $usedPom ;
+fi ;
+echo "==================================================================" ;
+done
+
+
Added: migration-thirdparty/bin/get-third-original-list.sh
===================================================================
--- migration-thirdparty/bin/get-third-original-list.sh (rev 0)
+++ migration-thirdparty/bin/get-third-original-list.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,6 @@
+#!/bin/sh
+rm -f third-original.list
+ssh publish(a)nuiton.org '(find /var/lib/maven/release -type d \
+| grep -v "org/nuiton" | grep -v "org/chorem" | grep .*/[0-9] | cut -f6- -d/ )' > third-original.list
+cat third-original.list
+
Property changes on: migration-thirdparty/bin/get-third-original-list.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: migration-thirdparty/bin/nuiton-patch-poms.sh
===================================================================
--- migration-thirdparty/bin/nuiton-patch-poms.sh (rev 0)
+++ migration-thirdparty/bin/nuiton-patch-poms.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,37 @@
+#!/bin/sh
+rm -fr nuiton-modify-poms.list
+touch nuiton-modify-poms.list
+for i in $(cat third-translations-used.list) ; do
+in=$(echo $i | cut -d':' -f1) ;
+out=$(echo $i | cut -d':' -f2) ;
+g=$(echo $in | cut -d'/' -f1) ;
+a=$(echo $in | cut -d'/' -f2) ;
+v=$(echo $in | cut -d'/' -f3) ;
+g2=$(echo $out | cut -d'/' -f1) ;
+a2=$(echo $out | cut -d'/' -f2) ;
+v2=$(echo $out | cut -d'/' -f3) ;
+file="resolv_safe/$g=$a=$v" ;
+if [ ! -e $file ] ; then echo "nothing to do for $in" ; continue ; fi ;
+echo "$g:$a:$v --> $g2:$a2:$v2" ;
+for pom in $(cat $file) ; do
+ echo -n " $pom " ;
+ if [ $g != $g2 ] ; then
+ echo -n " [change group]" ;
+ sed -i~ -e "s/<groupId>$g<\/groupId>/<groupId>$g2<\/groupId>/" $pom ;
+ fi ;
+ if [ $v != $v2 ] ; then
+ sed -i -r -e "s/version>$v(.*)/version>$v2\1/" $pom ;
+ echo -n " [change v]" ;
+ fi ;
+ grep $pom nuiton-modify-poms.list 1>/dev/null ;
+ if [ $? -gt 0 ] ; then
+ echo $pom >> nuiton-modify-poms.list ;
+ fi;
+ echo "" ;
+done ;
+echo "" ;
+done
+sort -d nuiton-modify-poms.list > nuiton-modify-poms.list2
+mv nuiton-modify-poms.list2 nuiton-modify-poms.list
+
+
Added: migration-thirdparty/bin/nuiton-svn-revert.sh
===================================================================
--- migration-thirdparty/bin/nuiton-svn-revert.sh (rev 0)
+++ migration-thirdparty/bin/nuiton-svn-revert.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,27 @@
+#!/bin/sh
+rm -fr modify.list
+touch modify.list
+for i in $(cat third-translations.list) ; do
+in=$(echo $i | cut -d':' -f1) ;
+out=$(echo $i | cut -d':' -f2) ;
+g=$(echo $in | cut -d'/' -f1) ;
+a=$(echo $in | cut -d'/' -f2) ;
+v=$(echo $in | cut -d'/' -f3) ;
+g2=$(echo $out | cut -d'/' -f1) ;
+a2=$(echo $out | cut -d'/' -f2) ;
+v2=$(echo $out | cut -d'/' -f3) ;
+file="resolv/$g=$a=$v" ;
+if [ ! -e $file ] ; then echo "nothing to do for $in" ; continue ; fi ;
+echo "$g:$a:$v --> $g2:$a2:$v2" ;
+for pom in `cat $file` ; do
+ grep $pom modify.list 1>/dev/null ;
+ if [ $? -eq 0 ] ; then continue ; fi ;
+ isModified=$(svn st $pom | wc -l) ;
+ if [ $isModified -eq 0 ] ; then continue; fi ;
+ echo -n " $pom < revert" ;
+ svn revert $pom 1>/dev/null ;
+ echo " >" ;
+done ;
+done
+rm modify.list
+
Added: migration-thirdparty/bin/obtain-nuiton-svn-repository.sh
===================================================================
--- migration-thirdparty/bin/obtain-nuiton-svn-repository.sh (rev 0)
+++ migration-thirdparty/bin/obtain-nuiton-svn-repository.sh 2009-08-19 17:01:54 UTC (rev 14)
@@ -0,0 +1,13 @@
+#!/bin/sh
+rm -rf svn
+ssh publish(a)nuiton.org '/opt/redmine-tools/display-projects.sh nuiton' | grep -v "eugengo" | grep -v "sandbox" > nuiton-all-projects.list
+
+for i in $(cat nuiton-all-projects.list) ; do
+ echo "recuperation $i/trunk -> svn/trunk/$i" ;
+ svn checkout http://svn.nuiton.org/svn/$i/trunk svn/trunk/$i 1> /dev/null ;
+ echo "recuperation $i/tags -> svn/tags/$i" ;
+ svn checkout http://svn.nuiton.org/svn/$i/tags svn/tags/$i 1> /dev/null ;
+done
+
+echo "mise en cache des poms"
+find -name "pom.xml" > nuiton-all-poms.list
Property changes on: migration-thirdparty/bin/obtain-nuiton-svn-repository.sh
___________________________________________________________________
Added: svn:executable
+ *
1
0