Child pages
  • Sakai Wicket Maven Archetype
Skip to end of metadata
Go to start of metadata

This project has moved to github. This page is no longer maintained.

See: https://github.com/sakaiproject/sakai-wicket-maven-archetype/

Information

The Sakai Wicket Maven Archetype allows you to generate a sample Sakai app via a single Maven command. The app is based on Apache Wicket which integrates nicely with Sakai. The app demonstrates how to get a Sakai tool styled, internationalised and registered, setup your own APIs, wire them up with Spring and inject them via annotations. The 1.1 and up releases also include multi database support via Spring JDBC. It could easily be used as a base for a real tool.

Versions

ArchetypeWicket
1.21.4.17
1.31.5.10*
1.4.16.16.0*
1.5.06.16.0

'*' means source exists but no binaries. I strongly recommend you use version 1.5.0.

How do I get it?

Simply run the following command in your Terminal and follow the prompts:

How do I use it?

The output of the above command will produce a project that you can build and deploy to Sakai or add to Eclipse and extend.

  • No labels

16 Comments

  1. Watch out when copying/pasting as it's over two lines. Any chance of adding a trailing \ to the first line?

    1. Done, thanks Matthew.

  2. Thank you for this! I'm finally able to get a tool project to load into my Netbeans IDE that I can modify and deploy successfully. Very grateful to you for this.

    I get the following when trying to get version 1.3 or 1.4.1 but the 1.2 version works great.

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.sakai
    project.maven-archetype:sakai-wicket-maven-archetype:1.4.1) -> [Help 1]

  3. The binaries are not in the repo yet. If you want to use it now, grab the source, mvn clean install, then run the above command.

    https://source.sakaiproject.org/contrib/archetypes/apache-wicket/tags/sakai-wicket-maven-archetype-1.4.1/

  4. 1.5.0 binaries are now in central (thumbs up)

  5. Hi! I'm a new noob Sakai developer. 

    I’ve use this command to generate an app on my Sakai folder, but, when I try to do an “mvn clean install” it give me this error.

    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 2.464 s
    [INFO] Finished at: 2015-03-22T12:39:50+01:00
    [INFO] Final Memory: 18M/495M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project exampleApp-tool: Compilation failure: Compilation failure:
    [ERROR] /C:/opt/sakai-10.4/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[19,23] package com.steve.model does not exist
    [ERROR] /C:/opt/sakai-10.4/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[19,23] package com.steve.model does not exist

    Any idea about why?

    1. Hi, what version of the archetype are you using?

        1. Sounds like ThirdPage.java has a bad import (the 'steve' gives it away (wink)), might have been left over in the code. Run 'Organise Imports' on that file to clean it up.

           

          1. Have a good day Steve,

             

            I have the same error and ran 'Organize imports' too, but the build fail, I apreciate your help.

            [INFO] BUILD FAILURE

            [INFO] ------------------------------------------------------------------------

            [INFO] Total time: 3.034s

            [INFO] Finished at: Mon Sep 05 11:56:34 COT 2016

            [INFO] Final Memory: 21M/248M

            [INFO] ------------------------------------------------------------------------

            [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project exampleApp-tool: Compilation failure: Compilation failure:

            [ERROR] /sakai/sakai2/sakai/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[42,49] cannot find symbol

            [ERROR] symbol:   method getName()

            [ERROR] location: variable thing of type org.sakaiproject.example.model.Thing

            [ERROR] /sakai/sakai2/sakai/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[148,36] cannot find symbol

            [ERROR] symbol:   method getId()

            [ERROR] location: variable t of type org.sakaiproject.example.model.Thing

  6.  After removing it, you still get the following error.

    [ERROR] /home/~/proinf-tools/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[149,36] cannot find symbol

      symbol:   method getId()

      location: variable t of type org.sakaiproject.example.model.Thing

     

    So there is still a problem regarding lombok. I didn't figure out why exactly. Either the relative path to the master.pom or the outdated version of lombok or the version of the maven compiler plugin. After fixing those things, the build worked fine for me.

  7. What version of lombok with maven do you recomend for wicket maven archetype?

     

    I have the same error:

    [INFO] BUILD FAILURE

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time: 3.034s

    [INFO] Finished at: Mon Sep 05 11:56:34 COT 2016

    [INFO] Final Memory: 21M/248M

    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project exampleApp-tool: Compilation failure: Compilation failure:

    [ERROR] /sakai/sakai2/sakai/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[42,49] cannot find symbol

    [ERROR] symbol:   method getName()

    [ERROR] location: variable thing of type org.sakaiproject.example.model.Thing

    [ERROR] /sakai/sakai2/sakai/exampleApp/tool/src/java/org/sakaiproject/example/tool/pages/ThirdPage.java:[148,36] cannot find symbol

    [ERROR] symbol:   method getId()

    [ERROR] location: variable t of type org.sakaiproject.example.model.Thing

     

     

     

     

     

     

     

  8. I know this page is no longer maintained but does someone know what the error is here?

    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 4.063 s
    [INFO] Finished at: 2017-05-15T13:04:30-04:00
    [INFO] Final Memory: 17M/227M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Lexical error, Encountered: "l" (108), after : "." at archetype-resources/tool/src/java/tool/pages/ThirdPage.java[line 175, column 54] -> [Help 1]
    [ERROR]

  9. Hi Guys

     

    Just deployed the above mentioned tool on my SAKAI instance, but i am unable to see it under Site Info > Tool Edit and Sites > Add/Edit pages > New Tools.

    Can anyone help

     

    Thanks

    Kgothatso

    1. Move across to the github page. It's likely your webapp hasn't started up due to a bug which has been resolved in the latest code.

  10. Hi Steve

     

    when i run the command from git. this is what i get below

     

    [INFO] Generating project in Interactive mode
    [DEBUG] Searching for remote catalog: https://repo.maven.apache.org/maven2/archetype-catalog.xml
    [WARNING] No archetype found in remote catalog. Defaulting to internal catalog
    [DEBUG] Using catalog /home/kg/.m2/repository/archetype-catalog.xml
    [WARNING] Archetype not found in any catalog. Falling back to central repository.
    [WARNING] Add a repsoitory with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
    [DEBUG] Not found archetype org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:1.6.0 in cache
    [WARNING] The POM for org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:jar:1.6.0 is missing, no dependency information available
    [DEBUG] Archetype org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:1.6.0 doesn't exist
    org.apache.maven.archetype.downloader.DownloadException: Error downloading org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:jar:1.6.0.
            at org.apache.maven.archetype.downloader.DefaultDownloader.download(DefaultDownloader.java:83)
            at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.exists(DefaultArchetypeArtifactManager.java:279)
            at org.apache.maven.archetype.ui.generation.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:121)
            at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:200)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
            at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.shared.artifact.resolve.ArtifactResolverException: Failure to find org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:jar:1.6.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
            at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact(Maven31ArtifactResolver.java:116)
            at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact(Maven31ArtifactResolver.java:80)
            at org.apache.maven.shared.artifact.resolve.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:73)
            at org.apache.maven.archetype.downloader.DefaultDownloader.download(DefaultDownloader.java:79)
            ... 25 more
    Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:jar:1.6.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
            at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
            at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
            at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
            at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
            at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact(Maven31ArtifactResolver.java:108)
            ... 28 more
    Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype:jar:1.6.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
            at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
            at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
            at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
            at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
            at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
            ... 32 more
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:10 min
    [INFO] Finished at: 2017-06-06T09:21:09+02:00
    [INFO] Final Memory: 20M/620M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype6.0) -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) .maven-archetype:sakai-wicket-maven-archetype:1.6.0)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
            at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.MojoFailureException: The desired archetype does not exist (org.sakaiproject.maven-archetype:sakai-wicket-maven-archetype
            at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:216)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
            ... 20 more
    Caused by: org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (org.sakaiproject.maven-archetype:sakai-wicket-maven-
            at org.apache.maven.archetype.ui.generation.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:12
            at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:200)
            ... 22 more
    [ERROR]
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException