Re: Maven3 RC1: Executing MojoExecutions with PluginManager

2010-09-19 Thread Steffen Grunwald
On Fri, Sep 17, 2010 at 7:35 PM, Olivier Lamy ol...@apache.org wrote:
 You can have a look at the site plugin 3.x branch [1] to understand
 how to do it.

Hi Olivier, thanks for the pointer.

I've done 2 things different in my maven 2 version and I adjusted it
according to your Mojo:
- I used the PluginManager to execute. New options are
BuildPluginManager or LifecycleExecutor, which uses forking. Since I
do not understand the way I can execute the mojoExecutions forked, I
use BuildPluginManager which does the trick. Or do you suggest to use
forking? I'm asking because, if that is the right way: why isn't the
PluginManager delegating to BuildPluginManager.executeMojo() instead
of throwing UnsupportedOperationException?
- I directly passed MojoDescriptor and Plugin Execution Configuration
to the MojoExecution. You additionally converted and merged their
plexusConfiguration. Can't that be done internally by the
BuildPluginManager for less regression?

Thanks, Steffen

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Maven3 RC1: Executing MojoExecutions with PluginManager

2010-09-17 Thread Steffen
Hello,

I developed a mojo that can be used to execute executions by id with
their individual configuration.
This is needed to execute plugins seperately if they are configured
twice (i.e. the sql execute plugin) in a project.

With maven 3 this is now broken because of an
UnsupportedOperationException of the deprecated PluginManager.

Here's what I do:
- I run maven in a project, passing the execution ids to my mojo
- the mojo is checking the project's plugins for their configured executions
- If the plugin has an execution configured I want to execute: I
retrieve the plugin descriptor using the PluginManager
(verifyPlugin()) and the Configuration from the Execution and create a
MojoExecution
- I execute the MojoExecution(s) with the PluginManager
(executeMojo()). And BAAM! this is throwing the
UnsupportedOperationException

Is there a way introduced by Maven3 to execute executions by id (so I
can get rid of my own plugin)?
Is there an alternative way to execute the MojoExecution? I tried
BuildPluginManager but this just won't do either.

Thanks, Steffen

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



maven3 embedder

2010-08-10 Thread Steffen Stundzig
Hi folks,

I've tried the whole day on how can i embedd a call for a maven goal
into my java src. I'm working with maven-3.0-beta-1.

Here are my sample snippets which the appropriate error messages:

public class MavenEmbedTest {
  public static void main(String[] args) {
File workingDir = new File(/path/to/a/maven/project);

// [1]
MavenCli cli = new MavenCli();
cli.doMain(new String[] { package }, workingDir.getAbsolutePath(),
System.out, System.err);

// [2]  
DefaultMaven maven = new DefaultMaven();
DefaultMavenExecutionRequest request = new
DefaultMavenExecutionRequest();
request.setBaseDirectory(workingDir);
ListString goals = new ArrayListString();
goals.add(package);
request.setGoals(goals);
MavenExecutionResult result = maven.execute(request);

// [3]
File pom = new File(workingDir, pom.xml);
DefaultProjectBuilder projectBuilder = new DefaultProjectBuilder();
ProjectBuildingResult project = projectBuilder.build(pom, new
  DefaultProjectBuildingRequest());
  }
}

As result of [1] running as local java program, i got:
[ERROR] Error executing Maven.
[ERROR] Cycle detected in component graph in the system:
[ERROR] Caused by: Cyclic requirement detected
[ERROR] Caused by: Edge between
'Vertex{label='org.apache.maven.lifecycle.LifecycleExecutor:default'}'
and
'Vertex{label='org.apache.maven.project.MavenProjectBuilder:default'}'
introduces to cycle in the graph
org.apache.maven.project.MavenProjectBuilder:default --
org.apache.maven.project.ProjectBuilder:default --
org.apache.maven.model.building.ModelBuilder:default --
org.apache.maven.model.plugin.LifecycleBindingsInjector:default --
org.apache.maven.lifecycle.LifecycleExecutor:default --
org.apache.maven.project.MavenProjectBuilder:default

As result of [2] I got a NullPointerException, because of the annotated
components were not injected. How can I start the PlexusContainer correctly?

The result of [3] is RepositorySystem is missing which is nearly the
same problem as in [2].

What I need is to start a maven plugin, which is deployed in my local
repo and is based on maven3.

Could anybody help my please? Are there any samples or code snippets,
which I could use?

Currently I'm working on a hudson build trigger for maven3 based free
style projects. The trigger checks updates on the maven dependencies and
the schedules a rebuild.

Regards
   Steffen...


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



maven eclipse plugin problem with ejb projects

2009-04-23 Thread Steffen Grunwald
Hello,

I'm facing an issue mentioned in bug [1] and [2] that causes a wrong
extension in the eclipse .settings files. This problem still exists in
the 2.6 release.
I submitted a patch quite a while ago and would like to know, if there
are some plans to commit the patch or fix the problem in another way
for a next release.

Thanks, Steffen

[1] http://jira.codehaus.org/browse/MECLIPSE-451
[2] http://jira.codehaus.org/browse/MECLIPSE-455

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven eclipse plugin problem with ejb projects

2009-04-23 Thread Steffen Grunwald
Hello Arnaud,

 Can you also provide an integration test to validate the issue ?
 If you give me ne, I'll apply them on 2.7

Great. There you go. I attached the testcase to [1].

Thanks, Steffen

[1] http://jira.codehaus.org/browse/MECLIPSE-455

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Conditional code generation

2007-04-03 Thread Steffen Mazanek

Franz, this rocks. Thanks a lot!

Best regards,
Steffen

franz see schrieb:

Good day to you, Steffan,

Yes, that would do just fine. You can have something like

...
profile
  idadd-examples-that-compile-only-if-eclipse-is-installed/id
  activation
property
  nameeclipse.dir/name
/property
  /activation
  modules
moduleexample-that-compiles-if-eclipse-is-installed/module
  /modules
/profile
...

This profile will add the module
example-that-compiles-if-eclipse-is-installed if eclipse.dir is set.

Or if you know exactly where your eclipse executable should be placed, you
can do 


...
profile
  idadd-examples-that-compile-only-if-eclipse-is-installed/id
  activation
file
  existsC:\Location\Of\Eclipse\Executable\eclipse.exe/exists
/file
  /activation
  modules
moduleexample-that-compiles-if-eclipse-is-installed/module
  /modules
/profile
...

Note: properties can not be used in file activation ( if you wish properties
to be used, kindly file a jira issue ). See [1] for more details.

Cheers,
Franz

[1] http://docs.codehaus.org/display/MAVENUSER/Profiles


Steffen Mazanek-4 wrote:
  
I have defined a property eclipse.dir in my settings.xml. Is it possible 
to skip a submodule
completely whenever eclipse.dir is not set? Or to check whether 
eclipse.dir is a valid path?

What is best practice?

Eric: I am pretty new to maven so I would be very happy if you could 
work out the

details of your approach a bit more.

Best regards,

Steffen

Eric Redmond schrieb:

Check out build profiles. You can check for the existance of some 
tell-tale

eclipse installation, such as the eclipse executable file.

http://maven.apache.org/pom.html

Eric

On 4/2/07, Steffen Mazanek [EMAIL PROTECTED] wrote:
  

Hello,

I have something like the following project layout:

-project
-- library
-- program
-- examples
 -- examples-that-compile-only-if-eclipse-is-installed
 -- examples-that-do-not-need-eclipse

Concretely I use eclipse in headless mode to generate
some sources via maven-emfgen-plugin.

How can I tell maven to skip the examples depending on eclipse
if eclipse is not installed. Can I do this via profiles?

Any help is greatly appreciated!


Best regards,

Steffen Mazanek


-
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]



Conditional code generation

2007-04-02 Thread Steffen Mazanek

Hello,

I have something like the following project layout:

-project
-- library
-- program
-- examples
-- examples-that-compile-only-if-eclipse-is-installed
-- examples-that-do-not-need-eclipse

Concretely I use eclipse in headless mode to generate
some sources via maven-emfgen-plugin.

How can I tell maven to skip the examples depending on eclipse
if eclipse is not installed. Can I do this via profiles?

Any help is greatly appreciated!


Best regards,

Steffen Mazanek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conditional code generation

2007-04-02 Thread Steffen Mazanek
I have defined a property eclipse.dir in my settings.xml. Is it possible 
to skip a submodule
completely whenever eclipse.dir is not set? Or to check whether 
eclipse.dir is a valid path?

What is best practice?

Eric: I am pretty new to maven so I would be very happy if you could 
work out the

details of your approach a bit more.

Best regards,

Steffen

Eric Redmond schrieb:
Check out build profiles. You can check for the existance of some 
tell-tale

eclipse installation, such as the eclipse executable file.

http://maven.apache.org/pom.html

Eric

On 4/2/07, Steffen Mazanek [EMAIL PROTECTED] wrote:


Hello,

I have something like the following project layout:

-project
-- library
-- program
-- examples
 -- examples-that-compile-only-if-eclipse-is-installed
 -- examples-that-do-not-need-eclipse

Concretely I use eclipse in headless mode to generate
some sources via maven-emfgen-plugin.

How can I tell maven to skip the examples depending on eclipse
if eclipse is not installed. Can I do this via profiles?

Any help is greatly appreciated!


Best regards,

Steffen Mazanek


-
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: Maven2 plugin for eclipse

2007-03-12 Thread Steffen Mazanek

mvn eclipse:eclipse?
http://maven.apache.org/guides/mini/guide-ide-eclipse.html

Hope this helps.

Steffen

Marouane Amraoui schrieb:
I m using Maven2 plugin for eclipse . 


Version plugin is : 0.0.10.

 


I created a maven project . I added dependency using the plugin.

 

when I add the dependency it only added in pom file and note in eclipse file .classpath   this obligate me to do 


A double  work 

 


There is a solution for that ???

 


---

Merouane AMRAOUI
Consultant Expert
Division Développement
Email.: [EMAIL PROTECTED]

Gsm  .: 065 19 60 99   
Tél. | Tel.: 022 98 70 70Téléc | Fax: 022 98 70 70

OMNIDATA , 74 Bv AbdelMoumen

 



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Generate sources using program in same project

2007-03-12 Thread Steffen Mazanek

Hello,

our project consists of multiple subprojects. One subproject
implements a code generator, that takes an xml and generates
java.
Another subproject is called examples and consists of several
subprojects (basically just the xml-files for the generator).
How should I invoke the generator? How should the example
poms look like? In which subdirectories should they sit?
The code has to be generated and compiled.

I tried the maven exec plugin but I failed.

   plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
configuration
 mainClass
  foo.Generator
 /mainClass
 keepAlivetrue/keepAlive
 arguments
  argument-c/argument
  argumentpathto\spec.xml/argument
 /arguments
/configuration
   /plugin

I guess it failed because of a classpath problem. How can I track this?


Best regards,

Steffen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jjtree-javacc

2007-02-28 Thread Steffen Mazanek

Thank you, Eric and Wayne,

it does work now. However, I guess this is a more general problem.
How would you explain, that generated sources go to the src-directory
again? Isn't this a bit unattractive? Everybody would look into
target/generated-sources first.

Again, thank you for your help.

Steffen

Eric Redmond schrieb:

http://mojo.codehaus.org/javacc-maven-plugin/jjtree-mojo.html
http://mojo.codehaus.org/javacc-maven-plugin/javacc-mojo.html

Configure the javacc sourceDirectory to jjtree's outputDirectory. I 
suggest

using a common property (like ${jjtree.output} or something).

Eric

On 2/28/07, Steffen Mazanek [EMAIL PROTECTED] wrote:


Hello,

I am pretty new to maven. Currently I try to run jjtree on a file and
pass the result to javacc. Is there a standard way to do this
with the javacc-maven-plugin? The default outputDirectory of
the jjtree goal is target/generated-sources/jjtree, but javacc is 
looking

for files in src/main/javacc.
What is the maven convention in such cases? Should generated files go
to target (- plugins may point to target for input?!) or source in
general?

My experiences with Maven are very good up to now. Migrating
an old project is a lot simpler than I originally expected.

Best regards,

Steffen

-
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]



jjtree-javacc

2007-02-27 Thread Steffen Mazanek

Hello,

I am pretty new to maven. Currently I try to run jjtree on a file and
pass the result to javacc. Is there a standard way to do this
with the javacc-maven-plugin? The default outputDirectory of
the jjtree goal is target/generated-sources/jjtree, but javacc is looking
for files in src/main/javacc.
What is the maven convention in such cases? Should generated files go
to target (- plugins may point to target for input?!) or source in general?

My experiences with Maven are very good up to now. Migrating
an old project is a lot simpler than I originally expected.

Best regards,

Steffen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Maven Gettext Plugin 1.1 released

2006-01-08 Thread Steffen Pingel
Hi,

the XNap Commons team has recently released the initial version of the Maven 
Gettext Plugin. The plugin integrates the GNU gettext [1] 
internationalization (i18n) tools into Maven builds. Plugin documentation is 
available at 
http://xnap-commons.sourceforge.net/m1/maven-gettext-plugin/index.html .

The Gettext tools are widely used for i18n (in the Java-less world) and have 
powerful features:
 * easy extraction of user visible strings
 * marking of changed strings to enable translators to check if the
   translation still matches
 * advanced plural handling. 
 * support for many source code languages (C, Python, Lisp...) including Java.

The plugin was developed for the Gettext Commons [2] library. The lightweight 
library combines the power of the unix-style gettext tools with the widely 
used Java ResourceBundles. This makes it possible to use the original text 
instead of arbitrary property keys, which is less cumbersome and makes 
programs easier to read.

This tutorial [3] gives an overview of the Gettext Commons and describes how 
to integrate the library into existing Java applications.

A plugin for Maven 2 is being developed here: 
http://xnap-commons.sourceforge.net/m2/maven-gettext-plugin/index.html .

Steffen


[1] http://www.gnu.org/software/gettext/
[2] http://xnap-commons.sourceforge.net/gettext-commons/index.html
[3] http://xnap-commons.sourceforge.net/gettext-commons/tutorial.html

-- 
Steffen Pingel - [EMAIL PROTECTED] - http://steffenpingel.de

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[m2] proxy settings are ignored?!

2005-10-26 Thread Krause, Steffen
Hi all,
 
For some reason I have trouble setting up the proxy in the settings.xml. This 
is the block I entered into the settings.xml but Maven2 will still not go 
through the proxy. 
 
proxies
  proxy
activetrue/active
protocolhttp/protocol
username/
password/
hostproxy.ka1.dsh.de/host
port80/port
nonProxyHosts/
  /proxy
/proxies
 
It always brings following error message:
 
The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or 
no valid version could be found
 
 
At home where I access the internet without a proxy it works fine but here at 
work I just can't get the proxy to work. 
Anybody has an idea??
 
Thanks,
 
Steffen.


[ANN] StatCvs plugin 2.4 released

2004-04-20 Thread Steffen Pingel
The StatCvs-XML team is pleased to announce the StatCvs plugin 2.4 release!

 http://statcvs-xml.berlios.de/maven-plugin/

The StatCvs plugin generates statistics about CVS usage using StatCvs-XML. See 
here for sample output:

 http://statcvs-xml.berlios.de/statcvs/index.html

Features in this version includes:

 - Colorful 3D charts
 - Customizable reports through parameterization and scriptability
 - Accurate analysis through history feature
 - Recent activity chart
 - Software evolution matrix
 
The plugin has been tested with Maven 1.0-rc2. It can be installed through 
Maven:

 maven plugin:download -DartifactId=maven-statcvs-plugin -DgroupId=statcvs 
-Dversion=2.4

Happy statisistics browsing.

Steffen

-- 
Steffen Pingel - [EMAIL PROTECTED] - http://steffenpingel.de

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]