Re: Adding files to target before creating war

2011-03-21 Thread Gajo Csaba
The target directory is probably created in the generate-resources phase, before the compile phase. What about trying it in the package phase? You can also try the pre-integration-test phase, but this will only be called if you run maven with a target higher than package. Here are the

How to override the default logger?

2011-01-13 Thread Gajo Csaba
Hi there, I would like to verride Maven's default logger with my own. How to do this? I see that Mojo has a setLog() method, so I was thinking of making a mojo that executes in the first phase (validate), it would set the log with setLog()... and then all the other mojos that execute in the

Configure logging in custom mojo

2011-01-07 Thread Gajo Csaba
Is there a way to configure logging in a properties file? Something like log4j.properties? I would want, for example, to output to a file, in DEBUG level... Thanks, Csaba - To unsubscribe, e-mail:

Re: m2eclipse plugin builder or launcher

2010-12-21 Thread Gajo Csaba
i.e. an org.eclipse.ui.actions.ActionDelegate implmentation of your own. Cheers Lucas On 12/21/2010 08:27 AM, Gajo Csaba wrote: Hi, I have a question regarding the m2eclipse plugin. Let me know if

m2eclipse plugin builder or launcher

2010-12-20 Thread Gajo Csaba
Hi, I have a question regarding the m2eclipse plugin. Let me know if this is not the right place to ask. I'm writing my own custom plugin, and I would like to execute the mvn package command. Meaning: I want to run the m2eclipse builder, so that it would run the Run As-Maven package. Anyone

Creating a custom lifecycle

2010-12-01 Thread Gajo Csaba
Hello, I'm trying to create a custom lifecycle. In this case, I don't mean providing custom classes for one of the defined phases, but redefining the phases themselves. For example, the DefaultLifecycleMapping seems to support clean, compile, test etc... How can I, for example, make it so

Re: can we use maven in offline environment?

2010-12-01 Thread Gajo Csaba
1. create a dummy maven project 2. in the pom.xml add in the dependencies, plugins and reporting ALL the files you'll need... possibly include all the versions as well 3. go to a computer that does have internet and run mvn clean site package install deploy dependency:go-offline and a handful

Re: Creating a custom lifecycle

2010-12-01 Thread Gajo Csaba
I want to delete the deploy goal. Make it exist as much as mvn apple does On 1.12.2010 12:14, Antonio Petrelli wrote: It's best to tell us what you want to accomplish. Fighting Maven is always a bad thing. Antonio 2010/12/1 Gajo Csabacsaba.g...@cosylab.com: Hello, I'm trying to create a

Re: Creating a custom lifecycle

2010-12-01 Thread Gajo Csaba
I didn't try it yet, but I'll try it now. I think this will not solve the problem. If you write mvn deploy, you will probably have the compile, test etc. phases executed. What I need is, to not run any of these phases, but immediately print out this is not supported and end the execution. The

Re: Creating a custom lifecycle

2010-12-01 Thread Gajo Csaba
Yes, I've created a new packaging. In my test project pom.xml, I now have: packagingapple/packaging build plugins plugin groupIdcom.test.phases/groupId artifactIdAppleLifecycle/artifactId extensionstrue/extensions /plugin /plugins /build The AppleLifecycle project defines the apple lifecycle.

How do redefine the path to an element, in a custom mojo?

2010-08-31 Thread Gajo Csaba
I took Stephen's advice and looked at the maven-ant-plugin to see how I can override the parsing of a plugin's configuration. Now I have a parser which works just fine, and can parse the following: configuration packages package name=xxx dependency name=aaa version=1.0 type=abc / ...

How to set log level when testing a custom mojo?

2010-08-31 Thread Gajo Csaba
I know that I can set the log level to DEBUG mode with the -X option, but then I get thousands of lines of useless output. Is there a way I can limit the output to only my class? Something like -Dlog.level.com.mycompany=DEBUG ? I've also attempted using log4j but it seems there's no easy way

XML node attributes when writing a custom mojo

2010-08-25 Thread Gajo Csaba
Hello there! Is it possible to design a custom Maven plugin in such a way that the nodes in its configuration use xml attributes? For example, instead of configure include namesomefile.txt/name /include /configure I would like to have configure include name=somefile.txt/ /configure Is

Re: Using a Veloctity template in a custom Maven report

2010-08-25 Thread Gajo Csaba
To build a website with mvn site, you need to put your custom .vm file somewhere in your project directory, and then in your pom.xml configure the maven-site-plugin to use that .vm file. build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId

JUnit test fails with Javamail

2010-07-13 Thread Gajo Csaba
Hello, I wrote a simple JUnit 4 test. It just sends a plain email with JavaMail. When I run this test class from Eclipse, it passes without problems. However, when I run it with mvn test, the test will fail. Here is part of the stack trace: DEBUG SMTP: trying to connect to host

Re: build problem

2010-03-02 Thread Gajo Csaba
Hi, Maven should output the javac compilation error to you. If you didn't see it, it means Maven hasn't reached the point to compile it yet. Maybe you could send us the complete output you get from Maven to see why it doesn't work. It seems to me that you've installed the jar file correctly

Re: build problem

2010-03-02 Thread Gajo Csaba
Well it can't find oracle.spatial.georaster and some other packages. But looks like you can't build this project at all with your version of Maven: http://www.mail-archive.com/geotools-gt2-us...@lists.sourceforge.net/msg07357.html Maybe try downgrading to version 2.0.9 or try with a newer

Expand environment variable in parent's version

2010-02-26 Thread Gajo Csaba
Hello, I would like to use an environment variable to define the parent project. So I wrote that it's version is parent ... version${env.VERSION_NUMBER}/version /parent The environment variable is set, when I write echo $VERSION_NUMBER in the console, I get its value. According to the

Re: Expand environment variable in parent's version

2010-02-26 Thread Gajo Csaba
On 02/26/2010 02:09 PM, Wendy Smoak wrote: 2010/2/26 Gajo Csabacsaba.g...@cosylab.com: I would like to use an environment variable to define the parent project. So I wrote that it's version is parent ... version${env.VERSION_NUMBER}/version /parent In short, you can't do that.

Plugin configuration element is duplicating itself

2010-01-08 Thread Gajo Csaba
Hello, I'm using the rpm plugin for creating rpms. One project is divided into 3 rpms, so I have a configuration like plugin configuration mappings ... /mappings /configuration executions execution .../execution /executions /plugin There is 1 main configuration, and 2 separate

Re: Plugin configuration element is duplicating itself

2010-01-08 Thread Gajo Csaba
in this component? Because in the pom.xml, the specific mapping has just one source element, while the setSources() method is forwarded a list of two source elements! I'm not sure from which package it comes from, perhaps org.codehaus.plexus:plexus-utils:1.5.7 ? Regards, Csaba Gajo Csaba

Filtering a file in maven mojo

2009-12-17 Thread Gajo Csaba
Hello, One of our custom mojos is generating a file, and the template for this file is stored in the jar file of the mojo. What is done is that the resource is read with getClass().getResourceAsStream(), and then printed into a real file line by line. What I would like to do is, before

Custom plugin - resolve variables loaded from a file

2009-12-16 Thread Gajo Csaba
Hello, We're using the rpm plugin for packaging, and we have a problem with its install script. There are two ways to include a script. One is the (deprecated) install tag. In this case, we would put the bash script into the pom.xml, which is rather ugly, but it works. The bash script itself

Re: Custom plugin - resolve variables loaded from a file

2009-12-16 Thread Gajo Csaba
, Gajo Csaba csaba.g...@cosylab.com wrote: Hello, We're using the rpm plugin for packaging, and we have a problem with its install script. There are two ways to include a script. One is the (deprecated) install tag. In this case, we would put the bash script into the pom.xml, which is rather ugly

How to download every dependency we need at once?

2009-12-15 Thread Gajo Csaba
Hello, We have a problem that some computers are not connected to the internet, so Maven cannot download dependencies from there. Because of this, by default, maven is running in offline mode. Currently, Maven is set up by an installation script, which installs maven and does some changes

Re: How to download every dependency we need at once?

2009-12-15 Thread Gajo Csaba
This seems to be almost perfect except it requires a project to exist. But I'll use it if there's nothing else :) Thanks, Csaba Jesse Farinacci wrote: Hi Gajo, 2009/12/15 Gajo Csaba csaba.g...@cosylab.com: Is there some cleaner way to do this? I know exactly which dependencies

Re: Plugin to start a jar?

2009-12-10 Thread Gajo Csaba
The exec plugin? Thomas Sundberg wrote: Hi! I want to start a jar during the 'pre-integration-test' pretty much as starting a Tomcat with Cargo or similar. But this is a standalone jar that contains a server that i want to have available for integrationstests that I want to run later. I want

How to download m2eclipse plugin?

2009-12-08 Thread Gajo Csaba
Hello, I would like to download the m2eclipse plugin, and I don't mean through the update site. We need to provide our Eclipse pre-packaged with m2eclipse, so we need to have the files handy. Anyone knows the url from where we can download it? All I could find is the update site... Thanks,

Re: Create multiple JARs from different src directories

2009-12-04 Thread Gajo Csaba
Hello, I don't know specifically for the JAR plugin, but according to its website at http://maven.apache.org/plugins/maven-jar-plugin/usage.html you can configure which files to include/exclude. So you could create separate execution elements for each jar file you want to generate, and set

How to change the plugin config from a mojo?

2009-12-02 Thread Gajo Csaba
Hello, I have a mojo which requires a project. When it starts, it gets the project's build plugins, searches for a specific one, and then takes its configuration and changes is. The configuration is an Xpp3Dom object, which I convert to String with toString()... but how do I convert that

Global shared memory

2009-12-02 Thread Gajo Csaba
Hello, Is there a way I can share some values between mojos, and so that they aren't Strings? I know that there is a mavenProject.getProperties() thing which can be used, but in this case I would like to share a HashMap. Regards, Csaba

Plugin to terminate another plugin

2009-11-26 Thread Gajo Csaba
Hello, I use the exec plugin to run some external processes. It is possible for one of these processes to get into an eternal loop, so the build will hang. Is there a way to terminate this goal after, let's say, 10 seconds? If there's no thing that's already made, is there a way to write a

Replace the deploy phase with my own plugin

2009-11-25 Thread Gajo Csaba
Hello, I was looking at components.xml of the rpm plugin, and see that it uses Maven's standard deploy plugin for the deploy phase. Is there a way to replace that phase in the pom.xml with a plugin of my own, without modifying components.xml, or I have to change the plugin itself? Regards,

How to include images into Doxia generated site?

2009-11-24 Thread Gajo Csaba
Hello, I'm generating a PDF from DocBook XML, and I don't know how to include images, as in, where should they be located? I've tried next to the xml file, in the root directory... http://maven.apache.org/doxia/book/index.html Thanks, Csaba

One project, two outputs, how to do it?

2009-11-24 Thread Gajo Csaba
Hello, Usually when I build a project and install it to my local repository, I have one jar file there. In one specific case, I would like two jars to be created, and they should both be installed into the repository. Is there a way to do this? Creating two jars is not so much a problem,

Re: One project, two outputs, how to do it?

2009-11-24 Thread Gajo Csaba
No, different, one containing one part of the compiled code, the other the rest. Alexander wrote: Two identical jar? 2009/11/24 Gajo Csaba csaba.g...@cosylab.com Hello, Usually when I build a project and install it to my local repository, I have one jar file there. In one specific case

Re: Skip dependencies

2009-11-24 Thread Gajo Csaba
this dependency checkDependencyOnMyOwn(dep); } } I'm now waiting for comments why this is a horrible butchering of Maven :) Regards, Csaba Gajo Csaba wrote: Ah cool, some of my colleagues are experimenting with it, I'll ask them tomorrow! Csaba Madai wrote: Have you tried Artifactory? It's

Re: Skip dependencies

2009-11-24 Thread Gajo Csaba
Because they're not optional, they just cannot be installed by Maven because they're in a YUM repository. But I guess the effect would be the same? Stephen Connolly wrote: why don't you just set optionaltrue/optional on your dependencies? 2009/11/24 Gajo Csaba csaba.g...@cosylab.com

post-integration-test must be executed

2009-11-23 Thread Gajo Csaba
Hello, We're doing some integration tests with bash scripts, and these are executed with Maven's exec plugin. When the test works, it returns 0, when it fails, it returns 1. When it returns 1, the exec plugin will fail and the post-integration-test goal will not be executed. It is crucial

Re: post-integration-test must be executed

2009-11-23 Thread Gajo Csaba
2009/11/23 Gajo Csaba csaba.g...@cosylab.com: Hello, We're doing some integration tests with bash scripts, and these are executed with Maven's exec plugin. When the test works, it returns 0, when it fails, it returns 1. When it returns 1, the exec plugin will fail and the post-integration

RPM dependencies

2009-11-23 Thread Gajo Csaba
Hello, We would like to use RPMs similarly to JARs. This means that, when we install a project, its rpm would go into the repository. When another project is using this project, then the rpm should be fetched from the repository and installed. Is there a good way to do this? The problem

Re: RPM dependencies

2009-11-23 Thread Gajo Csaba
Maven, you might find that it can replace any functionality you got from rpm/yum, thus rendering the use of rpm packaging redundant. Eyal. 2009/11/23 Gajo Csaba csaba.g...@cosylab.com Hello, We would like to use RPMs similarly to JARs. This means that, when we install a project, its rpm

Re: RPM dependencies

2009-11-23 Thread Gajo Csaba
classpathPrefix/usr/lib/ctch/java/classpathPrefix /manifest /archive /configuration /plugin /plugins /build On Mon, Nov 23, 2009 at 3:47 PM, Gajo Csaba csaba.g...@cosylab.com wrote: I have been actually using the rpm plugin, found a few bugs

Skip dependencies

2009-11-23 Thread Gajo Csaba
Hello, Is there a way to write a plugin or something, which would check if a dependency exists, and if it doesn't, then just skips it? Currently if a dependency is missing and cannot be downloaded, then the build will fail. Thanks, Csaba

Re: Skip dependencies

2009-11-23 Thread Gajo Csaba
it would fail. But it should not fail if it's not in the Maven repository. Regards, Csaba Csaba Madai wrote: Hi, I think thats the point of the dependency, to be there, why do you use a dependency in your pom when it's not necesarry? :) Csaba 2009/11/23 Gajo Csaba csaba.g...@cosylab.com

Re: Skip dependencies

2009-11-23 Thread Gajo Csaba
Ah cool, some of my colleagues are experimenting with it, I'll ask them tomorrow! Csaba Madai wrote: Have you tried Artifactory? It's not a plugin, but I assume it will do the job for you :) Csaba 2009/11/23 Gajo Csaba csaba.g...@cosylab.com: Hello Csaba :) The problem I might

Excluding repositories

2009-11-20 Thread Gajo Csaba
Hello, One of the dependencies is trying to access a repository at download.java.net, and this site is blocked by our firewall. Is there a way to tell Maven to skip this repository? Either in settings.xml or pom.xml Thanks, Csaba

Re: Alternative output directory for javadocs

2009-11-20 Thread Gajo Csaba
The example from the website worked fine for me, it placed the javadocs into an alternative directory, though maybe I didn't understand what exactly you're trying to archive. Regards, Csaba Sebastian Hoß wrote: On Fri, 20 Nov 2009 11:48:09 +0100 Sebastian Hoß m...@shoss.de wrote: Hey

Maven plugin version number

2009-11-18 Thread Gajo Csaba
Hello, I'm writing a plugin which is generating certain files, and I would like to add something like a Generated by xxx version 1.2.3 string to each file it generates. The problem is, how can the plugin know its own version (without hardcoding it)? Regards, Csaba

Re: Maven plugin version number

2009-11-18 Thread Gajo Csaba
. Here's one: http://forums.sun.com/thread.jspa?threadID=642761 /Anders 2009/11/18 Gajo Csaba csaba.g...@cosylab.com Hello, I'm writing a plugin which is generating certain files, and I would like to add something like a Generated by xxx version 1.2.3 string to each file it generates

Maven RPM plugin changes all file permissions to 644

2009-11-13 Thread Gajo Csaba
Hello, I'm using the Maven RPM plugin for creating rpms. It's working fine, but it overwrites the permissions of all files to 664. So for example, an executable file becomes non-executable. I've added these tags to the configuration: defaultFilemode-/defaultFilemode

Re: Maven RPM plugin changes all file permissions to 644

2009-11-13 Thread Gajo Csaba
OK as far as I can see, the problem is that the RPM Plugin uses Plexus Archiver version 1.0-alpha-5, which copes files by opening and output stream and writing to it, and no chmod is done. This is fixed in version 1.0-alpha-12, where the Plexus Archiver explicitly executes the chmod command

Re: Maven RPM plugin changes all file permissions to 644

2009-11-13 Thread Gajo Csaba
I ran the RPM Plugin with the patched version of the archiver, and it works. However, the tests fail, so I had to run it with the -Dmaven.test.skip=true parameter. Gajo Csaba wrote: OK as far as I can see, the problem is that the RPM Plugin uses Plexus Archiver version 1.0-alpha-5, which

How to delegate the execution to other Mojos?

2009-11-11 Thread Gajo Csaba
Hello, I would like to create a maven plugin, which would delegate to other plugins based on parameters. Something like mvn mymojo:dotask -Dtask=xxx and then in the dotask mojo I would see what the value of task is, and if it's xxx then execute Mojo1, if it's yyy then Mojo2 etc... How can

Re: How to delegate the execution to other Mojos?

2009-11-11 Thread Gajo Csaba
case, the build will probably be broken in a hard to figure out way -Stephen 2009/11/11 Gajo Csaba csaba.g...@cosylab.com: Hello, I would like to create a maven plugin, which would delegate to other plugins based on parameters. Something like mvn mymojo:dotask -Dtask=xxx and then in the dotask

Plugin to detect if called from the shell

2009-11-10 Thread Gajo Csaba
Hello, Is there a way for a Maven plugin (Mojo) to detect if it has been called from the console, and not from pom.xml as part of the lifecycle? I have a Mojo which has @requiresProject false, and I execute it like mvn pluginname:dostuff But it also can be called from pom.xml, as part of a

Maven Archetype: run script after creation

2009-11-09 Thread Gajo Csaba
Hello, I would like to create an archetype with a default directory structure. After the directories are created, I'd like the archetype to execute a Perl script. How can I do this? Thanks, Csaba - To unsubscribe,

Maven archetypes and Velocity

2009-11-09 Thread Gajo Csaba
Hello, I have a very simple question regarding archetypes. I've created my own basic archetype, and in archetype-resources/src/main/java/App.java I wrote the following: package $xxx Installed the archetype, created a new project with it and also added the -Dxxx=abc parameter... and it

Re: Maven archetypes and Velocity

2009-11-09 Thread Gajo Csaba
you need to create an archetype.properties file: http://maven.apache.org/plugins/maven-archetype-plugin/examples/create-with-property-file.html Thanks, Adam On Mon, 2009-11-09 at 14:21 +0100, Gajo Csaba wrote: Hello, I have a very simple question regarding archetypes. I've created my own

Re: Maven Archetype: run script after creation

2009-11-09 Thread Gajo Csaba
it's all done, a Perl script is executed to do some more work... Jamie Whitehouse wrote: You may want to look at the exec-maven-plugin which can execute programs outside of Maven: http://mojo.codehaus.org/exec-maven-plugin/ -Original Message- From: Gajo Csaba [mailto:csaba.g

Same plugin, different phases

2009-11-04 Thread Gajo Csaba
Hello, I use the exec plugin, and I need to pass it different parameters based on the target I define. So for example, if I write mvn test, then exec should forward one set of arguements to the command it executes, and if I write mvn compile, then it sends another arguement. How to do this?

Re: Same plugin, different phases

2009-11-04 Thread Gajo Csaba
element wrong. It should be inside the execution section. /Anders 2009/11/4 Gajo Csaba csaba.g...@cosylab.com Hello, I use the exec plugin, and I need to pass it different parameters based on the target I define. So for example, if I write mvn test, then exec should forward one set

Re: Same plugin, different phases

2009-11-04 Thread Gajo Csaba
Ah ok, got it to work. Looks like I needed to define a global execution as well - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org

Re: [Fwd: Threads in a plug-in]

2009-10-29 Thread Gajo Csaba
it? On Wed, Oct 28, 2009 at 9:20 AM, Gajo Csaba csaba.g...@cosylab.com wrote: Good idea! I was actually hoping there was some switch I can set in Maven to tell it not to terminate my thread, but I guess your idea would work fine as well. Thanks! Csaba Stephen Connolly wrote: add

[Fwd: Threads in a plug-in]

2009-10-28 Thread Gajo Csaba
Hello all, Could someone please answer my question? I don't believe it's that complicated... Thanks, Csaba ---BeginMessage--- Hello, I've developed a plug-in which executes some shell commands. I would like to run these commands in parallel with the rest of the build process, because

Re: [Fwd: Threads in a plug-in]

2009-10-28 Thread Gajo Csaba
-Stephen 2009/10/28 Gajo Csaba csaba.g...@cosylab.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org

Threads in a plug-in

2009-10-27 Thread Gajo Csaba
Hello, I've developed a plug-in which executes some shell commands. I would like to run these commands in parallel with the rest of the build process, because they don't affect the other files. So I was thinking of creating a thread in the execute() method, starting it, and let it do its