Error when mvn -P tomcat,min
When i built the Jetspeed Portal as the tutorial: http://portals.apache.org/tutorials/jetspeed-2/01/build-it.html, i got the following errors: $ mvn -P tomcat,min [ERROR] BUILD ERROR [INFO] --- [INFO] Error executing any tasks Embedded error: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:300: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:305: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:505: java.lang.ClassCastExecption: org.apache.maven.usability.MojoExecutionExceptionDiagnoser cannot be cast to org.apache.maven.usability.diagnostics.ErrorDiagnoser [INFO] --- [INFO] For more information, run Maven with the -e switch [INFO] --- i use the Maven-2.0.8 and JDK 6, anyone knows this problem, please help me! Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I add generated resources to target jar?
Thanks Dan! That did the trick. I included the following in my pom and it works beautifully: ... build resources resource directorytarget/generated-sources/antlr/directory includes include**/*.tokens/include /includes /resource /resources /build 2008/8/30 Dan Tran [EMAIL PROTECTED]: Maven pom allows you to add additional resource directories. Check the pom schema again. -D On Fri, Aug 29, 2008 at 2:40 PM, Jan van Mansum [EMAIL PROTECTED] wrote: Hello group, I am using the antlr3 maven plugin to generate a parser. I would also like the .tokens file to be included in the target jar file, so that a client project can use it to generate a tree walker. How can a achieve this? Thanks for any help, best regards, -- Jan van Mansum - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jan van Mansum - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when mvn -P tomcat,min
I don't know if it makes a difference to your problem, but there should be no space between -P and the profile names. On Sun, Aug 31, 2008 at 6:59 AM, Fancing [EMAIL PROTECTED] wrote: When i built the Jetspeed Portal as the tutorial: http://portals.apache.org/tutorials/jetspeed-2/01/build-it.html, i got the following errors: $ mvn -P tomcat,min [ERROR] BUILD ERROR [INFO] --- [INFO] Error executing any tasks Embedded error: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:300: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:305: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:505: java.lang.ClassCastExecption: org.apache.maven.usability.MojoExecutionExceptionDiagnoser cannot be cast to org.apache.maven.usability.diagnostics.ErrorDiagnoser [INFO] --- [INFO] For more information, run Maven with the -e switch [INFO] --- i use the Maven-2.0.8 and JDK 6, anyone knows this problem, please help me! Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when mvn -P tomcat,min
It works. Thanks a lot! :) But i think this document should be updated: http://portals.apache.org/tutorials/jetspeed-2/01/build-it.html There is ONE space between -P and the profile name!!! 2008/8/31 Paul Benedict [EMAIL PROTECTED]: I don't know if it makes a difference to your problem, but there should be no space between -P and the profile names. On Sun, Aug 31, 2008 at 6:59 AM, Fancing [EMAIL PROTECTED] wrote: When i built the Jetspeed Portal as the tutorial: http://portals.apache.org/tutorials/jetspeed-2/01/build-it.html, i got the following errors: $ mvn -P tomcat,min [ERROR] BUILD ERROR [INFO] --- [INFO] Error executing any tasks Embedded error: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:300: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:305: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:505: java.lang.ClassCastExecption: org.apache.maven.usability.MojoExecutionExceptionDiagnoser cannot be cast to org.apache.maven.usability.diagnostics.ErrorDiagnoser [INFO] --- [INFO] For more information, run Maven with the -e switch [INFO] --- i use the Maven-2.0.8 and JDK 6, anyone knows this problem, please help me! Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when mvn -P tomcat,min
You'll need to take this up with the Jetspeed dev team. Obviously the Maven guys have no control over the Jetspeed documentation. Wayne On 8/31/08, Fancing [EMAIL PROTECTED] wrote: It works. Thanks a lot! :) But i think this document should be updated: http://portals.apache.org/tutorials/jetspeed-2/01/build-it.html There is ONE space between -P and the profile name!!! 2008/8/31 Paul Benedict [EMAIL PROTECTED]: I don't know if it makes a difference to your problem, but there should be no space between -P and the profile names. On Sun, Aug 31, 2008 at 6:59 AM, Fancing [EMAIL PROTECTED] wrote: When i built the Jetspeed Portal as the tutorial: http://portals.apache.org/tutorials/jetspeed-2/01/build-it.html, i got the following errors: $ mvn -P tomcat,min [ERROR] BUILD ERROR [INFO] --- [INFO] Error executing any tasks Embedded error: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:300: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:305: The following error occurred while executing this line: D:\Develop\Maven\workspace\jetexpress\etc\build.xml:505: java.lang.ClassCastExecption: org.apache.maven.usability.MojoExecutionExceptionDiagnoser cannot be cast to org.apache.maven.usability.diagnostics.ErrorDiagnoser [INFO] --- [INFO] For more information, run Maven with the -e switch [INFO] --- i use the Maven-2.0.8 and JDK 6, anyone knows this problem, please help me! Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Override localRepository at plugin execution using another local repository plexus component implementation
Currently, a typical localRepository configuration is declared like this in the mojo. /** * Used to look up Artifacts in the remote repository. * * @parameter expression=${component.org.apache.maven.artifact.factory.ArtifactFactory} * @required * @readonly */ protected org.apache.maven.artifact.factory.ArtifactFactory factory; This means, I can create my own local repository plexus component implementation, declare it as a dependency in my pom in the plugin's dependency list, and pass it in as a execution configuration like execution configuration localmyExecutionLocalRepository/local /configuration? /execution /executions dependencies my implementation goes here /dependencies Where myExecutionLocalRepository is the plexus component name, known as hint Is the right approach? The motivation behind this is that I have a need to use dependency plugin to copy and unpack some very large artifacts and I dont want it to pollute my global local repository especially when using snapshot artifacts. myExecutionLocalRepository is located under target directory so that It can be cleanup via maven clean. Advice is greatly appreciated. Thanks -D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to override the value in pom's project properties in mojo
FYI, my problem has been solved in 2.1-RCx ( ie 2.0.10-RC) -D On Fri, Jul 25, 2008 at 9:12 PM, Dan Tran [EMAIL PROTECTED] wrote: I am writing a plugin to set the values of a given set of property key passing in by user. However if the user set the default values int pom.xml's properties, the plugin cant not overwrite them. Here is the source to the mojo http://svn.codehaus.org/mojo/trunk/mojo/build-helper-maven-plugin/src/main/java/org/codehaus/mojo/buildhelper/ReserveListenerPortMojo.java The pom example is at http://svn.codehaus.org/mojo/trunk/mojo/build-helper-maven-plugin/src/it/reserve-ports/pom.xml. Am i missing something? Thanks -D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing: org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.2.4
Yes, we installed a newer version of Artifactory over the weekend. Should be alright now and your artifact is available at http://repo.jfrog.org/artifactory/plugins-releases-local/org/jfrog/maven/annomojo/maven-plugin-anno/1.2.4/maven-plugin-anno-1.2.4.jar Yoav matinh wrote: On Friday 29 August 2008 thomas2004 wrote: Hi all, As I try to build the project by mvn eclipse:eclipse I got error as follow: [code] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.2.4 You get this because the maven-plugin-anno is not in maven's central repository. According to [0] your can configure maven to use JFrog's repository which would be the best option. Unfortunately this repo seems to be broken at the moment. As an alternative you can download the ZIP file as also explained on the page mentioned above [0] and extract it into your local repository (~/.m2/repository on unix). hth, - martin [0] http://www.jfrog.org/sites/mvn-anno-mojo/latest/ -- View this message in context: http://www.nabble.com/Missing%3A-org.jfrog.maven.annomojo%3Amaven-plugin-anno%3Ajar%3A1.2.4-tp19217580p19246005.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Override localRepository at plugin execution using another local repository plexus component implementation
You're on the right track, but there's a few problems here. Firstly, I'm a bit confused as you have artifactFactory, but refer to local repository. This is important - if the plugin is using a factory to create a repository then you can replace the factory, but if it's using ${settings.localRepository} you'll have to override that in a different way. As for replacing an implementation, the method you've given is not quite correct. You actually need something like: configuration factory implementation=com.foo.bar.MyArtifactFactory / /configuration A good example of this is the shade plugin, which does so for it's transformers. But if @component is used, or @readonly - this may not work anyway. For the specific use case you are talking about, replacement components shouldn't be needed, it just sounds like you want to modify the local repository. That seems like a feature request to make of the dependency plugin. Cheers, Brett 2008/9/1 Dan Tran [EMAIL PROTECTED] Currently, a typical localRepository configuration is declared like this in the mojo. /** * Used to look up Artifacts in the remote repository. * * @parameter expression=${component.org.apache.maven.artifact.factory.ArtifactFactory} * @required * @readonly */ protected org.apache.maven.artifact.factory.ArtifactFactory factory; This means, I can create my own local repository plexus component implementation, declare it as a dependency in my pom in the plugin's dependency list, and pass it in as a execution configuration like execution configuration localmyExecutionLocalRepository/local /configuration? /execution /executions dependencies my implementation goes here /dependencies Where myExecutionLocalRepository is the plexus component name, known as hint Is the right approach? The motivation behind this is that I have a need to use dependency plugin to copy and unpack some very large artifacts and I dont want it to pollute my global local repository especially when using snapshot artifacts. myExecutionLocalRepository is located under target directory so that It can be cleanup via maven clean. Advice is greatly appreciated. Thanks -D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brett Porter Blog: http://blogs.exist.com/bporter/
Re: Override localRepository at plugin execution using another local repository plexus component implementation
Oops, I pasted the wrong declaration, it should be /** * Location of the local repository. * * @parameter expression=${localRepository} * @readonly * @required */ protected org.apache.maven.artifact.repository.ArtifactRepository local; Looks like the expression=${localRepository} is the implicit ${settings.localRepository} Is there a way to pass in my own localRepository instead of using the implicit settings.localRepository. This way, there is no need to enhance the plugin. If we need to enhance dependency plugin to allow override of its local configuration, how is it going to be? Perhaps, we can add an additional configuration like localRepositoryPath( String) and create a new DefaultArtifactRepository if it is not null to replace the declared local at execution time? Thanks -Dan On Sun, Aug 31, 2008 at 5:25 PM, Brett Porter [EMAIL PROTECTED] wrote: You're on the right track, but there's a few problems here. Firstly, I'm a bit confused as you have artifactFactory, but refer to local repository. This is important - if the plugin is using a factory to create a repository then you can replace the factory, but if it's using ${settings.localRepository} you'll have to override that in a different way. As for replacing an implementation, the method you've given is not quite correct. You actually need something like: configuration factory implementation=com.foo.bar.MyArtifactFactory / /configuration A good example of this is the shade plugin, which does so for it's transformers. But if @component is used, or @readonly - this may not work anyway. For the specific use case you are talking about, replacement components shouldn't be needed, it just sounds like you want to modify the local repository. That seems like a feature request to make of the dependency plugin. Cheers, Brett 2008/9/1 Dan Tran [EMAIL PROTECTED] Currently, a typical localRepository configuration is declared like this in the mojo. /** * Used to look up Artifacts in the remote repository. * * @parameter expression=${component.org.apache.maven.artifact.factory.ArtifactFactory} * @required * @readonly */ protected org.apache.maven.artifact.factory.ArtifactFactory factory; This means, I can create my own local repository plexus component implementation, declare it as a dependency in my pom in the plugin's dependency list, and pass it in as a execution configuration like execution configuration localmyExecutionLocalRepository/local /configuration? /execution /executions dependencies my implementation goes here /dependencies Where myExecutionLocalRepository is the plexus component name, known as hint Is the right approach? The motivation behind this is that I have a need to use dependency plugin to copy and unpack some very large artifacts and I dont want it to pollute my global local repository especially when using snapshot artifacts. myExecutionLocalRepository is located under target directory so that It can be cleanup via maven clean. Advice is greatly appreciated. Thanks -D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brett Porter Blog: http://blogs.exist.com/bporter/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Override localRepository at plugin execution using another local repository plexus component implementation
On Sun, Aug 31, 2008 at 5:48 PM, Dan Tran [EMAIL PROTECTED] wrote: Is there a way to pass in my own localRepository instead of using the implicit settings.localRepository. This way, there is no need to enhance the plugin. On the off chance this is less complicated than it looks... does -Dmaven.repo.local=/path/to/repo do what you want? -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Override localRepository at plugin execution using another local repository plexus component implementation
Hi Wendy, that would not work since it switch to a new local repo for the whole maven build lifecycle. What I want is just to temporary change it at a specific plugin's execution time. Thanks -D On Sun, Aug 31, 2008 at 6:12 PM, Wendy Smoak [EMAIL PROTECTED] wrote: On Sun, Aug 31, 2008 at 5:48 PM, Dan Tran [EMAIL PROTECTED] wrote: Is there a way to pass in my own localRepository instead of using the implicit settings.localRepository. This way, there is no need to enhance the plugin. On the off chance this is less complicated than it looks... does -Dmaven.repo.local=/path/to/repo do what you want? -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Override localRepository at plugin execution using another local repository plexus component implementation
On Sun, Aug 31, 2008 at 5:48 PM, Dan Tran [EMAIL PROTECTED] wrote: Oops, I pasted the wrong declaration, it should be /** * Location of the local repository. * * @parameter expression=${localRepository} * @readonly * @required */ protected org.apache.maven.artifact.repository.ArtifactRepository local; Looks like the expression=${localRepository} is the implicit ${settings.localRepository} Is there a way to pass in my own localRepository instead of using the implicit settings.localRepository. This way, there is no need to enhance the plugin. Of course, we still need to remove @readonly which is a minimal change in the plugin If we need to enhance dependency plugin to allow override of its local configuration, how is it going to be? Perhaps, we can add an additional configuration like localRepositoryPath( String) and create a new DefaultArtifactRepository if it is not null to replace the declared local at execution time? Thanks -Dan On Sun, Aug 31, 2008 at 5:25 PM, Brett Porter [EMAIL PROTECTED] wrote: You're on the right track, but there's a few problems here. Firstly, I'm a bit confused as you have artifactFactory, but refer to local repository. This is important - if the plugin is using a factory to create a repository then you can replace the factory, but if it's using ${settings.localRepository} you'll have to override that in a different way. As for replacing an implementation, the method you've given is not quite correct. You actually need something like: configuration factory implementation=com.foo.bar.MyArtifactFactory / /configuration A good example of this is the shade plugin, which does so for it's transformers. But if @component is used, or @readonly - this may not work anyway. For the specific use case you are talking about, replacement components shouldn't be needed, it just sounds like you want to modify the local repository. That seems like a feature request to make of the dependency plugin. Cheers, Brett 2008/9/1 Dan Tran [EMAIL PROTECTED] Currently, a typical localRepository configuration is declared like this in the mojo. /** * Used to look up Artifacts in the remote repository. * * @parameter expression=${component.org.apache.maven.artifact.factory.ArtifactFactory} * @required * @readonly */ protected org.apache.maven.artifact.factory.ArtifactFactory factory; This means, I can create my own local repository plexus component implementation, declare it as a dependency in my pom in the plugin's dependency list, and pass it in as a execution configuration like execution configuration localmyExecutionLocalRepository/local /configuration? /execution /executions dependencies my implementation goes here /dependencies Where myExecutionLocalRepository is the plexus component name, known as hint Is the right approach? The motivation behind this is that I have a need to use dependency plugin to copy and unpack some very large artifacts and I dont want it to pollute my global local repository especially when using snapshot artifacts. myExecutionLocalRepository is located under target directory so that It can be cleanup via maven clean. Advice is greatly appreciated. Thanks -D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brett Porter Blog: http://blogs.exist.com/bporter/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
my maven plugin .IllegalStateException
The PluginDescriptor for the plugin Plugin [org.apache.maven.plugins:maven-checksnapshot-plugin] was not found. [INFO] [INFO] Trace java.lang.IllegalStateException: The PluginDescriptor for the plugin Plugin [org.apache.maven.plugins:maven-checksnapshot-plugin] was not found. at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:317) at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:207) at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:171) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1257) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1221) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:987) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(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:280) 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] [INFO] Total time: 1 second