GayaBalan / ivybeans

Automatically exported from code.google.com/p/ivybeans
0 stars 0 forks source link

ivybeans doesn't work #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Environment : ivybeans 1.2, netbeans 7.2 , linux 64 bit , openjdk 7

Description :
ant -f /home/paulo/NetBeansProjects/bookjar/util jar
:: Ivy non official version -  :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = 
/home/paulo/NetBeansProjects/bookjar/util/ivysettings.xml
:: resolving dependencies :: util#util;1.0
    confs: [compile, runtime, compile-test, runtime-test]
    found com.eaio.stringsearch#stringsearch;2 in eaio
    found com.googlecode.juniversalchardet#juniversalchardet;1.0.3 in m2repo
:: resolution report :: resolve 146ms :: artifacts dl 7ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      compile     |   2   |   0   |   0   |   0   ||   5   |   0   |
    |      runtime     |   2   |   0   |   0   |   0   ||   5   |   0   |
    |   compile-test   |   2   |   0   |   0   |   0   ||   5   |   0   |
    |   runtime-test   |   2   |   0   |   0   |   0   ||   5   |   0   |
    ---------------------------------------------------------------------
:: retrieving :: util#util
    confs: [compile, runtime, compile-test, runtime-test]
    0 artifacts copied, 2 already retrieved (0kB/9ms)
Processing /home/paulo/.ivy2/cache/util-util-compile.xml to 
/home/paulo/NetBeansProjects/bookjar/util/build/ivy-paths/compile-path.propertie
s
Processing /home/paulo/.ivy2/cache/util-util-runtime.xml to 
/home/paulo/NetBeansProjects/bookjar/util/build/ivy-paths/runtime-path.propertie
s
Processing /home/paulo/.ivy2/cache/util-util-compile-test.xml to 
/home/paulo/NetBeansProjects/bookjar/util/build/ivy-paths/compile-test-path.prop
erties
Processing /home/paulo/.ivy2/cache/util-util-runtime-test.xml to 
/home/paulo/NetBeansProjects/bookjar/util/build/ivy-paths/runtime-test-path.prop
erties
init:
Deleting: /home/paulo/NetBeansProjects/bookjar/util/build/built-jar.properties
deps-jar:
Updating property file: 
/home/paulo/NetBeansProjects/bookjar/util/build/built-jar.properties
compile:
/home/paulo/NetBeansProjects/bookjar/util/dist/[artifact].[ext]
:: delivering :: util#util;1.0 :: 1.0 :: integration :: Thu Aug 09 14:57:57 
WEST 2012
    delivering ivy file to /home/paulo/NetBeansProjects/bookjar/util/dist/ivy.xml
:: publishing :: util#util
/home/paulo/NetBeansProjects/bookjar/util/nbproject/ivy-impl.xml:179: 
impossible to publish artifacts for util#util;1.0: 
java.io.FileNotFoundException: 
/usr/share/java/ivy.jar/local/util/util/1.0/jars/util.jar (Not a directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
    at org.apache.ivy.util.FileUtil.copy(FileUtil.java:155)
    at org.apache.ivy.util.FileUtil.copy(FileUtil.java:130)
    at org.apache.ivy.plugins.repository.file.FileRepository.copy(FileRepository.java:76)
    at org.apache.ivy.plugins.repository.file.FileRepository.put(FileRepository.java:58)
    at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
    at org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:234)
    at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
    at org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:281)
    at org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:260)
    at org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:172)
    at org.apache.ivy.Ivy.publish(Ivy.java:600)
    at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:311)
    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:392)
    at org.apache.tools.ant.Target.performTasks(Target.java:413)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

with these configs

ivysettings.xml:

<ivysettings>
    <!-- for documentation about this file, see
    http://ant.apache.org/ivy/history/trunk/settings.html -->
    <settings defaultResolver="default"/>
    <resolvers>
        <chain name="public">
            <!-- This is the default maven 2 repository -->
            <ibiblio name="m2repo" m2compatible="true" />
             <ibiblio name="eaio" root="http://eaio.com/maven2" m2compatible="true" />
        </chain>
    </resolvers>

    <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
</ivysettings>

and ivy.xml:
 <?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
    <info module="util" organisation="util" revision="1.0"/>
    <configurations>
        <conf name="compile"/>
        <conf name="runtime"/>
        <conf name="compile-test"/>
        <conf name="runtime-test"/>
    </configurations>
    <dependencies>
        <dependency org="com.eaio.stringsearch" name="stringsearch" rev="2" conf="" />
        <dependency org="com.googlecode.juniversalchardet" name="juniversalchardet" rev="1.0.3" conf="" />
    </dependencies>
</ivy-module>

Original issue reported on code.google.com by i30817@gmail.com on 9 Aug 2012 at 2:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Commenting out the '-ivy-publish' target part of the ivy-impl.xml makes it 
'work'

Original comment by i30817@gmail.com on 10 Aug 2012 at 3:44

GoogleCodeExporter commented 9 years ago
It's because the local resolver uses
${ivy.default.ivy.user.dir}
to find the repository.

Unexplicably, that property is set to '/usr/share/java/ivy.jar'

Original comment by i30817@gmail.com on 10 Aug 2012 at 6:32

GoogleCodeExporter commented 9 years ago
setting
    <property name="ivy.default.ivy.user.dir" value="${user.home}/.ivy2" />

at the beginning of the ivysettings.xml fixed it.

Why would ivy use the jar as the location of the local repository is beyond me 
though. Either a very bad bug or a distro patch snafu. (i'm on ubuntu).

Original comment by i30817@gmail.com on 10 Aug 2012 at 7:00

GoogleCodeExporter commented 9 years ago
actually this is better    <property name="ivy.local.default.root" 
value="${user.home}/.ivy2/cache" />

to try to make them use the same place as where they get (cache vs local)

Anyway, when trying to invoke ant from debian debuild this starts failing since 
debuild uses fakeroot so ${user.home} starts to look like :
    java.io.FileNotFoundException: /root/.ivy2/cache/resolved-bookjar-bookjar-1.0.xml (Permission denied)

However since debuild only uses fakeroot for SOME of it's operations (including 
apparently 'install' the repositories are not the same.

Don't really know how to solve it without hardcoding the home, which is 
obviously not a good idea for portable builds.

Original comment by i30817@gmail.com on 10 Aug 2012 at 7:14

GoogleCodeExporter commented 9 years ago
However, i think the problem on the previous post is different from the other 
one, i wasn't invoking debuild in those, just doing 'build' in netbeans.

Original comment by i30817@gmail.com on 10 Aug 2012 at 7:41

GoogleCodeExporter commented 9 years ago
It is not an ivybeans problem. Contact ivy user list.

Original comment by laurent....@gmail.com on 23 Aug 2012 at 9:17