org.apache.... not found in build script
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. Denny -- To unsubscribe, e-mail: opensuse-java+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-java+help@opensuse.org
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. 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 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). Regards Michal Vyskocil
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@opensuse.org For additional commands, e-mail: opensuse-java+help@opensuse.org
On Friday 12 March 2010 04:14:40 pm Denny Beyer wrote:
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.
Yes - I see there's a change between 11.1 and 11.2, which makes ant incompatible. Sorry, fixed now in Java:packages/Factory (sr35066). Regards Michal Vyskocil
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
participants (2)
-
Denny Beyer
-
Michal Vyskocil