Maven GWT production deployment - 'may need to be (re)compiled' - java

Short summary: GWT compilation is running fine as part of a Bamboo plan, but the generated nocache.js contains the (re)compile message.
I'm running into a little trouble lately while changing the way the application is compiled and deployed.
Configuration:
- GWT 2.4.0
- Maven GWT plugin
- Bamboo
Running a GWT compilation on my machine everything is performing normally, can run both in dev mode and js mode.
Running a maven compilation (through eclipse - maven - run as - package) performs fine, nocache.js looks fine.
Running a command-line maven compilation on an XP machine or with a Solaris+Bamboo yields a wrong nocache.js, even though the generated htmls look ok. In fact, the *.cache.html are identical to the ones on my machine.
So the module.nocache.js on my machine contains the correct references to the uniquely named html files while the nocache.js on the affected machines(?) does not contain any such references.
GWT compiler launch options are identical on all machines. Target and war folders were cleaned on all machines.
A summary of the plan:
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # myproject ---
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # myproject ---
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # myproject ---
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # myproject ---
[INFO] --- maven-surefire-plugin:2.10:test (default-test) # myproject ---
[INFO] --- gwt-maven-plugin:2.4.0:compile (default) # myproject ---
[INFO] Compilation succeeded -- 639,969s
[INFO] --- maven-war-plugin:2.2:war (default-war) # myproject ---
[INFO] Packaging webapp
[INFO] Assembling webapp [myproject] in [.....\myproject\target\myproject-2.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [....\myproject\war]
[INFO] Webapp assembled in [14125 msecs]
[INFO] Building war: .....\myproject\target\myproject-2.0-SNAPSHOT.war
[INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) # myproject ---
[INFO] --- gwt-maven-plugin:2.4.0:test (default) # myproject ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) # myproject ---
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # myproject ---
Locally, in Eclipse, I've closed all projects except the one I'm compiling so all the dependencies are retrieved via maven. Eclipse is signalling a lot of error but I'm running from eclipse the maven goals clean and install and the result is again fine.
The resulting nocache.js files have the same time as the compilation time, they are not retrieved or left-over.
I'm stumped, somehow on the Bamboo machine the Maven GWT compile plugin has decided by its own to compile for development, I assume.
L.E.
Additional info, Bamboo build log. It seems to be using the standard linker and it looks the same as on the local machine:
build 06-Aug-2012 20:18:35 [INFO] Permutation 0 (strong name F96236D63A05E1D33308D4FE26EDA9F9) has an initial download size of 4937614 and total script size of 4937614
build 06-Aug-2012 20:18:35 [INFO] Invoking Linker RPC policy file manifest
build 06-Aug-2012 20:18:35 [INFO] Invoking Linker Standard
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker RPC log linker
build 06-Aug-2012 20:18:36 [INFO] Emitting RPC log files
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Export CompilationResult symbol maps
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Emit compile report artifacts
build 06-Aug-2012 20:18:36 [INFO] Permutation 1 (strong name B836CC45CC0786F0D04CEA25F7204F39) has an initial download size of 5220544 and total script size of 5220544
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker RPC policy file manifest
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Standard
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker RPC log linker
build 06-Aug-2012 20:18:36 [INFO] Emitting RPC log files
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Export CompilationResult symbol maps
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Emit compile report artifacts
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker RPC policy file manifest
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Standard
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker RPC log linker
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Export CompilationResult symbol maps
build 06-Aug-2012 20:18:36 [INFO] Invoking Linker Emit compile report artifacts
build 06-Aug-2012 20:18:36 [INFO] Linking Public artifacts into ....-SNAPSHOT
build 06-Aug-2012 20:18:36 [INFO] Linking Deploy artifacts into ....-SNAPSHOT/WEB-INF/deploy

Solved it, it was a nocache.js file that was commited some time ago by mistake. Because of it, the new nocache.js never got generated or did not overwrite it.
Not exactly sure on the details of how this happened but I will not investigate further, I'm adding this only for future reference.

Related

Cannot run OpenJFX's non modular maven sample

Title is pretty self explanatory, I've downloaded the non-modular maven sample code for JavaFX from OpenJFX (from here) and I can't run it.
It compiles without any error but when I try to run it I get this error
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.openjfx:hellofx >-------------------------
[INFO] Building hellofx 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:0.0.6:run (default-cli) > process-classes # hellofx >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # hellofx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # hellofx ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< javafx-maven-plugin:0.0.6:run (default-cli) < process-classes # hellofx <<<
[INFO]
[INFO]
[INFO] --- javafx-maven-plugin:0.0.6:run (default-cli) # hellofx ---
[INFO] Toolchain in javafx-maven-plugin null
[ERROR] Command execution failed.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.691 s
[INFO] Finished at: 2022-12-07T08:56:47+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.6:run (default-cli) on project hellofx: Error: Command execution failed. Cannot run program "java" (in directory "/home/johan/Desktop/hellofx"): error=2, No such file or directory -> [Help 1]
Any idea is appreciated as I don't even understand the Cannot run program Java part.
I ran the javafx:compile then the javafx:run in Maven.
Ensure your JAVA_HOME environmental variable is set correctly. This will allow the javafx-maven-plugin to find the correct java command needed to run your application.
Follow this guide, choosing the relevant section for your OS:
Set JAVA_HOME on Windows 7, 8, 10, Mac OS X, Linux
Also, use the current version of the maven JavaFX plugin, 0.0.8, though that is not your core issue.

Maven build skips clean and validate phases

I am using IntelliJ IDE. My project is maven project. What is bothering me is that when for example choose "Install" phase from Maven Toolbar and click "Run Maven Build",
the clean phase is not executed:
"C:\Program Files\Java\jdk-9.0.1\bin\java" -Dmaven.multiModuleProjectDirectory=A:\custom_software_projects\IdeaProjects\power_management "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2\lib\idea_rt.jar=53577:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.3.2 install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building power_server 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # power_server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # power_server ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # power_server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory A:\custom_software_projects\IdeaProjects\power_management\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # power_server ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # power_server ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # power_server ---
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (default) # power_server ---
[INFO] Building jar: A:\custom_software_projects\IdeaProjects\power_management\target\power_server-1.0-SNAPSHOT-jar-with-dependencies.jar
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:unpack-dependencies (unpack-sigar) # power_server ---
[INFO] log4j:log4j:jar:1.2.17 already exists in destination.
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # power_server ---
[INFO] Installing A:\custom_software_projects\IdeaProjects\power_management\target\power_server-1.0-SNAPSHOT.jar to C:\Users\ggeorgiev\.m2\repository\Power_Management_Server\power_server\1.0-SNAPSHOT\power_server-1.0-SNAPSHOT.jar
[INFO] Installing A:\custom_software_projects\IdeaProjects\power_management\pom.xml to C:\Users\ggeorgiev\.m2\repository\Power_Management_Server\power_server\1.0-SNAPSHOT\power_server-1.0-SNAPSHOT.pom
[INFO] Installing A:\custom_software_projects\IdeaProjects\power_management\target\power_server-1.0-SNAPSHOT-jar-with-dependencies.jar to C:\Users\ggeorgiev\.m2\repository\Power_Management_Server\power_server\1.0-SNAPSHOT\power_server-1.0-SNAPSHOT-jar-with-dependencies.jar
[INFO]
[INFO] --- maven-antrun-plugin:1.4:run (Copying jar-with-dependecnies and fixing LF in .sh scripts) # power_server ---
project.artifactId
[INFO] Executing tasks
[copy] Copying 1 file to A:\custom_programs\power_server
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.291 s
[INFO] Finished at: 2018-02-10T21:42:17+02:00
[INFO] Final Memory: 17M/56M
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0
So, as you see the first step taken is maven-resources-plugin:2.6:resources. From what I understood from maven docs is that when we specify a phase all previous phases are executed up to the chosen one. Per maven doc:
This command executes each default life cycle phase in order (validate, compile, package, etc.), before executing install. You only need to call the last build phase to be executed, in this case, install
Why is it skipping the clean and validate phases?
Edit:
I also have the clean phase in the Run Configuration section, but the result is the same:
Maven has 3 different builtin lifecycles
There are three built-in build lifecycles: default, clean and site.
install is part of the default lifecycle and there is no reason for clean to execute when you do install.
As to validate it has no built in binding as you can see here which means that it's not going to execute:
Furthermore, a build phase can also have zero or more goals bound to it. If a build phase has no goals bound to it, that build phase will not execute.
The default lifecycle does not include clean in it. Check the docs
Quote:
For example, the default lifecycle comprises of the following phases
(for a complete list of the lifecycle phases, refer to the Lifecycle
Reference):
validate - validate the project is correct and all necessary
information is available
compile - compile the source code of the
project
test - test the compiled source code using a suitable unit
testing framework. These tests should not require the code be packaged
or deployed
package - take the compiled code and package it in its
distributable format, such as a JAR.
verify - run any checks on
results of integration tests to ensure quality criteria are met
install - install the package into the local repository, for use as a
dependency in other projects locally
deploy - done in the build
environment, copies the final package to the remote repository for
sharing with other developers and projects.
Also, the validate phase is not associated with the default lifecycle of packaging .jar files.
Check the Default Lifecycle Bindings for JAR files at the bottom of the docs

Maven failing to assemble WAR - Java Heap Space Issue - Stanford Core NLP

So i'm getting this error when trying to Clean Install with Maven. I've attempted increasing MAVEN_OPTS with Xmx-512m or w/e it was called, similarly fiddled with Eclipse ini to increase heap space, but all of this to no avail, I keep getting this error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DiaryAppREST 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # DiaryAppREST ---
[INFO] Deleting C:\Users\Administrator\workspace\DiaryAppREST\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # DiaryAppREST ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Administrator\workspace\DiaryAppREST\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # DiaryAppREST ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Users\Administrator\workspace\DiaryAppREST\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # DiaryAppREST ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Administrator\workspace\DiaryAppREST\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) # DiaryAppREST ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # DiaryAppREST ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:3.0.0:war (default-war) # DiaryAppREST ---
[INFO] Packaging webapp
[INFO] Assembling webapp [DiaryAppREST] in [C:\Users\Administrator\workspace\DiaryAppREST\target\DiaryAppREST-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Administrator\workspace\DiaryAppREST\WebContent]
[INFO] Webapp assembled in [8913 msecs]
[INFO] Building war: C:\Users\Administrator\workspace\DiaryAppREST\target\DiaryAppREST-0.0.1-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.019 s
[INFO] Finished at: 2017-02-28T09:52:30+00:00
[INFO] Final Memory: 86M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.0.0:war (default-war) on project DiaryAppREST: Error assembling WAR: Problem creating war: Execution exception (and the archive is probably corrupt but I could not delete it): Java heap space -> [Help 1]
[ERROR]
I can't understand what is causing this, tried to find information online but can't seem to find this specific problem that anyone else is having. If anyone would be able to help i'd be very much appreciated.
Just figured it out,
Firstly, I had set MAVEN_OPTS incorrectly, I had them set as:
set MAVEN_OPTS="Xmx 512m"
After changing this to:
set MAVEN_OPTS="-Xmx512m"
You can also add this line into your profile (.profile, .bash_profile, etc) for this to be set in every terminal you open.
export MAVEN_OPTS="-Xmx512m"
And then went into the directory the project was in using CMD,
I ran:
mvn clean install -U
This seemed to do the trick and everything went successfully.
Hope this helps anyone else having problems!
I had the same issue running maven via ant from Jenkins on a Windows box.
The issue was how to pass the memory parameter. Here is the updated ant script showing how to pass the parameter "<jvmarg value="-Xmx1024m" />":
<target name="web.package" depends="init" if="warName">
<artifact:mvn mavenHome="${maven.home}" failonerror="true" fork="true">
<jvmarg value="-Dmaven.multiModuleProjectDirectory=$M2_HOME" />
<jvmarg value="-Xmx1024m" />
<arg value="package" />
<arg value="-Pwar" />
<arg value="-DwarName=${warName}" />
<arg value="-Denv=${env}" />
<arg value="-e" />
</artifact:mvn>
</target>
For info, here is the crash output:
[artifact:mvn] [INFO] Building war: D:\Jenkins\workspace\DEPLOY_SVN\atl_dev_trunk\src\tomcat\target\abc##6_4_6_0.war
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] BUILD FAILURE
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Total time: 01:50 min
[artifact:mvn] [INFO] Finished at: 2017-11-09T02:35:50+01:00
[artifact:mvn] [INFO] Final Memory: 99M/247M
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.0.0:war (default-war) on project abc: Error assembling WAR: Problem creating war: Execution exception (and the archive is probably corrupt but I could not delete it): Java heap space -> [Help 1]

Spring Boot - My unit tests are being skipped

I am migrating an existing project to boot. I created a brand new project using start.spring.io and copied over the source code, etc. Everything compiles, but when I do a 'mvn test' it compiles the classes but then only executes the default 'ApplicationTests' (created by start.spring.io).
Here's an excerpt from the maven output:
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # pendview ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\dev\pendview2\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # pendview ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 26 source files to C:\dev\pendview2\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.15:test (default-test) # pendview ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
What's even stranger is that if I pass '-Dtest=TestAuthController' then it does run that specific unit test:
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # pendview ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 26 source files to C:\dev\pendview2\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.15:test (default-test) # pendview ---
[INFO] Surefire report directory: C:\dev\pendview2\target\surefire-reports
(skipped output of AuthControllerTest for brevity)
-------------------------------------------------------
T E S T S
-------------------------------------------------------Results :
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
What am I doing wrong? Does spring boot setup a surefire config that I'm not conforming to?
Any help would be greatly appreciated!
-Trey
Spring Boot configures the Surefire plugin to run all test classes that have a name ending with Test or Tests but not starting with Abstract. You can see this configuration in the spring-boot-starter-parent pom. If your test class is named TestAuthController then it doesn't match this configuration. Renaming it to AuthControllerTest or AuthControllerTests should fix your problem.
Seems for me there is some issue with Maven surefire plugin, when it doesn't detect tests, if your test class name doesn't end with Tests suffix. :-)
Try this command in your console/terminal:
mvn clean install
But first navigate to directory of your tests.
If you wish to skip tests use this command:
mvn clean install -Dmaven.test.skip
It seems Andy's answer should be updated for Spring Boot 2.X. I can't see surefire config anywhere now. Probably there were too many complains about this convention.

building a scala-java-antlr project in maven results with ClassDefNotFoundError on runtime

I'm trying to port mustache.scala to scala 2.10, and make it built with maven with antlr3-maven-plugin instead of sbt. so far, i got this, and the code is compiled successfully. but at runtime, when i try to execute something simple like new Mustach("hello {{world}}!"), i get a java.lang.NoClassDefFoundError.
the weird thing, is that at first, i got the NoClassDefFoundError for Node class. i didn't understand why the java classes were'nt in the compiled jar, but i was eager to test if it worked. so i compiled just the two java classes with javac, and invoked the scala REPL as follows:
$scala -cp path/to/compiled/java/classes:path/to/jar-with-dependencies.jar
Welcome to Scala version 2.10.2 (OpenJDK 64-Bit Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import org.monkey.mustache._
import org.monkey.mustache._
scala> new Mustache("hello {{world}}!")
java.lang.NoClassDefFoundError: org/monkey/mustache/MustacheLexer
at org.monkey.mustache.Mustache.<init>(Mustache.scala:21)
at org.monkey.mustache.Mustache.<init>(Mustache.scala:32)
at .<init>(<console>:11)
at .<clinit>(<console>)
at .<init>(<console>:7)
at .<clinit>(<console>)
at $print(<console>)
...
so now i'm getting a NoClassDefFoundError on ANTLR output classes, so I see that not only the java files compile output was not packaged in the jar, but also ANTLR generated files. the scala code is depended on the java code as well as on the ANTLR generated code, so if the compilation succeeds, it must mean that at some point the java & ANTLR code was compiled succefully.
the relevant maven output is attached:
$ mvn clean install
.
. irrelevant output omitted...
.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mustache_2.10 1.0.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) # mustache_2.10 ---
[INFO] Deleting file set: /path/to/mustache.scala/target (included: [**], excluded: [])
[INFO]
[INFO] --- antlr3-maven-plugin:1.0:antlr (default) # mustache_2.10 ---
[INFO] Processing grammar /path/to/mustache.scala/src/main/antlr/org/monkey/mustache/Mustache.g
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # mustache_2.10 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /path/to/mustache.scala/src/main/resources
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:compile (project-resources-execution) # mustache_2.10 ---
[INFO] /path/to/mustache.scala/src/main/java:-1: info: compiling
[INFO] /path/to/mustache.scala/target/generated-sources/antlr:-1: info: compiling
[INFO] /path/to/mustache.scala/src/main/scala:-1: info: compiling
[INFO] Compiling 8 source files to /path/to/mustache.scala/target/classes at 1371141939993
[INFO] prepare-compile in 0 s
[INFO] compile in 8 s
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # mustache_2.10 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default) # mustache_2.10 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:compile (compile) # mustache_2.10 ---
[INFO] /path/to/mustache.scala/src/main/java:-1: info: compiling
[INFO] /path/to/mustache.scala/target/generated-sources/antlr:-1: info: compiling
[INFO] /path/to/mustache.scala/src/main/scala:-1: info: compiling
[INFO] Compiling 8 source files to /path/to/mustache.scala/target/classes at 1371141948773
[INFO] prepare-compile in 0 s
[INFO] compile in 8 s
[INFO]
.
. irrelevant output omitted...
.
[INFO]
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) # mustache_2.10 ---
[INFO] Building jar: /path/to/mustache.scala/target/mustache_2.10-1.0.5-SNAPSHOT.jar
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) # mustache_2.10 >>>
[INFO]
[INFO] --- antlr3-maven-plugin:1.0:antlr (default) # mustache_2.10 ---
[INFO] No grammars processed; generated files are up to date
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) # mustache_2.10 <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) # mustache_2.10 ---
[INFO] Building jar: /path/to/mustache.scala/target/mustache_2.10-1.0.5-SNAPSHOT-sources.jar
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) # mustache_2.10 ---
[INFO] Installing /path/to/mustache.scala/target/mustache_2.10-1.0.5-SNAPSHOT.jar to /path/to/mustache_2.10/1.0.5-SNAPSHOT/mustache_2.10-1.0.5-SNAPSHOT.jar
[INFO] Installing /path/to/mustache.scala/pom.xml to /path/to/.m2/repository/org/monkey/mustache_2.10/1.0.5-SNAPSHOT/mustache_2.10-1.0.5-SNAPSHOT.pom
[INFO] Installing /path/to/mustache.scala/target/mustache_2.10-1.0.5-SNAPSHOT-sources.jar to /path/to/.m2/repository/org/monkey/mustache_2.10/1.0.5-SNAPSHOT/mustache_2.10-1.0.5-SNAPSHOT-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.516s
[INFO] Finished at: Thu Jun 13 19:46:06 IDT 2013
[INFO] Final Memory: 16M/214M
[INFO] ------------------------------------------------------------------------
buttom line, how do i get the compiled output from java files to be packaged in the jar along with the compiled scala code?
The scala compiler read the source *.java (explicit in your log), but it doesn't compile them. To compile your *.scala it can used *.java OR *.class.
The classes generated into target/generated-sources/antlr don't exist into target/classes. The compilation is not done by maven-compiler-plugin. Wrong use of includes : it's a filter not a way to add sources dir. Try to remove it : you will have compilation error like
.../MustacheLexer.java:[168,17] cannot find symbol
[ERROR] symbol : variable type
Sorry I don't know/search how to fix it.

Categories

Resources