Mailinglist Archive: opensuse-java (11 mails)

< Previous Next >
Re: [opensuse-java] org.apache.... not found in build script
  • From: Denny Beyer <opensuse@xxxxxxxxxxxxx>
  • Date: Fri, 12 Mar 2010 16:14:40 +0100
  • Message-id: <201003121614.40285.opensuse@xxxxxxxxxxxxx>
On Wednesday 10 March 2010 11:27:56 Michal Vyskocil wrote:
On Tuesday 09 March 2010 11:30:29 am Denny Beyer wrote:
Hi there,

i'm trying to fix some build issues related to ant. The project
(home:lumnis:branches:openSUSE:Factory:Contrib scala) is building fine
for 11.1 but give the following error with 11.2 and factory:
<---
[scalacfork] Compiling 209 files to
/usr/src/packages/BUILD/scala-2.7.7.final-
sources/build/locker/classes/compiler
[scalacfork] /usr/src/packages/BUILD/scala-2.7.7.final-
sources/src/compiler/scala/tools/ant/Scalac.scala:15: error: value apache
is not a member of package org
[scalacfork] import org.apache.tools.ant.{BuildException, Project}
[scalacfork] ^
[scalacfork] /usr/src/packages/BUILD/scala-2.7.7.final-
sources/src/compiler/scala/tools/ant/Scalac.scala:16: error: value apache
is not a member of package org
[scalacfork] import org.apache.tools.ant.taskdefs.MatchingTask
[scalacfork] ^


--->

So, obviously, apache (ant) could not be found, or am I wrong? How would
I test this during build?

Does someone had a similar issue?
Are there any known issues with ant in 11.2/factory?
How can I make sure I use the latest ant version in my project(e.g. from
obs-java/packages/).

I appreciate any kind of idea sharing and help on how to fix this issue.

The problem is caused by wrong location of ant used in classpath - the
/usr/share/ant/lib/ant.jar is not valid.
Just out of curiosity and for my understanding, why has been the location wrong
for 11.2/factory but
not for 11.1? Where is this sed wrongly, the ant build (so is that something
that should be fixed
upstream), the build service, the used ant package or the spec file.
Looking on build.xml it is
necessary to change the ant.jar property to the /usr/share/java/ant.jar,
so write the follwing line into %build

%ant Dant.jar=%{_javadir}/ant.jar build
Thanks, I altered the appropriate line in the spec file and it worked.

Hint: in those cases it is useful build program using ant -v -d. After that
you have the /var/tmp/build-root/.build.log with a values of all properties
and arguments passed to javac, so it's easy to find the problem (and
classpath is the problem in most cases).
I will keep that in mind for future projects.

Regards
Michal Vyskocil

Thanks for your support,

Denny
--
To unsubscribe, e-mail: opensuse-java+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-java+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups