简体   繁体   中英

How to build a Grails Plugin and deploy it to local Ivy repository?

Is there a way to build a Grails Plugin and deploy the artifacts to the local Ivy repository?

With Maven, I would do this:

mvn install

Use the ivy publish task

<ivy:publish resolver="local" pubrevision="1.0">
   <artifacts pattern="build/[artifact].[ext]" />
</ivy:publish>

Note 1

Your ivy file must list the artifacts you plan to publish

<ivy-module version="2.0">
  <info organisation="myorg" module="mymodule"/>
  <publications>
    <artifact name="mymodule" type="zip"/>
  </publications>
</ivy-module>

Maven derives this information from the module declaration in the POM file. One of the advantages of using ivy is that you can publish more than one artifact.

Note 2

The ivy local repository is located in the following location by default:

${user.dir}/.ivy2/local

You can of course create your own custom repositories by declaring alternative resolvers in you settings file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM