File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Unable to find mojo 'validate' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Unable to find mojo Watch "Unable to find mojo New topic
Author

Unable to find mojo 'validate'

Murali Vijay
Greenhorn

Joined: Jan 05, 2011
Posts: 12

Hi Im new to Maven,

I've configured my maven script with StarTeam repository, as shown below



--when I try to checkout the source code using the command >mvn scm:checkout
It give the below error message...
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-scm-plugin:1.2:checkout': Unable to find the mojo 'checkout' (or one of its required components) in the plugin 'org.apache.maven.plugins:maven-scm-plugin'
Component descriptor cannot be found in the component repository: org.apache.maven.scm.manager.ScmManager.

Please hemp me to correct the issue.
Thanks
Murali Vijay
Greenhorn

Joined: Jan 05, 2011
Posts: 12

Hi I found there is no class called checkout in the .jar file when I extract it. I found CheckoutMojo class, So I executed the command
>mvn scm:CheckoutMojo
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Required goal not found: scm:CheckoutMojo in org.apache.maven.plugins:maven-scm-plugin:1.2
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Jan 10 12:12:43 GMT+05:30 2011
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------


Below is the extracted .jar file information
C:\Documents and Settings\vijay\.m2\repository\org\apache\maven\plugins\maven-scm-plugin\1.2>jar -xvf maven-scm-plugin-1.2.jar
created: META-INF/
inflated: META-INF/MANIFEST.MF
created: META-INF/maven/
created: org/
created: org/apache/
created: org/apache/maven/
created: org/apache/maven/scm/
created: org/apache/maven/scm/plugin/
inflated: META-INF/maven/plugin.xml
inflated: META-INF/NOTICE
inflated: META-INF/LICENSE
inflated: META-INF/DEPENDENCIES
inflated: org/apache/maven/scm/plugin/StatusMojo.class
inflated: org/apache/maven/scm/plugin/AbstractScmMojo.class
inflated: org/apache/maven/scm/plugin/ValidateMojo.class
inflated: org/apache/maven/scm/plugin/BootstrapMojo.class
inflated: org/apache/maven/scm/plugin/CheckoutMojo.class
inflated: org/apache/maven/scm/plugin/EditMojo.class
inflated: org/apache/maven/scm/plugin/UpdateMojo.class
inflated: org/apache/maven/scm/plugin/CheckinMojo.class
inflated: org/apache/maven/scm/plugin/UnEditMojo.class
inflated: org/apache/maven/scm/plugin/BranchMojo.class
inflated: org/apache/maven/scm/plugin/HelpMojo.class
inflated: org/apache/maven/scm/plugin/DiffMojo.class
inflated: org/apache/maven/scm/plugin/DefaultLog.class
inflated: org/apache/maven/scm/plugin/CheckLocalModificationsMojo.class
inflated: org/apache/maven/scm/plugin/UpdateSubprojectsMojo.class
inflated: org/apache/maven/scm/plugin/ChangeLogMojo.class
inflated: org/apache/maven/scm/plugin/AddMojo.class
inflated: org/apache/maven/scm/plugin/ExportMojo.class
inflated: org/apache/maven/scm/plugin/ListMojo.class
inflated: org/apache/maven/scm/plugin/TagMojo.class
created: META-INF/maven/org.apache.maven.plugins/
created: META-INF/maven/org.apache.maven.plugins/maven-scm-plugin/
inflated: META-INF/maven/org.apache.maven.plugins/maven-scm-plugin/pom.xml
inflated: META-INF/maven/org.apache.maven.plugins/maven-scm-plugin/pom.properties
------------

Please help me to resolve the issue. Thanks
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

mvn scm:checkout should have worked - try updating your SCM plugin to 1.4, it's the latest version


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Murali Vijay
Greenhorn

Joined: Jan 05, 2011
Posts: 12

Hi Martijn, thanks for your valuable reply. After updating the SCM plugin versio to 1.4 the problem resolved.

Then I faced the problem with the SCM url format and I corrected that one.

Then I run the command >mvn scm:checkout, It throws the below error

[ERROR] Provider message:
[ERROR] The starteam command failed.
[ERROR] Command output:
[ERROR] 'stcmd' is not recognized as an internal or external command, operable program or batch file.


Please help me to resolve the issue. Thanks
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Have you got stcmd working from your command line? Quite often all the Maven plugins do is call existing commands/programs that you have already installed.
Murali Vijay
Greenhorn

Joined: Jan 05, 2011
Posts: 12

Hi Martijn, after setting the StarTeam path, the issue is been resolved.
And I can able to checkout the code from starteam successfully.
Thanks for your support.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You're welcome!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to find mojo 'validate'