14 Replies Latest reply: Mar 29, 2008 12:28 AM by Clint Hanson RSS

Downloaded the source and wouldnt build from Maven

Tony Herstell Master

Downloaded the source.
Downloaded maven (first time user)
tried mvn all and got

C:\jbosswiki-beta2-2.4>mvn all
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'all': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Feb 20 12:12:06 NZDT 2007
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------


Any suggestions?

(I messed around for a while and googled with no luck).

  • 1. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

    Well I hacked the .ear and set up all the files I thought I would need.

    It runs up great apart from no login.
    ... after a little while it dawned on me that this is supposed to run inside something else... JBoss Portal perhaps!

    Sometimes finding exactly what you want through google is not the best way ;)
    [JBoss Wiki ] [Search...]
    All I wanted was a standalone wiki (like JSPWiki).

    Ill go and download Portal, get that running and try running up again.

    Doh!

    :/

  • 2. Re: Downloaded the source and wouldnt build from Maven
    Tomasz Szymanski Novice

    As for source distro - are you sure you're using right maven (1.1.2 ?).

    For the easiest installation I'd suggest installing from JEMS Installer - it'll set you up ejb3/portal and stuff.

    And it's here: http://labs.jboss.com/portal/jemsinstaller

    Cheers,
    Tomek

  • 3. Re: Downloaded the source and wouldnt build from Maven
    Tomasz Szymanski Novice

    Of course JEMS installer won't install you JB Wiki, just as+portal+ejb3 :)

    Tomek

  • 4. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

    I got the latest maven... :(

    I downloaded and hacked the .ear, it seems to be ignored anyhow when deployed in the portal JBoss.

    I got it working (of sorts as I have plenty of exceptions)...

    I can't remember the series of steps...

  • 5. Re: Downloaded the source and wouldnt build from Maven
    Tomasz Szymanski Novice

    Last one is not the right one (i know - i'm lazy :) )

    Use this one:
    http://maven.apache.org/maven-1.x/

    steps are:
    1) download jems installer, install "portal" configuration.
    2) fill in .sample files in jbwiki-src
    3) maven all

    and it should work :)

    szimano

  • 7. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

     



    C:\Documents and Settings\herstell\My Documents\Wiki\Source for wiki\jbosswiki-beta2-2.4>maven all
    __ __
    | \/ |__ _Apache__ ___
    | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
    |_| |_\__,_|\_/\___|_||_| v. 1.0.2

    build:start:

    all:
    wiki:all:
    prepare-repo:
    [copy] Copying 15 files to C:\Documents and Settings\herstell\.maven\repository
    Starting the reactor...
    Our processing order:
    Wiki common
    +----------------------------------------
    | Making wiki-common for the repo Wiki common
    | Memory: 2M/4M
    +----------------------------------------
    Attempting to download junit-3.8.1.jar.
    Error retrieving artifact from [http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar]: java.io.IOException: Unknown error downloading; status code
    WARNING: Failed to download junit-3.8.1.jar.
    Attempting to download commons-fileupload-1.0.jar.
    Error retrieving artifact from [http://www.ibiblio.org/maven/commons-fileupload/jars/commons-fileupload-1.0.jar]: java.io.IOException: Unknown error d
    WARNING: Failed to download commons-fileupload-1.0.jar.
    Attempting to download dom4j-1.6.jar.
    Error retrieving artifact from [http://www.ibiblio.org/maven/dom4j/jars/dom4j-1.6.jar]: java.io.IOException: Unknown error downloading; status code wa
    WARNING: Failed to download dom4j-1.6.jar.
    Attempting to download portlet-api-1.0.jar.
    Error retrieving artifact from [http://www.ibiblio.org/maven/portlet-api/jars/portlet-api-1.0.jar]: java.io.IOException: Unknown error downloading; st
    WARNING: Failed to download portlet-api-1.0.jar.
    Attempting to download jbossall-client-3.2.3.jar.
    Error retrieving artifact from [http://www.ibiblio.org/maven/jboss/jars/jbossall-client-3.2.3.jar]: java.io.IOException: Unknown error downloading; st
    WARNING: Failed to download jbossall-client-3.2.3.jar.

    BUILD FAILED
    File...... C:\Documents and Settings\herstell\My Documents\Wiki\Source for wiki\jbosswiki-beta2-2.4\maven.xml
    Element... maven:reactor
    Line...... 58
    Column.... 56
    The build cannot continue because of the following unsatisfied dependencies:

    junit-3.8.1.jar
    commons-fileupload-1.0.jar
    dom4j-1.6.jar
    portlet-api-1.0.jar
    jbossall-client-3.2.3.jar

    Total time: 11 seconds
    Finished at: Thu Mar 15 18:10:00 NZDT 2007

    C:\Documents and Settings\herstell\My Documents\Wiki\Source for wiki\jbosswiki-beta2-2.4>



    Trying to build wiki... got really fed up hacking the .ear files. ;)

    I am new to maven .. how do I fix this?



  • 8. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

    Please advise...

    This also posted on the portal site.

    
    Set up environment
    
     * Install java (1.5 - wiki only works with 1.5 as yet).
     * Set up JAVA_HOME in the system PATH (My Computer - Environment Variables)
     * Unpack JBoss Portal Latest Release (comes as a single package including JBoss)
     * Install MySQL? (root, admin) and MySQL? gui tools.
     * Create database jbossdb inside MySQL?
     * link Jboss to MySQL? by:
     o copying mysql-ds.xml from docs/examples/jca
     o renaming the datasource to PortalDS? inside the file
     o add username, password and machine name (root, admin, localhost)
     o rename datasource in portal-hsqldb-ds.xml from PortalDS? to PortalDS_OLD
     * run server (bin/run) and ensure it runs up and tables are created.
    
    If building wiki:
    
     * Install Maven (1.0.2)
     * Add maven to system PATH
     * Download wiki source
     * Build wiki (to create ear file) using maven all in base wiki directory
     * Deploy ear file into deploy area of Jboss server
    
    If hacking an ear file (current process as maven doesn't work)
    
     * explode the ear file and update the relevant files (see Jboss wiki wiki to see the files you want to change).. where files are stored, which extensions will be rendered as images etc.
    
    JIRA issues raised:
    Cannot actually build wiki from Maven as maven cannot import some jars.
    Cannot run up the latest (beta) portal with wiki as it doesn't like it.
    Positioning a User component to allow the users to login when the wiki page is being displayed... this is not remembered over a server re-start so you have to go admin and add the User Component again.
    
    



    09:42:22,180 INFO [MyFacesGenericPortlet] PortletContext 'C:\Program Files\jboss-portal-2.6-BETA1\server\default\.\deploy\jboss-portal.sar\portal-ad
    09:42:23,414 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PortalDS_OLD' to JNDI name 'java:Port
    09:42:23,492 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
    09:42:23,758 INFO [EARDeployer] Init J2EE application: file:/C:/Program Files/jboss-portal-2.6-BETA1/server/default/deploy/wiki.ear
    09:42:24,086 INFO [TomcatDeployer] deploy, ctxPath=/wiki-test, warUrl=.../tmp/deploy/tmp54289wiki.ear-contents/wiki-test-exp.war/
    09:42:24,305 INFO [TomcatDeployer] deploy, ctxPath=/wiki, warUrl=.../tmp/deploy/tmp54289wiki.ear-contents/wiki-exp.war/
    09:42:24,461 ERROR [[/wiki]] Exception starting filter wikiFileAccessFilter
    java.lang.NoClassDefFoundError: org/jboss/wiki/WikiSession
     at java.lang.Class.getDeclaredConstructors0(Native Method)
     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
     at java.lang.Class.getConstructor0(Class.java:2671)
     at java.lang.Class.newInstance0(Class.java:321)
     at java.lang.Class.newInstance(Class.java:303)
     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:210)
     at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
    


  • 9. Re: Downloaded the source and wouldnt build from Maven
    Tomasz Szymanski Novice

    Hey... looks like ibiblio is breaking something ;-)

    It appears that old links to jar on ibiblio are fwding to ther links, but maven 1.0.2 doesn't understand them.

    Could you please edit all project.properties files (main folder, wiki-common/, forge-wiki/, wiki-management/, wiki-test) and change:
    maven.repo.remote=http://repository.atlassian.com,http://www.ibiblio.org/maven,http://dist.codehaus.org/

    to

    maven.repo.remote=http://repo1.maven.org/maven

    That should do the trick.

    Cheers,
    Tomek

  • 10. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

    Cheers Tomek
    That better..
    Now I have


    prepare-ear:
    [delete] Deleting directory C:\jbosswiki-beta2-2.4\target\ear
    [copy] Copying 1 file to C:\jbosswiki-beta2-2.4\target\ear
    [copy] Copying 1 file to C:\jbosswiki-beta2-2.4\target\ear
    [copy] Copying 1 file to C:\jbosswiki-beta2-2.4\target\ear
    [copy] Copying 1 file to C:\jbosswiki-beta2-2.4\target\ear

    BUILD FAILED
    File...... C:\jbosswiki-beta2-2.4\maven.xml
    Element... ant:copy
    Line...... 82
    Column.... 32
    C:\jbosswiki-beta2-2.4\lib not found.
    Total time: 10 seconds
    Finished at: Fri Mar 16 12:17:59 NZDT 2007

    C:\jbosswiki-beta2-2.4>


    :(

  • 11. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

    I ran maven ear
    I got the ear but am dubious that is ok.

  • 12. Re: Downloaded the source and wouldnt build from Maven
    Tony Herstell Master

     

    15:07:05,711 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
    15:07:05,977 INFO [EARDeployer] Init J2EE application: file:/C:/Program Files/jboss-portal-2.6-BETA1/server/default/deploy/wiki.ear
    15:07:06,274 INFO [TomcatDeployer] deploy, ctxPath=/wiki-test, warUrl=.../tmp/deploy/tmp12499wiki.ear-contents/wiki-test-exp.war/
    15:07:06,477 INFO [TomcatDeployer] deploy, ctxPath=/wiki, warUrl=.../tmp/deploy/tmp12499wiki.ear-contents/wiki-exp.war/
    15:07:06,696 ERROR [[/wiki]] Exception starting filter wikiFileAccessFilter
    java.lang.NoClassDefFoundError: org/jboss/wiki/WikiSession
     at java.lang.Class.getDeclaredConstructors0(Native Method)
     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
     at java.lang.Class.getConstructor0(Class.java:2671)
     at java.lang.Class.newInstance0(Class.java:321)
     at java.lang.Class.newInstance(Class.java:303)
     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:210)
     at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
    


  • 13. Re: Downloaded the source and wouldnt build from Maven
    Neil McFarlane Novice

    Hello.

    Would it be possible to replace the current files on the site with property files that point to the the new Maven repositories? Probably save quite a few headaches.

  • 14. Re: Downloaded the source and wouldnt build from Maven
    Clint Hanson Newbie

    Whats the chance that we can get the properties files updated, it took much searching to find this forum with the proper repository location to set, and a year later its still set as the old repositories. I would be glad to help with some of that type stuff. The frustration of having to go through this almost made it more worthwhile to chase down some other wiki project, and I would hate for that to be the standard reaction. You guys really have a cool solution on your hands once it gets working out of the box.

    Is there a way to let the portlet set this info at install time?