Skip to content

Commit 7fb8761

Browse files
committed
[ bc50411 ] before bug fix 12wq
2 parents 2b96af1 + bc50411 commit 7fb8761

24 files changed

Lines changed: 791 additions & 365 deletions

NOTICE.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,14 @@ This file was downloaded from http://www.ferc.gov/docs-filing/eqr/soft-tools/sam
99

1010
src/main/resources/transaction.txt
1111
This file was downloaded from http://www.ferc.gov/docs-filing/eqr/soft-tools/sample-csv/transaction.txt and contains neither copyright notice nor license.
12+
13+
src/test/resources/CSVFileParser/bom.csv
14+
src/test/resources/CSVFileParser/test.csv
15+
src/test/resources/CSVFileParser/test_default.txt
16+
src/test/resources/CSVFileParser/test_default_comment.txt
17+
src/test/resources/CSVFileParser/test_rfc4180.txt
18+
src/test/resources/CSVFileParser/test_rfc4180_trim.txt
19+
src/test/resources/CSVFileParser/testCSV85.csv
20+
src/test/resources/CSVFileParser/testCSV85_default.txt
21+
src/test/resources/CSVFileParser/testCSV85_ignoreEmpty.txt
22+
These files are used as test data and test result specifications.

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!---
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
Apache Commons CSV
18+
===================
19+
20+
The Apache Commons CSV library provides a simple interface for reading and writing CSV files of various types.
21+
22+
More information can be found on the [homepage][home].
23+
24+
The [commons developer mailing list][ml] is the main channel of communication for contributors.
25+
26+
Where can I get the latest release?
27+
-----------------------------------
28+
You can download source and binaries from our [download page][download].
29+
30+
Alternatively you can pull it from the central Maven repositories:
31+
32+
```xml
33+
<groupId>org.apache.commons</groupId>
34+
<artifactId>commons-csv</artifactId>
35+
<version>1.0</version>
36+
```
37+
38+
License
39+
-------
40+
Code is under the [Apache Licence v2][license].
41+
42+
Donations
43+
---------
44+
You like Apache Commons CSV? Then [donate back to the ASF][donate] to support the development.
45+
46+
[home]:http://commons.apache.org/csv
47+
[ml]:http://commons.apache.org/csv/mail-lists.html
48+
[download]:http://commons.apache.org/csv/download_csv.cgi
49+
[license]:http://www.apache.org/licenses/LICENSE-2.0.txt
50+
[donate]:http://www.apache.org/foundation/contributing.html

RELEASE-NOTES.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ INTRODUCTION:
88
This document contains the release notes for the 1.0 version of Apache Commons CSV.
99
Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format.
1010

11-
CSV requires at least Java 5.0.
11+
CSV requires at least Java 6.0.
1212

1313
The Apache Commons CSV library provides a simple interface for reading and writing
1414
CSV files of various types.
@@ -34,6 +34,9 @@ o CSV-48: Predefined format for MYSQL
3434
FIXED BUGS
3535
============
3636

37+
o CSV-125: No longer works with Java 6
38+
o CSV-122: NullPointerException when empty header string and and null string of "".
39+
Thanks to Mike Lewis.
3740
o CSV-118: CSVRecord.toMap() throws NPE on formats with no
3841
headers. Thanks to Enrique Lara.
3942
o CSV-113: Check whether ISE/IAE are being used appropriately
@@ -86,4 +89,4 @@ patches, or suggestions for improvement, see the Apache Apache Commons CSV websi
8689
http://commons.apache.org/proper/commons-csv/
8790

8891
Have fun!
89-
-Apache Commons CSV team
92+
-Apache Commons CSV team

doap_csv.rdf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:asfext="http://projects.apache.org/ns/asfext#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:doap="http://usefulinc.com/ns/doap#" xml:lang="en">
19+
<Project rdf:about="http://commons.apache.org/csv/">
20+
<name>Apache Commons Lang</name>
21+
<homepage rdf:resource="http://commons.apache.org/csv/"/>
22+
<programming-language>Java</programming-language>
23+
<category rdf:resource="http://projects.apache.org/category/library"/>
24+
<license rdf:resource="http://usefulinc.com/doap/licenses/asl20"/>
25+
<bug-database rdf:resource="http://issues.apache.org/jira/browse/CSV"/>
26+
<download-page rdf:resource="http://commons.apache.org/csv/download_csv.cgi"/>
27+
<asfext:pmc rdf:resource="http://commons.apache.org/"/>
28+
<shortdesc xml:lang="en">Java Common Components</shortdesc>
29+
<description xml:lang="en">
30+
The Apache Commons CSV library provides a simple interface for reading and writing
31+
CSV files of various types.
32+
</description>
33+
<repository>
34+
<SVNRepository>
35+
<browse rdf:resource="http://svn.apache.org/viewvc/commons/proper/csv/trunk"/>
36+
<location rdf:resource="http://svn.apache.org/repos/asf/commons/proper/csv"/>
37+
</SVNRepository>
38+
</repository>
39+
<release>
40+
<Version>
41+
<name>commons-csv</name>
42+
<created>2014-08-14</created>
43+
<revision>1.0</revision>
44+
</Version>
45+
</release>
46+
<mailing-list rdf:resource="http://commons.apache.org/mail-lists.html"/>
47+
</Project>
48+
</rdf:RDF>

pom.xml

Lines changed: 110 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
18+
<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">
2019
<modelVersion>4.0.0</modelVersion>
2120
<parent>
2221
<groupId>org.apache.commons</groupId>
@@ -25,7 +24,7 @@ limitations under the License.
2524
</parent>
2625
<groupId>org.apache.commons</groupId>
2726
<artifactId>commons-csv</artifactId>
28-
<version>1.0-SNAPSHOT</version>
27+
<version>1.1-SNAPSHOT</version>
2928
<name>Apache Commons CSV</name>
3029
<url>http://commons.apache.org/proper/commons-csv/</url>
3130
<description>
@@ -43,15 +42,13 @@ CSV files of various types.
4342
<dependency>
4443
<groupId>commons-io</groupId>
4544
<artifactId>commons-io</artifactId>
46-
<!-- 2.2 is last version compatible with Java 1.5 -->
47-
<version>2.2</version>
45+
<version>2.4</version>
4846
<scope>test</scope>
4947
</dependency>
5048
<dependency>
5149
<groupId>com.h2database</groupId>
5250
<artifactId>h2</artifactId>
53-
<!-- 1.3.172 requires Java 1.6 -->
54-
<version>1.3.168</version>
51+
<version>1.4.181</version>
5552
<scope>test</scope>
5653
</dependency>
5754
</dependencies>
@@ -96,9 +93,9 @@ CSV files of various types.
9693
</contributors>
9794

9895
<scm>
99-
<connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/csv/trunk</connection>
100-
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/csv/trunk</developerConnection>
101-
<url>http://svn.apache.org/viewvc/commons/proper/csv/trunk</url>
96+
<connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/csv/tags/CSV_1.0</connection>
97+
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/csv/tags/CSV_1.0</developerConnection>
98+
<url>http://svn.apache.org/viewvc/commons/proper/csv/tags/CSV_1.0</url>
10299
</scm>
103100

104101
<issueManagement>
@@ -109,13 +106,14 @@ CSV files of various types.
109106
<distributionManagement>
110107
<site>
111108
<id>apache.website</id>
112-
<name>Apache Website</name>
113-
<url>${commons.deployment.protocol}://people.apache.org/www/commons.apache.org/csv/</url>
109+
<name>Apache Commons Site</name>
110+
<url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-csv/</url>
114111
</site>
115112
</distributionManagement>
116113

117114
<properties>
118115
<commons.release.version>1.0</commons.release.version>
116+
<commons.release.desc>(Java 6.0+)</commons.release.desc>
119117
<!-- The RC version used in the staging repository URL. -->
120118
<commons.rc.version>RC1</commons.rc.version>
121119
<commons.componentid>csv</commons.componentid>
@@ -130,6 +128,10 @@ CSV files of various types.
130128

131129
<checkstyle.version>2.12.1</checkstyle.version>
132130
<checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file>
131+
132+
<!-- Override jacoco version from commons parent 34, since it doesn't work with Java 8.
133+
Remove this after commons parent 35 has been released. -->
134+
<commons.jacoco.version>0.7.1.201405082137</commons.jacoco.version>
133135
</properties>
134136

135137
<build>
@@ -164,6 +166,30 @@ CSV files of various types.
164166
<headerLocation>${checkstyle.header.file}</headerLocation>
165167
</configuration>
166168
</plugin>
169+
170+
<!-- We need to add our test data files to rat exclusions -->
171+
<!-- Needed for command-line access, e.g mvn apache-rat:rat and mvn apache-rat:check -->
172+
<plugin>
173+
<groupId>org.apache.rat</groupId>
174+
<artifactId>apache-rat-plugin</artifactId>
175+
<version>${commons.rat.version}</version>
176+
<!-- Should agree with config in reporting section -->
177+
<configuration>
178+
<excludes>
179+
<exclude>src/test/resources/CSVFileParser/bom.csv</exclude>
180+
<exclude>src/test/resources/CSVFileParser/test.csv</exclude>
181+
<exclude>src/test/resources/CSVFileParser/test_default.txt</exclude>
182+
<exclude>src/test/resources/CSVFileParser/test_default_comment.txt</exclude>
183+
<exclude>src/test/resources/CSVFileParser/test_rfc4180.txt</exclude>
184+
<exclude>src/test/resources/CSVFileParser/test_rfc4180_trim.txt</exclude>
185+
<exclude>src/test/resources/CSVFileParser/testCSV85.csv</exclude>
186+
<exclude>src/test/resources/CSVFileParser/testCSV85_default.txt</exclude>
187+
<exclude>src/test/resources/CSVFileParser/testCSV85_ignoreEmpty.txt</exclude>
188+
<exclude>src/test/resources/ferc.gov/contract.txt</exclude>
189+
<exclude>src/test/resources/ferc.gov/transaction.txt</exclude>
190+
</excludes>
191+
</configuration>
192+
</plugin>
167193
</plugins>
168194
</build>
169195

@@ -191,15 +217,15 @@ CSV files of various types.
191217
<plugin>
192218
<groupId>org.apache.maven.plugins</groupId>
193219
<artifactId>maven-pmd-plugin</artifactId>
194-
<version>3.1</version>
220+
<version>3.2</version>
195221
<configuration>
196222
<targetJdk>${maven.compiler.target}</targetJdk>
197223
</configuration>
198224
</plugin>
199225
<plugin>
200226
<groupId>org.codehaus.mojo</groupId>
201227
<artifactId>findbugs-maven-plugin</artifactId>
202-
<version>2.5.4</version>
228+
<version>3.0.0</version>
203229
</plugin>
204230
<plugin>
205231
<groupId>org.codehaus.mojo</groupId>
@@ -255,7 +281,77 @@ CSV files of various types.
255281
<artifactId>javancss-maven-plugin</artifactId>
256282
<version>2.0</version>
257283
</plugin>
284+
285+
<!-- We need to add our test data files to rat exclusions -->
286+
<plugin>
287+
<groupId>org.apache.rat</groupId>
288+
<artifactId>apache-rat-plugin</artifactId>
289+
<version>${commons.rat.version}</version>
290+
<!-- Should agree with config in build section -->
291+
<configuration>
292+
<excludes>
293+
<exclude>src/test/resources/CSVFileParser/bom.csv</exclude>
294+
<exclude>src/test/resources/CSVFileParser/test.csv</exclude>
295+
<exclude>src/test/resources/CSVFileParser/test_default.txt</exclude>
296+
<exclude>src/test/resources/CSVFileParser/test_default_comment.txt</exclude>
297+
<exclude>src/test/resources/CSVFileParser/test_rfc4180.txt</exclude>
298+
<exclude>src/test/resources/CSVFileParser/test_rfc4180_trim.txt</exclude>
299+
<exclude>src/test/resources/CSVFileParser/testCSV85.csv</exclude>
300+
<exclude>src/test/resources/CSVFileParser/testCSV85_default.txt</exclude>
301+
<exclude>src/test/resources/CSVFileParser/testCSV85_ignoreEmpty.txt</exclude>
302+
<exclude>src/test/resources/ferc.gov/contract.txt</exclude>
303+
<exclude>src/test/resources/ferc.gov/transaction.txt</exclude>
304+
</excludes>
305+
</configuration>
306+
</plugin>
258307
</plugins>
259308
</reporting>
260309

310+
<profiles>
311+
<profile>
312+
<id>setup-checkout</id>
313+
<activation>
314+
<file>
315+
<missing>site-content</missing>
316+
</file>
317+
</activation>
318+
<build>
319+
<plugins>
320+
<plugin>
321+
<groupId>org.apache.maven.plugins</groupId>
322+
<artifactId>maven-antrun-plugin</artifactId>
323+
<version>1.7</version>
324+
<executions>
325+
<execution>
326+
<id>prepare-checkout</id>
327+
<phase>pre-site</phase>
328+
<goals>
329+
<goal>run</goal>
330+
</goals>
331+
<configuration>
332+
<tasks>
333+
<exec executable="svn">
334+
<arg line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}" />
335+
</exec>
336+
337+
<exec executable="svn">
338+
<arg line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs" />
339+
</exec>
340+
341+
<pathconvert pathsep=" " property="dirs">
342+
<dirset dir="${commons.scmPubCheckoutDirectory}" includes="*" />
343+
</pathconvert>
344+
<exec executable="svn">
345+
<arg line="update --set-depth infinity ${dirs}" />
346+
</exec>
347+
</tasks>
348+
</configuration>
349+
</execution>
350+
</executions>
351+
</plugin>
352+
</plugins>
353+
</build>
354+
</profile>
355+
</profiles>
356+
261357
</project>

src/changes/changes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
</properties>
4040
<body>
4141

42-
<release version="1.0" date="TBD" description="First release">
42+
<release version="1.0" date="2014-08-14" description="First release">
43+
<action issue="CSV-125" type="fix" dev="britter">No longer works with Java 6</action>
4344
<action issue="CSV-122" type="fix" dev="britter" due-to="Mike Lewis">NullPointerException when empty header string and and null string of ""</action>
4445
<action issue="CSV-117" type="update" dev="sebb">Validate format parameters in constructor</action>
4546
<action issue="CSV-121" type="add" dev="ggregory" due-to="Sebastian Hardt">IllegalArgumentException thrown when the header contains duplicate names when the column names are empty.</action>

0 commit comments

Comments
 (0)