5 Replies Latest reply on Jun 6, 2008 6:13 PM by Nick Belaevski

    Building source manually Maven/Eclipse

    Matt Schrader Newbie

      I would like to build the source manually so I can make some modifications. Is there a guide to doing this? I have gotten as far as checking out the repository, and runing mvn eclipse:eclipse however this gives the following error:

      Missing:
      ----------
      1) org.richfaces.cdk:generator:jar:3.2.2-SNAPSHOT
      
       Try downloading the file manually from:
       http://labs.jboss.com/portal/jbossrichfaces/downloads
      
       Then, install it using the command:
       mvn install:install-file -DgroupId=org.richfaces.cdk -DartifactId=generato
      r -Dversion=3.2.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
      
       Alternatively, if you host your own repository you can deploy the file there:
      
       mvn deploy:deploy-file -DgroupId=org.richfaces.cdk -DartifactId=generator
      -Dversion=3.2.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Drepo
      sitoryId=[id]
      
       Path to dependency:
       1) org.richfaces.cdk:maven-cdk-plugin:maven-plugin:3.2.2-SNAPSHOT
       2) org.richfaces.cdk:generator:jar:3.2.2-SNAPSHOT


      I do not see this jar on the site anywhere.

      I thought I remembered a getting involved link with a building the source tutorial, but I can't seem to find it now. I would like to get to know this code so I can help out on some of the bugs/improvements.

        • 1. Re: Building source manually Maven/Eclipse
          Nick Belaevski Master

          Hello,

          From what directory are you running the build?

          • 2. Re: Building source manually Maven/Eclipse
            Matt Schrader Newbie

            I have checked out to C:\richfaces. I am in the richfaces directory when i did the mvn command.

            • 3. Re: Building source manually Maven/Eclipse
              Matt Schrader Newbie

              I got passed that problem, now I'm getting a PermGen out of memory error. My setting is (MAVEN_OPTS = -Xms512m -Xmx768m)

              The system is out of resources.
              Consult the following stack trace for details.
              java.lang.OutOfMemoryError: PermGen space
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
              at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at com.sun.tools.javac.main.JavaCompiler.(JavaCompiler.java:314)
              at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72)
              at com.sun.tools.javac.main.Main.compile(Main.java:340)
              at com.sun.tools.javac.main.Main.compile(Main.java:279)
              at com.sun.tools.javac.main.Main.compile(Main.java:270)
              at com.sun.tools.javac.Main.compile(Main.java:87)
              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:597)
              at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:372)
              at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:136)
              at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:407)
              at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:98)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:924)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:767)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:529)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)

              • 4. Re: Building source manually Maven/Eclipse
                Matt Schrader Newbie

                After looking into this a bit more others are having the same problem when running Java 1.6.0_04 and higher. I'll try installing a different version of java to see if that fixes this.

                • 5. Re: Building source manually Maven/Eclipse
                  Nick Belaevski Master

                  Matt,

                  1. Looks like you have to build CDK first before trying to run eclipse project generation. To do that go to cdk directory and run mvn install from there. Then try to build the whole project again. That's so because Maven plugins we use are participating in source generation and therefore they should be accessible.

                  Another variant: configure http://snapshots.jboss.org/maven2/ as plugin repository & common repository.

                  2. My local MAVEN_OPTS variable is

                  -Xmx512m -XX:MaxPermSize=256m
                  . That should be sufficient for the build to run

                  3. Sun JDK 1.6 isn't recommended due to some issues:
                  - there is a bug in XML parser that leads to attributes get messed in renderer code
                  - incompatibility with 1.5 JDK in inheritance of some Paint2D classes