tetra 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. data/.gitignore +27 -0
  2. data/.rubocop.yml +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +28 -0
  5. data/MOTIVATION.md +27 -0
  6. data/README.md +106 -0
  7. data/Rakefile +9 -0
  8. data/SPECIAL_CASES.md +130 -0
  9. data/bin/tetra +29 -0
  10. data/integration-tests/commons.sh +55 -0
  11. data/lib/template/gitignore +2 -0
  12. data/lib/template/kit.spec +64 -0
  13. data/lib/template/kit/CONTENTS +8 -0
  14. data/lib/template/kit/jars/CONTENTS +1 -0
  15. data/lib/template/kit/m2/settings.xml +10 -0
  16. data/lib/template/output/CONTENTS +3 -0
  17. data/lib/template/package.spec +65 -0
  18. data/lib/template/src/CONTENTS +6 -0
  19. data/lib/tetra.rb +63 -0
  20. data/lib/tetra/ant_runner.rb +27 -0
  21. data/lib/tetra/archiver.rb +95 -0
  22. data/lib/tetra/commands/ant.rb +23 -0
  23. data/lib/tetra/commands/base.rb +89 -0
  24. data/lib/tetra/commands/download_maven_source_jars.rb +29 -0
  25. data/lib/tetra/commands/dry_run.rb +17 -0
  26. data/lib/tetra/commands/finish.rb +22 -0
  27. data/lib/tetra/commands/generate_all.rb +38 -0
  28. data/lib/tetra/commands/generate_kit_archive.rb +18 -0
  29. data/lib/tetra/commands/generate_kit_spec.rb +16 -0
  30. data/lib/tetra/commands/generate_package_archive.rb +19 -0
  31. data/lib/tetra/commands/generate_package_script.rb +21 -0
  32. data/lib/tetra/commands/generate_package_spec.rb +22 -0
  33. data/lib/tetra/commands/get_pom.rb +33 -0
  34. data/lib/tetra/commands/get_source.rb +30 -0
  35. data/lib/tetra/commands/init.rb +15 -0
  36. data/lib/tetra/commands/list_kit_missing_sources.rb +21 -0
  37. data/lib/tetra/commands/move_jars_to_kit.rb +18 -0
  38. data/lib/tetra/commands/mvn.rb +23 -0
  39. data/lib/tetra/git.rb +140 -0
  40. data/lib/tetra/kit_checker.rb +104 -0
  41. data/lib/tetra/kit_runner.rb +43 -0
  42. data/lib/tetra/kit_spec_adapter.rb +28 -0
  43. data/lib/tetra/logger.rb +28 -0
  44. data/lib/tetra/main.rb +102 -0
  45. data/lib/tetra/maven_runner.rb +47 -0
  46. data/lib/tetra/maven_website.rb +59 -0
  47. data/lib/tetra/package_spec_adapter.rb +59 -0
  48. data/lib/tetra/pom.rb +55 -0
  49. data/lib/tetra/pom_getter.rb +104 -0
  50. data/lib/tetra/project.rb +245 -0
  51. data/lib/tetra/script_generator.rb +57 -0
  52. data/lib/tetra/source_getter.rb +41 -0
  53. data/lib/tetra/spec_generator.rb +60 -0
  54. data/lib/tetra/template_manager.rb +33 -0
  55. data/lib/tetra/version.rb +6 -0
  56. data/lib/tetra/version_matcher.rb +90 -0
  57. data/spec/data/ant-super-simple-code/build.xml +133 -0
  58. data/spec/data/ant-super-simple-code/build/HW.class +0 -0
  59. data/spec/data/ant-super-simple-code/build/mypackage/HW.class +0 -0
  60. data/spec/data/ant-super-simple-code/dist/antsimple-20130618.jar +0 -0
  61. data/spec/data/ant-super-simple-code/lib/junit-4.11.jar +0 -0
  62. data/spec/data/ant-super-simple-code/lib/log4j-1.2.13.jar +0 -0
  63. data/spec/data/ant-super-simple-code/src/mypackage/HW.java +15 -0
  64. data/spec/data/antlr/antlr-2.7.2.jar +0 -0
  65. data/spec/data/antlr/pom.xml +6 -0
  66. data/spec/data/commons-logging/commons-logging-1.1.1.jar +0 -0
  67. data/spec/data/commons-logging/parent_pom.xml +420 -0
  68. data/spec/data/commons-logging/pom.xml +504 -0
  69. data/spec/data/nailgun/nailgun-0.7.1.jar +0 -0
  70. data/spec/data/nailgun/pom.xml +153 -0
  71. data/spec/data/struts-apps/pom.xml +228 -0
  72. data/spec/data/tomcat/pom.xml +33 -0
  73. data/spec/lib/ant_runner_spec.rb +45 -0
  74. data/spec/lib/archiver_spec.rb +106 -0
  75. data/spec/lib/git_spec.rb +105 -0
  76. data/spec/lib/kit_checker_spec.rb +119 -0
  77. data/spec/lib/maven_runner_spec.rb +68 -0
  78. data/spec/lib/maven_website_spec.rb +56 -0
  79. data/spec/lib/pom_getter_spec.rb +36 -0
  80. data/spec/lib/pom_spec.rb +69 -0
  81. data/spec/lib/project_spec.rb +254 -0
  82. data/spec/lib/script_generator_spec.rb +67 -0
  83. data/spec/lib/source_getter_spec.rb +36 -0
  84. data/spec/lib/spec_generator_spec.rb +130 -0
  85. data/spec/lib/template_manager_spec.rb +54 -0
  86. data/spec/lib/version_matcher_spec.rb +64 -0
  87. data/spec/spec_helper.rb +37 -0
  88. data/spec/support/kit_runner_examples.rb +15 -0
  89. data/tetra.gemspec +31 -0
  90. data/utils/delete_nonet_user.sh +8 -0
  91. data/utils/setup_nonet_user.sh +8 -0
  92. metadata +267 -0
@@ -0,0 +1,41 @@
1
+ # encoding: UTF-8
2
+
3
+ module Tetra
4
+ # attempts to get java projects' sources
5
+ class SourceGetter
6
+ include Logging
7
+
8
+ # attempts to download a project's sources
9
+ def get_maven_source_jar(project, pom_path)
10
+ maven_runner = Tetra::MavenRunner.new(project)
11
+ pom = Pom.new(pom_path)
12
+ maven_runner.get_source_jar(pom.group_id, pom.artifact_id, pom.version)
13
+ end
14
+
15
+ # looks for jars in maven's local repo and downloads corresponding
16
+ # source jars
17
+ def get_maven_source_jars(project)
18
+ maven_runner = Tetra::MavenRunner.new(project)
19
+
20
+ project.from_directory do
21
+ paths = Find.find(".").reject { |path| artifact_from_path(path).nil? }.sort
22
+
23
+ succeded_paths = paths.each do |path|
24
+ group_id, artifact_id, version = artifact_from_path(path)
25
+ log.info("attempting source download for #{path} (#{group_id}:#{artifact_id}:#{version})")
26
+ maven_runner.get_source_jar(group_id, artifact_id, version)
27
+ end
28
+
29
+ [succeded_paths, (paths - succeded_paths)]
30
+ end
31
+ end
32
+
33
+ private
34
+
35
+ # if possible, turn path into a Maven artifact name, otherwise return nil
36
+ def artifact_from_path(path)
37
+ match = path.match(%r{\./kit/m2/(.+)/(.+)/(.+)/\2-\3.*\.jar$})
38
+ [match[1].gsub("/", "."), match[2], match[3]] unless match.nil?
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,60 @@
1
+ # encoding: UTF-8
2
+
3
+ module Tetra
4
+ # creates and updates spec files
5
+ class SpecGenerator
6
+ include Logging
7
+
8
+ def initialize(project)
9
+ @project = project
10
+ end
11
+
12
+ def generate_kit_spec
13
+ @project.from_directory do
14
+ spec_name = "#{@project.name}-kit.spec"
15
+ spec_path = File.join("kit", spec_name)
16
+ output_dir = File.join("output", "#{@project.name}-kit")
17
+ FileUtils.mkdir_p(output_dir)
18
+
19
+ adapter = Tetra::KitSpecAdapter.new(@project)
20
+ conflict_count = generate_merging("kit.spec", adapter.public_binding, spec_path, :generate_kit_spec)
21
+
22
+ symlink_to_output(spec_path, output_dir)
23
+
24
+ [spec_path, conflict_count]
25
+ end
26
+ end
27
+
28
+ def generate_package_spec(name, pom_path, filter)
29
+ pom = Tetra::Pom.new(pom_path)
30
+ @project.from_directory do
31
+ spec_name = "#{name}.spec"
32
+ spec_path = File.join("src", name, spec_name)
33
+ output_dir = File.join("output", name)
34
+ FileUtils.mkdir_p(output_dir)
35
+
36
+ adapter = Tetra::PackageSpecAdapter.new(@project, name, pom, filter)
37
+ conflict_count = generate_merging("package.spec", adapter.public_binding, spec_path, "generate_#{name}_spec")
38
+
39
+ symlink_to_output(spec_path, output_dir)
40
+
41
+ [spec_path, conflict_count]
42
+ end
43
+ end
44
+
45
+ private
46
+
47
+ # generates a spec file from a template and 3-way merges it
48
+ def generate_merging(template, binding, path, tag_prefix)
49
+ new_content = TemplateManager.new.generate(template, binding)
50
+ @project.merge_new_content(new_content, path, "Spec generated", tag_prefix)
51
+ end
52
+
53
+ # links a spec file in a subdirectory of output/
54
+ def symlink_to_output(spec_path, destination_dir)
55
+ spec_name = Pathname.new(spec_path).basename.to_s
56
+ destination_spec_path = File.join(destination_dir, spec_name)
57
+ FileUtils.symlink(File.expand_path(spec_path), destination_spec_path, force: true)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,33 @@
1
+ # encoding: UTF-8
2
+
3
+ module Tetra
4
+ # operates on files in template/
5
+ class TemplateManager
6
+ include Logging
7
+
8
+ attr_reader :template_path
9
+
10
+ def initialize
11
+ @template_path = File.join(File.dirname(__FILE__), "..", "template")
12
+ end
13
+
14
+ # copies a template file in a directory
15
+ def copy(template_name, destination_dir)
16
+ FileUtils.cp_r(File.join(template_path, template_name), destination_dir)
17
+ end
18
+
19
+ # generates content from an ERB template and an object binding
20
+ # if destination_path is given, write it to that file, otherwise just
21
+ # return it
22
+ def generate(template_name, object_binding, destination_path = nil)
23
+ erb = ERB.new File.read(File.join(template_path, template_name)), nil, "<>"
24
+ new_content = erb.result(object_binding)
25
+
26
+ unless destination_path.nil?
27
+ File.open(destination_path, "w") { |io| io.write new_content }
28
+ end
29
+
30
+ new_content
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,6 @@
1
+ # encoding: UTF-8
2
+
3
+ # base module for tetra
4
+ module Tetra
5
+ VERSION = "0.40.0"
6
+ end
@@ -0,0 +1,90 @@
1
+ # encoding: UTF-8
2
+
3
+ module Tetra
4
+ # heuristically matches version strings
5
+ class VersionMatcher
6
+ include Logging
7
+
8
+ # heuristically splits a full name into an artifact name and version string
9
+ # assumes that version strings begin with a numeric character and are separated
10
+ # by a ., -, _, ~ or space
11
+ # returns a [name, version] pair
12
+ def split_version(full_name)
13
+ matches = full_name.match(/(.*?)(?:[\.\-\_ ~,]?([0-9].*))?$/)
14
+ if !matches.nil? && matches.length > 1
15
+ [matches[1], matches[2]]
16
+ else
17
+ [full_string, nil]
18
+ end
19
+ end
20
+
21
+ # returns the "best match" between a version number and a set of available version numbers
22
+ # using a heuristic criterion. Idea:
23
+ # - split the version number in chunks divided by ., - etc.
24
+ # - every chunk with same index is "compared", differences make up a score
25
+ # - "comparison" is a subtraction if the chunk is an integer, a string distance measure otherwise
26
+ # - score weighs differently on chunk index (first chunks are most important)
27
+ # - lowest score wins
28
+ def best_match(my_version, their_versions)
29
+ log.debug("version comparison: #{my_version} vs #{their_versions.join(", ")}")
30
+
31
+ my_chunks = my_version.split(/[\.\-\_ ~,]/)
32
+ their_chunks_hash = Hash[
33
+ their_versions.map do |their_version|
34
+ their_chunks_for_version = (
35
+ if !their_version.nil?
36
+ their_version.split(/[\.\-\_ ~,]/)
37
+ else
38
+ []
39
+ end
40
+ )
41
+ their_chunks_for_version += [nil] * [my_chunks.length - their_chunks_for_version.length, 0].max
42
+ [their_version, their_chunks_for_version]
43
+ end
44
+ ]
45
+
46
+ max_chunks_length = ([my_chunks.length] + their_chunks_hash.values.map { |chunk| chunk.length }).max
47
+
48
+ scoreboard = []
49
+ their_versions.each do |their_version|
50
+ their_chunks = their_chunks_hash[their_version]
51
+ score = 0
52
+ their_chunks.each_with_index do |their_chunk, i|
53
+ score_multiplier = 100**(max_chunks_length - i - 1)
54
+ my_chunk = my_chunks[i]
55
+ score += chunk_distance(my_chunk, their_chunk) * score_multiplier
56
+ end
57
+ scoreboard << { version: their_version, score: score }
58
+ end
59
+
60
+ scoreboard = scoreboard.sort_by { |element| element[:score] }
61
+
62
+ log.debug("scoreboard: ")
63
+ scoreboard.each_with_index do |element, i|
64
+ log.debug(" #{i + 1}. #{element[:version]} (score: #{element[:score]})")
65
+ end
66
+
67
+ return scoreboard.first[:version] unless scoreboard.first.nil?
68
+ end
69
+
70
+ # returns a score representing the distance between two version chunks
71
+ # for integers, the score is the difference between their values
72
+ # for strings, the score is the Levenshtein distance
73
+ # in any case score is normalized between 0 (identical) and 99 (very different/uncomparable)
74
+ def chunk_distance(my_chunk, their_chunk)
75
+ my_chunk = "0" if my_chunk.nil?
76
+ their_chunk = "0" if their_chunk.nil?
77
+
78
+ if i?(my_chunk) && i?(their_chunk)
79
+ return [(my_chunk.to_i - their_chunk.to_i).abs, 99].min
80
+ else
81
+ return [Text::Levenshtein.distance(my_chunk.upcase, their_chunk.upcase), 99].min
82
+ end
83
+ end
84
+
85
+ # true for integer strings
86
+ def i?(string)
87
+ string =~ /^[0-9]+$/
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,133 @@
1
+ <!--
2
+ Ant simple sample project.
3
+ Kick start your java builds.
4
+ Find out more at http://www.bodkinconsulting.com
5
+ or http://java.net/projects/ant-simple-sample
6
+
7
+ Instructions:
8
+ Put this file in an empty directory and run the 'ant' command in that directory. The build file will create directories and make a very empty jar file in the same directory as the build.xml.
9
+
10
+ Create src/HW.java and put this code in it.
11
+
12
+ public class HW
13
+ {
14
+ public static void main(String [] args)
15
+ {
16
+ System.out.println("Hello World");
17
+ }
18
+
19
+ }
20
+
21
+ in the build file below change
22
+ <property name="main_class_name" value="changeme"/>
23
+ to
24
+ <property name="main_class_name" value="HW"/>
25
+
26
+ Run the ant command again, and now you can run your main class with the command
27
+ java -jar antsimple.jar
28
+
29
+ It should print:
30
+ Hellow World
31
+ and exit.
32
+
33
+ Add a junit.jar (from junit.org) into your ANT_HOME/lib directory and run 'ant test'
34
+
35
+ Create the file test/HWTest.java and add this code.
36
+ import junit.framework.*;
37
+ public class HWTest extends TestCase {
38
+ public void testTrue()
39
+ {
40
+ assertTrue(true);
41
+ }
42
+ }
43
+
44
+ -->
45
+
46
+ <project name="antsimple" default="dist" basedir=".">
47
+ <description>
48
+ Ant Simple Sample File
49
+ </description>
50
+ <!-- set global properties for this build -->
51
+ <property name="ant.project.name" value="antsimple"/>
52
+ <property name="main_class_name" value="HW"/>
53
+ <property name="jarname" value="${ant.project.name}"/>
54
+ <!-- set directories -->
55
+ <property name="src" location="src"/>
56
+ <property name="test" location="test"/>
57
+ <property name="build" location="build"/>
58
+ <property name="dist" location="dist"/>
59
+ <property name="lib" location="lib"/>
60
+
61
+ <path id="project.classpath">
62
+ <pathelement location="${build}" />
63
+ <pathelement location="${lib}/log4j-1.2.13.jar" />
64
+ </path>
65
+
66
+
67
+ <target name="init">
68
+ <!-- Create the time stamp -->
69
+ <tstamp/>
70
+ <!-- Create directories if needed -->
71
+ <mkdir dir="${src}"/>
72
+ <mkdir dir="${test}"/>
73
+ <mkdir dir="${build}"/>
74
+ <mkdir dir="${dist}"/>
75
+ </target>
76
+
77
+ <target name="compile" depends="init" description="compile the source " >
78
+ <!-- Compile the java code from ${src} into ${build} -->
79
+ <javac debug="true"
80
+ srcdir="${src}"
81
+ destdir="${build}"
82
+ classpathref="project.classpath"/>
83
+ <!-- Copy files from ${src} into ${build} -->
84
+ <copy todir="${build}">
85
+ <fileset dir="${src}">
86
+ <exclude name="**/*.java"/>
87
+ </fileset>
88
+ </copy>
89
+ </target>
90
+
91
+ <!--
92
+ Broken???
93
+ -->
94
+ <target name="test" depends="compiletest" description="run the tests " >
95
+ <junit printsummary="yes" fork="yes" haltonfailure="yes">
96
+ <formatter type="plain"/>
97
+ <batchtest fork="true">
98
+ <fileset dir="${test}">
99
+ <include name="**/*Test*.java"/>
100
+ </fileset>
101
+ </batchtest>
102
+ <classpath refid="${project.classpath}" />
103
+ </junit>
104
+ </target>
105
+
106
+ <target name="compiletest" depends="compile"
107
+ description="compile the tests " >
108
+ <javac debug="true"
109
+ srcdir="${test}"
110
+ destdir="${build}"
111
+ classpathref="project.classpath" />
112
+ </target>
113
+
114
+ <target name="dist" depends="compile" description="generate the distribution" >
115
+ <!-- Create the distribution directory -->
116
+
117
+ <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
118
+ <jar jarfile="${dist}/${jarname}-${DSTAMP}.jar" basedir="${build}">
119
+ <manifest>
120
+ <attribute name="Main-Class"
121
+ value="${main_class_name}"/>
122
+ </manifest>
123
+ </jar>
124
+ <copy file="${dist}/${jarname}-${DSTAMP}.jar" tofile="./${jarname}.jar" overwrite="true"/>
125
+ </target>
126
+
127
+ <target name="clean"
128
+ description="clean up" >
129
+ <!-- Delete the ${build} directory-->
130
+ <delete dir="${build}"/>
131
+ </target>
132
+ </project>
133
+
@@ -0,0 +1,15 @@
1
+ package mypackage;
2
+
3
+ import org.apache.log4j.Logger;
4
+ import org.apache.log4j.BasicConfigurator;
5
+
6
+ public class HW
7
+ {
8
+ static Logger logger = Logger.getLogger(HW.class);
9
+ public static void main(String [] args)
10
+ {
11
+ BasicConfigurator.configure();
12
+ logger.info("Hello World");
13
+ }
14
+
15
+ }
@@ -0,0 +1,6 @@
1
+ <project>
2
+ <modelVersion>4.0.0</modelVersion>
3
+ <groupId>antlr</groupId>
4
+ <artifactId>antlrall</artifactId>
5
+ <version>2.7.2</version>
6
+ </project>
@@ -0,0 +1,420 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+ <!--
3
+
4
+ Licensed to the Apache Software Foundation (ASF) under one or more
5
+ contributor license agreements. See the NOTICE file distributed with
6
+ this work for additional information regarding copyright ownership.
7
+ The ASF licenses this file to You under the Apache License, Version 2.0
8
+ (the "License"); you may not use this file except in compliance with
9
+ the License. You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ -->
20
+ <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">
21
+ <modelVersion>4.0.0</modelVersion>
22
+ <parent>
23
+ <groupId>org.apache</groupId>
24
+ <artifactId>apache</artifactId>
25
+ <version>4</version>
26
+ </parent>
27
+ <groupId>org.apache.commons</groupId>
28
+ <artifactId>commons-parent</artifactId>
29
+ <packaging>pom</packaging>
30
+ <!-- TODO: dummy version. In Maven 2.1, this will be auto-versioned being a generic parent -->
31
+ <version>5</version>
32
+ <name>Commons Parent</name>
33
+ <url>http://commons.apache.org/</url>
34
+ <inceptionYear>2001</inceptionYear>
35
+
36
+ <ciManagement>
37
+ <system>continuum</system>
38
+ <url>http://vmbuild.apache.org/continuum/</url>
39
+ <notifiers>
40
+ <notifier>
41
+ <type>mail</type>
42
+ <configuration>
43
+ <address>dev@commons.apache.org</address>
44
+ </configuration>
45
+ </notifier>
46
+ </notifiers>
47
+ </ciManagement>
48
+
49
+ <distributionManagement>
50
+ <!--
51
+ This POM's parent POM (the Apache root POM) provides repositories. Unfortunately,
52
+ this allows for accidental deployments. So we disable them here by providing
53
+ a dummy repository. Use "mvn -Prc deploy" (Apache snapshot repository) or
54
+ "mvn -Prelease deploy" (Apache release repository), if you really want to deploy.
55
+ -->
56
+ <repository>
57
+ <id>dummy</id>
58
+ <name>Dummy to avoid accidental deploys</name>
59
+ <url />
60
+ </repository>
61
+ </distributionManagement>
62
+
63
+ <!--
64
+ This section *must* be overwritten by subprojects. It is only to allow
65
+ a release of the commons-parent POM.
66
+ -->
67
+ <scm>
68
+ <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/commons-parent/tags/commons-parent-5</connection>
69
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/commons-parent/tags/commons-parent-5</developerConnection>
70
+ <url>http://svn.apache.org/viewvc/commons/proper/commons-parent/tags/commons-parent-5</url>
71
+ </scm>
72
+
73
+ <mailingLists>
74
+ <mailingList>
75
+ <name>Commons Commits List</name>
76
+ <subscribe>commits-subscribe@commons.apache.org</subscribe>
77
+ <unsubscribe>commits-unsubscribe@commons.apache.org</unsubscribe>
78
+ <post>commits@commons.apache.org</post>
79
+ <archive>http://mail-archives.apache.org/mod_mbox/commons-commits/</archive>
80
+ <otherArchives>
81
+ <otherArchive>http://www.mail-archive.com/commits@commons.apache.org/</otherArchive>
82
+ </otherArchives>
83
+ </mailingList>
84
+ <mailingList>
85
+ <name>Commons Dev List</name>
86
+ <subscribe>dev-subscribe@commons.apache.org</subscribe>
87
+ <unsubscribe>dev-unsubscribe@commons.apache.org</unsubscribe>
88
+ <post>dev@commons.apache.org</post>
89
+ <archive>http://mail-archives.apache.org/mod_mbox/commons-dev/</archive>
90
+ <otherArchives>
91
+ <otherArchive>http://www.mail-archive.com/dev@commons.apache.org/</otherArchive>
92
+ <otherArchive>http://www.nabble.com/Commons---Dev-f317.html</otherArchive>
93
+ </otherArchives>
94
+ </mailingList>
95
+ <mailingList>
96
+ <name>Commons Issues List</name>
97
+ <subscribe>issues-subscribe@commons.apache.org</subscribe>
98
+ <unsubscribe>issues-unsubscribe@commons.apache.org</unsubscribe>
99
+ <post>issues@commons.apache.org</post>
100
+ <archive>http://mail-archives.apache.org/mod_mbox/commons-issues/</archive>
101
+ <otherArchives>
102
+ <otherArchive>http://www.mail-archive.com/issues@commons.apache.org/</otherArchive>
103
+ <otherArchive>http://www.nabble.com/Commons---Issues-f25499.html</otherArchive>
104
+ </otherArchives>
105
+ </mailingList>
106
+ <mailingList>
107
+ <name>Commons User List</name>
108
+ <subscribe>user-subscribe@commons.apache.org</subscribe>
109
+ <unsubscribe>user-unsubscribe@commons.apache.org</unsubscribe>
110
+ <post>user@commons.apache.org</post>
111
+ <archive>http://mail-archives.apache.org/mod_mbox/commons-user/</archive>
112
+ <otherArchives>
113
+ <otherArchive>http://www.mail-archive.com/user@commons.apache.org/</otherArchive>
114
+ <otherArchive>http://www.nabble.com/Commons---User-f319.html</otherArchive>
115
+ </otherArchives>
116
+ </mailingList>
117
+ </mailingLists>
118
+ <build>
119
+ <pluginManagement>
120
+ <plugins>
121
+ <plugin>
122
+ <groupId>org.apache.maven.plugins</groupId>
123
+ <artifactId>maven-gpg-plugin</artifactId>
124
+ <version>1.0-alpha-3</version>
125
+ </plugin>
126
+ <plugin>
127
+ <groupId>org.apache.maven.plugins</groupId>
128
+ <artifactId>maven-jar-plugin</artifactId>
129
+ <version>2.1</version>
130
+ </plugin>
131
+ <plugin>
132
+ <groupId>org.apache.maven.plugins</groupId>
133
+ <artifactId>maven-remote-resources-plugin</artifactId>
134
+ <version>1.0-alpha-6</version>
135
+ </plugin>
136
+ <plugin>
137
+ <groupId>org.apache.maven.plugins</groupId>
138
+ <artifactId>maven-source-plugin</artifactId>
139
+ <version>2.0.4</version>
140
+ </plugin>
141
+ <plugin>
142
+ <groupId>org.apache.maven.plugins</groupId>
143
+ <artifactId>maven-surefire-plugin</artifactId>
144
+ <version>2.3</version>
145
+ </plugin>
146
+ <plugin>
147
+ <groupId>org.apache.maven.plugins</groupId>
148
+ <artifactId>maven-assembly-plugin</artifactId>
149
+ <version>2.2-beta-1</version>
150
+ </plugin>
151
+ </plugins>
152
+ </pluginManagement>
153
+ <plugins>
154
+ <!-- TODO: later use toolchain support to do compilation on an external JDK 1.3+ compiler -->
155
+ <plugin>
156
+ <artifactId>maven-compiler-plugin</artifactId>
157
+ <configuration>
158
+ <source>${maven.compile.source}</source>
159
+ <target>${maven.compile.target}</target>
160
+ </configuration>
161
+ </plugin>
162
+ <plugin>
163
+ <artifactId>maven-jar-plugin</artifactId>
164
+ <configuration>
165
+ <archive>
166
+ <manifestEntries>
167
+ <Specification-Title>${project.name}</Specification-Title>
168
+ <Specification-Version>${project.version}</Specification-Version>
169
+ <Specification-Vendor>${project.organization.name}</Specification-Vendor>
170
+ <Implementation-Title>${project.name}</Implementation-Title>
171
+ <Implementation-Version>${project.version}</Implementation-Version>
172
+ <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
173
+ <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
174
+ <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
175
+ <X-Compile-Target-JDK>${maven.compile.source}</X-Compile-Target-JDK>
176
+ </manifestEntries>
177
+ </archive>
178
+ </configuration>
179
+ </plugin>
180
+ <plugin>
181
+ <artifactId>maven-idea-plugin</artifactId>
182
+ <configuration>
183
+ <jdkLevel>${maven.compile.source}</jdkLevel>
184
+ </configuration>
185
+ </plugin>
186
+ </plugins>
187
+ </build>
188
+
189
+ <reporting>
190
+ <plugins>
191
+ <plugin>
192
+ <groupId>org.apache.maven.plugins</groupId>
193
+ <artifactId>maven-javadoc-plugin</artifactId>
194
+ <version>2.2</version>
195
+ <configuration>
196
+ <aggregate>true</aggregate>
197
+ </configuration>
198
+ </plugin>
199
+ <plugin>
200
+ <groupId>org.apache.maven.plugins</groupId>
201
+ <artifactId>maven-jxr-plugin</artifactId>
202
+ <version>2.1</version>
203
+ <configuration>
204
+ <aggregate>true</aggregate>
205
+ </configuration>
206
+ </plugin>
207
+ <plugin>
208
+ <groupId>org.apache.maven.plugins</groupId>
209
+ <artifactId>maven-site-plugin</artifactId>
210
+ <configuration>
211
+ <!-- Exclude the navigation file for Maven 1 sites
212
+ and the changes file used by the changes-plugin,
213
+ as they interfere with the site generation. -->
214
+ <moduleExcludes>
215
+ <xdoc>navigation.xml,changes.xml</xdoc>
216
+ </moduleExcludes>
217
+ </configuration>
218
+ </plugin>
219
+ <plugin>
220
+ <groupId>org.apache.maven.plugins</groupId>
221
+ <artifactId>maven-surefire-report-plugin</artifactId>
222
+ <version>2.3</version>
223
+ </plugin>
224
+ <plugin>
225
+ <groupId>org.codehaus.mojo</groupId>
226
+ <artifactId>jdepend-maven-plugin</artifactId>
227
+ <version>2.0-beta-1</version>
228
+ </plugin>
229
+ <plugin>
230
+ <groupId>org.codehaus.mojo</groupId>
231
+ <artifactId>rat-maven-plugin</artifactId>
232
+ <version>1.0-alpha-3</version>
233
+ </plugin>
234
+ </plugins>
235
+ </reporting>
236
+
237
+ <profiles>
238
+ <profile>
239
+ <id>ci</id>
240
+ <distributionManagement>
241
+ <repository>
242
+ <id>apache.snapshots</id>
243
+ <name>Apache Development Snapshot Repository</name>
244
+ <url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
245
+ </repository>
246
+ <snapshotRepository>
247
+ <id>apache.snapshots</id>
248
+ <name>Apache Development Snapshot Repository</name>
249
+ <url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
250
+ </snapshotRepository>
251
+ </distributionManagement>
252
+ </profile>
253
+
254
+ <profile>
255
+ <id>release</id>
256
+ <distributionManagement>
257
+ <repository>
258
+ <id>apache.releases</id>
259
+ <name>Apache Release Distribution Repository</name>
260
+ <url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
261
+ </repository>
262
+ </distributionManagement>
263
+ <build>
264
+ <plugins>
265
+ <!-- We want to sign the artifact, the POM, and all attached artifacts -->
266
+ <plugin>
267
+ <artifactId>maven-gpg-plugin</artifactId>
268
+ <configuration>
269
+ <passphrase>${gpg.passphrase}</passphrase>
270
+ </configuration>
271
+ <executions>
272
+ <execution>
273
+ <id>sign-artifacts</id>
274
+ <phase>verify</phase>
275
+ <goals>
276
+ <goal>sign</goal>
277
+ </goals>
278
+ </execution>
279
+ </executions>
280
+ </plugin>
281
+ <plugin>
282
+ <artifactId>maven-source-plugin</artifactId>
283
+ <executions>
284
+ <execution>
285
+ <id>create-source-jar</id>
286
+ <goals>
287
+ <goal>jar</goal>
288
+ </goals>
289
+ </execution>
290
+ </executions>
291
+ </plugin>
292
+ <plugin>
293
+ <artifactId>maven-javadoc-plugin</artifactId>
294
+ <executions>
295
+ <execution>
296
+ <id>create-javadoc-jar</id>
297
+ <goals>
298
+ <goal>jar</goal>
299
+ </goals>
300
+ <configuration>
301
+ <source>${maven.compile.source}</source>
302
+ </configuration>
303
+ </execution>
304
+ </executions>
305
+ </plugin>
306
+ <!-- We want to package license resources into the JARs -->
307
+ <plugin>
308
+ <groupId>org.apache.maven.plugins</groupId>
309
+ <artifactId>maven-remote-resources-plugin</artifactId>
310
+ <executions>
311
+ <execution>
312
+ <goals>
313
+ <goal>process</goal>
314
+ </goals>
315
+ <configuration>
316
+ <resourceBundles>
317
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.3</resourceBundle>
318
+ </resourceBundles>
319
+ </configuration>
320
+ </execution>
321
+ </executions>
322
+ </plugin>
323
+ </plugins>
324
+ </build>
325
+ </profile>
326
+
327
+ <profile>
328
+ <id>rc</id>
329
+ <distributionManagement>
330
+ <repository>
331
+ <id>apache.snapshots</id>
332
+ <name>Apache Development Snapshot Repository</name>
333
+ <url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
334
+ </repository>
335
+ <snapshotRepository>
336
+ <id>apache.snapshots</id>
337
+ <name>Apache Development Snapshot Repository</name>
338
+ <url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
339
+ </snapshotRepository>
340
+ </distributionManagement>
341
+ <build>
342
+ <plugins>
343
+ <!-- We want to sign the artifact, the POM, and all attached artifacts -->
344
+ <plugin>
345
+ <artifactId>maven-gpg-plugin</artifactId>
346
+ <configuration>
347
+ <passphrase>${gpg.passphrase}</passphrase>
348
+ </configuration>
349
+ <executions>
350
+ <execution>
351
+ <id>sign-artifacts</id>
352
+ <phase>verify</phase>
353
+ <goals>
354
+ <goal>sign</goal>
355
+ </goals>
356
+ </execution>
357
+ </executions>
358
+ </plugin>
359
+ <plugin>
360
+ <artifactId>maven-source-plugin</artifactId>
361
+ <executions>
362
+ <execution>
363
+ <id>create-source-jar</id>
364
+ <goals>
365
+ <goal>jar</goal>
366
+ </goals>
367
+ </execution>
368
+ </executions>
369
+ </plugin>
370
+ <plugin>
371
+ <artifactId>maven-javadoc-plugin</artifactId>
372
+ <executions>
373
+ <execution>
374
+ <id>create-javadoc-jar</id>
375
+ <goals>
376
+ <goal>jar</goal>
377
+ </goals>
378
+ <configuration>
379
+ <source>${maven.compile.source}</source>
380
+ </configuration>
381
+ </execution>
382
+ </executions>
383
+ </plugin>
384
+ <!-- We want to package license resources into the JARs -->
385
+ <plugin>
386
+ <groupId>org.apache.maven.plugins</groupId>
387
+ <artifactId>maven-remote-resources-plugin</artifactId>
388
+ <executions>
389
+ <execution>
390
+ <goals>
391
+ <goal>process</goal>
392
+ </goals>
393
+ <configuration>
394
+ <resourceBundles>
395
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.3</resourceBundle>
396
+ </resourceBundles>
397
+ </configuration>
398
+ </execution>
399
+ </executions>
400
+ </plugin>
401
+ </plugins>
402
+ </build>
403
+ </profile>
404
+ </profiles>
405
+
406
+ <properties>
407
+
408
+ <!-- Default configuration for compiler source and target JVM -->
409
+ <maven.compile.source>1.3</maven.compile.source>
410
+ <maven.compile.target>1.3</maven.compile.target>
411
+
412
+ <!--
413
+ Make the deployment protocol pluggable. This allows to switch to
414
+ other protocols like scpexe, which some users prefer over scp.
415
+ -->
416
+ <commons.deployment.protocol>scp</commons.deployment.protocol>
417
+
418
+ </properties>
419
+
420
+ </project>