# Compiling with module dependency not working

**URL:** https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230
**Category:** Uncategorized
**Created:** [June 18, 2015, 7:06pm UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230 "2015-06-18T19:06:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jvskriubakken](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/jvskriubakken/32/1430_2.png) [@jvskriubakken](https://discuss.kotlinlang.org/u/jvskriubakken)
#### Post date: [June 18, 2015, 7:06pm UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230/1 "2015-06-18T19:06:48Z")

</div>

Hi everyone!

I’m having a Kotlin Javascript project where I’ve devided the my kotlin code into two modules. I’m building my project with maven and I’ve created a depency from the one module the other, however it’s not compiling.  
Is this supported?

I’ve created an example project where it’s occuring:  
[https://github.com/jvskriubakken/kotlin-js](https://github.com/jvskriubakken/kotlin-js)

Maven build log:

[INFO] Scanning for projects…  
[INFO] ------------------------------------------------------------------------  
[INFO] Reactor Build Order:  
[INFO]  
[INFO] kotlin-javascript  
[INFO] kotlin-js-common  
[INFO] kotlin-js-example  
[INFO] kotlin-webapp  
[INFO]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  
[INFO] ------------------------------------------------------------------------  
[INFO] Building kotlin-javascript 1.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] — maven-install-plugin:2.3.1:install (default-install) @ kotlin-javascript —  
[INFO] Installing /Users/joerunds/Code/kotlin-js/pom.xml to /Users/joerunds/.m2/repository/no/logiq/kotlin/javascript/kotlin-javascript/1.0-SNAPSHOT/kotlin-javascript-1.0-SNAPSHOT.pom  
[INFO]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  
[INFO] ------------------------------------------------------------------------  
[INFO] Building kotlin-js-common 1.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] — maven-antrun-plugin:1.3:run (ensure-target-classes-dir-before-kotlin-compile) @ kotlin-js-common —  
[INFO] Executing tasks  
[INFO] Executed tasks  
[INFO]  
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ kotlin-js-common —  
[debug] execute contextualize  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ kotlin-js-common —  
[INFO] Nothing to compile - all classes are up to date  
[INFO]  
[INFO] — kotlin-maven-plugin:0.12.200:js (compile) @ kotlin-js-common —  
[info] Kotlin Compiler version 0.12.200  
[info] Compiling Kotlin sources from [/Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/kotlin]  
[debug] libraryFiles: [/Users/joerunds/.m2/repository/org/jetbrains/kotlin/kotlin-js-library/0.12.200/kotlin-js-library-0.12.200.jar]  
[debug] Output:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/target/classes/../../js/kotlin-js-common.js  
Sources:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/kotlin/no/logiq/common/Common.kt  
[debug] Output:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/target/classes/../../js/kotlin-js-common.meta.js  
Sources:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/kotlin/no/logiq/common/Common.kt  
[INFO]  
[INFO] — maven-dependency-plugin:2.1:unpack (unpack) @ kotlin-js-common —  
[INFO] Configured Artifact: org.jetbrains.kotlin:kotlin-js-library:0.12.200:jar  
[INFO] kotlin-js-library-0.12.200.jar already unpacked.  
[INFO]  
[INFO] — maven-resources-plugin:2.5:testResources (default-testResources) @ kotlin-js-common —  
[debug] execute contextualize  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joerunds/Code/kotlin-js/kotlin-js-common/src/test/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ kotlin-js-common —  
[INFO] No sources to compile  
[INFO]  
[INFO] — maven-surefire-plugin:2.10:test (default-test) @ kotlin-js-common —  
[INFO] No tests to run.  
[INFO] Surefire report directory: /Users/joerunds/Code/kotlin-js/kotlin-js-common/target/surefire-reports

* * *

## T E S T S

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]  
[INFO] — maven-jar-plugin:2.3.2:jar (default-jar) @ kotlin-js-common —  
[INFO]  
[INFO] — maven-install-plugin:2.3.1:install (default-install) @ kotlin-js-common —  
[INFO] Installing /Users/joerunds/Code/kotlin-js/kotlin-js-common/target/kotlin-js-common-1.0-SNAPSHOT.jar to /Users/joerunds/.m2/repository/no/logiq/kotlin/javascript/kotlin-js-common/1.0-SNAPSHOT/kotlin-js-common-1.0-SNAPSHOT.jar  
[INFO] Installing /Users/joerunds/Code/kotlin-js/kotlin-js-common/pom.xml to /Users/joerunds/.m2/repository/no/logiq/kotlin/javascript/kotlin-js-common/1.0-SNAPSHOT/kotlin-js-common-1.0-SNAPSHOT.pom  
[INFO]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  
[INFO] ------------------------------------------------------------------------  
[INFO] Building kotlin-js-example 1.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] — maven-antrun-plugin:1.3:run (ensure-target-classes-dir-before-kotlin-compile) @ kotlin-js-example —  
[INFO] Executing tasks  
[INFO] Executed tasks  
[INFO]  
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ kotlin-js-example —  
[debug] execute contextualize  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ kotlin-js-example —  
[INFO] Nothing to compile - all classes are up to date  
[INFO]  
[INFO] — kotlin-maven-plugin:0.12.200:js (compile) @ kotlin-js-example —  
[info] Kotlin Compiler version 0.12.200  
[info] Compiling Kotlin sources from [/Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/kotlin]  
[warn] artifact no.logiq.kotlin.javascript:kotlin-js-common:jar:1.0-SNAPSHOT:compile is not a Kotlin Javascript Library  
[debug] libraryFiles: [/Users/joerunds/.m2/repository/org/jetbrains/kotlin/kotlin-js-library/0.12.200/kotlin-js-library-0.12.200.jar]  
[error] /Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/kotlin/no/logiq/kotlin/Task.kt: (3, 17) Unresolved reference: common  
[error] /Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/kotlin/no/logiq/kotlin/Task.kt: (5, 39) Unresolved reference: Common

Anyone knows what I could be doing wrong?

PS: My project compiled before introducing the common module and the depenency on it.

---

<div class="post-metadata">

### Author: ![Michael.Nedzelsky](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@Michael.Nedzelsky](https://discuss.kotlinlang.org/u/Michael.Nedzelsky)
#### Post date: [June 23, 2015, 10:25am UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230/2 "2015-06-23T10:25:52Z")

</div>

It seems the problem is in kotlin-js-common/pom.xml --- it produced an archive without JS files in it, so kotlin js compiler doesn't recognize it as a valid Kotlin JavaScript library.

```kotlin
[INFO] Building kotlin-js-example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
...............................................................
[info] Kotlin Compiler version 0.12.200
[info] Compiling Kotlin sources from [/home/michaeln/mygithub/kotlin-js/kotlin-js-example/src/main/kotlin]
[warn] artifact no.logiq.kotlin.javascript:kotlin-js-common:jar:1.0-SNAPSHOT:compile is not a Kotlin Javascript Library
```

pom.xml contains lines

```kotlin
                   <phase>compile</phase>
                   <goals>
                           <goal>js</goal>
                   </goals>
                   <configuration>
                           <outputFile>${project.build.outputDirectory}/../../js/${project.artifactId}.js</outputFile>
                           <metaFile>${project.build.outputDirectory}/${project.artifactId}.meta.js</metaFile>
                   </configuration>
```

but now meta file should also be created in the same directory which contains translated JS file. Option \<metaFile\> now is boolean and is true by default.

---

<div class="post-metadata">

### Author: ![jvskriubakken](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/jvskriubakken/32/1430_2.png) [@jvskriubakken](https://discuss.kotlinlang.org/u/jvskriubakken)
#### Post date: [June 24, 2015, 9:44am UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230/3 "2015-06-24T09:44:03Z")

</div>

Hi Michael and thanks your answer!

I’ve now changed metaFile = path to be metaInfo = true  
See:  
[https://github.com/jvskriubakken/kotlin-js/commit/1e4e9bc8a5764f008ded4436e36c31af2d9849fe](https://github.com/jvskriubakken/kotlin-js/commit/1e4e9bc8a5764f008ded4436e36c31af2d9849fe)

But I still have problems compiling

[INFO] Scanning for projects…  
[INFO] ------------------------------------------------------------------------  
[INFO] Reactor Build Order:  
[INFO]  
[INFO] kotlin-javascript  
[INFO] kotlin-js-common  
[INFO] kotlin-js-example  
[INFO] kotlin-webapp  
[INFO]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  
[INFO] ------------------------------------------------------------------------  
[INFO] Building kotlin-javascript 1.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] — maven-install-plugin:2.3.1:install (default-install) @ kotlin-javascript —  
[INFO] Installing /Users/joerunds/Code/kotlin-js/pom.xml to /Users/joerunds/.m2/repository/no/logiq/kotlin/javascript/kotlin-javascript/1.0-SNAPSHOT/kotlin-javascript-1.0-SNAPSHOT.pom  
[INFO]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  
[INFO] ------------------------------------------------------------------------  
[INFO] Building kotlin-js-common 1.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] — maven-antrun-plugin:1.3:run (ensure-target-classes-dir-before-kotlin-compile) @ kotlin-js-common —  
[INFO] Executing tasks  
&nbsp;&nbsp;[mkdir] Created dir: /Users/joerunds/Code/kotlin-js/kotlin-js-common/target/classes  
[INFO] Executed tasks  
[INFO]  
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ kotlin-js-common —  
[debug] execute contextualize  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ kotlin-js-common —  
[INFO] Nothing to compile - all classes are up to date  
[INFO]  
[INFO] — kotlin-maven-plugin:0.12.200:js (compile) @ kotlin-js-common —  
[info] Kotlin Compiler version 0.12.200  
[info] Compiling Kotlin sources from [/Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/kotlin]  
[debug] libraryFiles: [/Users/joerunds/.m2/repository/org/jetbrains/kotlin/kotlin-js-library/0.12.200/kotlin-js-library-0.12.200.jar]  
[debug] Output:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/target/classes/../../js/kotlin-js-common.js  
Sources:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/kotlin/no/logiq/common/Common.kt  
[debug] Output:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/target/classes/../../js/kotlin-js-common.meta.js  
Sources:  
/Users/joerunds/Code/kotlin-js/kotlin-js-common/src/main/kotlin/no/logiq/common/Common.kt  
[INFO]  
[INFO] — maven-dependency-plugin:2.1:unpack (unpack) @ kotlin-js-common —  
[INFO] Configured Artifact: org.jetbrains.kotlin:kotlin-js-library:0.12.200:jar  
[INFO] Unpacking /Users/joerunds/.m2/repository/org/jetbrains/kotlin/kotlin-js-library/0.12.200/kotlin-js-library-0.12.200.jar to  
&nbsp;&nbsp;/Users/joerunds/Code/kotlin-js/kotlin-js-common/target/classes/../../js  
&nbsp;&nbsp;with includes \*.js and excludes:null  
[INFO]  
[INFO] — maven-resources-plugin:2.5:testResources (default-testResources) @ kotlin-js-common —  
[debug] execute contextualize  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joerunds/Code/kotlin-js/kotlin-js-common/src/test/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ kotlin-js-common —  
[INFO] No sources to compile  
[INFO]  
[INFO] — maven-surefire-plugin:2.10:test (default-test) @ kotlin-js-common —  
[INFO] No tests to run.  
[INFO] Surefire report directory: /Users/joerunds/Code/kotlin-js/kotlin-js-common/target/surefire-reports

* * *

## T E S T S

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]  
[INFO] — maven-jar-plugin:2.3.2:jar (default-jar) @ kotlin-js-common —  
[INFO] Building jar: /Users/joerunds/Code/kotlin-js/kotlin-js-common/target/kotlin-js-common-1.0-SNAPSHOT.jar  
[INFO]  
[INFO] — maven-install-plugin:2.3.1:install (default-install) @ kotlin-js-common —  
[INFO] Installing /Users/joerunds/Code/kotlin-js/kotlin-js-common/target/kotlin-js-common-1.0-SNAPSHOT.jar to /Users/joerunds/.m2/repository/no/logiq/kotlin/javascript/kotlin-js-common/1.0-SNAPSHOT/kotlin-js-common-1.0-SNAPSHOT.jar  
[INFO] Installing /Users/joerunds/Code/kotlin-js/kotlin-js-common/pom.xml to /Users/joerunds/.m2/repository/no/logiq/kotlin/javascript/kotlin-js-common/1.0-SNAPSHOT/kotlin-js-common-1.0-SNAPSHOT.pom  
[INFO]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  
[INFO] ------------------------------------------------------------------------  
[INFO] Building kotlin-js-example 1.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] — maven-antrun-plugin:1.3:run (ensure-target-classes-dir-before-kotlin-compile) @ kotlin-js-example —  
[INFO] Executing tasks  
&nbsp;&nbsp;[mkdir] Created dir: /Users/joerunds/Code/kotlin-js/kotlin-js-example/target/classes  
[INFO] Executed tasks  
[INFO]  
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ kotlin-js-example —  
[debug] execute contextualize  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ kotlin-js-example —  
[INFO] Nothing to compile - all classes are up to date  
[INFO]  
[INFO] — kotlin-maven-plugin:0.12.200:js (compile) @ kotlin-js-example —  
[info] Kotlin Compiler version 0.12.200  
[info] Compiling Kotlin sources from [/Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/kotlin]  
[warn] artifact no.logiq.kotlin.javascript:kotlin-js-common:jar:1.0-SNAPSHOT:compile is not a Kotlin Javascript Library  
[debug] libraryFiles: [/Users/joerunds/.m2/repository/org/jetbrains/kotlin/kotlin-js-library/0.12.200/kotlin-js-library-0.12.200.jar]  
[INFO] ------------------------------------------------------------------------  
[INFO] Reactor Summary:  
[INFO]  
[INFO] kotlin-javascript … SUCCESS [0.178s]  
[INFO] kotlin-js-common … SUCCESS [2.860s]  
[INFO] kotlin-js-example … FAILURE [0.244s]  
[INFO] kotlin-webapp … SKIPPED  
[INFO] ------------------------------------------------------------------------  
[INFO] BUILD FAILURE  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 3.395s  
[INFO] Finished at: Wed Jun 24 11:41:30 CEST 2015  
[error] /Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/kotlin/no/logiq/kotlin/Task.kt: (3, 17) Unresolved reference: common  
[error] /Users/joerunds/Code/kotlin-js/kotlin-js-example/src/main/kotlin/no/logiq/kotlin/Task.kt: (5, 39) Unresolved reference: Common  
[INFO] Final Memory: 17M/322M  
[INFO] ------------------------------------------------------------------------

Maybe I do not understand what you are saying here: “but now meta file should also be created in the same directory which contains translated JS file”?

Looking forward to if anyone could help with understanding this.

Jørund

---

<div class="post-metadata">

### Author: ![Michael.Nedzelsky](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@Michael.Nedzelsky](https://discuss.kotlinlang.org/u/Michael.Nedzelsky)
#### Post date: [June 24, 2015, 11:20am UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230/4 "2015-06-24T11:20:01Z")

</div>

Hi Jørund!

Let’s take a look at kotlin-js-common.

pom.xml contains the following lines:

```kotlin
                   <goals>
                           <goal>js</goal>
                   </goals>
                   <configuration>
                           <outputFile>${project.build.outputDirectory}/…/…/js/${project.artifactId}.js</outputFile>
                           <metaInfo>true</metaInfo>
                   </configuration>
```

We see that kotlin-js-common.js and kotlin-js-common.meta.js will be placed into kotlin-js-common/js, outside of target directory.  
The resulting jar target/kotlin-js-common-1.0-SNAPSHOT.jar doesn’t contain nor kotlin-js-common.js&nbsp;&nbsp;neither kotlin-js-common.meta.js.

It seems you can use something like the following in order to fix build  
[https://github.com/MichaelNedzelsky/kotlin-js/commit/533995f6b93f49e013b9b1a60ff203adc1f218a9](https://github.com/MichaelNedzelsky/kotlin-js/commit/533995f6b93f49e013b9b1a60ff203adc1f218a9)

Michael Nedzelsky

---

<div class="post-metadata">

### Author: ![jvskriubakken](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/jvskriubakken/32/1430_2.png) [@jvskriubakken](https://discuss.kotlinlang.org/u/jvskriubakken)
#### Post date: [June 26, 2015, 8:43am UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230/5 "2015-06-26T08:43:55Z")

</div>

Thanks a lot Michael for your time!

I pulled your pull request and it looks promising, since it now compiled successfully, but however it failed runtime.  
See attached picture.  
Would you be able to see what’s wrong?

 ![/uploads/kotlinlang/original/1X/1eb551332a94a3bd7f3de2de3e1f4d37df42cc1f.png](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/1X/1eb551332a94a3bd7f3de2de3e1f4d37df42cc1f.png)

---

<div class="post-metadata">

### Author: ![jvskriubakken](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/jvskriubakken/32/1430_2.png) [@jvskriubakken](https://discuss.kotlinlang.org/u/jvskriubakken)
#### Post date: [June 26, 2015, 9:04am UTC](https://discuss.kotlinlang.org/t/compiling-with-module-dependency-not-working/230/6 "2015-06-26T09:04:13Z")

</div>

Hello again!

Sorry, my blind mistake. Did not see that I had to add a reference to the common js file in my index.html.

Thanks a lot for your time. It was really helpful. I would never have guesses this my self.

Jørund
