Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble writing ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 143

PostPosted: Wed Dec 14, 2016 3:09 am    Post subject: Trouble writing ebuild Reply with quote

Trying to write an ebuild:

Code:

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2 git-r3

DESCRIPTION="The newest fork of the original LimeWire open source project."
HOMEPAGE="https://sourceforge.net/projects/wireshare/"
#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
EGIT_BRANCH="master"
EGIT_REPO_URI="git://git.code.sf.net/p/wireshare/code-0"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64"
JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_BUILD_XML="WireShare/buildLinuxJar.xml"

#IUSE=""
DEPEND=">=virtual/jdk-1.7"
RDEPEND=">=virtual/jre-1.7"

java_prepare() {
   java-pkg_clean
}

src_install() {
   java-pkg_newjar target/${P}-dev.jar ${PN}.jar
   use doc && java-pkg_dojavadoc dist/api
   use source && java-pkg_dosrc src/java/org
}


When I try to emerge it I get this:

Code:
>>> Source configured.
>>> Compiling source in /var/tmp/portage/nathan/wireshare-9999/work/wireshare-9999 ...
 * Disabling all optional ANT_TASKS
Buildfile: /var/tmp/portage/nathan/wireshare-9999/work/wireshare-9999/WireShare/buildLinuxJar.xml
     [echo] Java Version via Ant: 1.8
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

ivy-load:
  [taskdef] Could not load definitions from resource org/apache/ivy/ant/antlib.xml. It could not be found.

BUILD FAILED
/var/tmp/portage/nathan/wireshare-9999/work/wireshare-9999/WireShare/components/common/ant-macros.xml:28: Problem: failed to create task or type antlib:org.apache.ivy.ant:configure
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet

This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
        -/usr/share/ant-core/lib
        -/var/tmp/portage/.ant/lib
        -a directory added on the command line with the -lib argument


How can I fix this?
Back to top
View user's profile Send private message
littletux
n00b
n00b


Joined: 08 Dec 2003
Posts: 74

PostPosted: Sun Jan 01, 2017 3:47 am    Post subject: Reply with quote

maybe this will help you to understand

http://www.thinkplexx.com/learn/howto/maven2/plugins/could-not-load-definitions-from-resource-antlib-xml-understanding-the-problem-and-fix-worklow
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 143

PostPosted: Sat Jan 07, 2017 7:10 am    Post subject: Reply with quote

littletux wrote:
maybe this will help you to understand

http://www.thinkplexx.com/learn/howto/maven2/plugins/could-not-load-definitions-from-resource-antlib-xml-understanding-the-problem-and-fix-worklow


I'm not sure I understand that. It seems to be related to mantle.

I found this:

Quote:
up vote
3
down vote
One important thing missing from this StackOverflow page is that setting the correct ANT_HOME env var is absolutely vital and important, without this setting ant keeps telling the same error, regardless of where you copy the ant-contrib-1.0b3.jar on your file systems. This missing thing has costed me a few hours. =)

However I receive this error without eclipse, in the pure ant.


Code:
echo $ ANT_HOME


returns

Code:
/usr/share/ant


Quote:
You can provide full path to the ant-contrib JAR explicitly using "classpath" element:

<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${path-to-ant-contrib}/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>


https://devmanual.gentoo.org/eclass-reference/java-ant-2.eclass/index.html has java-ant_rewrite-classpath, can that do what he's saying?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum