You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Gintas Grigelionis (JIRA)" <ji...@apache.org> on 2017/08/31 19:37:00 UTC

[jira] [Updated] (IVY-1283) ivy:publish conf switch is not honored.

     [ https://issues.apache.org/jira/browse/IVY-1283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gintas Grigelionis updated IVY-1283:
------------------------------------
    Description: 
I have the following build.xml:
{code:xml}
<project name="test" default="publish" xmlns:ivy="antlib:org.apache.ivy.ant">
  <target name="info" description="--> configure ivy">
    <ivy:info file="${basedir}\ivy.xml"/>
  </target>
	
  <target name="configure" description="--> configure ivy">
     <ivy:configure file="..\ivysettings.xml"/>
  </target>

 <target name="publish_debug" depends="configure,info">
		<ivy:publish artifactspattern="${basedir}\bin\Debug\[artifact].[ext]"
			resolver="development"
			pubrevision="1.0.0.0" 
			pubdate="${NOW_US}"
			overwrite="true" 
			conf="debug"
		/>
    </target>
</publish>
{code}
I have the following ivysettings.xml:
{code:xml}
<ivysettings>
    <property name="repo.dir" value="\\titan.englab.local\Users\mfancy\ivyRepo"/>
	
    <settings defaultResolver="development"/>
	
    <resolvers>
        <filesystem name="development">
            <ivy pattern="${repo.dir}/development/[organisation]/[module]/[revision]/ivy.xml" />
            <artifact pattern="${repo.dir}/development/[organisation]/[module]/[revision]/[conf]/[artifact].[ext]" />
        </filesystem>
    </resolvers>
</ivysettings>
{code}
I have the following ivy.xml:
{code:xml}
<ivy-module version="2.0">
  <info organisation="ironmountain" module="HelloWorldCL" revision="1.0.0.0"/>
  <configurations defaultconf="debug"> 
	<conf name="release"/>
	<conf name="debug"/>
  </configurations>
  <publications>
    <artifact name="HelloWorldCL" ext="dll" type="dll" conf="debug,release"/>
    <artifact name="HelloWorldCL" ext="pdb" type="pdb" conf="debug,release"/>
  </publications>
</ivy-module>
{code}
When I run "ant publish" I get the following structure in my repository.
{code}
development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml
development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml.sha1
development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml.md5
development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll
development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll.sha1
development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll.md5
{code}
I was expecting the "default" to be replaced by "debug" since it was specified with a switch on the ivy.publish target.


  was:
I have the following build.xml:
<project name="test" default="publish" xmlns:ivy="antlib:org.apache.ivy.ant">
  <target name="info" description="--> configure ivy">
    <ivy:info file="${basedir}\ivy.xml"/>
  </target>
	
  <target name="configure" description="--> configure ivy">
     <ivy:configure file="..\ivysettings.xml"/>
  </target>

 <target name="publish_debug" depends="configure,info">
		<ivy:publish artifactspattern="${basedir}\bin\Debug\[artifact].[ext]"
			resolver="development"
			pubrevision="1.0.0.0" 
			pubdate="${NOW_US}"
			overwrite="true" 
			conf="debug"
		/>
    </target>
</publish>

I have the following ivysettings.xml:
<ivysettings>
    <property name="repo.dir" value="\\titan.englab.local\Users\mfancy\ivyRepo"/>
	
    <settings defaultResolver="development"/>
	
    <resolvers>
        <filesystem name="development">
            <ivy pattern="${repo.dir}/development/[organisation]/[module]/[revision]/ivy.xml" />
            <artifact pattern="${repo.dir}/development/[organisation]/[module]/[revision]/[conf]/[artifact].[ext]" />
        </filesystem>
    </resolvers>
</ivysettings>

I have the following ivy.xml:
<ivy-module version="2.0">
  <info organisation="ironmountain" module="HelloWorldCL" revision="1.0.0.0"/>
  <configurations defaultconf="debug"> 
	<conf name="release"/>
	<conf name="debug"/>
  </configurations>
  <publications>
    <artifact name="HelloWorldCL" ext="dll" type="dll" conf="debug,release"/>
    <artifact name="HelloWorldCL" ext="pdb" type="pdb" conf="debug,release"/>
  </publications>
</ivy-module>

When I run "ant publish" I get the following structure in my repository.
development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml
development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml.sha1
development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml.md5
development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll
development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll.sha1
development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll.md5

I was expecting the "default" to be replaced by "debug" since it was specified with a switch on the ivy.publish target.



> ivy:publish conf switch is not honored.
> ---------------------------------------
>
>                 Key: IVY-1283
>                 URL: https://issues.apache.org/jira/browse/IVY-1283
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Windows 7
>            Reporter: Mark Fancy
>
> I have the following build.xml:
> {code:xml}
> <project name="test" default="publish" xmlns:ivy="antlib:org.apache.ivy.ant">
>   <target name="info" description="--> configure ivy">
>     <ivy:info file="${basedir}\ivy.xml"/>
>   </target>
> 	
>   <target name="configure" description="--> configure ivy">
>      <ivy:configure file="..\ivysettings.xml"/>
>   </target>
>  <target name="publish_debug" depends="configure,info">
> 		<ivy:publish artifactspattern="${basedir}\bin\Debug\[artifact].[ext]"
> 			resolver="development"
> 			pubrevision="1.0.0.0" 
> 			pubdate="${NOW_US}"
> 			overwrite="true" 
> 			conf="debug"
> 		/>
>     </target>
> </publish>
> {code}
> I have the following ivysettings.xml:
> {code:xml}
> <ivysettings>
>     <property name="repo.dir" value="\\titan.englab.local\Users\mfancy\ivyRepo"/>
> 	
>     <settings defaultResolver="development"/>
> 	
>     <resolvers>
>         <filesystem name="development">
>             <ivy pattern="${repo.dir}/development/[organisation]/[module]/[revision]/ivy.xml" />
>             <artifact pattern="${repo.dir}/development/[organisation]/[module]/[revision]/[conf]/[artifact].[ext]" />
>         </filesystem>
>     </resolvers>
> </ivysettings>
> {code}
> I have the following ivy.xml:
> {code:xml}
> <ivy-module version="2.0">
>   <info organisation="ironmountain" module="HelloWorldCL" revision="1.0.0.0"/>
>   <configurations defaultconf="debug"> 
> 	<conf name="release"/>
> 	<conf name="debug"/>
>   </configurations>
>   <publications>
>     <artifact name="HelloWorldCL" ext="dll" type="dll" conf="debug,release"/>
>     <artifact name="HelloWorldCL" ext="pdb" type="pdb" conf="debug,release"/>
>   </publications>
> </ivy-module>
> {code}
> When I run "ant publish" I get the following structure in my repository.
> {code}
> development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml
> development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml.sha1
> development\ironmountain\HelloWorldCL\1.0.0.0\ivy.xml.md5
> development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll
> development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll.sha1
> development\ironmountain\HelloWorldCL\1.0.0.0\default\HelloWorldCL.dll.md5
> {code}
> I was expecting the "default" to be replaced by "debug" since it was specified with a switch on the ivy.publish target.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)