Rob Evans (robevans) wrote:

Folks,

I've not a clue where to go with this. I can run the simulate goal on
the hello tutorial just fine but it fails on my project. My component is
building and running ok otherwise.



The problem is an class incompatability. Your running a very recent version of Melin with an old version of the Avalon Meta package. I've attached a maven.xml file that contains a script to bring your version of the avalon-meta plugin up-to-date. Add the maven.xml alongside you project.xml - then invoke the following command:


$ maven avalon:setup

The scrip will update you avalon-meta plugin to the latest version.

Cheers, Steve.







--

Stephen J. McConnell
mailto:[EMAIL PROTECTED]

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|



<project default="avalon:plugin"  xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant">

  <ant:property name="meta.plugin.version" value="1.2"/>
  <ant:property name="meta.plugin.groupId" value="avalon-meta"/>   
  <ant:property name="meta.plugin.artifactId" value="avalon-meta-plugin"/>   
  <ant:property name="meta.plugin.jar" 
    value="${meta.plugin.artifactId}-${meta.plugin.version}.jar"/>   

  <goal name="avalon:setup">
    <echo>
Initiating download and installation of the Avalon Meta Plugin.
${meta.plugin.artifactId}-${meta.plugin.version}.jar</echo>
    <j:set var="repoList">${maven.repo.remote}</j:set> 
    <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize> 
    <j:forEach var="repo" items="${repos}"> 
      <echo>repository '${repo}'</echo> 
      <util:file var="localPlugin" name="${maven.home}/plugins/${meta.plugin.artifactId}-${meta.plugin.version}.jar" /> 
      <j:if test="${!localPlugin.exists()}"> 
        <j:set var="remoteFile" value="${repo}/${meta.plugin.groupId}/plugins/${meta.plugin.artifactId}-${meta.plugin.version}.jar" /> 
        <echo>trying to download ${remoteFile}</echo> 
        <j:catch var="ex"> 
        <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils"> 
          <j:arg type="java.lang.String" value="${remoteFile}" /> 
          <j:arg type="java.io.File" value="${localPlugin}"/> 
          <j:arg type="boolean" value="false"/> 
          <j:arg type="boolean" value="true"/> 
          <j:arg type="java.lang.String" value="${maven.proxy.host}" /> 
          <j:arg type="java.lang.String" value="${maven.proxy.port}" /> 
          <j:arg type="java.lang.String" value="${maven.proxy.username}" /> 
          <j:arg type="java.lang.String" value="${maven.proxy.password}" /> 
          <j:arg type="boolean" value="false"/> 
        </j:invokeStatic> 
        </j:catch> 
      </j:if> 
      <j:break test="${localPlugin.exists()}"/> 
    </j:forEach>
    <j:set var="downloaded" value="${localPlugin.exists()}"/> 
    <j:if test="${!downloaded}"> 
      <ant:fail message="Unable to find plug-in" /> 
    </j:if> 
    <j:if test="${downloaded}">
      <ant:move file="${localPlugin}" toFile="tmp.jar"/>
      <echo>Plugin downloaded, removing other versions</echo> 
      <delete verbose="false"> 
        <fileset dir="${maven.home}/plugins">
          <include name="${meta.plugin.artifactId}-*.jar" /> 
          <exclude name="${meta.plugin.artifactId}-${meta.plugin.version}.jar" /> 
        </fileset> 
      </delete> 
      <delete includeEmptyDirs="true" verbose="false"> 
        <fileset dir="${maven.plugin.unpacked.dir}"> 
          <include name="*.cache"/> 
          <include name="**/.processed" /> 
          <include name="${meta.plugin.artifactId}-*/**" /> 
        </fileset>
      </delete>
      <ant:move file="tmp.jar" toFile="${localPlugin}"/>
    </j:if> 
  </goal>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to