Note that there are some explanatory texts on larger screens.

plurals
  1. POGradle: Can not find package in build
    primarykey
    data
    text
    <p>I'm just new to Gradle, and I have a small problem with it. I'm trying to build two projects (called 'infrastructure' and 'domain'), where domain has some imports from infrastructure.</p> <p>When I try to build both projects, Gradle can't compile my domain project, because he can't find a package from infrastructure.</p> <p>This is my build.gradle:</p> <pre><code>subprojects{ apply plugin: 'java' springversion = '3.0.4.RELEASE' hibernateversion = '3.4.0.GA' jsfversion = '2.0.3' projectid = 'com.companyName.projectName' projectversion = '1.0.0-SNAPSHOT' repositories { mavenRepo urls: 'file:///C:/companyName/m2repo' mavenCentral() } dependencies { compile group: 'commons-configuration', name: 'commons-configuration', version: '1.6' compile group: 'sample.plugin', name: 'hsqldb-maven-plugin', version: '1.0-SNAPSHOT' testCompile group: 'junit', name: 'junit', version: '4.8.2' testCompile group: 'org.mockito', name: 'mockito-core', version: '1.8.0' testCompile group: 'org.springframework', name: 'spring-test', version: springversion compile group: 'org.springframework', name: 'spring-context', version: springversion compile group: 'org.springframework', name: 'spring-orm', version: springversion compile group: 'org.springframework', name: 'spring-web', version: springversion compile group: 'org.hibernate', name: 'hibernate-annotations', version: hibernateversion compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: hibernateversion compile group: 'org.hibernate', name: 'ejb3-persistence', version: '1.0.2.GA' compile group: 'javax.enterprise', name: 'cdi-api', version: '1.0-CR1' compile group: 'com.sun.faces', name: 'jsf-api', version: jsfversion compile group: 'commons-lang', name: 'commons-lang', version: '2.5' runtime group: 'org.slf4j', name: 'slf4j-api', version: '1.5.6' runtime group: 'org.slf4j', name: 'slf4j-jdk14', version: '1.5.6' runtime group: 'org.hsqldb', name: 'hsqldb', version: '1.8.0.10' runtime group: 'commons-dbcp', name: 'commons-dbcp', version: '1.2.2' runtime group: 'org.aspectj', name: 'aspectjweaver', version: '1.6.2' } } project (':infrastructure'){ task intTestJar(type: Jar) { from sourceSets.main.classes from sourceSets.test.classes } } project(':domain'){ compileJava.dependsOn (':infrastructure:intTestJar') } </code></pre> <p>In my settings.gradle, I've declared this:</p> <pre><code>include 'infrastructure', 'domain' </code></pre> <p>Both projects should be built to a .jar file.</p> <p>When try to build the projects, this error is shown when he is running domain:compileTestJava</p> <pre><code>package com.companyName.projectName.test does not exist </code></pre> <p>This package refers to my infrastructure project. In eclipse it works, but I can't build it with gradle.</p> <p>Any help would be appreciated.</p> <p>Regards,</p> <p>Walle</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload