Re: Can't deploy site,Help please.
Hi, You configure authentication in settings.xml. Look here for details: http://maven.apache.org/settings.html#Servers rgds, markku jiangshachina wrote: Hello, I tried to deploy project via scp just now, but authentication failed. How to set the user/password of remote machine in POM file? a cup of Java, cheers! Sha Jiang Markku Saarela wrote: One slash character was dropped out :-) file:///192.1.1.0/temp/directory - markku Markku Saarela wrote: Hi, No, File protocol can deploy any directory in network where user has access. The first slash character is defining that path is absolute two others are some server delimiters. file:/c:/temp vs. file:///someserver/depl or even file://192.1.1.0/temp/directory rgds, markku jiangshachina wrote: Hello, I have solved the issue by used file:///path/to/deployment/dir file protocol just deploys to a local path, doesn't it? a cup of Java, cheers! Sha Jiang 秋秋 wrote: Hi, yes,I have solved the issue by used file:///path/to/deployment/dir*, * thanks. 2007/2/6, Tim Kettler [EMAIL PROTECTED]: Hi, the URL you give in the distribution management section is the HTTP URL of your projects site. To deploy it you need to specify a valid deployment URL. This could be something like: - scp://my.server.com/var/www/htdocs/myproject (for SSH's secure copy) - sftp://my.server.com/deployment/dir (for SFTP deployment) - file:///path/to/deployment/dir (for deploying to a local file system) Hope this helps -Tim Am Dienstag, den 06.02.2007, 11:03 +0800 schrieb 秋秋: Hi, I use apache-tomcat-5.5.17 as a server for the project site,the url is http://localhost:8080/pcie/, I have added the configuration in the pom.xmllike this: distributionManagement site idmaven/id urlscp://localhost:8080/pcie//url /site /distributionManagement I have start up the server successfull as well as I Have execute site command,but when I execute site-deploy,I appear the error like this: FATAL ERROR: Error executing Maven for a project org.apache.maven.lifecycle.LifecycleExecutionException: Error uploading site at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java :441) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java :382) at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68) Caused by: org.apache.maven.plugin.MojoExecutionException: Error uploading site at org.apache.maven.plugins.site.SiteDeployMojo.execute( SiteDeployMojo.java :184) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:534) ... 8 more Caused by: org.apache.maven.wagon.authentication.AuthenticationException : Cannot connect. Reason: invalid server's version string at org.apache.maven.wagon.providers.ssh.AbstractSshWagon.openConnection ( AbstractSshWagon.java:239) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:106) at org.apache.maven.plugins.site.SiteDeployMojo.execute( SiteDeployMojo.java :153) ... 10 more Caused by: com.jcraft.jsch.JSchException: invalid server's version string
Re: Can't deploy site,Help please.
Hello, My local machine is Windows 2000, the remote machine is RedHat AS 4.0. I set the following statements in my pom.xml, distributionManagement repository idtest/id urlscp://HostIP/Absolute_Path_To_Repo/url /repository /distributionManagement and run command mvn deploy. Maven indicated me to login remote machine via [EMAIL PROTECTED], but there isn't the user in remote machine, factly, Administrator is my current user in local machine. Absolutely, the authentication would be failed. a cup of Java, cheers! Sha Jiang jiangshachina wrote: Hello, I tried to deploy project via scp just now, but authentication failed. How to set the user/password of remote machine in POM file? a cup of Java, cheers! Sha Jiang Markku Saarela wrote: One slash character was dropped out :-) file:///192.1.1.0/temp/directory - markku Markku Saarela wrote: Hi, No, File protocol can deploy any directory in network where user has access. The first slash character is defining that path is absolute two others are some server delimiters. file:/c:/temp vs. file:///someserver/depl or even file://192.1.1.0/temp/directory rgds, markku jiangshachina wrote: Hello, I have solved the issue by used file:///path/to/deployment/dir file protocol just deploys to a local path, doesn't it? a cup of Java, cheers! Sha Jiang 秋秋 wrote: Hi, yes,I have solved the issue by used file:///path/to/deployment/dir*, * thanks. 2007/2/6, Tim Kettler [EMAIL PROTECTED]: Hi, the URL you give in the distribution management section is the HTTP URL of your projects site. To deploy it you need to specify a valid deployment URL. This could be something like: - scp://my.server.com/var/www/htdocs/myproject (for SSH's secure copy) - sftp://my.server.com/deployment/dir (for SFTP deployment) - file:///path/to/deployment/dir (for deploying to a local file system) Hope this helps -Tim Am Dienstag, den 06.02.2007, 11:03 +0800 schrieb 秋秋: Hi, I use apache-tomcat-5.5.17 as a server for the project site,the url is http://localhost:8080/pcie/, I have added the configuration in the pom.xmllike this: distributionManagement site idmaven/id urlscp://localhost:8080/pcie//url /site /distributionManagement I have start up the server successfull as well as I Have execute site command,but when I execute site-deploy,I appear the error like this: FATAL ERROR: Error executing Maven for a project org.apache.maven.lifecycle.LifecycleExecutionException: Error uploading site at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java :441) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java :382) at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68) Caused by: org.apache.maven.plugin.MojoExecutionException: Error uploading site at org.apache.maven.plugins.site.SiteDeployMojo.execute( SiteDeployMojo.java :184) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:534) ... 8 more Caused by: org.apache.maven.wagon.authentication.AuthenticationException : Cannot connect. Reason: invalid server's version string at org.apache.maven.wagon.providers.ssh.AbstractSshWagon.openConnection ( AbstractSshWagon.java:239) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:106) at org.apache.maven.plugins.site.SiteDeployMojo.execute( SiteDeployMojo.java :153) ...
no /proxy url ?
Hello, I've installed archiva from a SVN checkout. I've configured a managed proxy and a proxied on to repo1.maven.org Requesting http://localhost:8080/archiva/repository /maven/activation/activation/1.0.2/activation-1.0.2.pom works. Requesting http://localhost:8080/archiva/proxy /maven/activation/activation/1.0.2/activation-1.0.2.pom fails HTTP ERROR: 404 There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. RequestURI=/archiva/proxy/maven/activation/activation/1.0.2/activation- 1.0.2.pom Caused by: There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. - [unknown location] at com.opensymphony.xwork.DefaultActionProxy.(DefaultActionProxy.java:72) at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:46) ... As I'm using archiva from maven1, I need the proxy feature to handle maven1-like requests : http://localhost:8080/archiva/proxy/maven/activation/jars/activation-1.0.2.jar What's wrong with /proxy URI ?
Re: Can't deploy site,Help please.
Hi, OK, I get it! Thanks very much! a cup of Java, cheers! Sha Jiang Markku Saarela wrote: Hi, You configure authentication in settings.xml. Look here for details: http://maven.apache.org/settings.html#Servers rgds, markku jiangshachina wrote: Hello, I tried to deploy project via scp just now, but authentication failed. How to set the user/password of remote machine in POM file? a cup of Java, cheers! Sha Jiang Markku Saarela wrote: One slash character was dropped out :-) file:///192.1.1.0/temp/directory - markku Markku Saarela wrote: Hi, No, File protocol can deploy any directory in network where user has access. The first slash character is defining that path is absolute two others are some server delimiters. file:/c:/temp vs. file:///someserver/depl or even file://192.1.1.0/temp/directory rgds, markku jiangshachina wrote: Hello, I have solved the issue by used file:///path/to/deployment/dir file protocol just deploys to a local path, doesn't it? a cup of Java, cheers! Sha Jiang 秋秋 wrote: Hi, yes,I have solved the issue by used file:///path/to/deployment/dir*, * thanks. 2007/2/6, Tim Kettler [EMAIL PROTECTED]: Hi, the URL you give in the distribution management section is the HTTP URL of your projects site. To deploy it you need to specify a valid deployment URL. This could be something like: - scp://my.server.com/var/www/htdocs/myproject (for SSH's secure copy) - sftp://my.server.com/deployment/dir (for SFTP deployment) - file:///path/to/deployment/dir (for deploying to a local file system) Hope this helps -Tim Am Dienstag, den 06.02.2007, 11:03 +0800 schrieb 秋秋: Hi, I use apache-tomcat-5.5.17 as a server for the project site,the url is http://localhost:8080/pcie/, I have added the configuration in the pom.xmllike this: distributionManagement site idmaven/id urlscp://localhost:8080/pcie//url /site /distributionManagement I have start up the server successfull as well as I Have execute site command,but when I execute site-deploy,I appear the error like this: FATAL ERROR: Error executing Maven for a project org.apache.maven.lifecycle.LifecycleExecutionException: Error uploading site at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java :441) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java :382) at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68) Caused by: org.apache.maven.plugin.MojoExecutionException: Error uploading site at org.apache.maven.plugins.site.SiteDeployMojo.execute( SiteDeployMojo.java :184) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:534) ... 8 more Caused by: org.apache.maven.wagon.authentication.AuthenticationException : Cannot connect. Reason: invalid server's version string at org.apache.maven.wagon.providers.ssh.AbstractSshWagon.openConnection ( AbstractSshWagon.java:239) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:106) at
Re: no /proxy url ?
Hi Nicolas, Suffered from exactly the same problem a few weeks back - turns out the Archiva team have removed the proxy distinction. To access your repository, you simply go to the webdav URL (whatever the URL you set up for the repository). This URL now provides all the proxy functionality (at least as far as I have tested it), and should work for Maven 1 requests as well. You do need to do some extra work to get everything working though: the webdav URL is secured, so by default will ask for a username and a password. To allow for anonymous access, you need to grant the guest user the repository_observer role on all your repositories. Another little catch to look out for with Maven 1 and Archiva is handling of dependencies of type plugin - not sure if the bug has been fixed, but we had to apply a patch to get everything working. You should find the details in the Archiva bug tracking database, if not let me know and I can post them up here again. Mike. On 2/7/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I've installed archiva from a SVN checkout. I've configured a managed proxy and a proxied on to repo1.maven.org Requesting http://localhost:8080/archiva/repository /maven/activation/activation/1.0.2/activation-1.0.2.pom works. Requesting http://localhost:8080/archiva/proxy /maven/activation/activation/1.0.2/activation-1.0.2.pom fails HTTP ERROR: 404 There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. RequestURI=/archiva/proxy/maven/activation/activation/1.0.2/activation- 1.0.2.pom Caused by: There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. - [unknown location] at com.opensymphony.xwork.DefaultActionProxy.( DefaultActionProxy.java:72) at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy( DefaultActionProxyFactory.java:46) ... As I'm using archiva from maven1, I need the proxy feature to handle maven1-like requests : http://localhost:8080/archiva/proxy/maven/activation/jars/activation-1.0.2.jar What's wrong with /proxy URI ?
Re: no /proxy url ?
This change has for side effect that archiva does not handle maven1 requests anymore : http://localhost:8080/archiva/repository/maven/activation/activation/1.0.2/activation-1.0.2.pomworks as expected and will make a maven2 client relocate to javax.activation Previous archiva builds auto-detected maven1 formatted request and converted them to Artifacts internal object for resolution. A special case I contributed to was to handle relocation internally for such maven1 requests, as maven1 does not read those meta-data. now http://localhost:8080/archiva/repository/maven/activation/jars/activation-1.0.2.jaris 500 error: Could not find /activation/jars/activation-1.0.2.jar in any of the repositories. This is a blocking regression for me as lot's of my projects still use maven1. 2007/2/7, Michael Horwitz [EMAIL PROTECTED]: Hi Nicolas, Suffered from exactly the same problem a few weeks back - turns out the Archiva team have removed the proxy distinction. To access your repository, you simply go to the webdav URL (whatever the URL you set up for the repository). This URL now provides all the proxy functionality (at least as far as I have tested it), and should work for Maven 1 requests as well. You do need to do some extra work to get everything working though: the webdav URL is secured, so by default will ask for a username and a password. To allow for anonymous access, you need to grant the guest user the repository_observer role on all your repositories. Another little catch to look out for with Maven 1 and Archiva is handling of dependencies of type plugin - not sure if the bug has been fixed, but we had to apply a patch to get everything working. You should find the details in the Archiva bug tracking database, if not let me know and I can post them up here again. Mike. On 2/7/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I've installed archiva from a SVN checkout. I've configured a managed proxy and a proxied on to repo1.maven.org Requesting http://localhost:8080/archiva/repository /maven/activation/activation/1.0.2/activation-1.0.2.pom works. Requesting http://localhost:8080/archiva/proxy /maven/activation/activation/1.0.2/activation-1.0.2.pom fails HTTP ERROR: 404 There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. RequestURI=/archiva/proxy/maven/activation/activation/1.0.2/activation- 1.0.2.pom Caused by: There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. - [unknown location] at com.opensymphony.xwork.DefaultActionProxy.( DefaultActionProxy.java:72) at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy( DefaultActionProxyFactory.java:46) ... As I'm using archiva from maven1, I need the proxy feature to handle maven1-like requests : http://localhost:8080/archiva/proxy/maven/activation/jars/activation-1.0.2.jar What's wrong with /proxy URI ?
Re: no /proxy url ?
I made some more tests and I was wrong : relocation is still applied as expected. http://localhost:8080/archiva/repository/maven/servletapi/jars/servletapi-2.4.jar logs 181281 [btpool0-4] DEBUG org.apache.maven.archiva.proxy.ProxyRequestHandler - Artifact requested is: servletapi:servletapi:jar:2.4:runtime 181297 [btpool0-4] DEBUG org.apache.maven.archiva.proxy.ProxyRequestHandler - Artifact servletapi:servletapi:2.4 has been relocated to javax.servlet:servlet-api:2.4 /logs I then get a strange error : *Error 404 Not Found* Resource in error: http://localhost:8080/archiva/repository/servletapi/jars/servletapi-2.4.jar/servletapi/jars/servletapi-2.4.jar it.could.webdav.DAVException: Not found at it.could.webdav.methods.HEAD.process(HEAD.java:52) at it.could.webdav.methods.GET.process(GET.java:58) at it.could.webdav.DAVProcessor.process(DAVProcessor.java:79) at org.codehaus.plexus.webdav.simple.SimpleDavServerComponent.process(SimpleDavServerComponent.java:142) at org.apache.maven.archiva.web.repository.ProxiedDavServer.process(ProxiedDavServer.java:157) Seems the DAV server does not get the relocated path. 2007/2/7, nicolas de loof [EMAIL PROTECTED]: This change has for side effect that archiva does not handle maven1 requests anymore : http://localhost:8080/archiva/repository/maven/activation/activation/1.0.2/activation-1.0.2.pom works as expected and will make a maven2 client relocate to javax.activation Previous archiva builds auto-detected maven1 formatted request and converted them to Artifacts internal object for resolution. A special case I contributed to was to handle relocation internally for such maven1 requests, as maven1 does not read those meta-data. now http://localhost:8080/archiva/repository/maven/activation/jars/activation-1.0.2.jaris 500 error: Could not find /activation/jars/activation- 1.0.2.jar in any of the repositories. This is a blocking regression for me as lot's of my projects still use maven1. 2007/2/7, Michael Horwitz [EMAIL PROTECTED]: Hi Nicolas, Suffered from exactly the same problem a few weeks back - turns out the Archiva team have removed the proxy distinction. To access your repository, you simply go to the webdav URL (whatever the URL you set up for the repository). This URL now provides all the proxy functionality (at least as far as I have tested it), and should work for Maven 1 requests as well. You do need to do some extra work to get everything working though: the webdav URL is secured, so by default will ask for a username and a password. To allow for anonymous access, you need to grant the guest user the repository_observer role on all your repositories. Another little catch to look out for with Maven 1 and Archiva is handling of dependencies of type plugin - not sure if the bug has been fixed, but we had to apply a patch to get everything working. You should find the details in the Archiva bug tracking database, if not let me know and I can post them up here again. Mike. On 2/7/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I've installed archiva from a SVN checkout. I've configured a managed proxy and a proxied on to repo1.maven.org Requesting http://localhost:8080/archiva/repository /maven/activation/activation/1.0.2/activation- 1.0.2.pom works. Requesting http://localhost:8080/archiva/proxy /maven/activation/activation/1.0.2/activation-1.0.2.pom fails HTTP ERROR: 404 There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. RequestURI=/archiva/proxy/maven/activation/activation/1.0.2/activation- 1.0.2.pom Caused by: There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. - [unknown location] at com.opensymphony.xwork.DefaultActionProxy.( DefaultActionProxy.java:72) at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy( DefaultActionProxyFactory.java :46) ... As I'm using archiva from maven1, I need the proxy feature to handle maven1-like requests : http://localhost:8080/archiva/proxy/maven/activation/jars/activation-1.0.2.jar What's wrong with /proxy URI ?
Re: no /proxy url ?
The patch to solve issue about maven plugin is still not applied : http://localhost:8080/archiva/repository/maven/maven/plugins/maven-abbot-plugin-1.0.jar 2007-02-07 10:38:33,921 [btpool0-4] DEBUG ProxyRequestHandler- Retrieving maven/maven-abbot-plugin/1.0/maven-abbot-plugin-1.0.pom from maven plublic repository 2007-02-07 10:38:34,609 [btpool0-4] DEBUG ProxyRequestHandler- Successfully downloaded 2007-02-07 10:38:34,624 [btpool0-4] DEBUG ProxyRequestHandler- Retrieving maven/maven-abbot-plugin/1.0/maven-abbot-plugin-1.0.plugin from maven plublic repository 2007/2/7, nicolas de loof [EMAIL PROTECTED]: This change has for side effect that archiva does not handle maven1 requests anymore : http://localhost:8080/archiva/repository/maven/activation/activation/1.0.2/activation-1.0.2.pom works as expected and will make a maven2 client relocate to javax.activation Previous archiva builds auto-detected maven1 formatted request and converted them to Artifacts internal object for resolution. A special case I contributed to was to handle relocation internally for such maven1 requests, as maven1 does not read those meta-data. now http://localhost:8080/archiva/repository/maven/activation/jars/activation-1.0.2.jaris 500 error: Could not find /activation/jars/activation- 1.0.2.jar in any of the repositories. This is a blocking regression for me as lot's of my projects still use maven1. 2007/2/7, Michael Horwitz [EMAIL PROTECTED]: Hi Nicolas, Suffered from exactly the same problem a few weeks back - turns out the Archiva team have removed the proxy distinction. To access your repository, you simply go to the webdav URL (whatever the URL you set up for the repository). This URL now provides all the proxy functionality (at least as far as I have tested it), and should work for Maven 1 requests as well. You do need to do some extra work to get everything working though: the webdav URL is secured, so by default will ask for a username and a password. To allow for anonymous access, you need to grant the guest user the repository_observer role on all your repositories. Another little catch to look out for with Maven 1 and Archiva is handling of dependencies of type plugin - not sure if the bug has been fixed, but we had to apply a patch to get everything working. You should find the details in the Archiva bug tracking database, if not let me know and I can post them up here again. Mike. On 2/7/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I've installed archiva from a SVN checkout. I've configured a managed proxy and a proxied on to repo1.maven.org Requesting http://localhost:8080/archiva/repository /maven/activation/activation/1.0.2/activation- 1.0.2.pom works. Requesting http://localhost:8080/archiva/proxy /maven/activation/activation/1.0.2/activation-1.0.2.pom fails HTTP ERROR: 404 There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. RequestURI=/archiva/proxy/maven/activation/activation/1.0.2/activation- 1.0.2.pom Caused by: There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. - [unknown location] at com.opensymphony.xwork.DefaultActionProxy.( DefaultActionProxy.java:72) at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy( DefaultActionProxyFactory.java :46) ... As I'm using archiva from maven1, I need the proxy feature to handle maven1-like requests : http://localhost:8080/archiva/proxy/maven/activation/jars/activation-1.0.2.jar What's wrong with /proxy URI ?
Is it possible ot sign the jar with all dependencies that maven generates using its assembly plugin? any help appreciated.
Hello list, Is it possible ot sign the jar with all dependencies that maven generates using its assembly plugin? The maven jar plugin has manifest and keystore config params. Are those accessible or usable osmehow by the assembly plugin? Scenario: I'm trying to deploy a large jar with all dependencies a)signed and b) included in the main jar Any help appreciated, of course. Thanks, Joshua
more than one source directory
Hallo, I would like to have more than one source directory. Currently the src structure looks like src/core/src src/test/src src/plugins/src Whereby test dosn't mean a JUnit test. I cannot modify the source tree structure. So I'm looking for an alternative way and would like to get some hints. Kindly Regards Andrey -- Andrey Behrens, Mobil: +49-160-92755947 Phone: +49-228-936-36478 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more than one source directory
Look at http://mojo.codehaus.org/build-helper-maven-plugin/ the add-source goal will add other sources directory to the build process. 2007/2/7, Behrens, Andrey [EMAIL PROTECTED]: Hallo, I would like to have more than one source directory. Currently the src structure looks like src/core/src src/test/src src/plugins/src Whereby test dosn't mean a JUnit test. I cannot modify the source tree structure. So I'm looking for an alternative way and would like to get some hints. Kindly Regards Andrey -- Andrey Behrens, Mobil: +49-160-92755947 Phone: +49-228-936-36478 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
executable jar
Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane
add builders in eclipse:eclipse
hi list after a eclipse:clean, the builders for eclipse are gone. does anybody know, when the feature is available, to add buildcommands like: buildCommand nameorg.eclipse.ui.externaltools.ExternalToolBuilder/name triggersauto,/triggers arguments dictionary keyLaunchConfigHandle/key valuelt;projectgt;/.externalToolBuilders/maven-update-repo.launch/value /dictionary /arguments /buildCommand or is it possible to add such commands at the moment in a diffenet way? because the BuildCommand is ready for that. thank for any hints marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: add builders in eclipse:eclipse
I have this in my pom to add the aspectj builder: plugin artifactIdmaven-eclipse-plugin/artifactId configuration outputDirectorytarget/ajdtclasses/outputDirectory projectnatures projectnatureorg.eclipse.ajdt.ui.ajnature/projectnature projectnatureorg.eclipse.jdt.core.javanature/projectnature /projectnatures buildcommands buildcommandorg.eclipse.ajdt.core.ajbuilder/buildcommand /buildcommands /configuration /plugin Gaute On 2/7/07, marc gassmann [EMAIL PROTECTED] wrote: hi list after a eclipse:clean, the builders for eclipse are gone. does anybody know, when the feature is available, to add buildcommands like: buildCommand nameorg.eclipse.ui.externaltools.ExternalToolBuilder/name triggersauto,/triggers arguments dictionary keyLaunchConfigHandle/key valuelt;projectgt;/.externalToolBuilders/maven-update-repo.launch /value /dictionary /arguments /buildCommand or is it possible to add such commands at the moment in a diffenet way? because the BuildCommand is ready for that. thank for any hints marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: add builders in eclipse:eclipse
hi thanks a lot for the fast respond. but unfortunately I need arguments. this one is possible at the moment as well with the plugin. I have something like that: plugins plugin artifactIdmaven-eclipse-plugin/artifactId configuration buildcommands buildcommand nameorg.eclipse.ui.externaltools.ExternalToolBuilder/name triggersauto,/triggers arguments dictionary keyLaunchConfigHandle/key valuelt;projectgt;/.externalToolBuilders/maven-update-repo.launch/value /dictionary /arguments /buildcommand /buildcommands /configuration /plugin and this doesnt work :-( other hints? thx marc Gaute Lote said the following on 07.02.2007 11:38: I have this in my pom to add the aspectj builder: plugin artifactIdmaven-eclipse-plugin/artifactId configuration outputDirectorytarget/ajdtclasses/outputDirectory projectnatures projectnatureorg.eclipse.ajdt.ui.ajnature/projectnature projectnatureorg.eclipse.jdt.core.javanature/projectnature /projectnatures buildcommands buildcommandorg.eclipse.ajdt.core.ajbuilder/buildcommand /buildcommands /configuration /plugin Gaute On 2/7/07, marc gassmann [EMAIL PROTECTED] wrote: hi list after a eclipse:clean, the builders for eclipse are gone. does anybody know, when the feature is available, to add buildcommands like: buildCommand nameorg.eclipse.ui.externaltools.ExternalToolBuilder/name triggersauto,/triggers arguments dictionary keyLaunchConfigHandle/key valuelt;projectgt;/.externalToolBuilders/maven-update-repo.launch /value /dictionary /arguments /buildCommand or is it possible to add such commands at the moment in a diffenet way? because the BuildCommand is ready for that. thank for any hints marc - 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: more than one source directory
On Wednesday 07 February 2007 11:09, nicolas de loof wrote: Hi, I thank you for your quick help. Look at http://mojo.codehaus.org/build-helper-maven-plugin/ the add-source goal will add other sources directory to the build process. Regards Andrey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: executable jar
Good day to you, Jane, What do you mean by it can only be used in your machine? What error are you getting when used in another machine? Cheers, Franz Lan-6 wrote: Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane -- View this message in context: http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369 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: Order of classpath supplied by dependencies ant task
Good day to you, Joseph, AFAIK, you cannot control the order of the dependencies...And I can't think of a workaround. Curious, why use antlib for your dependency management and not use maven's ? Cheers, Franz Joseph Leniston wrote: Hi, I am using Antlib for Maven 2.0 to do dependency management in our ant builds. I have a number of POM files for compiling common, server and client code. I also want to use maven to manage our server runtime classpath. I use the following code to get the server runtime classpath from a POM file and store it in a pathId for use later. artifact:dependencies pathId=cp.server.runtime.jars filesetId=server.runtime.jars.fileset remoteRepository refid=maven.repository / pom file=${fetched.build.files.dir}/server_runtime_pom.xml / /artifact:dependencies However if I list the contents of the cp.server.runtime.jars property the jar files are not in the order I specified: property name=cp refid=cp.server.runtime.jars/ echo message=Server Runtime Classpath is ${cp}/ It is important that I can specify the order of the runtime jar files because there is a patch that must be first in the classpath. Is there a way to specify an order of jar files in the POM file? Or to force the dependencies to be stored in the pathID property in the same order as in the POM file? --- This email message is intended solely for the person or entity to which it is addressed. The information it contains is confidential and may be legally privileged. Any review, retransmission, dissemination or other use of this email may be unlawful. If you are not the intended recipient, please notify us immediately and destroy the email from all sources. Thank you. Child, Youth and Family Service accepts no responsibility for changes made to this email or to any attachments after transmission from the Office. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Order-of-classpath-supplied-by-dependencies-ant-task-tf3184655s177.html#a8845470 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: Excluding certain modules in a profile
Good day to you, Ravi, AFAIK, you cannot exclude a module from your build. However, what you can do is to include modules. Thus, you could simply create something like.. ?xml version=1.0 encoding=UTF-8 ? project ... modules modulemodule3/module modulemodule4/module /modules profiles profile idcpp-qa/id modules modulemodule1/module modulemodule2/module /modules /profile /profiles ... /project This would then build modules module3 and module4 by default, unless you specify -Pccp-qa so that modules module1 to module4 gets build. But if you want your default build to include module1 and module2, and simply exclude them on certain occassions, then you can do something like... project ... modules modulemodule3/module modulemodule4/module /modules profiles profile activation property name!exclude-cpp-qa/name /property /activation modules modulemodule1/module modulemodule2/module /modules /profile /profiles ... /project The pom above builds modules module1 to module4 by default ( since by default, the property exclude-cpp-qa is not defined ), and will build modules module3 and module4 only if exclude-cpp-qa is defined ( i.e. mvn clean install -Dexclude-cpp-qa ). See [1] and [2] for more info. Cheers, Franz [1] http://maven.apache.org/guides/introduction/introduction-to-profiles.html [2] http://docs.codehaus.org/display/MAVENUSER/Profiles Balasubramanian, Ravi Shankar wrote: Hi, I am using maven 2.0.4 and I want to be excluding certain modules while building my project in a certain profile. Following is the scenarion: This is how my main pom looks like: ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.informatica.metadatarepository.qa/groupId artifactIdmetamodels/artifactId packagingpom/packaging name${artifactId}/name modules modulemodule1/module modulemodule2/module modulemodule3/module modulemodule4/module /modules profiles profile idcpp-qa/id modules modulemodule3/module modulemodule4/module /modules /profile /profiles With the above pom, when I build the project activating the profile cpp-qa, all the four modules are being built. I want to be building only module3 and module4 using certain configurations in this profile. Is there a way by which I can accomplish this in maven2? Thanks for any help, Ravi. Tough times never last, but tough men do... -- View this message in context: http://www.nabble.com/Excluding-certain-modules-in-a-profile-tf3185303s177.html#a8845843 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dependency to a pom file
Hello, Can I use a parent artifact as a reference in a project pom? For example a cut out from a test pom.xml: dependency groupIdde.tmobile.cabu/groupId artifactIdfom/artifactId version7.1/version /dependency fom is a parent artifact with a list of modules in its pom.xml. But it seems that this wont work. It seems that maven expects a jar artifact. If I do something like that dependency groupIdde.tmobile.cabu/groupId artifactIdfom-module1/artifactId version7.1/version /dependency does it work. Is that behaviour correct or is there somewhere a bug? Kindly Regards Andrey -- Andrey Behrens, Mobil: +49-160-92755947 Phone: +49-228-936-36478 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dependency to a pom file
Try setting the type to pom, i.e. dependency groupIdde.tmobile.cabu/groupId artifactIdfom/artifactId version7.1/version typepom/type /dependency This seems to work fine for me. Cheers, Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] Simple copy and filter plugin?
Hi, often i need only to copy some files from one directory to another. Sometimes the files must be filtered. Is there any simple plugin for this? I tried two plugins to do the job: - The assemby-plugin doesn't filter filesets and i can't read ${project.build.finalName} in the descriptor. - The resources-plugin isn't free to set source and destination directory on each execution. Regards Sebastian -- T-Systems Multimedia Solutions GmbH (T-Systems MMS) Sebastian Breit Softwareentwickler Hausanschrift: Riesaer Strasse 5, 01129 Dresden Postanschrift: Postfach 10 02 24, 01072 Dresden Telefon: +49 351 28 20-29 27 Telefax: +49 351 28 20-51 14 E-Mail: mailto:[EMAIL PROTECTED] Internet: http://www.t-systems-mms.com Aufsichtsrat: Helmut Binder (Vorsitzender) Geschäftsführung: Dr. Klaus Radermacher, Peter Klingenburg Handelsregister: Amtsgericht Dresden (HRB 11433), Sitz der Gesellschaft Dresden Ust-IdNr.: DE 811 807 949
RE: compile tries to bundle up the ear - should it?
This is all very contradictory. So I need to do a maven install so the ear can find the war/ejbs, yet all I REALLY want to do is compile. I have to do an INSTALL even though SNAPSHOT in essence means build every time. Why do things need to go into the repository? Developers used to be able to do a compile in 58 seconds. Now because compile needs to build the ear/war/ejbs, you have to do an install that takes 13 - 15 minutes. How does this not seem infinitely frustrating and completely infuriating? -Original Message- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 8:58 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? I would need more information on your POMs, project structure etc to be able to explain why you are having these problems. At this stage there is probably no other advice I can give you. Is there anyone else out there who can help? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 4:43 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Yeah, this is kinda nuts, even after running an install, I see things getting rebuilt: [INFO] Building withdrawalEJB [INFO]task-segment: [install] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] Compiling 3 source files to E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [surefire:test] [INFO] No tests to run. [INFO] [jar:jar] [INFO] Building jar: E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\withdrawalEJB- 1.0-SNAPSHOT.jar [INFO] [install:install] [INFO] Installing E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\withdrawalEJB- 1.0-SNAPSHOT.jar to E:\work\m2\Repository\lty\withdrawa Shouldn't this happen just once? Why each time? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 9:59 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? So in essence you're suggesting shutting of unittests via a switch (most developers already think it takes too long and use -Dtest=asdf). I personally find this unacceptable. I still think it's silly that mvn tries to build an ear/war/ejbs when all it needs are the underlying classes. There's part of the picture I think I'm not emphasizing enough which is the inherently long drawn out process building an atg app requires (their assembly phase) which we've linked to the package lifecycle goal. Having to do an install of each module takes too much time moving around and doing an install of everything takes too long if all you want to do is compile. To build an ejb, the underlying java source needs to be compiled and stashed somewhere doesn't it? I just still don't understand why there would be this dependency on an ear file to simply compile something in one of the main applications. I have a feeling this will be the straw that breaks the development camels back. -Original Message- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 8:05 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? Hopefully they're all using Eclipse and they can run 'mvn eclipse:eclipse' to generate the Eclipse project files they need so that they can compile their Java code as they develop. You don't need to build your EJB, WAR and EAR files just to get your classes to compile UNLESS other modules depend on them. For example, if I have modules A, B and C and module B is dependent on A but C is independent of both of them, I can build C without needing access to artifacts from A and B. If, however, I want to build B, I will need access to A.jar. A.jar would normally come from my local repository since I've run 'mvn clean install' in module A. The whole point is that you've decided when designing your project structure that A, B and C are separately managed modules (with dependencies between them). Therefore, to access A's classes from B you need to package them in some way. In Maven, the way to do this is to package them as a jar file and place them in your local repository (and eventually in your snapshot repository and, finally, in your production repository). As for running tests, developers can turn off running the tests during their development cycle (see the Maven Website for details). The actual package/install steps of creating a jar and copying it to a local repository are very quick so no developer is really going to notice the lost time. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 February 2007 10:37 AM To: Maven
Re: Excluding certain modules in a profile
I don't believe this is possible. Instead, I think you would need to set it up as follows: parent/pom.xml modules/ profiles profile idcpp-qa/id modules modulemodule3/module modulemodule4/module /modules /profile profile iddefault/id modules modulemodule1/module modulemodule2/module modulemodule3/module modulemodule4/module /modules /profile /profiles And then use some activation magic to decide when to turn on default etc. No guarantee this would work as I've never done it myself, but I'm fairly certain your other proposed solution will not work, so give this a try. Wayne On 2/7/07, Balasubramanian, Ravi Shankar [EMAIL PROTECTED] wrote: Hi, I am using maven 2.0.4 and I want to be excluding certain modules while building my project in a certain profile. Following is the scenarion: This is how my main pom looks like: ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.informatica.metadatarepository.qa/groupId artifactIdmetamodels/artifactId packagingpom/packaging name${artifactId}/name modules modulemodule1/module modulemodule2/module modulemodule3/module modulemodule4/module /modules profiles profile idcpp-qa/id modules modulemodule3/module modulemodule4/module /modules /profile /profiles With the above pom, when I build the project activating the profile cpp-qa, all the four modules are being built. I want to be building only module3 and module4 using certain configurations in this profile. Is there a way by which I can accomplish this in maven2? Thanks for any help, Ravi. Tough times never last, but tough men do... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dependencies are bloated in M2
FWIW, I want to mention that we did end up using exclusions and that did the trick. What I was missing was how could I find what was dependent on what. For that the mvn site | Dependency Report provided the answer. From there it was a matter of excluding the dependencies I did not want. Painful but effective. So I was hoping that there would be a POM level exclusions element that would exclude the dependencies from all the artifacts in that POM. That would be useful. Thanks for the clarifications on the provided vs exclusion concept. Using Provided does seem a little hokey. Pankaj craigmcc wrote: On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: Yes, but sometimes you will need to use a dependency for compile time only, and NOT for runtime. You don't need the container to provide it for you either because it is not required for runtime. Example: aspectjtools.jar. You can't exclude it because your project will not compile. The only way is to give it the provided scope. That is not correct. Declaring a dependency to be optional puts it on the compile classpath, but avoids any attempt to include it at runtime. Even if your container doesn't provide it that's not a problem, maven doesn't care. I know it is not very clean to give a dependency a provided scope when it's not going to be provided anywhere, but sometimes you need to do this if you want to compile against it. The semantics of provided are different than optional even though Maven does not enforce it. The code you write against a provided API assumes that the API will indeed be provided by the container. As an example, you might declare as provided a library that you've installed in Tomcat's common/lib directory. The library must be there in order for the application to function -- but Maven can assume that it will indeed by supplied by the container, so won't include it in the WAR. Optional, on the other hand, means what it says. Declaring such a dependency means that you will need it available at compile time FOR THE DEPENDENCY, but not necessarily for your own code (unless you explicitly need it for other reasons). The library is explicitly NOT required at runtime, because your dependency has said, in effect, I can use this library if it exists, but if it does not, no harm no foul. Note also that optional is NOT a scope -- it is a completely separate element. That is because the concept of being optional is orthogonal to scope ... it's perfectly reasonable, for example, to have an optional module with compile scope if your build process knows how to intelligently deal with that combination. PLEASE do not misuse provided scope to mean the optional element or vice versa. PLEASE set up your POMs to say what you mean. These are two DIFFERENT concepts! Craig Bashar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Sanchez Sent: Tuesday, February 06, 2007 5:18 PM To: Maven Users List Subject: Re: dependencies are bloated in M2 still not right, you have to use exclusions provided means the environment (read appserver) provides that dependency, which is only true for few dependencies in the whole world, like servlet-api On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: This is the question I was answering: Tandon, Pankaj wrote: 1. How can we control what get's into WEB-INF/lib. We tried all the scopes mentioned, but that did not help. And it's follow up: Christian Goetze wrote: I believe that the scope that should work is provided. The problem is that I don't know if maven is smart enough to remove a provided dependency from the transitive closure. I would call that a bug if it didn't. And the answer to these 2 questions is to use the provided scope. It will also stop a dependency from being passed on transitively. Using exclusions is NOT right if you still want to compile against these dependencies. Bashar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Sanchez Sent: Tuesday, February 06, 2007 5:02 PM To: Maven Users List Subject: Re: dependencies are bloated in M2 exactly, that's why he needs to use exclusions, you exclude things that you don't need. On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: It is the right solution. Using exclusions will exclude a dependency from being downloaded at all, which means it won't be available at any path. Using provided will still make the dependency available for compile time, but not in runtime, and will not bundle it in the package. Read maven FAQ: http://maven.apache.org/general.html#scope-provided -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Sanchez Sent: Tuesday, February 06, 2007 4:29 PM To: Maven Users List
Re: Excluding certain modules in a profile
Try this to set up a default profile: profile iddefault/id activation activeByDefaulttrue/activeByDefault /activation modules ... /modules /profile Cheers, Jon Wayne Fay wrote: I don't believe this is possible. Instead, I think you would need to set it up as follows: parent/pom.xml modules/ profiles profile idcpp-qa/id modules modulemodule3/module modulemodule4/module /modules /profile profile iddefault/id modules modulemodule1/module modulemodule2/module modulemodule3/module modulemodule4/module /modules /profile /profiles And then use some activation magic to decide when to turn on default etc. No guarantee this would work as I've never done it myself, but I'm fairly certain your other proposed solution will not work, so give this a try. Wayne On 2/7/07, Balasubramanian, Ravi Shankar [EMAIL PROTECTED] wrote: Hi, I am using maven 2.0.4 and I want to be excluding certain modules while building my project in a certain profile. Following is the scenarion: This is how my main pom looks like: ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.informatica.metadatarepository.qa/groupId artifactIdmetamodels/artifactId packagingpom/packaging name${artifactId}/name modules modulemodule1/module modulemodule2/module modulemodule3/module modulemodule4/module /modules profiles profile idcpp-qa/id modules modulemodule3/module modulemodule4/module /modules /profile /profiles With the above pom, when I build the project activating the profile cpp-qa, all the four modules are being built. I want to be building only module3 and module4 using certain configurations in this profile. Is there a way by which I can accomplish this in maven2? Thanks for any help, Ravi. Tough times never last, but tough men do... - 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: [m2] Simple copy and filter plugin?
I'd use the antrun plugin. -- View this message in context: http://www.nabble.com/-m2--Simple-copy-and-filter-plugin--tf3187244s177.html#a8846466 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: [M2]: Doubts about modules and packing.
Marcos, use the overlay capabilities of the war plugin to merge dependent war's. Be warned that timestamping issues exist (newer files in dependent jar's do not get overwritten): http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html i believe the uberjar mojo is what you're looking for which would solve your webstart issues. never used it so i'm not certain. Cheers! Marcos Silva Pereira wrote: Hello, this is my first post to this list. Usually, I can find any information I need to use Maven. But, nowadays, because my company is migrating from Ant to Maven and we have a lot of specific targets, I need to appeal to this mailing list. So, we are doing the migration following the steps below: 1. Put projects in Maven layout 2. Split some projects in many modules project 3. Migrate Ant tasks. Doing theses steps we have some doubts. Our environment: We have a set of internal projects that work more like libs to other real projects. So, we desire to add these internal libs as maven managed dependencies, we´ve even created an internal remote repository to deploy them. Right now, these libs have only classes, but to us, in a logical view, they must contain all artifacts related to them - like JSPs, pictures, and so forth. First: We have more than one project that share the same web application structure. In other words, all web artefacts for those projects - including jsp - are in the same directory/eclipse project, without modules. My question is: how can I separate web application part in modules and later take only a single war with all artifacts? How can can separate these projects and keep taking my whole webapp? Second: I have some ant´s targets that create jars for java web start clients. These jars have classes that are part of the dependencies - for example, from commons-beans. Using Ant, I put these classes in jws's jar using a zipfileset: zipfileset id=jar.commons-beans src=${libs}/commons-beans.jar include name=org/apache/... / ... /zipfileset Of course, I manage the dependency manually, so, I could reference it in src attribute. Using maven, how can I do it? I am already using the antrun plugin, but I don't know how to reference a dependency jar inside pom.xml. Do you have any suggestions? Maybe I can use maven-webstart plugin, but how do I filter classes inside a dependency? ps.: sorry my poor English. -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] http://blastemica.blogspot.com -- View this message in context: http://www.nabble.com/-M2-%3A-Doubts-about-modules-and-packing.-tf3181598s177.html#a8846745 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: Can I get a timestamp?
Thanks Greg/Tony -- works like a charm. Jim (not Kim) -Original Message- From: Tony Ambrozie [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 10:14 PM To: Maven Users List Subject: Re: Can I get a timestamp? I am using the buildnumber plugin successfully to tag my assembly releases with a timestamp (for example, for assembly, finalName${ project.artifactId}-${project.version}-r${buildNumber}/finalName), just as Greg suggested. Need to make sure to invoke the plugin create goal, for example mvn buildnumber:create assembly:assembly. Thanks' On 2/6/07, Greg Jones [EMAIL PROTECTED] wrote: Kim, You can use the maven-buildnumber-plugin to get a timestamp, as follows: plugin groupIdorg.codehaus.mojo/groupId artifactIdmaven-buildnumber-plugin/artifactId version0.9.4/version configuration format{0,date,-MM-dd HH:mm:ss}/format items itemtimestamp/item /items doCheckfalse/doCheck doUpdatefalse/doUpdate /configuration executions execution phasevalidate/phase goals goalcreate/goal /goals /execution /executions /plugin The timestamp is put into the ${buildNumber} property. You can also adjust the format of the timestamp to suit your requirements. Take a look at http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.htm lfor information on how it works. Regards, Greg J. -Original Message- From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 11:03 AM To: 'Maven Users List' Subject: RE: Can I get a timestamp? The plug-in will allow you to use timestamp tagging to tag your builds. I am sorry but I don't think you can access the timestamp property directly in the pom itself. Why do you need to do that anyway? Bashar -Original Message- From: Crossley, Jim [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 4:43 PM To: Maven Users List Subject: RE: Can I get a timestamp? Thanks for the quick reply, but what does that do, exactly? In which property does it make the timestamp available? I tried ${timestamp} after adding that snippet to my pom, but it was empty. What am I missing? Thanks, Jim -Original Message- From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 6:15 PM To: 'Maven Users List' Subject: RE: Can I get a timestamp? You can use maven scm plugin: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-scm-plugin/artifactId configuration addTimestamptrue/addTimestamp tagbuild/tag timestampFormatMMddHHmm/timestampFormat /configuration /plugin -Original Message- From: Crossley, Jim [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 3:57 PM To: Maven Users List Subject: Can I get a timestamp? Do I really have to write an entire plugin just to make a timestamp available as a maven property? That's what Google is telling me, but I wanted to make sure before I went to all that trouble. Thanks, Jim - 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] - 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: no /proxy url ?
This issue is due to the ProxiedDavServer.process method : it uses the proxyRequestHandler to get the requested resource. This proxy handle artifact relocation, and returns the expected File object, but this one is not used and the initial DavServerRequest is used to process the request. I'd suggest to modifiy the fetchContentFromProxies method to return a (modified) DavServerRequest based on the File object. This requires to remove the managedRepository basedir path from the file name. Is there any way to cleanly makes this conversion ? Another option is to change the ProxyRequestHandler interface to return a composite object in place of a File : something like a RepositoryElement with an URL-like resource path and a getFile(). 2007/2/7, nicolas de loof [EMAIL PROTECTED]: The patch to solve issue about maven plugin is still not applied : http://localhost:8080/archiva/repository/maven/maven/plugins/maven-abbot-plugin-1.0.jar 2007-02-07 10:38:33,921 [btpool0-4] DEBUG ProxyRequestHandler- Retrieving maven/maven-abbot-plugin/1.0/maven-abbot-plugin-1.0.pom from maven plublic repository 2007-02-07 10:38:34,609 [btpool0-4] DEBUG ProxyRequestHandler- Successfully downloaded 2007-02-07 10:38:34,624 [btpool0-4] DEBUG ProxyRequestHandler- Retrieving maven/maven-abbot-plugin/1.0/maven-abbot-plugin-1.0.plugin from maven plublic repository 2007/2/7, nicolas de loof [EMAIL PROTECTED]: This change has for side effect that archiva does not handle maven1 requests anymore : http://localhost:8080/archiva/repository/maven/activation/activation/1.0.2/activation-1.0.2.pom works as expected and will make a maven2 client relocate to javax.activation Previous archiva builds auto-detected maven1 formatted request and converted them to Artifacts internal object for resolution. A special case I contributed to was to handle relocation internally for such maven1 requests, as maven1 does not read those meta-data. now http://localhost:8080/archiva/repository/maven/activation/jars/activation-1.0.2.jar is 500 error: Could not find /activation/jars/activation- 1.0.2.jar in any of the repositories. This is a blocking regression for me as lot's of my projects still use maven1. 2007/2/7, Michael Horwitz [EMAIL PROTECTED]: Hi Nicolas, Suffered from exactly the same problem a few weeks back - turns out the Archiva team have removed the proxy distinction. To access your repository, you simply go to the webdav URL (whatever the URL you set up for the repository). This URL now provides all the proxy functionality (at least as far as I have tested it), and should work for Maven 1 requests as well. You do need to do some extra work to get everything working though: the webdav URL is secured, so by default will ask for a username and a password. To allow for anonymous access, you need to grant the guest user the repository_observer role on all your repositories. Another little catch to look out for with Maven 1 and Archiva is handling of dependencies of type plugin - not sure if the bug has been fixed, but we had to apply a patch to get everything working. You should find the details in the Archiva bug tracking database, if not let me know and I can post them up here again. Mike. On 2/7/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I've installed archiva from a SVN checkout. I've configured a managed proxy and a proxied on to repo1.maven.org Requesting http://localhost:8080/archiva/repository /maven/activation/activation/1.0.2/activation- 1.0.2.pom works. Requesting http://localhost:8080/archiva/proxy /maven/activation/activation/1.0.2/activation- 1.0.2.pom fails HTTP ERROR: 404 There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. RequestURI=/archiva/proxy/maven/activation/activation/1.0.2/activation- 1.0.2.pom Caused by: There is no Action mapped for namespace / and action name proxy. Check if there is such an action name with such namespace defined in the xwork.xml and also if such an action class exists. Check also the log to see if the action class is successfully loaded. - [unknown location] at com.opensymphony.xwork.DefaultActionProxy.( DefaultActionProxy.java:72) at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy( DefaultActionProxyFactory.java :46) ... As I'm using archiva from maven1, I need the proxy feature to handle maven1-like requests : http://localhost:8080/archiva/proxy/maven/activation/jars/activation-1.0.2.jar What's wrong with /proxy URI ?
RE: Can I get a timestamp?
Jim (not Kim) Sorry about that. The keys are obviously too close together for my fingers :-) -Original Message- From: Crossley, Jim [mailto:[EMAIL PROTECTED] Sent: Thursday, 8 February 2007 1:53 AM To: Maven Users List Subject: RE: Can I get a timestamp? Thanks Greg/Tony -- works like a charm. Jim (not Kim) -Original Message- From: Tony Ambrozie [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 10:14 PM To: Maven Users List Subject: Re: Can I get a timestamp? I am using the buildnumber plugin successfully to tag my assembly releases with a timestamp (for example, for assembly, finalName${ project.artifactId}-${project.version}-r${buildNumber}/finalName), just as Greg suggested. Need to make sure to invoke the plugin create goal, for example mvn buildnumber:create assembly:assembly. Thanks' On 2/6/07, Greg Jones [EMAIL PROTECTED] wrote: Kim, You can use the maven-buildnumber-plugin to get a timestamp, as follows: plugin groupIdorg.codehaus.mojo/groupId artifactIdmaven-buildnumber-plugin/artifactId version0.9.4/version configuration format{0,date,-MM-dd HH:mm:ss}/format items itemtimestamp/item /items doCheckfalse/doCheck doUpdatefalse/doUpdate /configuration executions execution phasevalidate/phase goals goalcreate/goal /goals /execution /executions /plugin The timestamp is put into the ${buildNumber} property. You can also adjust the format of the timestamp to suit your requirements. Take a look at http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.htm lfor information on how it works. Regards, Greg J. -Original Message- From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 11:03 AM To: 'Maven Users List' Subject: RE: Can I get a timestamp? The plug-in will allow you to use timestamp tagging to tag your builds. I am sorry but I don't think you can access the timestamp property directly in the pom itself. Why do you need to do that anyway? Bashar -Original Message- From: Crossley, Jim [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 4:43 PM To: Maven Users List Subject: RE: Can I get a timestamp? Thanks for the quick reply, but what does that do, exactly? In which property does it make the timestamp available? I tried ${timestamp} after adding that snippet to my pom, but it was empty. What am I missing? Thanks, Jim -Original Message- From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 6:15 PM To: 'Maven Users List' Subject: RE: Can I get a timestamp? You can use maven scm plugin: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-scm-plugin/artifactId configuration addTimestamptrue/addTimestamp tagbuild/tag timestampFormatMMddHHmm/timestampFormat /configuration /plugin -Original Message- From: Crossley, Jim [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 3:57 PM To: Maven Users List Subject: Can I get a timestamp? Do I really have to write an entire plugin just to make a timestamp available as a maven property? That's what Google is telling me, but I wanted to make sure before I went to all that trouble. Thanks, Jim - 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] - 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: [m2] Simple copy and filter plugin?
takai schrieb: I'd use the antrun plugin. OK, its no problem to copy files. But i have defined multiple profiles. Every profile defines filter tokens read from a profile specific file. How can i use these tokens while copying with the antrun-plugin? Regards Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Simple copy and filter plugin?
Good day to you, Sebastian, Actually you can with maven-resources-plugin ( though it may not be pretty ). Something like... project ... build resources resource targetPath../../some-path-from-the-basedir/targetPath filtering!-- true, or false --/filtering directory!-- relative path from ${basedir} --/directory /resource resource targetPath../../some-path-from-the-basedir-2/targetPath filtering!-- true, or false --/filtering directory!-- another relative path from ${basedir} --/directory /resource ... /resources /build /project Cheers, Franz Sebastian Breit wrote: Hi, often i need only to copy some files from one directory to another. Sometimes the files must be filtered. Is there any simple plugin for this? I tried two plugins to do the job: - The assemby-plugin doesn't filter filesets and i can't read ${project.build.finalName} in the descriptor. - The resources-plugin isn't free to set source and destination directory on each execution. Regards Sebastian -- T-Systems Multimedia Solutions GmbH (T-Systems MMS) Sebastian Breit Softwareentwickler Hausanschrift: Riesaer Strasse 5, 01129 Dresden Postanschrift: Postfach 10 02 24, 01072 Dresden Telefon: +49 351 28 20-29 27 Telefax: +49 351 28 20-51 14 E-Mail: mailto:[EMAIL PROTECTED] Internet: http://www.t-systems-mms.com Aufsichtsrat: Helmut Binder (Vorsitzender) Geschäftsführung: Dr. Klaus Radermacher, Peter Klingenburg Handelsregister: Amtsgericht Dresden (HRB 11433), Sitz der Gesellschaft Dresden Ust-IdNr.: DE 811 807 949 -- View this message in context: http://www.nabble.com/-m2--Simple-copy-and-filter-plugin--tf3187244s177.html#a8847641 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: [m2] Simple copy and filter plugin?
for each profile do tasks property file=${basedir}/my/profile/specific/file/ ant antfile=.../ /tasks that should work, shouldn't it? Sebastian Breit wrote: takai schrieb: I'd use the antrun plugin. OK, its no problem to copy files. But i have defined multiple profiles. Every profile defines filter tokens read from a profile specific file. How can i use these tokens while copying with the antrun-plugin? Regards Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-m2--Simple-copy-and-filter-plugin--tf3187244s177.html#a8847884 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jsp precompile with war overlay
I'm trying to use the war overlay feature of maven-war-plugin to include some common JSPs (e.g. common header and footer files) in multiple projects, but I also want to use jspc-maven-plugin to precompile the project JSPs. The issue I'm facing is that jspc-maven-plugin needs to run after the war overlay is done, so that the common JSPs are available during the precompile, but before the packaging is done, so the generated classes and web.xml get included in the final war. Without using war overlays, the build section of my project pom looks like this in order to do the precompile: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjspc-maven-plugin/artifactId version1.4.6/version executions execution goals goalcompile/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration webXml${basedir}/target/jspweb.xml/webXml /configuration /plugin /plugins /build The webXml configuration for maven-war-plugin causes the war plugin to use the web.xml file generated by the jspc plugin -- jspc rewrites the web.xml to add servlet mappings for the precompiled JSP classes. This works well when all the JSPs are present in the project -- the generated war contains the precompiled JSP classes plus the rewritten web.xml. In order to get the precompile to work with JSPs from an overlaid war, I tried declaring an execution of the war plugin's exploded goal during the process-resources phase so that it builds a directory tree containing the overlays for the war: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId executions execution phaseprocess-resources/phase goals goalexploded/goal /goals /execution /executions /plugin I added some configuration to the jspc plugin to get it to compile the JSPs from the exploded tree instead of from src/main/webapps: configuration warSourceDirectory ${basedir}/target/${artifactId}-${version} /warSourceDirectory /configuration Here's the complete build section of my project pom after adding those changes: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId executions execution phaseprocess-resources/phase goals goalexploded/goal /goals /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdjspc-maven-plugin/artifactId version1.4.6/version configuration warSourceDirectory ${basedir}/target/${artifactId}-${version} /warSourceDirectory /configuration executions execution goals goalcompile/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration webXml${basedir}/target/jspweb.xml/webXml /configuration /plugin /plugins /build This works great, almost: the overlaid war directory gets created, jspc precompiles its JSPs, and the war plugin creates the final war containing all the precompiled JSP classes in its WEB-INF/classes directory. The only problem is that the war contains the original web.xml from src/main/webapps/WEB-INF instead of the rewritten version created by jspc, even though the configuration to use the rewritten one still exists in the second maven-war-plugin declaration. Any ideas why this is happening or how to get around it? George -- View this message in context: http://www.nabble.com/jsp-precompile-with-war-overlay-tf3187860s177.html#a8848176 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: [m2] Simple copy and filter plugin?
takai schrieb: for each profile do tasks property file=${basedir}/my/profile/specific/file/ ant antfile=.../ /tasks that should work, shouldn't it? Unfortunately not, because the profiles are environment specific (local, test server, development server) so i can't specify the needed file in the task. Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hibernate3-maven-plugin hbm2ddl always try to connect
hello, I have plugin descriptor: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration componentProperties outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin but when I call mvn compile hibernate3:hbm2ddl it try to connect to database... But I need only create schema.sql file... thanks, miso smime.p7s Description: S/MIME cryptographic signature
RE: dependencies are bloated in M2
Thanks for clearing that up. I think this discussion made it more clear what is the difference among provided, optional and exclusions. Sorry if I confused anyone. Bashar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig McClanahan Sent: Tuesday, February 06, 2007 11:18 PM To: Maven Users List Subject: Re: dependencies are bloated in M2 On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: Yes, but sometimes you will need to use a dependency for compile time only, and NOT for runtime. You don't need the container to provide it for you either because it is not required for runtime. Example: aspectjtools.jar. You can't exclude it because your project will not compile. The only way is to give it the provided scope. That is not correct. Declaring a dependency to be optional puts it on the compile classpath, but avoids any attempt to include it at runtime. Even if your container doesn't provide it that's not a problem, maven doesn't care. I know it is not very clean to give a dependency a provided scope when it's not going to be provided anywhere, but sometimes you need to do this if you want to compile against it. The semantics of provided are different than optional even though Maven does not enforce it. The code you write against a provided API assumes that the API will indeed be provided by the container. As an example, you might declare as provided a library that you've installed in Tomcat's common/lib directory. The library must be there in order for the application to function -- but Maven can assume that it will indeed by supplied by the container, so won't include it in the WAR. Optional, on the other hand, means what it says. Declaring such a dependency means that you will need it available at compile time FOR THE DEPENDENCY, but not necessarily for your own code (unless you explicitly need it for other reasons). The library is explicitly NOT required at runtime, because your dependency has said, in effect, I can use this library if it exists, but if it does not, no harm no foul. Note also that optional is NOT a scope -- it is a completely separate element. That is because the concept of being optional is orthogonal to scope ... it's perfectly reasonable, for example, to have an optional module with compile scope if your build process knows how to intelligently deal with that combination. PLEASE do not misuse provided scope to mean the optional element or vice versa. PLEASE set up your POMs to say what you mean. These are two DIFFERENT concepts! Craig Bashar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Sanchez Sent: Tuesday, February 06, 2007 5:18 PM To: Maven Users List Subject: Re: dependencies are bloated in M2 still not right, you have to use exclusions provided means the environment (read appserver) provides that dependency, which is only true for few dependencies in the whole world, like servlet-api On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: This is the question I was answering: Tandon, Pankaj wrote: 1. How can we control what get's into WEB-INF/lib. We tried all the scopes mentioned, but that did not help. And it's follow up: Christian Goetze wrote: I believe that the scope that should work is provided. The problem is that I don't know if maven is smart enough to remove a provided dependency from the transitive closure. I would call that a bug if it didn't. And the answer to these 2 questions is to use the provided scope. It will also stop a dependency from being passed on transitively. Using exclusions is NOT right if you still want to compile against these dependencies. Bashar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Sanchez Sent: Tuesday, February 06, 2007 5:02 PM To: Maven Users List Subject: Re: dependencies are bloated in M2 exactly, that's why he needs to use exclusions, you exclude things that you don't need. On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: It is the right solution. Using exclusions will exclude a dependency from being downloaded at all, which means it won't be available at any path. Using provided will still make the dependency available for compile time, but not in runtime, and will not bundle it in the package. Read maven FAQ: http://maven.apache.org/general.html#scope-provided -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Sanchez Sent: Tuesday, February 06, 2007 4:29 PM To: Maven Users List Subject: Re: dependencies are bloated in M2 that's not the right solution, you have to use exclusions On 2/6/07, Bashar Abdul Jawad [EMAIL PROTECTED] wrote: It will. If you don't want to include a particular dependency in your generated package just
Re: [m2] Simple copy and filter plugin?
Hello Franz, i just use the resources-plugin but its not very useful. OK, i will try to explain. It's a simple webapp project as part of a bigger project. Later i need the war artifact to include it in a release zip. Some files in the war have to be filtered environment specific while building the release zip. So the war artifact is installed unfiltered in the repository. But to simplify the development i want to filter the target/artifact-0.1-SNAPSHOT directory to target/artifact-0.1-SNAPSHOT.filterd (or somewhere else) after building the war. Then it's able to use the filterd directory to test the webapp locally without calling anymore commands. At the moment i use this code in the pom: profile idlocal-filter/id build resources resource directorytarget/${project.build.finalName}/directory filteringtrue/filtering targetPath${project.build.finalName}.filtered/targetPath /resource /resources plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId configuration outputDirectory${project.build.directory}/outputDirectory /configuration executions execution idfilter files while package/id goals goalresources/goal /goals phasepackage/phase /execution /executions /plugin /plugins /build /profile The disadvantage is that the resources goal runs twice. During building the war and after that. So the files will be copied twice - not very nice. Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven 2: antrun-plugin with ant-contrib tasks
Hello, I'm trying to build an ant project with maven 2 using the antrun plugin. The ant project uses ant-contib tasks. If I build the project with ant (ant build), it works without any problems, because the ant-contrib.jar is in ${ANT_HOME}/lib. However, if I try to build it with the maven antrun-plugin, it doesn't build because it can't find the for-task. So, I included a taskdef for it in the plugin's configuration, without the desired effect.. The ant build starts, some initialization stuff occur, but as soon as a for-task is encountered, the build fails. I have also tried to set dependencies on the plugin, but the same result.. Any help on this would be greatly appreciated.. Thanks Jo Here's part of the maven project's pom.xml: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phaseprocess-classes/phase configuration tasks taskdef resource=net/sf/antcontrib/antcontrib.properties classpath=${env.ANT_HOME }/lib/ant-contrib.jar/ echoBuilding Trax client with BOB../echo echo* bob properties: ${env.BOB_ENV }/echo ant antfile=build.xml dir=${basedir} target name=build/ /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin Here's the output of mvn package: [INFO] Scanning for projects... [INFO] [INFO] Building Trax EAR module [INFO]task-segment: [package] [INFO] [INFO] [ear:generate-application-xml] [INFO] Generating application.xml [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [WARNING] Artifact ant:ant:jar:1.6.5:runtime retains local scope 'runtime' overriding broader scope 'compile' given by a dependency. If this is not intended, modify or remove the local scope. [INFO] [antrun:run {execution: default}] [echo] Building Trax client with BOB.. [echo] * bob properties: /home/jo/projects/bob.properties Overriding previous definition of reference to bob-rt-lib Trying to override old definition of datatype ejbc bob: [echo] Remote repository = 'file:mnt/lambda-trax/repository' [echo] Local repository = '/home/jo/.repository' [echo] Bob dir = '/home/jo/.repository/trax/bob/bob-3.2.33' [echo] Temp dir = '/tmp' [echo] Remote repository is uptodate : '/mnt/lambda-trax/repository/remote-repository.xml' [echo] Check dependencies : 'bob;client-platform;server-platform;trax-webstart;framework;ogf-hibernate;generics;system;ystr;trax-pack-core;trax-pack-util;trax-swing-gui;ogoodies;ojdbc14;jtds;proxyclient;proxyservlet;bob-rt;' [INFO] [ERROR] FATAL ERROR [INFO] [INFO] The following error occurred while executing this line: /home/jo/.repository/trax/bob/bob-3.2.33/bob-build.xml:69: The following error occurred while executing this line: /home/jo/.repository/trax/bob/bob-3.2.33/bob-build.xml:276: Could not create task or type of type: for.
tomcat-maven-plugin and tomcat:run
1) I'm trying to use the tomcat-maven-plugin all is fine using mvn tomcat:deploy however if I try the new mvn tomcat:run which I understand is supposed to be like the jetty:run, I get an error, see end of email. 2) I assume this puts a tomcat instance in target/tomcat however I notice the tomcat manager isn't enable in the target\tomcat\conf\tomcat-users.xml 3) Is there any documentation on this tomcat:run goal ? none at http://mojo.codehaus.org/tomcat-maven-plugin/ cheers Pete [INFO] [tomcat:run] [INFO] Using existing Tomcat server configuration at C:\dev\odin\odin-web\target/tomcat [INFO] Starting tomcat server [INFO] Starting Servlet Engine: Apache Tomcat/5.5.15 [INFO] XML validation disabled [ERROR] Exception starting filter ResponseOverrideFilter java.lang.ClassCastException: org.displaytag.filter.ResponseOverrideFilter 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) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3598) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4168) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.startup.Embedded.start(Embedded.java:821) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:253) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:113) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) 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) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile tries to bundle up the ear - should it?
EJ, it sounds like you've got something misconfigured or screwy, because I can run the following just fine: parent - ear, war, ejb, lib lib has no deps ejb dep lib war dep ejb ear dep war from parent directory mvn clean compile cleans and builds all modules in turn from parent directory mvn compile Nothing to compile - all classes are up to date cd into ear module (has no code, only bundles up the war, ejb, lib) mvn -X compile [DEBUG] x_web: using locally installed snapshot [DEBUG] x_ejb: using locally installed snapshot [DEBUG] x_lib: using locally installed snapshot BUILD SUCCESSFUL So I'm really not sure what you're doing that's resulting in these troubles... Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: This is all very contradictory. So I need to do a maven install so the ear can find the war/ejbs, yet all I REALLY want to do is compile. I have to do an INSTALL even though SNAPSHOT in essence means build every time. Why do things need to go into the repository? Developers used to be able to do a compile in 58 seconds. Now because compile needs to build the ear/war/ejbs, you have to do an install that takes 13 - 15 minutes. How does this not seem infinitely frustrating and completely infuriating? -Original Message- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 8:58 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? I would need more information on your POMs, project structure etc to be able to explain why you are having these problems. At this stage there is probably no other advice I can give you. Is there anyone else out there who can help? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 4:43 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Yeah, this is kinda nuts, even after running an install, I see things getting rebuilt: [INFO] Building withdrawalEJB [INFO]task-segment: [install] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] Compiling 3 source files to E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [surefire:test] [INFO] No tests to run. [INFO] [jar:jar] [INFO] Building jar: E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\withdrawalEJB- 1.0-SNAPSHOT.jar [INFO] [install:install] [INFO] Installing E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\withdrawalEJB- 1.0-SNAPSHOT.jar to E:\work\m2\Repository\lty\withdrawa Shouldn't this happen just once? Why each time? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 9:59 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? So in essence you're suggesting shutting of unittests via a switch (most developers already think it takes too long and use -Dtest=asdf). I personally find this unacceptable. I still think it's silly that mvn tries to build an ear/war/ejbs when all it needs are the underlying classes. There's part of the picture I think I'm not emphasizing enough which is the inherently long drawn out process building an atg app requires (their assembly phase) which we've linked to the package lifecycle goal. Having to do an install of each module takes too much time moving around and doing an install of everything takes too long if all you want to do is compile. To build an ejb, the underlying java source needs to be compiled and stashed somewhere doesn't it? I just still don't understand why there would be this dependency on an ear file to simply compile something in one of the main applications. I have a feeling this will be the straw that breaks the development camels back. -Original Message- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 8:05 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? Hopefully they're all using Eclipse and they can run 'mvn eclipse:eclipse' to generate the Eclipse project files they need so that they can compile their Java code as they develop. You don't need to build your EJB, WAR and EAR files just to get your classes to compile UNLESS other modules depend on them. For example, if I have modules A, B and C and module B is dependent on A but C is independent of both of them, I can build C without needing access to artifacts from A and B. If, however, I want to build B, I will need access to A.jar. A.jar would normally come from my local repository since I've run 'mvn clean install' in module A. The whole point is that you've decided when designing your project structure that A, B and C are separately managed
RE: Maven 2: antrun-plugin with ant-contrib tasks
Hi Jo, One example for your reference. I use for-each and script language=javascript in build.xml please note maven.dependency.classpath property binding between pom.xml and build.xml excerpts below. Good luck. !-- == pom.xml fragment === -- plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasepre-site/phase configuration tasks typedef resource=org/apache/maven/artifact/ant/antlib.xml classpath refid=maven.dependency.classpath/ /typedef echo message=pom.xml: maven-antrun-plugin/echo tstamp format locale=en property=TODAY_UK pattern=d-MMM-/format /tstamp echopom.xml: timestamp ${TODAY_UK}/echo property refid=maven.dependency.classpath name=mvndepClasspath / ant inheritRefs=true inheritAll=true antfile=${basedir}/src/4.bin/build.xml property environment=env/ property value=true name=project.debug/property property file=${user.home}/build.properties/ target name=cmn.outadate.tgt.nm / /ant /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdorg.apache.maven/groupId artifactIdmaven-artifact-ant/artifactId version2.0.4/version /dependency dependency groupIdant/groupId artifactIdant/artifactId version1.6.5/version /dependency dependency groupIdjtidy/groupId artifactIdjtidy/artifactId version4aug2000r7-dev/version /dependency dependency groupIdant-contrib/groupId artifactIdcpptasks/artifactId version1.0b3/version /dependency dependency groupIdant-contrib/groupId artifactIdant-contrib/artifactId version1.0b2/version /dependency dependency groupIdant/groupId artifactIdoptional/artifactId version1.5.4/version /dependency dependency groupIdant/groupId artifactIdant-antlr/artifactId version1.6.5/version /dependency dependency groupIdantlr/groupId artifactIdantlrall/artifactId version2.7.4/version /dependency dependency groupIdant/groupId artifactIdant-nodeps/artifactId version1.6.5/version /dependency dependency groupIdbsf/groupId artifactIdbsf/artifactId systemPathC:/usr/local/share/sdl/bsf-2_2/lib/bsf.jar/systemPath versionBUNDLED/version scopesystem/scope /dependency dependency groupIdjs/groupId artifactIdjs/artifactId systemPathC:/usr/local/share/sdl/rhino1_5R4_1/js.jar/systemPath versionBUNDLED/version scopesystem/scope /dependency /dependencies /plugin !-- == build.xml fragment === -- ?xml version=1.0? !DOCTYPE project [ !ENTITY bld.cmn.prps SYSTEM file:./bld.cmn.prps.xml !ENTITY bld.cmn.tgts SYSTEM file:./bld.cmn.tgts.xml !ENTITY bld.prj.prps SYSTEM file:./bld.prj.prps.xml !ENTITY bld.prj.tgts SYSTEM file:./bld.prj.tgts.xml ] project name=SCM-Test default=cmn.proj.doc.tgt basedir=.. xmlns:ac=antlib:net.sf.antcontrib taskdef classpath=${mvndepClasspath} resource=org/apache/maven/artifact/ant/antlib.xml /taskdef echo message=inside build.xml at ${TODAY_UK} / !-- Common properties best loaded as entities -- bld.cmn.prps; !-- Project specific properties -- bld.prj.prps; !-- Project specific targets -- bld.prj.tgts; !-- Common target rules -- bld.cmn.tgts; /project -Original Message- From: Jo Vandermeeren [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 9:14 AM To: Maven Users List Subject: Maven 2: antrun-plugin with ant-contrib tasks Hello, I'm trying to build an ant project with maven 2 using the antrun plugin. The ant project uses ant-contib tasks. If I build the project with ant (ant build), it works without any problems, because the ant-contrib.jar is in ${ANT_HOME}/lib. However, if I try to build it with the maven antrun-plugin, it doesn't build because it can't find the for-task. So, I included a taskdef for it in the plugin's configuration, without the desired effect.. The ant build starts, some initialization stuff occur, but as soon as a for-task is encountered, the build fails. I have also tried to set dependencies on the plugin, but the same result.. Any help on
RE: compile tries to bundle up the ear - should it?
Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. Every time I compile after doing an install, I see this: [INFO] No goals needed for project - skipping [INFO] [INFO] Building template [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] Building ltyApp_ear [INFO]task-segment: [compile] [INFO] [INFO] snapshot lty:ltyWebApp:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:transferEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:messageEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:withdrawalEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:inboundenrollmentEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:enrollmentEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:upAdminEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:partnerEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:authserverEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:CSREJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:accountGuestEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:communityEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:testcellEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:upErrorEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:salesscriptEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:memberProfileEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:transactionEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:groceryEJB:1.0-SNAPSHOT: checking for updates from central [INFO] [ear:generate-application-xml] [INFO] Generating application.xml [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Why? Then running a compile a second time, I see this: [INFO] Building accountGuestEJB [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] Compiling 3 source files to E:\work\39-FUSED\frontoffice\ltyApp\ejb\accountGuest\target\classes It JUST compiled these sources -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:02 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? EJ, it sounds like you've got something misconfigured or screwy, because I can run the following just fine: parent - ear, war, ejb, lib lib has no deps ejb dep lib war dep ejb ear dep war from parent directory mvn clean compile cleans and builds all modules in turn from parent directory mvn compile Nothing to compile - all classes are up to date cd into ear module (has no code, only bundles up the war, ejb, lib) mvn -X compile [DEBUG] x_web: using locally installed snapshot [DEBUG] x_ejb: using locally installed snapshot [DEBUG] x_lib: using locally installed snapshot BUILD SUCCESSFUL So I'm really not sure what you're doing that's resulting in these troubles... Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: This is all very contradictory. So I need to do a maven install so the ear can find the war/ejbs, yet all I REALLY want to do is compile. I have to do an INSTALL even though SNAPSHOT in essence means build every time. Why do things need to go into the repository? Developers used to be able to do a compile in 58 seconds. Now because compile needs to build the ear/war/ejbs, you have to do an install that takes 13 - 15 minutes. How does this not seem infinitely frustrating and completely infuriating? -Original Message- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 8:58 PM To: 'Maven Users List'
RE: compile tries to bundle up the ear - should it?
Well I figured out why the ejbs continue to recompile - their package name doesn't reflect their location in main/java. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:38 PM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. Every time I compile after doing an install, I see this: [INFO] No goals needed for project - skipping [INFO] [INFO] Building template [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] Building ltyApp_ear [INFO]task-segment: [compile] [INFO] [INFO] snapshot lty:ltyWebApp:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:transferEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:messageEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:withdrawalEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:inboundenrollmentEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:enrollmentEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:upAdminEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:partnerEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:authserverEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:CSREJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:accountGuestEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:communityEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:testcellEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:upErrorEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:salesscriptEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:memberProfileEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:transactionEJB:1.0-SNAPSHOT: checking for updates from central [INFO] snapshot lty:groceryEJB:1.0-SNAPSHOT: checking for updates from central [INFO] [ear:generate-application-xml] [INFO] Generating application.xml [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Why? Then running a compile a second time, I see this: [INFO] Building accountGuestEJB [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] Compiling 3 source files to E:\work\39-FUSED\frontoffice\ltyApp\ejb\accountGuest\target\classes It JUST compiled these sources -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:02 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? EJ, it sounds like you've got something misconfigured or screwy, because I can run the following just fine: parent - ear, war, ejb, lib lib has no deps ejb dep lib war dep ejb ear dep war from parent directory mvn clean compile cleans and builds all modules in turn from parent directory mvn compile Nothing to compile - all classes are up to date cd into ear module (has no code, only bundles up the war, ejb, lib) mvn -X compile [DEBUG] x_web: using locally installed snapshot [DEBUG] x_ejb: using locally installed snapshot [DEBUG] x_lib: using locally installed snapshot BUILD SUCCESSFUL So I'm really not sure what you're doing that's resulting in these troubles... Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: This is all very contradictory. So I need to do a maven install so the ear can find the war/ejbs, yet all I REALLY want to do is compile. I have to do an INSTALL even though SNAPSHOT in essence means build every time. Why do things need to go into the repository? Developers used to be able to do a compile in 58 seconds. Now
Maven-Clearcase
Hi , I am looking for the documentation or help on integration of Maven with Clearcase like how can achive this? It will be great help for our project. RAM -- View this message in context: http://www.nabble.com/Maven-Clearcase-tf3188842s177.html#a8851523 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: tomcat-maven-plugin and tomcat:run
Hi Pete, On 07/02/07, Pete [EMAIL PROTECTED] wrote: 1) I'm trying to use the tomcat-maven-plugin all is fine using mvn tomcat:deploy however if I try the new mvn tomcat:run which I understand is supposed to be like the jetty:run, I get an error, see end of email. Looks like your webapp is using a different version of servlet-api, hence a class cast exception when tomcat tries to cast your filter. Ensure you're using servlet-api 2.4 which tomcat 5.5 uses. 2) I assume this puts a tomcat instance in target/tomcat however I notice the tomcat manager isn't enable in the target\tomcat\conf\tomcat-users.xml Nope, tomcat manager isn't deployed using tomcat:run. Feel free to raise an issue if you need this functionality. I didn't think this was too useful since the container is rather transient. 3) Is there any documentation on this tomcat:run goal ? none at http://mojo.codehaus.org/tomcat-maven-plugin/ See: http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Running%20a%20WAR%20project http://mojo.codehaus.org/tomcat-maven-plugin/run-mojo.html Cheers, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile tries to bundle up the ear - should it?
EJ, based on this response, does this mean that your issue can be considered fully resolved or are there other issues? As for the install question -- yes, I have previously executed mvn install to copy these artifacts to my local repo. The way I work, I am generally only working inside one module at a time, so I can run mvn install to copy all the other artifacts into my repo, then go into the specific module to do my edits etc and run mvn compile in that artifact alone, which will use the other unedited dependent artifacts out of my repo if needed. As for why does Maven EAR plugin require all artifacts be available during compile -- I'm pretty sure this just happens automatically during validate phase, which happens before compile, so when those artifacts are not available to validate, you never get to the compile phase. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: Well I figured out why the ejbs continue to recompile - their package name doesn't reflect their location in main/java. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:38 PM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: hibernate3-maven-plugin hbm2ddl always try to connect
Hello Miso From where are you trying to create the schema.sql? from hbm.xml files or annotated classes? Regards Johann Reyes -Original Message- From: Michal Hlavac [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 11:18 AM To: Maven Users List Subject: hibernate3-maven-plugin hbm2ddl always try to connect hello, I have plugin descriptor: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration componentProperties outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin but when I call mvn compile hibernate3:hbm2ddl it try to connect to database... But I need only create schema.sql file... thanks, miso - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
M2 maven-javadoc-plugin - javadoc for src and test
Hi, We have a multi project based on maven 2.0.4, I would like to add the javadoc comments of our unit test code to the project's javadoc report. Every subproject's (aka module) has the standard maven directory layout. We use maven-javadoc-plugin versioin 2.2. Any idea what is the best way to do it? Thanks, Erez. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: compile tries to bundle up the ear - should it?
No, my question is still unanswered. I guess what I'm looking for is for those working at the top most level, is it expected that if you want to compile, you must build an ear? So for anyone who does an install, p4 sync, compile - they can expect to see errors unless they do an additional install? -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 2:14 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? EJ, based on this response, does this mean that your issue can be considered fully resolved or are there other issues? As for the install question -- yes, I have previously executed mvn install to copy these artifacts to my local repo. The way I work, I am generally only working inside one module at a time, so I can run mvn install to copy all the other artifacts into my repo, then go into the specific module to do my edits etc and run mvn compile in that artifact alone, which will use the other unedited dependent artifacts out of my repo if needed. As for why does Maven EAR plugin require all artifacts be available during compile -- I'm pretty sure this just happens automatically during validate phase, which happens before compile, so when those artifacts are not available to validate, you never get to the compile phase. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: Well I figured out why the ejbs continue to recompile - their package name doesn't reflect their location in main/java. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:38 PM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. - 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: compile tries to bundle up the ear - should it?
I also spend a bit of time working at the top most level... I just ran my test again (jars etc named to jarx in local repo) and had no problems running mvn clean compile from my parent directory. Everything ran straight thru and I got a BUILD SUCCESSFUL at the end. One possible thought is that you are basically dirtying your project files etc with the p4 sync, so Maven thinks it has to recompile all the files etc in all the modules instead of just the EAR (?). I don't use SCM with Maven so I don't know much about that, just a thought. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: No, my question is still unanswered. I guess what I'm looking for is for those working at the top most level, is it expected that if you want to compile, you must build an ear? So for anyone who does an install, p4 sync, compile - they can expect to see errors unless they do an additional install? -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 2:14 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? EJ, based on this response, does this mean that your issue can be considered fully resolved or are there other issues? As for the install question -- yes, I have previously executed mvn install to copy these artifacts to my local repo. The way I work, I am generally only working inside one module at a time, so I can run mvn install to copy all the other artifacts into my repo, then go into the specific module to do my edits etc and run mvn compile in that artifact alone, which will use the other unedited dependent artifacts out of my repo if needed. As for why does Maven EAR plugin require all artifacts be available during compile -- I'm pretty sure this just happens automatically during validate phase, which happens before compile, so when those artifacts are not available to validate, you never get to the compile phase. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: Well I figured out why the ejbs continue to recompile - their package name doesn't reflect their location in main/java. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:38 PM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. - 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]
additional classpath to maven2
Hi, Is it possible to add additional classpath (not specified in the dependency) to maven2 on runtime. The idea is to unzip the jars to a specific directory and add those jars to compile / jar classpath. Thanks
RE: compile tries to bundle up the ear - should it?
Ok, my final attempt - why would there be code inside maven that sees an packaging type of ear and decide there's something to do during the compile lifecycle goal. What purpose could this serve? -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 2:49 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? I also spend a bit of time working at the top most level... I just ran my test again (jars etc named to jarx in local repo) and had no problems running mvn clean compile from my parent directory. Everything ran straight thru and I got a BUILD SUCCESSFUL at the end. One possible thought is that you are basically dirtying your project files etc with the p4 sync, so Maven thinks it has to recompile all the files etc in all the modules instead of just the EAR (?). I don't use SCM with Maven so I don't know much about that, just a thought. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: No, my question is still unanswered. I guess what I'm looking for is for those working at the top most level, is it expected that if you want to compile, you must build an ear? So for anyone who does an install, p4 sync, compile - they can expect to see errors unless they do an additional install? -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 2:14 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? EJ, based on this response, does this mean that your issue can be considered fully resolved or are there other issues? As for the install question -- yes, I have previously executed mvn install to copy these artifacts to my local repo. The way I work, I am generally only working inside one module at a time, so I can run mvn install to copy all the other artifacts into my repo, then go into the specific module to do my edits etc and run mvn compile in that artifact alone, which will use the other unedited dependent artifacts out of my repo if needed. As for why does Maven EAR plugin require all artifacts be available during compile -- I'm pretty sure this just happens automatically during validate phase, which happens before compile, so when those artifacts are not available to validate, you never get to the compile phase. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: Well I figured out why the ejbs continue to recompile - their package name doesn't reflect their location in main/java. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:38 PM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. - 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]
How can I deactivate an activeProfile?
Is there a magic incantation on the command line to deactivate a profile mentioned in the activeProfiles / section? -- cg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Access dependency properties inside pom.
How can I access dependency information inside the pom.xml? I would like to do something like the following: property.name${project.dependencies[junit:junit].version}/property.name In other words, how can I get the version from a dependency? Thanks... -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: compile tries to bundle up the ear - should it?
Unfortunately, you've completely exhausted my knowledge of Maven, and I have no response to your queries at this point. Perhaps try debugging Maven while it is executing your EAR compile and you'll find out... You might even uncover a bug. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: Ok, my final attempt - why would there be code inside maven that sees an packaging type of ear and decide there's something to do during the compile lifecycle goal. What purpose could this serve? -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 2:49 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? I also spend a bit of time working at the top most level... I just ran my test again (jars etc named to jarx in local repo) and had no problems running mvn clean compile from my parent directory. Everything ran straight thru and I got a BUILD SUCCESSFUL at the end. One possible thought is that you are basically dirtying your project files etc with the p4 sync, so Maven thinks it has to recompile all the files etc in all the modules instead of just the EAR (?). I don't use SCM with Maven so I don't know much about that, just a thought. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: No, my question is still unanswered. I guess what I'm looking for is for those working at the top most level, is it expected that if you want to compile, you must build an ear? So for anyone who does an install, p4 sync, compile - they can expect to see errors unless they do an additional install? -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 2:14 PM To: Maven Users List Subject: Re: compile tries to bundle up the ear - should it? EJ, based on this response, does this mean that your issue can be considered fully resolved or are there other issues? As for the install question -- yes, I have previously executed mvn install to copy these artifacts to my local repo. The way I work, I am generally only working inside one module at a time, so I can run mvn install to copy all the other artifacts into my repo, then go into the specific module to do my edits etc and run mvn compile in that artifact alone, which will use the other unedited dependent artifacts out of my repo if needed. As for why does Maven EAR plugin require all artifacts be available during compile -- I'm pretty sure this just happens automatically during validate phase, which happens before compile, so when those artifacts are not available to validate, you never get to the compile phase. Wayne On 2/7/07, EJ Ciramella [EMAIL PROTECTED] wrote: Well I figured out why the ejbs continue to recompile - their package name doesn't reflect their location in main/java. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 1:38 PM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wayne - did you do an install to get them into your local repository? My problem is compile tries to build an ear. In all my years of release engineering, compile has meant turn source code into byte code. Nothing more, nothing less. To have compile build an ear (which needs a war and ejbs) seems backward to me. Add to this that a standard compile took 58 seconds. Due to the other things that have to get run (namely the atg assembler), in order to get everything built and installed into our local repository, we need to run mvn install from the top level. This takes 13 - 15 minutes. That just isn't going to work. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[M2] Finding the Maven exec plugin
I am trying to use the exec-maven-plugin, but when I run exec:exec I get the following: [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'exec'. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-exec-plugin' does not exist or no valid version could be found There is no plugin there, but there is a plugin org.codehaus.mojo:exec-maven-plugin. Connections to the Internet must be made through our company's web proxy, but we have an internal Maven proxy to which our project is pointed. It already has the exec-maven-plugin (version 1.0.2), so I'm not sure why that's not being found. Any ideas as to what I may have misconfigured? -- Daniel Siegmann FJA-US, Inc. 512 Seventh Ave., New York, NY 10018 (212) 840-2618 ext. 139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Order of classpath supplied by dependencies ant task
Hi Franz, I thought that would be the case. I have found a bug report that describes my issue but it was created over a year ago so I don't hold out much hope of it being fixed soon. http://jira.codehaus.org/browse/MNG-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel We have an old application (started in the late 90's) that is built using ANT scripts. It would be very painful to migrate the build to Maven. So the next best thing is to use a maven repository for library file management and the dependencies task to manage the dependencies in ANT. Up till now the library files have not been managed. The libraries used in the build are not the same as used at run time. Some of the library files required by the application are no longer maintained and I don't know what version they are. We also have some custom libraries. So I have created our own maven repository and added the libraries using artifact:install. It will be another exercise to get the application working with known versions of the libraries. I have set the POM files up as per the instructions on http://maven.apache.org/ant-tasks.html. Is there another way to access the maven repository from within an ANT script? Any suggestions are gratefully received. Thanks, Joseph franz see wrote: Good day to you, Joseph, AFAIK, you cannot control the order of the dependencies...And I can't think of a workaround. Curious, why use antlib for your dependency management and not use maven's ? Cheers, Franz Joseph Leniston wrote: Hi, I am using Antlib for Maven 2.0 to do dependency management in our ant builds. I have a number of POM files for compiling common, server and client code. I also want to use maven to manage our server runtime classpath. I use the following code to get the server runtime classpath from a POM file and store it in a pathId for use later. artifact:dependencies pathId=cp.server.runtime.jars filesetId=server.runtime.jars.fileset remoteRepository refid=maven.repository / pom file=${fetched.build.files.dir}/server_runtime_pom.xml / /artifact:dependencies However if I list the contents of the cp.server.runtime.jars property the jar files are not in the order I specified: property name=cp refid=cp.server.runtime.jars/ echo message=Server Runtime Classpath is ${cp}/ It is important that I can specify the order of the runtime jar files because there is a patch that must be first in the classpath. Is there a way to specify an order of jar files in the POM file? Or to force the dependencies to be stored in the pathID property in the same order as in the POM file? --- This email message is intended solely for the person or entity to which it is addressed. The information it contains is confidential and may be legally privileged. Any review, retransmission, dissemination or other use of this email may be unlawful. If you are not the intended recipient, please notify us immediately and destroy the email from all sources. Thank you. Child, Youth and Family Service accepts no responsibility for changes made to this email or to any attachments after transmission from the Office. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Order-of-classpath-supplied-by-dependencies-ant-task-tf3184655s177.html#a8855119 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven 2: antrun-plugin with ant-contrib tasks
I went through this problem myself. Here is what I did to solve it. I'm glad to help. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phasecompile/phase goals goalrun/goal /goals configuration tasks taskdef resource=net/sf/antcontrib/antlib.xml classpath pathelement location=c:/lib/ant-contrib-ver.jar/ /classpath /taskdef for list=a,b,c param=letter delimiter=, sequential echo@{letter}/echo /sequential /for /tasks /configuration /execution /executions /plugin This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]
[M2] Projects with customizations
We have a project that I am preparing to convert from Ant to Maven2, but it is rather complex and I am not sure the best way to proceed. There are two difficulties: 1. We must support different versions, such as standalone and client-server via RMI. These require small changes in the build process, such as which property files are included, running rmic, and so on. 2. We must support customizations for each customer. This includes differences in property files and possibly code changes on CVS branches. Also, different customers use different version (as above) - sometimes just one, sometimes many. Ultimately, I need to create a packaging with the customized code (if any), and all the different versions. Presumably, this will require that the customized versions be deployed under a different name. My thought was to use profiles for (1), and append some string to the final name (such as -rmi). Then on each CVS branch I could modify the artifactId (and possibly groupId) for each customer. I don't know whether I should have some sort of parent-child relationship, or whether I should just use dependencies. Any suggestions? Has anyone dealt with a similar situation? -- Daniel Siegmann FJA-US, Inc. 512 Seventh Ave., New York, NY 10018 (212) 840-2618 ext. 139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] Finding the Maven exec plugin
On 2/7/07, Siegmann Daniel, NY [EMAIL PROTECTED] wrote: I am trying to use the exec-maven-plugin, but when I run exec:exec I get the following: [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'exec'. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-exec-plugin' does not exist or no valid version could be found There is no plugin there, but there is a plugin org.codehaus.mojo:exec-maven-plugin. try to fully specify the plugin on the command line. That should make sure that maven downloads the right plugin: mvn org.codehaus.mojo:exec-maven-plugin:exec while you're at it, feel free to test the 1.1-SNAPSHOT release of the plugin. Report any problem to the mojo user list / Jira. Thanks Jerome
Input from console
Hi all. I´m trying to create my first Maven plugin. This plugin is intended for Guara users to bootstrap the aplication, scaffonding, etc. How can I read input from console from Maven? I couldn´t find any references on the docs/google. Cheers. -- Leandro Rodrigo Saad Cruz software developer - certified scrum master :: scrum.com.br :: db.apache.org/ojb :: guara-framework.sf.net :: xingu.sf.net
Mirror URL not showing up in m2 error message
I have a internal proxy specified as a mirror to central. However, when I have an error resolving a dependency I see these error messages: Reason: Unable to download the artifact from any repository . . . from the specified remote repositories: central (http://repo1.maven.org/maven2) http://repo1.maven.org/maven2 is obviously not my internal proxy. Does m2 continue to try to reach the default central if all else fails or is this just noise? Carlos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mirror URL not showing up in m2 error message
just noise, if you see the Downloading: lines it'll print the real server it's hitting On 2/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a internal proxy specified as a mirror to central. However, when I have an error resolving a dependency I see these error messages: Reason: Unable to download the artifact from any repository . . . from the specified remote repositories: central (http://repo1.maven.org/maven2) http://repo1.maven.org/maven2 is obviously not my internal proxy. Does m2 continue to try to reach the default central if all else fails or is this just noise? Carlos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- I could give you my word as a Spaniard. No good. I've known too many Spaniards. -- The Princess Bride - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat-maven-plugin and tomcat:run
thanks Mark, fixed that. When using tomcat:run , it picks up changes to jsps ok which is great, but using the jetty:run plugin I found that I could also rebuild a serverside jar (which for a WAR would have been in web-inf/lib) using 'mvn install' it would then go into my local repo, which Jetty had on its classpath (you can see this at jetty start up - all jars come from local repository) , so when new jar gets installed, jetty picks up the change and redeploys. Where as I think the tomcat launch is using the target\myWebapp\WEB-INF\lib folder for these jars? I guess it's not possible for tomcat to pick up the jars from local repo ? it would be great if it could. If not, I need a way to refresh it JAR, I tried a 'mvn package' on the WAR project, when tomcat:run is still open in another window. I can see the jar timestamps change, but tomcat doesn't realise. So then I thought maybe I could use Tomcat manager to reload e.g. http://localhost:8080/manager/reload?path=/myWebapp but I don't think the manager is available in this Tomcat configuration? I tried changing the tomcat-users.xml , added user username=admin password= roles=tomcat,manager,admin/ then mvn tomcat:run but manager still not available Any thoughts on how to ease rapid development with Tomcat appreciated. Pete Pete On 07/02/07, Mark Hobson [EMAIL PROTECTED] wrote: Hi Pete, On 07/02/07, Pete [EMAIL PROTECTED] wrote: 1) I'm trying to use the tomcat-maven-plugin all is fine using mvn tomcat:deploy however if I try the new mvn tomcat:run which I understand is supposed to be like the jetty:run, I get an error, see end of email. Looks like your webapp is using a different version of servlet-api, hence a class cast exception when tomcat tries to cast your filter. Ensure you're using servlet-api 2.4 which tomcat 5.5 uses. 2) I assume this puts a tomcat instance in target/tomcat however I notice the tomcat manager isn't enable in the target\tomcat\conf\tomcat-users.xml Nope, tomcat manager isn't deployed using tomcat:run. Feel free to raise an issue if you need this functionality. I didn't think this was too useful since the container is rather transient. 3) Is there any documentation on this tomcat:run goal ? none at http://mojo.codehaus.org/tomcat-maven-plugin/ See: http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Running%20a%20WAR%20project http://mojo.codehaus.org/tomcat-maven-plugin/run-mojo.html Cheers, Mark - 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: POM inheritance behaving unexpectedly
On 2/7/07, Jörg Schaible [EMAIL PROTECTED] wrote: Tommy Knowlton wrote on Tuesday, February 06, 2007 11:19 PM: Is this a bug in the code that resolves ${project} references? No, this is a feature (that fails miserably when the directory in your repository does not match the artifactId ... MNG-2290). - Jörg Thanks for the reply, Jörg. I noticed that you are the reporter on that issue. Since I don't (yet?) have a codehaus JIRA login, I wonder whether you'll mind adding the following comment to that issue: All of this could have been avoided, if the expanded part is not the artifactId, but the basename of the current directory. Especially for the scm elements, this is IMHO the only valid assumption. Hmm, I would dispute that this is a valid assumption (that the SCM repo URL is derivable from the basename of the current directory). Suffice it to say that SCM's that I've used allow you to checkout from a repository URL to a (differently-named) local workspace. This fact alone makes the above-mentioned assumption false. E.g., svn co http://svn.mycorp.com/X/Y/Z ./some-name-other-than-Z or, more concretely, just today I did: svn co http://svn/modules/honeycomb/1.0.0 ./honeycomb … because we don't have the normal trunk/tags/branches subversion layout, but instead we keep anticipated or previously released version numbers as part of each module's repo layout. But, I a) don't want to check out all of the different source branches, and b) I don't want to have the extra level of clutter in my local workspace, and c) when I work on a different release branch, it's just a 'svn switch' to point at the other version's source repo. Aside from the fact that I'm off the well-trodden path as regards svn repo layout, I think my point remains valid that the helpful expansion mechanism can't make the indicated assumption. If you're not comfortable adding the comment on my behalf, I'll look into what it takes to get a JIRA login at codehaus. Thanks, -- Tommy
Re: Order of classpath supplied by dependencies ant task
Good day, Sorry, but I ran out of ideas. But maybe archiva has some functionalities that can help you manage your repository ( see [1] and [2] ). And if it does not, you might want to ask for those functionalities ( see [3] ) :-) Cheers, Franz [1] http://maven.apache.org/archiva/ [2] http://docs.codehaus.org/display/MAVENUSER/Archiva [3] http://jira.codehaus.org/browse/MRM Joseph Leniston wrote: Hi Franz, I thought that would be the case. I have found a bug report that describes my issue but it was created over a year ago so I don't hold out much hope of it being fixed soon. http://jira.codehaus.org/browse/MNG-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel We have an old application (started in the late 90's) that is built using ANT scripts. It would be very painful to migrate the build to Maven. So the next best thing is to use a maven repository for library file management and the dependencies task to manage the dependencies in ANT. Up till now the library files have not been managed. The libraries used in the build are not the same as used at run time. Some of the library files required by the application are no longer maintained and I don't know what version they are. We also have some custom libraries. So I have created our own maven repository and added the libraries using artifact:install. It will be another exercise to get the application working with known versions of the libraries. I have set the POM files up as per the instructions on http://maven.apache.org/ant-tasks.html. Is there another way to access the maven repository from within an ANT script? Any suggestions are gratefully received. Thanks, Joseph franz see wrote: Good day to you, Joseph, AFAIK, you cannot control the order of the dependencies...And I can't think of a workaround. Curious, why use antlib for your dependency management and not use maven's ? Cheers, Franz Joseph Leniston wrote: Hi, I am using Antlib for Maven 2.0 to do dependency management in our ant builds. I have a number of POM files for compiling common, server and client code. I also want to use maven to manage our server runtime classpath. I use the following code to get the server runtime classpath from a POM file and store it in a pathId for use later. artifact:dependencies pathId=cp.server.runtime.jars filesetId=server.runtime.jars.fileset remoteRepository refid=maven.repository / pom file=${fetched.build.files.dir}/server_runtime_pom.xml / /artifact:dependencies However if I list the contents of the cp.server.runtime.jars property the jar files are not in the order I specified: property name=cp refid=cp.server.runtime.jars/ echo message=Server Runtime Classpath is ${cp}/ It is important that I can specify the order of the runtime jar files because there is a patch that must be first in the classpath. Is there a way to specify an order of jar files in the POM file? Or to force the dependencies to be stored in the pathID property in the same order as in the POM file? --- This email message is intended solely for the person or entity to which it is addressed. The information it contains is confidential and may be legally privileged. Any review, retransmission, dissemination or other use of this email may be unlawful. If you are not the intended recipient, please notify us immediately and destroy the email from all sources. Thank you. Child, Youth and Family Service accepts no responsibility for changes made to this email or to any attachments after transmission from the Office. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Order-of-classpath-supplied-by-dependencies-ant-task-tf3184655s177.html#a8858772 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: Input from console
Hi Leandro, Are you talking about passing input parameters from the command line when you eexcute your plugin? If this is the case, you can put the @parameter tag in your mojo: /** * @parameter expression=${parameterName} default-value=false */ private boolean parameterName; To set the value from command line, use the -DparameterName=put the value here Hope this helps! :-) Thanks, Deng Leandro Saad wrote: Hi all. I´m trying to create my first Maven plugin. This plugin is intended for Guara users to bootstrap the aplication, scaffonding, etc. How can I read input from console from Maven? I couldn´t find any references on the docs/google. Cheers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: additional classpath to maven2
Good day, Try using maven-dependency plugn ( or codehaus' dependency-maven-plugin ) or maven-assembly-plugin to unpack the jar/zip files to target/classes. Not sure though if that would work. Btw, why not just add those as dependencies? Cheers, Franz That may require you to use depedency plugin or assembly plugin to unpack the files. Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, Is it possible to add additional classpath (not specified in the dependency) to maven2 on runtime. The idea is to unzip the jars to a specific directory and add those jars to compile / jar classpath. Thanks -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html#a8859324 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: [M2] Projects with customizations
Good day to you, Daniel, For changes in your build ( or pom ), you may want to use profiles. For changes in the source code itself, maybe it would be better if you just create a branch and just change the version. If only a part of the code changes, you may want to make it into its own maven project. And just use those as dependencies ( which one to use shall be determined by your profile ). Just my 2 cents, Franz Siegmann Daniel, NY wrote: We have a project that I am preparing to convert from Ant to Maven2, but it is rather complex and I am not sure the best way to proceed. There are two difficulties: 1. We must support different versions, such as standalone and client-server via RMI. These require small changes in the build process, such as which property files are included, running rmic, and so on. 2. We must support customizations for each customer. This includes differences in property files and possibly code changes on CVS branches. Also, different customers use different version (as above) - sometimes just one, sometimes many. Ultimately, I need to create a packaging with the customized code (if any), and all the different versions. Presumably, this will require that the customized versions be deployed under a different name. My thought was to use profiles for (1), and append some string to the final name (such as -rmi). Then on each CVS branch I could modify the artifactId (and possibly groupId) for each customer. I don't know whether I should have some sort of parent-child relationship, or whether I should just use dependencies. Any suggestions? Has anyone dealt with a similar situation? -- Daniel Siegmann FJA-US, Inc. 512 Seventh Ave., New York, NY 10018 (212) 840-2618 ext. 139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-M2--Projects-with-customizations-tf3190037s177.html#a8859364 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: executable jar
Hi,Franz, Thanks for your quick reply. The error shows: Exception in thread main java.lang.NoClassDefFoundError: javax/media/NoPlayerException Actually, I have difined the MainClass in POM. But in my own machine, it runs correctly. Jane 2007/2/7, franz see [EMAIL PROTECTED]: Good day to you, Jane, What do you mean by it can only be used in your machine? What error are you getting when used in another machine? Cheers, Franz Lan-6 wrote: Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane -- View this message in context: http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
axis poms on ws.zones.apache.org
Hi, I've been looking at using the wsdl2code maven2 plugin, which in turn has dependencies on other axis jars and stuff. Several of the jars/modules seem to be missing poms on ws.zones.apache.org, which is making it impossible to resolve the dependency chains and get the jars properly. Does anyone know what's going on with this? Cheers
Re: executable jar
NoClassDefFoundError usually means that you haven't packaged all the necessary libraries etc up into your output jar, or perhaps their JVM does not have the proper libraries available which you have installed in your machine. Check your CLASSPATH environment variable on your machine, and the jars you've manually installed into your JVM/JRE vs the CLASSPATH and jars available on the other computer(s). Wayne On 2/7/07, Lan [EMAIL PROTECTED] wrote: Hi,Franz, Thanks for your quick reply. The error shows: Exception in thread main java.lang.NoClassDefFoundError: javax/media/NoPlayerException Actually, I have difined the MainClass in POM. But in my own machine, it runs correctly. Jane 2007/2/7, franz see [EMAIL PROTECTED]: Good day to you, Jane, What do you mean by it can only be used in your machine? What error are you getting when used in another machine? Cheers, Franz Lan-6 wrote: Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane -- View this message in context: http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369 Sent from the Maven - Users mailing list archive at Nabble.com. - 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]
Build dashboard question
I have been searching the web for the last week, and I have not found what I wanted. I strongly believe someone out there is using something like this. I need to have build dashboard like this: |Environment|Build Version|Build Date| |=|=|| |111.112.2.2| 1.05 |Jan 5 2007| | 221.44.2.3| 1.06|Jan 6 2007 | ... This way I can have my Maven 2 build populate the data to a DB using something like JDBC, have the website with the table become updated with the new DB information, and have it display the information to the users. Please help me find an application like this, I strongly believe this is nothing creative or orginal and someothe out there has something like this in place. Please help. This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]
How to deploy the jar of third party into the repository on our company's server?
HI, I have set up a repository on our company's server by apache,the url is http://10.10.202.22/maven/, How does the maven know there is a repository on the server?and How can I deploy my jar of third party into my local repository and the server repository?
Re: How to deploy the jar of third party into the repository on our company's server?
Hello, Some guides are available at Maven main site, [1]installing 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html [2]deploying 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html a cup of Java, cheers! Sha Jiang 秋秋 wrote: HI, I have set up a repository on our company's server by apache,the url is http://10.10.202.22/maven/, How does the maven know there is a repository on the server?and How can I deploy my jar of third party into my local repository and the server repository? -- View this message in context: http://www.nabble.com/How-to-deploy-the-jar-of-third-party-into-the-repository-on-our-company%27s-server--tf3191568s177.html#a8860111 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: additional classpath to maven2
Hi, I ever used maven:maven-dependency-plugin, but it didin't work and even had other trouble. mojo.codehaus.org:dependency-maven-plugin may work well. a cup of Java, cheers! Sha Jiang franz see wrote: Good day, Try using maven-dependency plugn ( or codehaus' dependency-maven-plugin ) or maven-assembly-plugin to unpack the jar/zip files to target/classes. Not sure though if that would work. Btw, why not just add those as dependencies? Cheers, Franz That may require you to use depedency plugin or assembly plugin to unpack the files. Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, Is it possible to add additional classpath (not specified in the dependency) to maven2 on runtime. The idea is to unzip the jars to a specific directory and add those jars to compile / jar classpath. Thanks -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html#a8860196 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: additional classpath to maven2
Once jars are copied to a specific directory, how can I add that folder to the classpath ? -Jagan -Original Message- From: jiangshachina [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 10:36 PM To: users@maven.apache.org Subject: Re: additional classpath to maven2 Hi, I ever used maven:maven-dependency-plugin, but it didin't work and even had other trouble. mojo.codehaus.org:dependency-maven-plugin may work well. a cup of Java, cheers! Sha Jiang franz see wrote: Good day, Try using maven-dependency plugn ( or codehaus' dependency-maven-plugin ) or maven-assembly-plugin to unpack the jar/zip files to target/classes. Not sure though if that would work. Btw, why not just add those as dependencies? Cheers, Franz That may require you to use depedency plugin or assembly plugin to unpack the files. Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, Is it possible to add additional classpath (not specified in the dependency) to maven2 on runtime. The idea is to unzip the jars to a specific directory and add those jars to compile / jar classpath. Thanks -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html# a8860196 Sent from the Maven - Users mailing list archive at Nabble.com. - 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: Build dashboard question
CruiseControl (http://www.cruisecontrol.org) is probably what you are looking for. CC can run either ant or Maven for build; but I am not sure if CC has Maven-specific hooks to extract artifact info. /U -- Original message -- From: Morgovsky, Alexander (US - Glen Mills) [EMAIL PROTECTED] I have been searching the web for the last week, and I have not found what I wanted. I strongly believe someone out there is using something like this. I need to have build dashboard like this: |Environment|Build Version|Build Date| |=|=|| |111.112.2.2| 1.05 |Jan 5 2007| | 221.44.2.3| 1.06|Jan 6 2007 | ... This way I can have my Maven 2 build populate the data to a DB using something like JDBC, have the website with the table become updated with the new DB information, and have it display the information to the users. Please help me find an application like this, I strongly believe this is nothing creative or orginal and someothe out there has something like this in place. Please help. This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Removing version id from war artifacts
My war artifact is generated as myapp-1.0-SNAPSHOT.war. However, I need this deployed as myapp.war. I am sure this is a common requirement. How can I generate my war artifact and deploy it after stripping its version suffix? Would tomcat plugin do this automatically? Thanks, /U - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: POM inheritance behaving unexpectedly
Hi Tommy, Tommy Knowlton wrote on Thursday, February 08, 2007 3:30 AM: On 2/7/07, Jörg Schaible [EMAIL PROTECTED] wrote: Tommy Knowlton wrote on Tuesday, February 06, 2007 11:19 PM: Is this a bug in the code that resolves ${project} references? No, this is a feature (that fails miserably when the directory in your repository does not match the artifactId ... MNG-2290). - Jörg Thanks for the reply, Jörg. I noticed that you are the reporter on that issue. Since I don't (yet?) have a codehaus JIRA login, I wonder whether you'll mind adding the following comment to that issue: All of this could have been avoided, if the expanded part is not the artifactId, but the basename of the current directory. Especially for the scm elements, this is IMHO the only valid assumption. Hmm, I would dispute that this is a valid assumption (that the SCM repo URL is derivable from the basename of the current directory). Suffice it to say that SCM's that I've used allow you to checkout from a repository URL to a (differently-named) local workspace. This fact alone makes the above-mentioned assumption false. E.g., svn co http://svn.mycorp.com/X/Y/Z ./some-name-other-than-Z or, more concretely, just today I did: svn co http://svn/modules/honeycomb/1.0.0 ./honeycomb And where does the parent POM came from? ... because we don't have the normal trunk/tags/branches subversion layout, but instead we keep anticipated or previously released version numbers as part of each module's repo layout. But, I a) don't want to check out all of the different source branches, and b) I don't want to have the extra level of clutter in my local workspace, and c) when I work on a different release branch, it's just a 'svn switch' to point at the other version's source repo. This is a different situation. In this case you can *never* inherit the SCM entries and each of your POMs must have its own SCM section anyway. M2 cannot guess those entries. The issue is valid if you inherit from the parent POM one directory level above. If your parent is received from the repo, the SCM URL is always completely different. Aside from the fact that I'm off the well-trodden path as regards svn repo layout, I think my point remains valid that the helpful expansion mechanism can't make the indicated assumption. If you're not comfortable adding the comment on my behalf, I'll look into what it takes to get a JIRA login at codehaus. An email address and a nick name :) - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: additional classpath to maven2
Good day, Try unpackaging the class files to target\class ( or target\test-classes if it's for testing ). But I am not sure if that would be enough so that those classes would be included in the classpath. But again, why not use make those jars your dependencies? And what are you trying to do excatly? Cheers, Franz Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Once jars are copied to a specific directory, how can I add that folder to the classpath ? -Jagan -Original Message- From: jiangshachina [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 10:36 PM To: users@maven.apache.org Subject: Re: additional classpath to maven2 Hi, I ever used maven:maven-dependency-plugin, but it didin't work and even had other trouble. mojo.codehaus.org:dependency-maven-plugin may work well. a cup of Java, cheers! Sha Jiang franz see wrote: Good day, Try using maven-dependency plugn ( or codehaus' dependency-maven-plugin ) or maven-assembly-plugin to unpack the jar/zip files to target/classes. Not sure though if that would work. Btw, why not just add those as dependencies? Cheers, Franz That may require you to use depedency plugin or assembly plugin to unpack the files. Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, Is it possible to add additional classpath (not specified in the dependency) to maven2 on runtime. The idea is to unzip the jars to a specific directory and add those jars to compile / jar classpath. Thanks -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html# a8860196 Sent from the Maven - Users mailing list archive at Nabble.com. - 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] -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html#a8860302 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: executable jar
Hi, There are at least two way to get this exception. 1. at other machines you dont have JMF api available for executable jar. 2. Somehow at other machine you MediaLocator constructor get wrong parameter. - markku Lan wrote: Hi,Franz, Thanks for your quick reply. The error shows: Exception in thread main java.lang.NoClassDefFoundError: javax/media/NoPlayerException Actually, I have difined the MainClass in POM. But in my own machine, it runs correctly. Jane 2007/2/7, franz see [EMAIL PROTECTED]: Good day to you, Jane, What do you mean by it can only be used in your machine? What error are you getting when used in another machine? Cheers, Franz Lan-6 wrote: Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane -- View this message in context: http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369 Sent from the Maven - Users mailing list archive at Nabble.com. - 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: additional classpath to maven2
Hello, Factly, I don't use the plugins. how can I add that folder to the classpath ? I think Maven doesn't regard the jars as dependency at compile/runtime. I think you can set the jars to system scope dependencies. It's better to use dependency mechanism, even the jars aren't in any repository. a cup of Java, cheers! Sha Jiang Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Once jars are copied to a specific directory, how can I add that folder to the classpath ? -Jagan -Original Message- From: jiangshachina [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 10:36 PM To: users@maven.apache.org Subject: Re: additional classpath to maven2 Hi, I ever used maven:maven-dependency-plugin, but it didin't work and even had other trouble. mojo.codehaus.org:dependency-maven-plugin may work well. a cup of Java, cheers! Sha Jiang franz see wrote: Good day, Try using maven-dependency plugn ( or codehaus' dependency-maven-plugin ) or maven-assembly-plugin to unpack the jar/zip files to target/classes. Not sure though if that would work. Btw, why not just add those as dependencies? Cheers, Franz That may require you to use depedency plugin or assembly plugin to unpack the files. Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, Is it possible to add additional classpath (not specified in the dependency) to maven2 on runtime. The idea is to unzip the jars to a specific directory and add those jars to compile / jar classpath. Thanks -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html# a8860196 Sent from the Maven - Users mailing list archive at Nabble.com. - 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] -- View this message in context: http://www.nabble.com/additional-classpath-to-maven2-tf3189283s177.html#a8860353 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: Removing version id from war artifacts
Hello uma_rk, You can set a finalName for the project, for example as the following, project build finalNamemyapp/finalName build /project a cup of Java, cheers! Sha Jiang uma_rk wrote: My war artifact is generated as myapp-1.0-SNAPSHOT.war. However, I need this deployed as myapp.war. I am sure this is a common requirement. How can I generate my war artifact and deploy it after stripping its version suffix? Would tomcat plugin do this automatically? Thanks, /U - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Removing-version-id-from-war-artifacts-tf3191661s177.html#a8860421 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: Access dependency properties inside pom.
Hi Marcos, Instead of doing that, try this: dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version${property.name}/version /dependency /dependencies property.name3.8.1/property.name Declare the version as a property then use that in your dependency. Hope this helps. Dawn Marcos Silva Pereira wrote: How can I access dependency information inside the pom.xml? I would like to do something like the following: property.name${project.dependencies[junit:junit].version}/property.name In other words, how can I get the version from a dependency? Thanks... -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com -- View this message in context: http://www.nabble.com/Access-dependency-properties-inside-pom.-tf3189482s177.html#a8860434 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploy a License file
Hallo, is it possible to deploy a license file? I have an project with a LICENSE.txt file (like the maven docs told me). I have an license block too. licenses license nameGPL V2/name urlhttp://www.gnu.org/copyleft/gpl.html/url distributionrepo/distribution commentsGNU GENERAL PUBLIC LICENSE/comments /license /licenses But maven doesn't deploy the license file to the repository. Of course the license block will stay in the pom file. But I feel that this wouldn't be enough. Kindly Regards. Andrey -- Andrey Behrens, Mobil: +49-160-92755947 Phone: +49-228-936-36478 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to deploy the jar of third party into the repository on our company's server?
Hi, thanks,where are you from ?It looks like we come from the same place. 2007/2/8, jiangshachina [EMAIL PROTECTED]: Hello, Some guides are available at Maven main site, [1]installing 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html [2]deploying 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html a cup of Java, cheers! Sha Jiang 秋秋 wrote: HI, I have set up a repository on our company's server by apache,the url is http://10.10.202.22/maven/, How does the maven know there is a repository on the server?and How can I deploy my jar of third party into my local repository and the server repository? -- View this message in context: http://www.nabble.com/How-to-deploy-the-jar-of-third-party-into-the-repository-on-our-company%27s-server--tf3191568s177.html#a8860111 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: How to deploy the jar of third party into the repository on our company's server?
Hello 秋秋, where are you from ? I'm from Beijing, China. It looks like we come from the same place. I think so *_* a cup of Java, cheers! Sha Jiang 秋秋 wrote: Hi, thanks,where are you from ?It looks like we come from the same place. 2007/2/8, jiangshachina [EMAIL PROTECTED]: Hello, Some guides are available at Maven main site, [1]installing 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html [2]deploying 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html a cup of Java, cheers! Sha Jiang 秋秋 wrote: HI, I have set up a repository on our company's server by apache,the url is http://10.10.202.22/maven/, How does the maven know there is a repository on the server?and How can I deploy my jar of third party into my local repository and the server repository? -- View this message in context: http://www.nabble.com/How-to-deploy-the-jar-of-third-party-into-the-repository-on-our-company%27s-server--tf3191568s177.html#a8860111 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-deploy-the-jar-of-third-party-into-the-repository-on-our-company%27s-server--tf3191568s177.html#a8860758 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: executable jar
Hi, Wayne, Thanks for your reply. How can I package all the necessary libraries into the output jar?For a war, the lib will under the web-inf. In a maven project, the dependent jars are all in my own repositories, aren't they? When I perform mvn package, it hasn't included them. If another computer has the java environment, shall I run the executable jar with the same repository? I can't imagin it. I am confusing it.Thanks again. Jane 2007/2/8, Wayne Fay [EMAIL PROTECTED]: NoClassDefFoundError usually means that you haven't packaged all the necessary libraries etc up into your output jar, or perhaps their JVM does not have the proper libraries available which you have installed in your machine. Check your CLASSPATH environment variable on your machine, and the jars you've manually installed into your JVM/JRE vs the CLASSPATH and jars available on the other computer(s). Wayne On 2/7/07, Lan [EMAIL PROTECTED] wrote: Hi,Franz, Thanks for your quick reply. The error shows: Exception in thread main java.lang.NoClassDefFoundError: javax/media/NoPlayerException Actually, I have difined the MainClass in POM. But in my own machine, it runs correctly. Jane 2007/2/7, franz see [EMAIL PROTECTED]: Good day to you, Jane, What do you mean by it can only be used in your machine? What error are you getting when used in another machine? Cheers, Franz Lan-6 wrote: Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane -- View this message in context: http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369 Sent from the Maven - Users mailing list archive at Nabble.com. - 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: executable jar
Hi, markku, Thanks for your reply. Maybe the reason is like 1 just you said. The project I aims to package has a dependeny for jmf.jar. But it hasn't included in the jar. How can I include it? Jane 2007/2/8, Markku Saarela [EMAIL PROTECTED]: Hi, There are at least two way to get this exception. 1. at other machines you dont have JMF api available for executable jar. 2. Somehow at other machine you MediaLocator constructor get wrong parameter. - markku Lan wrote: Hi,Franz, Thanks for your quick reply. The error shows: Exception in thread main java.lang.NoClassDefFoundError: javax/media/NoPlayerException Actually, I have difined the MainClass in POM. But in my own machine, it runs correctly. Jane 2007/2/7, franz see [EMAIL PROTECTED]: Good day to you, Jane, What do you mean by it can only be used in your machine? What error are you getting when used in another machine? Cheers, Franz Lan-6 wrote: Hi, all I have generated an executable jar by using maven, (mvn package). The jar includes the generated classes and main class. But it can only be used in my own machine. Shall I do some more settings to the project? What can I do? Thanks advance! Jane -- View this message in context: http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369 Sent from the Maven - Users mailing list archive at Nabble.com. - 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: Input from console
Hi Leandro, If you are trying to act interractivly with the user, just import a Prompter (from plexus-interactivity) /** * @component */ Prompter prompter; in your mojo. Hope this helps. Raphaël 2007/2/8, Maria Odea Ching [EMAIL PROTECTED]: Hi Leandro, Are you talking about passing input parameters from the command line when you eexcute your plugin? If this is the case, you can put the @parameter tag in your mojo: /** * @parameter expression=${parameterName} default-value=false */ private boolean parameterName; To set the value from command line, use the -DparameterName=put the value here Hope this helps! :-) Thanks, Deng Leandro Saad wrote: Hi all. I´m trying to create my first Maven plugin. This plugin is intended for Guara users to bootstrap the aplication, scaffonding, etc. How can I read input from console from Maven? I couldn´t find any references on the docs/google. Cheers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to deploy the jar of third party into the repository on our company's server?
HI, jiangsha,I am from shenzhen,It is a pleasure to meet you! 2007/2/8, jiangshachina [EMAIL PROTECTED]: Hello 秋秋, where are you from ? I'm from Beijing, China. It looks like we come from the same place. I think so *_* a cup of Java, cheers! Sha Jiang 秋秋 wrote: Hi, thanks,where are you from ?It looks like we come from the same place. 2007/2/8, jiangshachina [EMAIL PROTECTED]: Hello, Some guides are available at Maven main site, [1]installing 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html [2]deploying 3rd party JARs http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html a cup of Java, cheers! Sha Jiang 秋秋 wrote: HI, I have set up a repository on our company's server by apache,the url is http://10.10.202.22/maven/, How does the maven know there is a repository on the server?and How can I deploy my jar of third party into my local repository and the server repository? -- View this message in context: http://www.nabble.com/How-to-deploy-the-jar-of-third-party-into-the-repository-on-our-company%27s-server--tf3191568s177.html#a8860111 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-deploy-the-jar-of-third-party-into-the-repository-on-our-company%27s-server--tf3191568s177.html#a8860758 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: How to deploy the jar of third party into the repository on our company's server?
Hi Sam, You can use the maven-install-plugin (install:install-file goal) to install a 3rd party jar into your local repository. To deploy it in a remote repo, you can use the maven-deploy-plugin (deply:deploy-file goal). See the following urls for more details: http://people.apache.org/~aramirez/maven-install-plugin/ http://people.apache.org/%7Earamirez/maven-install-plugin/ http://people.apache.org/~aramirez/maven-deploy-plugin/ http://people.apache.org/%7Earamirez/maven-deploy-plugin/ Hope this helps! :-) Thanks, Deng sam wrote: HI, I have set up a repository on our company's server by apache,the url is http://10.10.202.22/maven/, How does the maven know there is a repository on the server?and How can I deploy my jar of third party into my local repository and the server repository? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]