ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <Carlton.Br...@compucredit.com>
Subject RE: Namespace problems
Date Thu, 16 Oct 2008 13:32:04 GMT
Opened https://issues.apache.org/jira/browse/IVY-946 

-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@yahoo.com] 
Sent: Wednesday, October 15, 2008 5:07 PM
To: ivy-user@ant.apache.org
Subject: Re: Namespace problems

Could you create a JIRA issue for this?
Please attach a reproducable test-case if possible.

Maarten




----- Original Message ----
From: "Brown, Carlton" <Carlton.Brown@compucredit.com>
To: ivy-user@ant.apache.org
Sent: Tuesday, October 14, 2008 10:35:11 PM
Subject: RE: Namespace problems

Sorry to bring back a zombie thread... I'm still having this problem
with the namespace issue in RC1.  I did declare the to/from relationship
in both directions as Xavier asked earlier, and it seems that namespace
mapping still causes fatal error when transforming revision numbers.  

I was trying to use an install task, modeling the Ivy namespaces
tutorial as much as possible, but changing the revision suffix -rc3 to
-final3 instead of changing organisation from commons-.+ to apache like
the example did.

    <namespace name="promote-rc">
          <rule>
              <fromsystem>
                <src rev="(.+)-final(.+)"/>
                <dest rev="$r1-rc$r2"/>
              </fromsystem>
            <tosystem>
                  <src rev="(.+)-rc(.+)"/>
                  <dest rev="$r1-final$r2"/>
            </tosystem>
          </rule>
    </namespace>
    </namespaces> 

[ivy:install]         local-staging: bad revision found in
C:\ivy\artifact-repositories\local-staging\com\ccrt\ols\dynaweb\1.0.0-rc
3\ivy.xml: expected='1.0.0-rc3 found='1.0.0-final3'
[ivy:install]
[ivy:install] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED
c:\allworkspaces\ebiz-1.6-rmtest\ivy-template\ivy-common.xml:169:
Problem happened while installing modules - see output for details
    at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:113)
    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
    at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:1
05)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:41)
    at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTar
gets(EclipseDefaultExecutor.java:32)
    at
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAnt
Runner.java:423)
    at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAn
tRunner.java:137)

Total time: 1 second

* I know the resulting transform would result in a nonsensical value of
-finalN but that isn't important to this issue.

-----Original Message-----
From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
Sent: Friday, April 11, 2008 7:58 AM
To: ivy-user@ant.apache.org
Subject: Re: Namespace problems

On Thu, Apr 10, 2008 at 3:59 PM, Brown, Carlton <
Carlton.Brown@compucredit.com> wrote:

> I'd like to bump this topic one more time.  After more testing using 
> static revision numbers, I am still not able to use Ivy namespaces to 
> map revision numbers between repositories.  There's no problem with 
> organisations or modules.
>
> This time I used static revision numbers instead of expressions, in
> order to guarantee an 1:1 relationship.   For example, trying to map
> rev=1.0.0.1 to rev=1.0.0-final.   It kept failing with an error
similar
> to below, "inconsistent module descriptor".  It claims it "found" a 
> revision of 1.0.0-final inside ivy-1.0.01.xml (which is NOT contained 
> in the file), although it expected a revision of 1.0.0.1 (which truly 
> IS in the ivy-1.0.0.1.xml file).
>
> So does namespace mapping actually work for revisions?  Is there a 
> test case for this?

I doubt we have a test case for this, and I've never heard people using
namespaces for this, so I wouldn't be surprised if it's buggy. Just to
be sure, in your last test (with static revision) did you provide the
conversion rules in both ways (from and to system). Because I haven't
checked the code, but I think currently Ivy relies on both rules to
handle namespace properly.

Xavier


>
> > -----Original Message-----
> > From: Brown, Carlton [mailto:Carlton.Brown@compucredit.com]
> > Sent: Friday, April 04, 2008 1:52 PM
> > To: ivy-user@ant.apache.org
> > Subject: Namespace problems
> >
> > I'm getting errors I don't understand while using install with 
> > namespace and I'd appreciate any insight.
> >
> > Briefly, my intention is to copy foo-module-1.0.0.0 from an RC 
> > repository into a final repository with the version changed to 1.0.0

> > (truncating the final number).
> >
> > My rename rule looks like this:
> >
> > <rule>
> >      <fromsystem>
> >         <!-- Space holder, because although there will never be a 
> > fromsystem copy, Ivy still throws NPE if we don't include this xml 
> > element -->
> >      </fromsystem>
> >         <tosystem>
> >            <src rev="(.+)\.(.+)\.(.+)\.(.+)"/>
> >
> >            <dest rev="$r1\.$r2\.$r3"/>
> >
> >         </tosystem>
> > </rule>
> >
> > First, a question... clearly, the <fromsystem> is required because I

> > get a NullPointerException if it is not defined.
> > But am I wrong to think that <fromsystem> is unnecessary if I know 
> > that I will never install
> > *from* the system, always *to* it?
> >
> > Second, regarding the strange error:
> > [ivy:install] ERROR: rc-fs: bad revision found in
> > C:\artifact-repositories\rc-repo\myorg\foo-module\1.0.0.0\ivy.xml:
> > expected='1.0.0.0 found='1.0.0'
> > [ivy:install] java.text.ParseException: inconsistent module 
> > descriptor file found in 
> > 'C:\artifact-repositories\rc-repo\myorg\foo-module\1.0.0.0\ivy
> > .xml': bad
> > revision: expected='1.0.0.0' found='1.0.0';
> >
> > I don't understand the reasons for this error, because naturally the

> > original ivy file should not contain the modified revision number.
> > Even more odd, it seems to me that the semantic sense of the error
is
> > reversed.   The so-called 'expected' revision 1.0.0.0 is definitely
> > found in the 1.0.0.0\ivy.xml file.   The so-called 'found' revision
of
> > 1.0.0 is, of course, not found in that any file (since 1.0.0 is the 
> > new
> > revision number to be installed).   So basically I'm totally
> > confused as
> > to what went wrong.
> >
> > I'd really appreciate help understanding this, I beat my head 
> > against it
> > for several hours and came no closer to understanding it.   I
emulated
> > the tutorial as much as possible, but it seems I am having no luck.
> >
> > Thanks,
> > Carlton
> >
> >
> >
> > <HTML><BODY><P><hr size=1></P>
> > <P><STRONG>
> > ====================================================
> > This message contains PRIVILEGED and CONFIDENTIAL information that 
> > is intended only for use by the named recipient. If you are not the 
> > named recipient, any disclosure, dissemination, or action based on 
> > the contents of this message is prohibited. In such case please 
> > notify us and destroy and delete all copies of this transmission.
> > Thank you.
> > ====================================================
> > </STRONG></P></BODY></HTML>
> >
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL information that is 
> intended only for use by the named recipient. If you are not the named

> recipient, any disclosure, dissemination, or action based on the 
> contents of this message is prohibited. In such case please notify us 
> and destroy and delete all copies of this transmission.  Thank you.
> ====================================================
>



--
Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/
http://ant.apache.org/ivy/ http://www.xoocode.org/



      

Mime
View raw message