Summary: | [PATCH] HSSF Convenience Methods | ||
---|---|---|---|
Product: | POI | Reporter: | Eric Pugh <epugh> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0-dev | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other | ||
Attachments: |
Changes to build.xml
patch of files for hssf convenience methods in zip format This time with all code changes in ZIP. Nothing is ever easy! Comprehensive Zip file, including libs... Refactored code. This is the only zip to use. Zip file w/ removed xbuild.xml |
Description
Eric Pugh
2002-08-27 20:50:50 UTC
Created attachment 2849 [details]
Changes to build.xml
Created attachment 2850 [details]
patch of files for hssf convenience methods in zip format
Still trying to figure out bugzilla! ummm...you know...the only thing in the zip is this: Archive: epugh.zip Length Date Time Name -------- ---- ---- ---- 454 08-27-02 16:36 java/jakarta-poi/jakarta-poi/src/contrib/targets/hssf-convenience/xbuild.xml -------- ------- 454 1 file Created attachment 2887 [details]
This time with all code changes in ZIP. Nothing is ever easy!
Okay I don't mean to nit-pick... but please next time zip the files relative to the jakarta-poi directory. It makes it far easier to verify and apply... And realistically I apply patches quicker if they are easy to verfiy and apply. Anyhow.... it failed to build: /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:68: cannot resolve symbol symbol : class PropertyUtils location: package beanutils import org.apache.commons.beanutils.PropertyUtils; ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:69: cannot resolve symbol symbol : class NestableException location: package exception import org.apache.commons.lang.exception.NestableException; ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:95: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:118: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:140: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:164: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:186: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:209: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:231: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:256: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:285: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:289: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil Map values = PropertyUtils.describe( style ); ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:299: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil Map wbStyleMap = PropertyUtils.describe( wbStyle ); ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:311: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil PropertyUtils.copyProperties( style2, style ); /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:68: cannot resolve symbol symbol : class PropertyUtils location: package beanutils import org.apache.commons.beanutils.PropertyUtils; ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:69: cannot resolve symbol symbol : class NestableException location: package exception import org.apache.commons.lang.exception.NestableException; ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:95: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:118: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:140: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:164: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:186: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:209: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:231: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:256: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:285: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throws NestableException { ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:289: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil Map values = PropertyUtils.describe( style ); ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:299: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil Map wbStyleMap = PropertyUtils.describe( wbStyle ); ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:311: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil PropertyUtils.copyProperties( style2, style ); ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:312: cannot resolve symbol symbol : variable PropertyUtils location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil PropertyUtils.setProperty( style2, propertyName, propertyValue ); ^ /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/build/contrib/java/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:319: cannot resolve symbol symbol : class NestableException location: class org.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil throw new NestableException( "Couldn't setCellStyleProperty.", e ); ^ 16 errors BUILD FAILED /mnt/u03/home/andyext/jakarta/patch/jakarta-poi/tools/cents/centipede.cent/xbuild.xml:138: Compile failed; see the compiler error output for details. Created attachment 2906 [details]
Comprehensive Zip file, including libs...
Created attachment 2962 [details]
Refactored code. This is the only zip to use.
The attachement data 9/6/02 is the attachement of files that I would like committed. I added the ability to easily set a cell's alignment and font, and have the HSSFCellUtil class track whether another HSSFCellStyle needs to be created or not. I also made the setCellStyleProperty method public and moved it to HSSFCellUtil so that if you are programitcally building styles you can just directly pass in the various bean method name and values to use. Lastly, I added a method translateUnicodeValues that will look at a cell, and if it fines strings like α which are commonly found in webpage HTML strings, they are converted to the unicode equivalent and the cell is marked as a unicode cell. I can't wait to see these new classes commited so I can do patchs against them and see the history! <hint> <hint> Thanks, Eric Pugh One thing that would expedite commitment is if you would change the "Resolution" to REOPENED when you make changes. I just look down the list for patches that are not in the resolved or invalid state. If they aren't in said state I don't actually look at them. See what I see: http://nagoya.apache.org/bugzilla/buglist.cgi?product=POI&short_desc=%5BPATCH%5D&short_desc_type=allwordssubstr (this is the "Patches" link from the homepage) I just tried to commit this but the build does nothing...there's nothing in the ant target.... ???? Requirements: 1. Must compile 2. Must produce some kind of meaningful unit from the compilation (such as a jar file) -andy I'm not sure what I am doing wrong. I did a fresh build with the attachment from 9/6 and I ran the jar and all targets. In both cases, I end up with a jar file named jakarta-poi-contrib-1.8.0-dev-{mydate}.jar that has both classes, HSSFCellUtil and HSSFRegionUtil in them. That is what I am using to produce the jars that go onto my production boxes. In the jar are a couple files: commons-beanutils.jar (which does not end up in any compiled jars) commons-lang-1.0-b1.jar (which also does not end up in any compiled jars) HSSFRegionUtil.java HSSFCellUtil.java xbuild.xml (which doesn't really do anything, but all the other contribs have them). Okay, I see what the problem was on the status, I needed to mark the bug as "Reopen Bug", thanks. Let me know what I need to do to get this $%# code committed, and next time I'll do better! Thanks, Eric Okay.. . Lets start from the top. When I said the standards for contribs wasn't as high, I meant that we don't make you have unit tests, and we don't check them for quality like Javadocs etc. However it DOES need to build. The xbuild.xml file is an ant build file (more or less). Ant is like "make" but its not totally crack-inspired like make is. I suggest you take a close look at the other contribs' xbuild.xml and the jakarta.apache.org/ant project's "Documentation" which explains what the syntax of the xbuild.xml file is. (Those are ANT tasks). Right now this stuff isn't even being compiled or jar'd. Basically, you need to test this first. Run it in the build (the build is interactive run ./build.sh or bat). Get the jar, make sure it is valid (perhaps run a program against it). You can also find out more about the build at krysalsis.org/centipede -- it explains the whole structure (but I think the ant pages should be enough) Okay, obviously there is a disconnect between what I am producing and what you are trying to commit. I am able to compile in a fresh checkout of POI the contents of the zip file from 9/6. I last did it with a checkout from the 6th. I run the jar target, and it produces the main poi jar, plus a contrib jar, and then two other jars. In the contrib jar are the two new classes. Now, is the issue that the beanutils and lang jar in the contrib/lib directory are not included in the contrib jar, is that what is causing the heartburn? I can change the build to include the contents of contrib/lib in the contrib jar, but that means that people who already have the beanutils and lang jars will have dups. Also, and maybe this is just muddying the waters, and I should remove it, but since the HSSFConvenience methods don't have gui, I just included the xbuild.xml stuff just to match the other code. It has an empty target becasue there is no gui. What kinds of build errors are you getting? I have written code, and junit testcases against the new code. As soon as I figure out how to change the build to include contrib code in the junit classpath, I will submit the testcases. (right now I have to move my code into the main tree in order to run them). I really want to figure out where the disconnect is because I know this has taken up way too much of your time as is. Eric Created attachment 3049 [details]
Zip file w/ removed xbuild.xml
patch applied, please cross check. You may wish to contribute some documentation so people know to use the stuff in the lib dir, etc. |