I am attempting to create the java-client library using an enunciate v1.26.2 ant task. The problem is that every time I attempt to do this, I get this warning message:
WARNING: Unknown artifact 'java.client.library'. Artifact will not be exported.
I've checked that the java-client enunciate jar is on the class path and enunciate even says that it has found it in the output.
enun:
Loading modules from the specified classpath....
Discovered module docs
Discovered module java-client
...
So I'm not sure what to do exactly. I have tried googling to find that SO only has a few questions for enunciate, and none seem to answer my question. This is my ant script with relevant lines:
<path id="enunciate.classpath">
<fileset dir="${lib.enunciate.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${java.home}">
<include name="lib/tools.jar"/>
</fileset>
</path>
<taskdef name="enunciate" classname="org.codehaus.enunciate.main.EnunciateTask">
<classpath refid="enunciate.classpath"/>
</taskdef>
<target name="enun" description="Run enunicate task on the rest services">
<enunciate basedir="${src.web.java.dir}">
<include name="**/*.java"/>
<classpath refid="enunciate.classpath"/>
<export artifactId="java.client.library" destination="${dist.client.dir}/rest/" />
<export artifactId="docs" destination="${dist.docs.rest.dir}/"/>
<javacArgument argument="-g"/>
</enunciate>
</target>
Note: The docs export gets called and exports correctly with no problems. The code that is included compiles with no problem. I just can't seem to discover why the ant script doesn't want to export the java-client library. I've tried changing the name of the artifactId to several different values, including: java.client.library.binaries, java-client.library, enunciate-java-client, and all manner of other things with no end result. I have tried to use an enunciate.xml config file, which didn't seem to help. Here is the xml I tried to use:
<?xml version="1.0"?>
<enunciate label="full" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.26.xsd">
<modules>
<java-client disabled="false" disableCompile="false" jarName="foo.jar"/>
<docs disabled="false" docsDir="dist/docs/rest/"/>
</modules>
</enunciate>