Further to my previous post on the subject, I am still having real trouble
publishing a simple artifact.
I use XMLbeans to create a jar file from an XSD.
<target name="generateXMLbeansSource" depends=
"createRootFolders,ivy-retrieve">
<property name="xmlbeansjarname" value="myjar.jar" />
<mkdir dir="${srclocation}" />
<taskdef name="xmlbean" classname=
"org.apache.xmlbeans.impl.tool.XMLBean" classpathref="compile.classpath" />
<xmlbean download="false" srcgendir="${srclocation}" destfile=
"${xmlbeansjar.dir}/${xmlbeansjarname}" classpathref="compile.classpath"
debug="true" srconly="false">
<fileset dir="${schemaslocation}" includes=
"ResultWSI.wsdl" />
</xmlbean>
</target>
This runs OK, I now have a jar file called myjar.jar
I create a dist directory and copy the jar and my ivy file into it:
<property name="target.jar" value=
"${ivy.module}-${ivy.revision}.jar" />
<property name="ivy.revision" value="${timestamp}" />
<target name="jar" depends="ivy-init,generateXMLbeansSource">
<mkdir dir="${dist.dir}" />
<copy file="${xmlbeansjar.dir}/${xmlbeansjarname}" tofile=
"${dist.dir}/${target.jar}" />
<copy includeemptydirs="false" file="ivy.xml" tofile=
"${dist.dir}/ivy-${ivy.revision}.xml" />
</target>
My ivy file is:
<ivy-module version="2.0">
<info organisation="net.targetgroup" module=
"net.targetgroup.CentracResultIntegrationResultSchemas" status=
"integration" />
<configurations>
<conf name="compile" visibility="public" />
</configurations>
<publications>
<artifact />
</publications>
<dependencies>
<dependency org="org.apache.xmlbeans" name=
"com.springsource.org.apache.xmlbeans" rev="2.4.0" conf="compile->compile"
/>
<dependency org="javax.xml.stream" name=
"com.springsource.javax.xml.stream" rev="1.0.1" conf="compile->compile"/>
</dependencies>
</ivy-module>
I then try and publish:
<target name="ivy-publish" depends="jar">
<ivy:publish resolver="teamivy" warnonmissing="false"
overwrite="true" update="true" artifactspattern=
"${dist.dir}/[artifact]-[revision].[ext]" />
<delete dir="${dist.dir}" />
</target>
and get this:
jar:
[mkdir] Created dir:
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\dist
[copy] Copying 1 file to
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\dist
[copy] Copying
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\nonivyjars\resultWebService.jar
to
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\dist\net.targetgroup.CentracResultIntegrationResultSchemas-20090129113808.jar
[copy] Copying 1 file to
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\dist
[copy] Copying
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\ivy.xml
to
C:\workspaces\centracresultintegrationv1\centracresultintegrationresultschemas\dist\[email protected]
ivy-publish:
Overriding previous definition of property ivy.version
Overriding previous definition of property ivy.version
[property] Loading C:\DOCUME~1\pauln\LOCALS~1\Temp\delivery.properties
[property] Unable to find property file:
C:\DOCUME~1\pauln\LOCALS~1\Temp\delivery.properties
:: delivering ::
net.targetgroup#net.targetgroup.CentracResultIntegrationResultSchemas;work...@cd01571n
:: 20090129113812 :: integration :: Thu Jan 29 11:38:12 GMT 2009
delivering ivy file to
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\dist\ivy-20090129113812.xml
:: publishing ::
net.targetgroup#net.targetgroup.CentracResultIntegrationResultSchemas
BUILD FAILED
C:\workspaces\CentracResultIntegrationV1\CentracResultIntegrationResultSchemas\build.xml:72:
impossible to publish artifacts for
net.targetgroup#net.targetgroup.CentracResultIntegrationResultSchemas;work...@cd01571n:
java.io.IOException
: missing artifact
net.targetgroup#net.targetgroup.CentracResultIntegrationResultSchemas;20090129113812!net.targetgroup.CentracResultIntegrationResultSchemas.ja
r
at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:318)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
at org.apache.tools.ant.UnknownElement.execute(
UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(
Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
DefaultExecutor.java:40)
at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(
EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(
InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(
InternalAntRunner.java:137)
Caused by: java.io.IOException: missing artifact
net.targetgroup#net.targetgroup.CentracResultIntegrationResultSchemas;20090129113812!net.targetgroup.CentracResultIntegrationResultSchemas.jar
at org.apache.ivy.core.publish.PublishEngine.publish(
PublishEngine.java:226)
at org.apache.ivy.core.publish.PublishEngine.publish(
PublishEngine.java:170)
at org.apache.ivy.Ivy.publish(Ivy.java:600)
at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
... 12 more
Any ideas ?
Target
www.targetgroup.net
Target is a trading name of Target Group Limited,
registered in England and Wales No. 1208137
Registered office: Target House, Cowbridge Road East, Cardiff CF11 9AU
**********************************************************************
DISCLAIMER.
This message is intended only for the use of the Addressee and may
contain information that is PRIVILEGED and CONFIDENTIAL.
If you are not the intended recipient you must not copy,
distribute or take any action or reliance upon it.
The content of this message may also contain personal
views of an employee of this company and does
not necessarily represent the view of the company.
**********************************************************************
This message has been scanned by Norton Anti-Virus.
It has also been scanned by MAILsweeper to enforce our e-mail
policy. If you have any concerns or comments about the content
of this message, please e-mail [email protected].
**********************************************************************
_____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com