Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8781

@Grab unable to download jar library because maven repository contain ${packaging.type}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.2
    • None
    • Grape
    • None
    • Important

    Description

       Actual:
      @Grab unable to download jar library because maven repository contain ${packaging.type}

      Code example

      @Grab('org.apache.camel:camel-core:2.22.0')
      @Grab('org.apache.camel:camel-quartz2:2.22.0')
      @Grab('org.apache.camel:camel-telegram:2.22.0')
      @Grab('org.slf4j:slf4j-simple:1.7.25')
      
      import org.apache.camel.*
      import org.apache.camel.impl.*
      import org.apache.camel.builder.*
      import org.apache.camel.component.slack.*
      import org.apache.camel.util.jndi.JndiContext
      import org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy
      
      def camelContext = new DefaultCamelContext()
      def gpioIrrigation = '/sys/class/gpio/gpio16/value'
      
      'echo 16 > /sys/class/gpio/export'.execute()
      'echo "out" > /sys/class/gpio/gpio16/direction'.execute()
      //0+*+*+?+*+* every min
      
      camelContext.addRoutes(new RouteBuilder() {
       def void configure() {
       getContext().getGlobalOptions().put(Exchange.LOG_EIP_NAME, 'irrigation');
       from('quartz2://quartz2Test?cron=0+0+*/3+?+*+*').routeId("irrigation")
       .log('Irrigation started')
       .transform()
       .simple('1')
       .to("file:?fileName=$gpioIrrigation&autoCreate=true") 
       .delay(6000)
       .transform()
       .simple('0')
       .to("file:?fileName=$gpioIrrigation&autoCreate=true")
       .transform()
       .simple('Irrigation done')
       .to("telegram:bots/xxx?chatId=-xxx")
       .log('Irrigation done')
       .to("mock:success")
       }
      })
      camelContext.start()
      
      addShutdownHook{ camelContext.stop() }
      synchronized(this){ this.wait() }
      

       

      @Grab('org.apache.camel:camel-telegram:2.22.0') work only with -Dpackaging.type=jar

      problem with package type ${packaging.type}

      https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api/2.1

      https://github.com/452/groovy-raspberry

      Attachments

        1. Selection_008.png
          270 kB
          Ihor Lavryniuk

        Activity

          People

            Unassigned Unassigned
            452 Ihor Lavryniuk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: