Build failure (IR+ 2.1)

23 views
Skip to first unread message

Paul Hoffman

unread,
Aug 22, 2012, 10:09:35 AM8/22/12
to irp...@googlegroups.com
I'm trying to build IR+ 2.1 but failing. The errors begin with a
message "package edu.ur.ir.export does not exist"; my ant output looks
as follows. (I've changed the actual build directory path to just
"builddir" to make this easier to read.)

----------------------------------------------------------------------------
(...1,876 lines omitted...)

do-ir-web:

clean-production-staging:

clean:
[delete] Deleting directory builddir/ir_web/build
[delete] Deleting directory builddir/ir_web/reports

download-ivy:
[echo] Please wait this may take a few minutes - installing ivy...
[get] Getting: http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.2.0-rc1/ivy-2.2.0-rc1.jar
[get] To: builddir/ir_web/ivy/ivy.jar
[get] Not modified - so not downloaded

install-ivy:

resolve:
[ivy:resolve] :: Ivy 2.2.0-rc1 - 20100629224905 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = builddir/ir_web/ivysettings.xml
[ivy:resolve] :: resolving dependencies :: ir_web#ir_web;wor...@navi.flo.org
[ivy:resolve] confs: [default]
[ivy:resolve] found ir_service#ir_service;2.0 in local

(...89 lines omitted...)

ivy-report:
[mkdir] Created dir: builddir/ir_web/reports/ivy_report
[ivy:report] Processing /home/ir_plus/.ivy2/cache/ir_web-ir_web-default.xml to builddir/ir_web/reports/ivy_report/ir_web-ir_web-default.html
[ivy:report] Processing /home/ir_plus/.ivy2/cache/ir_web-ir_web-default.xml to builddir/ir_web/reports/ivy_report/ir_web-ir_web-default.graphml

retrieve:
[ivy:retrieve] :: retrieving :: ir_web#ir_web [sync]
[ivy:retrieve] confs: [default]
[ivy:retrieve] 0 artifacts copied, 83 already retrieved (0kB/23ms)

copy-resources:
[copy] Copying 4 files to builddir/ir_web/build/classes
[copy] Copied 42 empty directories to 24 empty directories under builddir/ir_web/build/classes

build:
[ext:javac] Compiling 210 source files to builddir/ir_web/build/classes
[ext:javac] builddir/ir_web/src/edu/ur/ir/web/action/export/MarcFileExport.java:31: package edu.ur.ir.export does not exist
[ext:javac] import edu.ur.ir.export.MarcExportService;

(440 lines omitted)

BUILD FAILED
builddir/build.xml:118: The following error occurred while executing this line:
builddir/ir_web/build.xml:144: Compile failed; see the compiler error output for details.

Total time: 34 seconds
----------------------------------------------------------------------------

Does anyone have any idea what's going wrong? I was guessing that my
pre-build script had somehow failed to copy all of the source files into
place, but when I do a recursive grep in builddir I see three source
files that compile into edu.ur.ir.export:

$ fgrep -r -w 'package edu.ur.ir.export' .
./ir_core/src/edu/ur/ir/export/XmlMarcFileWriter.java:package edu.ur.ir.export;
./ir_core/src/edu/ur/ir/export/MarcExportService.java:package edu.ur.ir.export;
./ir_core/src/edu/ur/ir/export/MrcMarcFileWriter.java:package edu.ur.ir.export;
./ir_core/src/edu/ur/ir/export/MarcRecordFileWriter.java:package edu.ur.ir.export;

Thanks in advance,

Paul.

--
Paul Hoffman <pa...@flo.org>
Systems Librarian
Fenway Libraries Online
c/o Wentworth Institute of Technology
550 Huntington Ave.
Boston, MA 02115
(617) 445-2914
(617) 442-2384 (FLO main number)

Nate Sarr

unread,
Aug 22, 2012, 11:08:36 AM8/22/12
to irp...@googlegroups.com

Hi Paul,
 
   Are you building from the original download or using a custom script?
 
-Nate
--
You received this message because you are subscribed to the Google Groups "irplus" group.
To post to this group, send email to irp...@googlegroups.com.
To unsubscribe from this group, send email to irplus+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/irplus?hl=en.


Nate Sarr

unread,
Aug 22, 2012, 11:34:24 AM8/22/12
to irp...@googlegroups.com
Hi Paul,
 
   If you did an IR+ 2.X install on the same machine it might be that you need tell ivy to clean up and rebuild all the classes.  To do this cd into the ir_web directory of the unzipped 2.1 code and run the following commands:
 
ant clean-ivy
ant clean-cache
 
Then cd back up to the top directory and run the command:
 
ant
 
Let me know if this fixes it.
 
-Nate

On Wed, Aug 22, 2012 at 10:09 AM, Paul Hoffman <pa...@flo.org> wrote:

Paul Hoffman

unread,
Aug 22, 2012, 12:08:38 PM8/22/12
to irp...@googlegroups.com
Nate,

On Wed, Aug 22, 2012 at 11:08:36AM -0400, Nate Sarr wrote:
> Hi Paul,
>
> Are you building from the original download or using a custom script?

I'm using a custom script -- we have to because we're hosting four (soon
to be six) independent instances of IR+. I was just able to build the
stock IR+ 2.1 in a separate dir using just ant, so obviously I'm doing
something wrong.

Ah, I see -- I was patching ir_web/ivy.xml and that was the culprit:

--- a/ivy.xml 2010-12-21 11:52:34.000000000 -0400
+++ b/ivy.xml 2012-08-22 17:04:25.000000000 -0500
@@ -28,8 +28,8 @@
<info organisation="ir_web" module="ir_web"/>
<dependencies>

- <dependency org="ir_service" name="ir_service" rev="2.1" changing="true"/>
- <dependency org="ur_tags" name="ur_tags" rev="2.1" transitive="false" changing="true"/>
+ <dependency org="ir_service" name="ir_service" rev="2.0" changing="true"/>
+ <dependency org="ur_tags" name="ur_tags" rev="2.0" transitive="false" changing="true"/>

<!-- struts 2 files and dependencies -->
<dependency org="org.apache.struts" name="struts2-core" rev="2.2.1" transitive="false">
@@ -88,7 +88,8 @@

<!-- yui download -->
<dependency org="yui" name="yui" rev="2.7.0" transitive="false" changing="true">
- <artifact name="yui" type="zip" url="http://yui.zenfs.com/releases/yui2/yui_2.7.0r2.zip"/>
+ <artifact name="yui" type="zip"
+ url="http://yuilibrary.com/downloads/yui2/$(yui.version).zip"/>
</dependency>

<!-- spring security libraries -->

Here's our build process, slightly simplified, in case it's of interest
to anyone. Assume we're building instance $LIB:

(1) Go to the instance directory (~/src/instance/$LIB) and create a new
build directory (builds/$BUILDNAME) in it. Each build is totally
independent of any others -- $BUILDNAME is a timestamp.

(2) Copy three few files into builds/$BUILDNAME, expanding "macros"
(speaking loosely) in them:

properties/production/ir_plus.properties
ir_web/log4j-config/production-appender/log4j.xml
ir_web/struts-config/production/struts.properties

We do this primarily to make sure config variables are set properly for
our needs -- e.g., set base.web.path to http://ir.flo.org/$LIB/, set
struts.multipart.saveDir to /var/tmp/ir_plus_$LIB, etc.

(3) Unzip ir_plus-2.1.zip into builds/$BUILDNAME (not quite empty any
more), specifying that existing files should not be overwritten.

(4) Patch two files:

ir_web/webapps/ir_web/pages/home.jsp
ir_web/webapps/ir_web/page-resources/css/global.css

(5) Copy in a custom logo for the repository.

(6) Run ant in builds/$BUILDNAME. Bail out if the build failed.

(7) Create a symlink from builds/LATEST to builds/$BUILDNAME.

I have several individual shell and Perl scripts set up so I can do
this:

$ irpl create-instance $LIB # create the instance (if necessary)
# -- this creates the DB and sets up an
# "instance dir" for it
$ irpl new-build $LIB # create the new build dir
$ irpl build $LIB # build it
$ irpl install $LIB # install it

Nate Sarr

unread,
Aug 22, 2012, 12:41:49 PM8/22/12
to irp...@googlegroups.com

Wow - very cool build process.  So are you all set then?

-Nate

Paul Hoffman

unread,
Aug 22, 2012, 12:59:51 PM8/22/12
to irp...@googlegroups.com
Nate,

On Wed, Aug 22, 2012 at 11:34:24AM -0400, Nate Sarr wrote:
> If you did an IR+ 2.X install on the same machine it might be that you
> need tell ivy to clean up and rebuild all the classes. To do this cd into
> the ir_web directory of the unzipped 2.1 code and run the following
> commands:
>
> ant clean-ivy
> ant clean-cache
>
> Then cd back up to the top directory and run the command:
>
> ant
>
> Let me know if this fixes it.

Aha! -- thanks, that's good to know. Does ivy keep anything outside the
build directory (to a normal person, that would be the ir_plus-2.1
directory)?

If so, given that our two new instances are going to use IR+ 2.1, I'm
sure I would run into this problem sooner or later, even if that wasn't
the problem this time.

Thanks again,

Nate Sarr

unread,
Aug 22, 2012, 1:05:29 PM8/22/12
to irp...@googlegroups.com
Yes it does.  Ivy when installed caches the files it downloads and the jar files that it creates so that it does not need to re-retrieve them - it does this in it's own special directory on your system - I believe it is a hidden directory like .ivy.  If you are not careful and don't set versions on the jar files it migh think a particular jar file is the same when they are actually different.
 
-Nate

Reply all
Reply to author
Forward
0 new messages