mulesoft-labs/mule-gradle-plugin

Dependent project classes are not built to mule project

Closed this issue · 2 comments

Hi, i noticed my dependent projects, built with:
dependencies {
compile project(':Shared')
compile project(':DragonDto')
are not build into the mule zip. Is there a way for the plugin to do this - or should i do it myself?

@gilbertg

This might be a bug, I'd need to investigate further. You should be able to work-around it however if you publish i.e to maven local and depend on the maven coordinates of your project instead of the project itself.

@gilbertg

I have tried to reproduce the issue but it is working for me, this is the build file I have for the multi-module project:

buildscript {
    dependencies {
        classpath group: 'org.mulesoft.build', name: 'mule-gradle-plugin', version: '1.2.2'
    }

    repositories {
        maven {
            url 'http://repository.mulesoft.org/releases'
        }
    }
}

project(':integration') {
    apply plugin: 'mulestudio'

    mule.muleEnterprise = false
    mule.version = '3.6.0'

    dependencies {
        compile project(':library')
    }
}

project(':library') {
    apply plugin: 'java'
    apply plugin: 'eclipse'
}

This is my settings.gradle:

include 'library', 'integration'

And these are the contents of my mule zip file:

➜  build  unzip -l integration.zip 
Archive:  integration.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  07-05-15 19:17   META-INF/
       25  07-05-15 19:17   META-INF/MANIFEST.MF
        0  07-05-15 19:17   classes/
      395  07-05-15 19:17   classes/log4j2.xml
        0  07-05-15 19:17   lib/
     1028  07-05-15 19:17   lib/library.jar
      841  07-05-15 19:00   globals.xml
       78  07-05-15 19:00   mule-app.properties
      966  07-05-15 19:10   mule-config.xml
      135  07-05-15 19:00   mule-deploy.properties
 --------                   -------
     3468                   10 files

I would encourage you to review your settings and check with newer versions of gradle. I'm using 2.4 to test, this might be a bug in the gradle version you're using.

If this is still a problem for you, please try and generate a reproducible sample app and re-open this ticket so I can do further investigation.