Re: Inser jar file in repository
I usually just put in the dependancy as I would like it to appear in my repository for example dep.. artifactIdmyartifact/artifactid groupmygroup/group version1.0/version /dep... Maven then complains it doesn't exist.. and tells you how to install it. Just replace the jar-file with the file it should use. On Jan 23, 2008 5:09 PM, Wendy Smoak [EMAIL PROTECTED] wrote: On Jan 23, 2008 8:54 AM, Arthur Rodrigues Stilben [EMAIL PROTECTED] wrote: I have a project A that depends of B.jar file. That B.jar is already done, I just want to put it in repository so that I can use it in project A. You can install B.jar in your local repository with 'mvn install:install-file ...' * http://maven.apache.org/plugins/maven-install-plugin/usage.html (If you are working in a team, consider establishing an internal repository.) -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inser jar file in repository
Oh.. and if you are using your own repository (you probably do).. then you can change install with deploy. You probably need to specify your remote repository (ftp://... or something like that). On Jan 23, 2008 5:32 PM, Roy van der Kuil [EMAIL PROTECTED] wrote: I usually just put in the dependancy as I would like it to appear in my repository for example dep.. artifactIdmyartifact/artifactid groupmygroup/group version 1.0/version /dep... Maven then complains it doesn't exist.. and tells you how to install it. Just replace the jar-file with the file it should use. On Jan 23, 2008 5:09 PM, Wendy Smoak [EMAIL PROTECTED] wrote: On Jan 23, 2008 8:54 AM, Arthur Rodrigues Stilben [EMAIL PROTECTED] wrote: I have a project A that depends of B.jar file. That B.jar is already done, I just want to put it in repository so that I can use it in project A. You can install B.jar in your local repository with 'mvn install:install-file ...' * http://maven.apache.org/plugins/maven-install-plugin/usage.html (If you are working in a team, consider establishing an internal repository.) -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven2 plugin
On 9/11/07, Roy van der Kuil [EMAIL PROTECTED] wrote: Hi, For internal use at our company I have written a small maven plugin that uses a configuration similar to: pom blablabla configuration myobjects myobject namea_name/name type namea_type/name /type /myobject myobject namea_name2/name type namea_type2/name /type /myobject /myobjects /configuration /configuration With matching javacode: public class MyobjectsMojo extends AbstractMojo { } Hmm.. tab-enter is not a good idea in a browser :) Here is more javacode: public class MyobjectsMojo extends AbstractMojo { private MyObject[] myobjects[] } public class Type { private String name; } Everything works fine with maven2.x up to 2.0.4. After that.. it simply fails to find the configuration for myobjects. Is there any way I can find out why it fails to map? I have tried mvn -e but no errors at all.. Thanks for your help, Roy
maven2 plugin
Hi, For internal use at our company I have written a small maven plugin that uses a configuration similar to: pom blablabla configuration myobjects myobject namea_name/name type namea_type/name /type /myobject myobject namea_name2/name type namea_type2/name /type /myobject /myobjects /configuration /configuration With matching javacode: public class MyobjectsMojo extends AbstractMojo { }
writing a maven plugin
Hi all, I am in the progress of updating a maven plugin for UIC (uic.sf.net) which I use in the company I work for very often. It's goal is to convert qt-designer files (*.ui) into java files using the UICcompiler. So far so good. My problem is that currently it writes the generated java files into the src/main/java directory and I would like that to be the target/generated-sources/uic. This would solve some problems I have (cleaning up generated java files of ui files that no longer exist for example). I managed to change the output directory but the problem is maven compile doesn't notice these java files. Is there something I need to change as well? Kind regards Roy
Re: writing a maven plugin
Hi, Thanks a lot! That actually did the trick :) -Roy On 6/26/07, Tim Kettler [EMAIL PROTECTED] wrote: Hi, you need to add the directory as an additional source directory to the pom. So in your mojo you need to do something like this: project.addCompileSourceRoot( dir ); -Tim Roy van der Kuil schrieb: Hi all, I am in the progress of updating a maven plugin for UIC (uic.sf.net) which I use in the company I work for very often. It's goal is to convert qt-designer files (*.ui) into java files using the UICcompiler. So far so good. My problem is that currently it writes the generated java files into the src/main/java directory and I would like that to be the target/generated-sources/uic. This would solve some problems I have (cleaning up generated java files of ui files that no longer exist for example). I managed to change the output directory but the problem is maven compile doesn't notice these java files. Is there something I need to change as well? Kind regards Roy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven+Checkstyle - Configuration file location
We do have an internal repository set up, as I would imagine others will too. At our company we have a so called 'library' with call kinds of handy utilities that are used in other projects. So deploying the maven style to that internal repository will see that just as the normal plugin. We also have setup maven-proxy as well, but that is not a requirement I think. We have a server running cruisecontrol (yes, we are planning to move to continuum as soon as it has rss support build in) and there it automatically detects the latest version of the checkstyle dependancy. So I am pretty sure it works very well ;) Kind regards, Roy On 9/5/06, Stephen Duncan [EMAIL PROTECTED] wrote: My experience is that this won't work for people who have not manually installed the shared project; the dependency won't be downloaded from an internal repository, it will only try central (you won't see this if you use a proxy mirror for central I guess). I believe the correct way to do this is by declaring acompany:acompany_style as an extension. build extensions extension groupIdacompany/groupId artifactIdacompany_style/artifactId version1.0-SNAPSHOT/version /extension /extensions /build -Stephen On 9/4/06, Roy van der Kuil [EMAIL PROTECTED] wrote: Hi, We have a similar setup and have created a 'project' with only a couple of resources. (our own version of the checkstyle xml and suppressions). We deployed this 'jar' and made the maven-checkstyle-plugin dependant on that dependancy: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdacompany/groupId artifactIdacompay_style/artifactId version1.0-SNAPSHOT/version /dependency /dependencies /plugin This actually works very well and makes sure every project uses the 'latest' style. On 9/4/06, Olivier Vierlinck [EMAIL PROTECTED] wrote: We use maven+checkstyle on a multi-project. We have defined our checks (mycheckstyle.xml) for one of the component. The xml file is stored right at the root of the component (next to the src and target folders) in the top pom file we have: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationmycheckstyle.xml/configLocation /configuration /plugin So we have a structure like this topProject --- pom.xml --- subComponent1 --- --- src --- --- target --- --- pom.xml --- --- mycheckstyle.xml --- --- ... --- subComponent2 --- --- src --- --- target --- --- pom.xml --- --- ... --- --- subsubComponent2.1 --- --- --- src --- --- --- target --- --- --- pom.xml --- --- --- ... This works fine. But now, we would like to use the same configuration file for ALL our component. So, we would like to have our (single) mycheckstyle.xml file stored only once, right under the topProject, next to the top pom.xml file. How can we define that in the pom file. I tried using relative path (../mycheckstyle.xml), full url (file:../mycheckstyle.xml), using maven variables ($project.dir/mycheckstyle.xml) but without success, always with one or another error message from maven such as Unable to find location '../mycheckstyle.xml' as URL, File or Resource. Is there any way to combine maven's knowledge of the project/components tree so that each individual component knwos the top level and use it to locate the mycheckstyle.xml. Even better: is there a way to support component with different level in the tree (as subComponent2 and subComponent2.1 in the example above) Thanks, Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven+Checkstyle - Configuration file location
Hi, We have a similar setup and have created a 'project' with only a couple of resources. (our own version of the checkstyle xml and suppressions). We deployed this 'jar' and made the maven-checkstyle-plugin dependant on that dependancy: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdacompany/groupId artifactIdacompay_style/artifactId version1.0-SNAPSHOT/version /dependency /dependencies /plugin This actually works very well and makes sure every project uses the 'latest' style. On 9/4/06, Olivier Vierlinck [EMAIL PROTECTED] wrote: We use maven+checkstyle on a multi-project. We have defined our checks (mycheckstyle.xml) for one of the component. The xml file is stored right at the root of the component (next to the src and target folders) in the top pom file we have: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationmycheckstyle.xml/configLocation /configuration /plugin So we have a structure like this topProject --- pom.xml --- subComponent1 --- --- src --- --- target --- --- pom.xml --- --- mycheckstyle.xml --- --- ... --- subComponent2 --- --- src --- --- target --- --- pom.xml --- --- ... --- --- subsubComponent2.1 --- --- --- src --- --- --- target --- --- --- pom.xml --- --- --- ... This works fine. But now, we would like to use the same configuration file for ALL our component. So, we would like to have our (single) mycheckstyle.xml file stored only once, right under the topProject, next to the top pom.xml file. How can we define that in the pom file. I tried using relative path (../mycheckstyle.xml), full url (file:../mycheckstyle.xml), using maven variables ($project.dir/mycheckstyle.xml) but without success, always with one or another error message from maven such as Unable to find location '../mycheckstyle.xml' as URL, File or Resource. Is there any way to combine maven's knowledge of the project/components tree so that each individual component knwos the top level and use it to locate the mycheckstyle.xml. Even better: is there a way to support component with different level in the tree (as subComponent2 and subComponent2.1 in the example above) Thanks, Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cobertura reports 0% for some classes
I had the same problem for projects that I have 'moved' from ant to maven (2). The test sources where in the same src directory as the main sources (I only had one src path). After creating 2 source trees (according to mavens best practice) it works like a charm.
maven2 pom inheritence
Hi all, We have a project setup that uses a 'root' pom for specifying things like the source directory/plugins used in the build process etc. This pom file has been uploaded to our local maven repository. This local maven repository is available through the maven proxy which is specified in the ~/.m2/settings.xml file. The problem starts when the 'root' pom is not available then it somehow doesn't pickup the settings.xml file to use the proxy. So I figuered people need to install or download the pom.xml file from the cvs repository manually and all things go well. The problem then exists that whenever the pom file is available you'll need to keep it up to date yourself. Is there something I am missing here so that people do not need to have the 'root' pom and still the settings.xml file is used to find the proxy? Our file sturcture: pom.xml /plugins/pom.xml plugins/theplugin/pom.xml client/pom.xml all poms available depend on the pom specified in the parent directory by specifying something like: parent groupIdcompany/groupId artifactIdcompany/artifactId version1.0-SNAPSHOT/version /parent -Roy
Re: maven2 pom inheritence
Thanks, But I guess this solves only part of the problem. if one of the pom's is missing it doesn't look at settings.xml to resolv any settings (at least not the proxy). Does someone know anything about that problem as well? Thanks for your help and the number of votes should be increased by now :) -Roy On 5/29/06, Jörg Schaible [EMAIL PROTECTED] wrote: Roy van der Kuil wrote on Monday, May 29, 2006 9:07 AM: Hi all, We have a project setup that uses a 'root' pom for specifying things like the source directory/plugins used in the build process etc. This pom file has been uploaded to our local maven repository. This local maven repository is available through the maven proxy which is specified in the ~/.m2/settings.xml file. The problem starts when the 'root' pom is not available then it somehow doesn't pickup the settings.xml file to use the proxy. So I figuered people need to install or download the pom.xml file from the cvs repository manually and all things go well. The problem then exists that whenever the pom file is available you'll need to keep it up to date yourself. Is there something I am missing here so that people do not need to have the 'root' pom and still the settings.xml file is used to find the proxy? Our file sturcture: pom.xml /plugins/pom.xml plugins/theplugin/pom.xml client/pom.xml all poms available depend on the pom specified in the parent directory by specifying something like: parent groupIdcompany/groupId artifactIdcompany/artifactId version1.0-SNAPSHOT/version /parent -Roy Vote here: http://jira.codehaus.org/browse/MNG-2289 ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JavaPolis
I am currently really impressed (I met Milos here at Javapolis) and started with netbeans the same day :) Hopefully we can all help him improve it even more (he has some nice advanced features for maven 1) =Roy On 12/13/05, Martin van den Bemt [EMAIL PROTECTED] wrote: Nope it is maven1.. Although Milos started on the maven2 plugin. Mvgr, Martin Frank Russo wrote: Will this work for maven 2? Frank Russo Senior Developer FX Alliance, LLC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: m2: starting a java class
HI Jesse, I am really looking forward to the try the run plugin. If you need any help testing/coding it please let me know, because this seems like the most important hurdle to take before moving to maven. For now I will try to build the execute plugin and see where that brings me :) Tanks On 10/20/05, Jesse McConnell [EMAIL PROTECTED] wrote: that particular plugin isn't available on any mirrors as it is largely a bastard child plugin that certain developers have given me a hard time for even spawning...so no release on it... you can checkout mojo and build it yourself if you want to use it in the shortterm until the runtime plugin comes out...I ought to have something to release on the runtime one next week providing I still get my vacation time :P mojo.codehaus.org http://mojo.codehaus.org http://mojo.codehaus.org for the mojo package jesse On 10/20/05, Roy van der Kuil [EMAIL PROTECTED] wrote: Hi all, Thanks for you're fast reply, although I have tried to insert the 'plugin' part into my pom.xml's build properties. Whenever I start maven, it complains it cannot find the plugin. Should I add something to my local plugin repository? Thanks for your help, -Roy On 10/19/05, Jason van Zyl [EMAIL PROTECTED] wrote: On Wed, 2005-10-19 at 13:42 +0200, Roy van der Kuil wrote: Hi All, We are currently moving (or at least trying too) from ant to maven. Mostly because we'd really like to solve those nasty classpath issues on different systems. As for compiling the sources everyting looks very promising (no problems so far), but since we are developing rich client applications (swing) I'd like to be able to start my java class from my maven project. We used to have an 'ant run' command and I'd like to know if there is anything similar for maven (2.0). I have seen a scope 'runtime' for dependancies but I am not quite sure it is used for what I have in mind. http://mojo.codehaus.org/maven-execute-plugin/ Thanks for your help, -Roy -- jvz. Jason van Zyl jason at maven.org http://maven.org http://maven.org http://maven.org http://maven.apache.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- jesse mcconnell
Re: m2: starting a java class
Hi all, Thanks for you're fast reply, although I have tried to insert the 'plugin' part into my pom.xml's build properties. Whenever I start maven, it complains it cannot find the plugin. Should I add something to my local plugin repository? Thanks for your help, -Roy On 10/19/05, Jason van Zyl [EMAIL PROTECTED] wrote: On Wed, 2005-10-19 at 13:42 +0200, Roy van der Kuil wrote: Hi All, We are currently moving (or at least trying too) from ant to maven. Mostly because we'd really like to solve those nasty classpath issues on different systems. As for compiling the sources everyting looks very promising (no problems so far), but since we are developing rich client applications (swing) I'd like to be able to start my java class from my maven project. We used to have an 'ant run' command and I'd like to know if there is anything similar for maven (2.0). I have seen a scope 'runtime' for dependancies but I am not quite sure it is used for what I have in mind. http://mojo.codehaus.org/maven-execute-plugin/ Thanks for your help, -Roy -- jvz. Jason van Zyl jason at maven.org http://maven.org http://maven.apache.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Plugin descriptor generator
Hi, I ran into the same error. You need to update to the latest maven release (or at least the RC version). There seems to be a method added in this release which is used by the latest version from the plugin creator plugin. Good luck, Roy On 10/19/05, Jan Bartel [EMAIL PROTECTED] wrote: Hi, Using the 2.0-beta-3 release of Maven, I'm trying to create a Java plugin. I've tried just cutting and pasting the Hello World example from the website, but I get the same error, which is when I try to generate the plugin.xml as part of the m2 install command, I get: Exception in thread main java.lang.NoSuchMethodError: org.apache.maven.plugin.descriptor.PluginDescriptor.setName (Ljava/lang/String;)V at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute( AbstractGeneratorMojo.java:91) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:417) [..snip..] My project looks like: /helloworld pom.xml /src/main/java/sample/plugin GreetingMojo.java Again, pom.xml and GreetingMojo.java are straight from the website. If someone could point me in the right direction I'd be grateful. thanks Jan Bartel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
m2: starting a java class
Hi All, We are currently moving (or at least trying too) from ant to maven. Mostly because we'd really like to solve those nasty classpath issues on different systems. As for compiling the sources everyting looks very promising (no problems so far), but since we are developing rich client applications (swing) I'd like to be able to start my java class from my maven project. We used to have an 'ant run' command and I'd like to know if there is anything similar for maven (2.0). I have seen a scope 'runtime' for dependancies but I am not quite sure it is used for what I have in mind. Thanks for your help, -Roy