Any clues? Google lead to a whole lot of sites full of XML (bleh :)
Regards,
Marc
Mac:/Volumes/Scratch/src/liftweb/liftweb marc$ mvn -e install
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Lift
[INFO] Lift Core
[INFO] Lift Example
[INFO] Skittr Example
[INFO]
------------------------------------------------------------------------
----
[INFO] Building Lift
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
----
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Volumes/Scratch/src/liftweb/liftweb/pom.xml to /
Users/marc/.m2/repository/net/liftweb/lift/0.1.8/lift-0.1.8.pom
[INFO]
------------------------------------------------------------------------
----
[INFO] Building Lift Core
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
----
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
java.io.IOException: null/bin/java: not found
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:52)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:507)
at iodp.usio.CommandMojo.runCommand(CommandMojo.java:57)
at iodp.usio.ScalaCompileMojo.execute(ScalaCompileMojo.java:48)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:459)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced
(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode
(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] scala compiler returned non-zero value.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: scala
compiler returned non-zero value.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:564)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:459)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced
(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode
(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: scala
compiler returned non-zero value.
at iodp.usio.CommandMojo.runCommand(CommandMojo.java:70)
at iodp.usio.ScalaCompileMojo.execute(ScalaCompileMojo.java:48)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:539)
... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Thu May 24 12:06:34 EST 2007
[INFO] Final Memory: 6M/12M
[INFO]
------------------------------------------------------------------------
Let me fire up IntelliJ and look at the maven-scala-plugin source and
see if I can see anything obvious...
Ryan
javaBin = System.getProperty("java.home");
if (javaBin == null) {
javaBin = System.getenv("JAVA_HOME");
if (javaBin == null) {
throw new MojoExecutionException("Couldn't locate java,
try setting JAVA_HOME environment variable.");
}
}
javaBin += File.separator + "bin" + File.separator + "java";
Ryan
Make sure JAVA_HOME is set or it won't work. type echo $JAVA_HOME
from your command prompt to make sure it's set before you type mvn
install. If it isn't set it in your login script or manually on the
command line. On windows its somewhere buried in your system info..
(been a while since i've been subjected to windows for development)
Also.. make sure you type "mvn clean install" from the liftweb
directory that contains the pom.xml (pom.xml is what maven looks at
to figure out what to do, you might get more hints by looking in
there as well)
Good luck.
Matthew
for interest, mvn -version reports "Maven version: 2.0.6" (from
Darwin Ports).
Scala is also sourced from Darwin Ports.
I don't like ~/.m2/* but I can tolerate it. And now that JAVA_HOME is
in place it all works!!! ;)
What I am looking at Scala and Lift for is a control system for a
nation wide professional video distribution system (it would need to
be highly available). The real-time possibilities of Lift as an
interface is really appealing. Customers of the platform can share
resources for a given time frame, dynamically prioritise their video,
etc. There is a scripting element to the old system that needs to be
replicated as well.
I had been looking at Erlang for the system to control all the video
adaptors (SNMP interfaces) but Erlang's unusualness has made the
customer shy. Scala at least targets a JVM which makes the customer
less concerned although not everyone there would understand the
difference between Scala and Java and in effect it shouldn't matter...
I'm still playing with the possible architectures and which bus /
middle-ware to settle on between nodes - which Lift would front. One
attraction of Erlang is having that distribution built in.
It is currently a background task as the network design is the
current focus.
Thanks for the help! Now I can start to dig, break and maybe even
start to grok it.
Regards,
Marc
Please people, if you have complaints about the maven scala support,
take them to code.google.com/p/maven-scala-plugin and we will try and
help you out.
Having two build systems for Lift is only going to complicate things
going forward.
Ryan
Cheers,
Julien
pony:~ dpp$ cat .bash_loginAnd on my Linux (Ubuntu 7.04, yes, I'm a Fawn Fan):
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
export PATH=$PATH:/sw/bin:/usr/local/mysql/bin:/opt/local/bin
export JAVA_HOME=/Library/Java/Home
export EDITOR=emacs
export CLASSPATH=.Maven "just works" for me. I really like being able to pull down all the packages needed to build lift automatically. Plus Brice and Ryan have been responsive to Scala/Maven related issues.
export JDK_BASE=/usr/lib/jvm/java
export JAVA_HOME=${JDK_BASE}
export HADOOP_HEAPSIZE=200
export PATH=$PATH:$JDK_BASE/bin
export PATH=$PATH:~/bin
export SCALA_HOME=/usr/local/share/scala
[mahadevan@h3 liftweb]$ mvn clean:clean install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Lift
[INFO] Lift Core
[INFO] Lift Example
[INFO] Skittr Example
[INFO] Searching repository for plugin with prefix: 'clean'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Lift
[INFO] task-segment: [clean:clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
target
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
target/classes
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
target/test-classes
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
target/site
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /2/home/mahadevan/src/java/liftweb/liftweb/pom.xml
to /2/home/mahadevan/.m2/repository/net/liftweb/lift/0.2.0/
lift-0.2.0.pom
[INFO]
----------------------------------------------------------------------------
[INFO] Building Lift Core
[INFO] task-segment: [clean:clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
lift/target
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
lift/target/classes
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
lift/target/test-classes
[INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
lift/target/site
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Exception in thread "main" java.lang.OutOfMemoryError: Java
heap space
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] scala compiler returned non-zero value.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 minutes 39 seconds
[INFO] Finished at: Sat Jun 09 13:25:24 IST 2007
[INFO] Final Memory: 13M/31M
[INFO]
------------------------------------------------------------------------
[mahadevan@h3 liftweb]$
export MAVEN_OPTS=-Xmx512M
Is not helpful as it is applying these JVM options to command 'mvn'
--
but not to maven-scala-compiler-JVM-task(which is forked as separate
JVM)
I don't know what options are needed in pom files to make the -Xmx
flags to
JVM for scala plugin. So I did following workaround(ugly one for the
timebeing to make maven plugin to compil code):
# export JAVA_HOME=MY_JDK_HOME
# mv $JAVA_HOME/jre/bin/java $JAVA_HOME/jre/bin/java_exe
Created a java-shell-script with following contents
#!/bin/sh
exec /opt/jdk1.5.0_11/jre/bin/java_exe "-Xmx256m" $*
Now ran the 'mvn' command to compile liftweb:
$ mvn clean:clean install
compilation was successfull finally with the above temproray-ugly-
fix :)
May be some maven-expert could let us know how to set the JVM max-
heap-
space for maven-scal-compiler task.
Checking out the subversion repository version of the maven-scala-plugin
(code.google.com/p/maven-scala-plugin) and building it (mvn install)
will give you a version where the system properties are copied from the
parent Java VM process to the child. I'm not sure if heap settings can
be solved this way or not.
Give this a try and let me know if it solves your problem.
If not, we will have to look into an additional set of options to pass
to the child process.
Ryan
On Sat, 2007-09-06 at 10:10 +0000, mahadevan wrote:
> Thoough my issue is not of above error, I am facing OutOfMemoryError
> while compiling lif code(scala code) via maven scala compiler plugin.
> Here iprocess s the output:
>
> [mahadevan@h3 liftweb]$ mvn clean:clean install
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO] Lift
> [INFO] Lift Core
> [INFO] Lift Example
> [INFO] Skittr Example
> [INFO] Searching repository for plugin with prefix: 'clean'.
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Lift
> [INFO] task-segment: [clean:clean, install]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> target
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> target/classes
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> target/test-classes
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> target/site
> [INFO] [site:attach-descriptor]
> [INFO] [install:install]
> [INFO] Installing /2/home/mahadevan/src/java/liftweb/liftweb/pom.xml
> to /2/home/mahadevan/.m2/repository/net/liftweb/lift/0.2.0/
> lift-0.2.0.pom
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Lift Core
> [INFO] task-segment: [clean:clean, install]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> lift/target
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> lift/target/classes
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> lift/target/test-classes
> [INFO] Deleting directory /2/home/mahadevan/src/java/liftweb/liftweb/
> lift/target/site
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [scala:compile {execution: default}]
> [INFO] Exception in thread "main" java.lang.OutOfMemoryError: Java
> heap space
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] scala compiler returned non-zero value.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3 minutes 39 seconds
> [INFO] Finished at: Sat Jun 09 13:25:24 IST 2007
> [INFO] Final Memory: 13M/31M
> [INFO]
> ------------------------------------------------------------------------
> [mahadevan@h3 liftweb]$
>
> export MAVEN_OPTS=-Xmx512M
> Is not helpful as it is applying these JVM options to command 'mvn' --
> but not to maven-scala-compiler-JVM-task(which is forked as separate
> JVM)
>
> I don't what options are needed in pom files to make the -Xmx flags to
> Ryan -- when will plugin 1.1 be on the Maven archives so we can change
> the lift pom.xml to use 1,1?
I think Brice is hosting the plugin right now. I guess we should look
into doing another release and getting it into the main Maven
repositories.
Ryan
Fix got compiled and plugin.jar has been made.
Tried to test liftweb scala compile, but don't know what changes to do
pom.xml of liftweb to make use of compile plugin.jar
FIX is:
--- src/main/java/scala/maven/ScalaMojo.java (revision 10)
+++ src/main/java/scala/maven/ScalaMojo.java (working copy)
@@ -43,7 +43,21 @@
throw new MojoExecutionException("Couldn't locate
java, try setting JAVA_HOME environment variable.");
}
}
+ // Provide support for JVM specific options like -X, -XX
flags
+ String jvmFlags = System.getProperty("JAVA_OPTIONS");
+ if(jvmFlags == null) {
+ jvmFlags = System.getenv("JAVA_OPTIONS");
+ if (jvmFlags == null) {
+ jvmFlags = "";
+ }else{
+ jvmFlags.trim();
+ jvmFlags = " " + jvmFlags + " ";
+ }
+ }
javaBin += File.separator + "bin" + File.separator + "java";
+ if(!"".equals(jvmFlags)){
+ javaBin += jvmFlags;
+ }
}
Made the plugin jar with following name : maven-scala-plugin-1.1-
SNAPSHOT.jar
[mahadevan@h3 maven-scala-plugin]$ svn info
Path: .
URL: http://maven-scala-plugin.googlecode.com/svn/trunk
Repository Root: http://maven-scala-plugin.googlecode.com/svn
Repository UUID: b3ddc661-202f-0410-864d-fbe52e633960
Revision: 10
Node Kind: directory
Schedule: normal
Last Changed Author: ryan.daum
Last Changed Rev: 10
Last Changed Date: 2007-06-07 23:40:42 +0530 (Thu, 07 Jun 2007)
> Ryan,
>
> I'm happy to host on maven.liftweb.net Just let me know.
>
> Thanks,
>
> David
>
> On 6/10/07, Ryan Daum <r...@darksleep.com> wrote:
>
>
>
>
>
> > On Sat, 2007-09-06 at 06:55 -0700, David Pollak wrote:
>
> > > Ryan -- when will plugin 1.1 be on the Maven archives so we can change
> > > the lift pom.xml to use 1,1?
>
> > I think Brice is hosting the plugin right now. I guess we should look
> > into doing another release and getting it into the main Maven
> > repositories.
>
> > Ryan
>
> --- src/main/java/scala/maven/ScalaMojo.java (revision 10)
> +++ src/main/java/scala/maven/ScalaMojo.java (working copy)
> @@ -43,7 +43,21 @@
> throw new MojoExecutionException("Couldn't locate
> java, try setting JAVA_HOME environment variable.");
> }
> }
> + // Provide support for JVM specific options like -X, -XX
> flags
> + String jvmFlags = System.getProperty("JAVA_OPTIONS");
> + if(jvmFlags == null) {
> + jvmFlags = System.getenv("JAVA_OPTIONS");
> + if (jvmFlags == null) {
> + jvmFlags = "";
> + }else{
> + jvmFlags.trim();
This line does not modify jvmFlags as I think to expect it to, but
rather returns a copy, trimmed, due to Java String immutability.
Also, you seem to only be trimming and re-padding with spaces if it's
an environment variable, and not a property. Is this intentional?
[mahadevan@h3 maven-scala-plugin]$ svn diff
Index: src/main/java/scala/maven/ScalaMojo.java
===================================================================
--- src/main/java/scala/maven/ScalaMojo.java (revision 10)
+++ src/main/java/scala/maven/ScalaMojo.java (working copy)
@@ -43,8 +43,22 @@
throw new MojoExecutionException("Couldn't locate
java, try setting JAVA_HOME environment variable.");
}
}
+ // Provide support for JVM specific options like -X, -XX
flags
+ String jvmFlags = System.getProperty("JAVA_OPTIONS");
+ if(jvmFlags == null) {
+ jvmFlags = System.getenv("JAVA_OPTIONS");
+ if (jvmFlags == null) {
+ jvmFlags = "";
+ }
+ }
+ jvmFlags = jvmFlags.trim();
javaBin += File.separator + "bin" + File.separator + "java";
+ if(!"".equals(jvmFlags)){
+ jvmFlags = " " + jvmFlags + " ";
+ javaBin += jvmFlags;
+ }
+
}
public static String join(Collection<String> s, String delimiter)
{
On Jun 11, 9:44 pm, "Michael Campbell" <michael.campb...@gmail.com>
wrote:
Alternatively, if you see yourself making further contributions to the
plugin, you could be added to the committers list for the subversion
repository.
Ryan