On 4/17/2016 4:27 PM, Carl Marcum wrote:
On 04/15/2016 10:01 PM, Patricia Shanahan wrote:


On 4/15/2016 6:52 PM, Carl Marcum wrote:
On 04/15/2016 09:21 PM, Patricia Shanahan wrote:
...
Do I need to run it in any particular directory? How does it find the
.jar I built?


It doesn't need to find the jar you built.

There is one pre-built from the RC and staged in Apache Nexus
repository.
...

I need to test the code I built before voting on the release. I think
the intent is that each PMC member casting a binding +1 vote knows the
supplied source code can be used to build a working version of the
software.

"Before voting +1 PMC members are required to download the signed
source code package, compile it as provided, and test the resulting
executable on their own platform..."

http://www.apache.org/dev/release.html#approving-a-release


Hi Patricia,

After going to Legal about this problem I got a great suggestion that
requires running the test script once, thus downloading the staged
release jar and setting up the local Groovy Ivy cache. Then build the
test jar from the RC sources and replace the jar in the Ivy cache.

Apologies in advance for the below instructions as I didn't have a lot
of time this weekend. I should create a wiki page for this as it's kind
of long.

I'll try to work with these instructions, and go on asking questions whenever I get stuck. I have saved all the e-mails in this thread, and in any case they are in the archive. I think we should aim for a step-by-step Wiki page that may inspire another Windows-using PMC member to attempt the build and test.


Testing the guno-extension staged in Apache Nexus
-------------------------------------------------
Download the HelloTextTableShape.groovy test script from bugzilla

If using Windows or a Linux with a soffice executable location other
than "/opt/openoffice4/program/".
Edit the test script for the location of the soffice executable.
A Windows example would look like: "C:/Program Files (x86)/OpenOffice
4/program"

Run the script from the download location
groovy HelloTextTableShape.groovy

The script should bootstrap the office and add sample content to some of
the applications using the guno-extension jar.
Close OpenOffice after the test.

running the script should download the jars to the local Groovy Ivy cache
On my Fedora Linux machine it is here:
~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar



Testing the downloaded source
-------------------------------

unpack the source jar
This will be the guno-extension test directory

If using Windows or a Linux with a soffice executable location other
than "/opt/openoffice4/program/".
Edit the two Spock test files for the location of the soffice executable.
src/test/groovy/org/openoffice/guno/SpreadsheetSpec.groovy and
UnoSpec.groovy
The default location is:
String oooExeFolder = "/opt/openoffice4/program/"

Do the test build.
(From guno-extension test directory)
gradle jar

rename the downloaded jar in the local Groovy Ivy cache
(From guno-extension test directory)
mv
~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.jar
~/.groovy/grapes/org.openoffice/guno-extension/jars/guno-extension-0.1.4.save


copy the test jar into it's place
cp ./build/libs/guno-extension-0.1.4.jar
~/.groovy/grapes/org.openoffice/guno-extension/jars/

edit the HelloTextTableShape.groovy script and comment out the grab
resolver for the staging area. This will make sure it can't see the
staged jar.
Groovy should find the newly built jar in the Ivy cache.
// @GrabResolver(name = 'guno', root =
'https://repository.apache.org/content/repositories/orgapacheopenoffice-1019/')


run the test script again to test the newly built jar.

groovy HelloTextTableShape.groovy

Once finished you can remove the test jar from Ivy and rename the
guno-extension-0.1.4.save back to .jar

Please let me know if you have any questions.

Thanks,
Carl


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to