Re: Any chance for maven and IDE (eclipse)?

2008-07-26 Thread Kalle Korhonen
On Fri, Jul 25, 2008 at 2:22 PM, Joerg Hohwiller <[EMAIL PROTECTED]>wrote:

> 3. Q4E / IAM
> Does NOT know about filtering. Does NOT understand scopes properly.
> Overall same problems with performance and blocking eclipse.
> In the end also useless for productive development in complex projects.
>

Q4E has had support for filtering since 0.6.0. Don't know about you, but
I've been using Q4E now exclusively for over two months and it's been
working flawlessly. Granted, it's a bit slow, but I'll take it any day over
repetitive runs of mvn eclipse:eclipse & refresh. It also understands nested
target directories which was an issue for me when using plain Eclipse and
mvn eclipse. I got over 40 m2 projects open all in the same Eclipse
workspace and I haven't had any issues.

Kalle


Creating plugins that execute plugins - mojo-executor

2008-07-26 Thread Don Brown
If you find yourself like me, wondering how to get rid of all this
identical Maven plugin XML in multiple modules, where inheritence is
not an option, you may be wanting to create a plugin that executes the
goals of other plugins, a plugin macro, if you will.  Well, since I
could find no easy way to execute other plugins within a plugin, I
created the Mojo Executor library, which allows you to execute goals
on other plugins programmatically.

For example, say you wanted to execute the copy-dependencies goal on
the dependency plugin, you'd write this:

executeMojo(
 plugin(
 groupId("org.apache.maven.plugins"),
 artifactId("maven-dependency-plugin"),
 version("2.0")
 ),
 goal("copy-dependencies"),
 configuration(
 element(name("outputDirectory"),
"${project.build.directory}/foo")
 ),
 executionEnvironment(
 project,
 session,
 pluginManager
 )
  );

Since this is just Java code, you can execute goals as many times as
you'd like with whatever configuration you need. The fluent interface
helps keep things readable, and the library leverages most of the
existing Maven behavior, including configuration merging, so it is
just like you defined an execution in your POM.  I'm currently using
this plugin for an integration test plugin that will run your
integration tests against any number of containers in one execution
with minimal XML (using repeated executions of surefire and cargo), so
you can do something like this:

mvn integration-test -Dcontainers=tomcat5x,jetty6x,jboss42x,resin3x

The mojo-executor project is here:

http://mojo-executor.googlecode.com

And the integration test plugin will be forthcoming...

Don

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



How can I know where part of my project has error?

2008-07-26 Thread youhaodeyi

In my maven project, the icon of the project begin with a red fork which
means this project has an error. But unfold this project, there is no error
in any source code and configuration file. In addition, this project doesn't
have any sub-module. So how can I get the error detail information?
-- 
View this message in context: 
http://www.nabble.com/How-can-I-know-where-part-of-my-project-has-error--tp18672546p18672546.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: packaging wars

2008-07-26 Thread Jean-Paul Vallée
Ok, so I reply to myself...
My needs were not to duplicate code (JSR168) between a generic version of my
portlets and the specific portlet (needed by one particular portal
solution).
My first idea was this one because of the intrusive needs due to the portal
solution (liferay, pluto...). These portals needed specific files inside.
But i did not want to depend on a specific portal solution. (that's why i
tried to make these hugly separation of the generic part and the specific
part)
(I wonder such intrusive things can happen!?)
Anyway, i missed something: the JSR286 (portlet V2) that should get me rid
of this.
Portlets V2 may be portable from one portal to another
I am currently reading it. So let' see...
If I misunderstood something, let me know :-)
Thanks.


2008/7/25 Stefan Seidel <[EMAIL PROTECTED]>

> Hi,
>
> I think we have two cases that are similar: Firstly, EJBs where only
> deployment descriptors are different. For this we use
> + parent
> +- generic
> +- specific1
> +- specific2
> All the sources are in generic/src/main/java.
> parent has pom and
> ../generic/src/main/java
> specific1 and 2 have src/main/resources and different artifactIds.
>
> The other one is about sharing JSP fragments between WARs, and we use the
> dependency plugin for that:
> + common
> + war-parent
> +- war1
> +- war2
> +- war3
> In war-parent we have:
>
>  common
>  provided
>
> and
>  
>
>  
>maven-dependency-plugin
>2.1-SNAPSHOT
>
>  
>expand common JSP fragments
>
>  unpack-dependencies
>
>generate-test-resources
>
>  group.id
>  common
>  true
>  **/*.jsp*
>
> ${project.build.directory}/webapp
>
>  
>
>  
> Likewise, you could unpack your resources to
> ${project.build.directory}/generates-resources and
> ${project.build.directory}/generated-sources.
>
> HTH,
>
> Stefan
>
>
>
>
> Jean-Paul Vallée wrote:
>
>> Thanks, Jeff and manuel
>> I think i will have a look at overlays, your explainations seem to be what
>> i
>> want to do.
>> But, is there a smarter way to do what i want, ie merge generic and
>> specific
>> artifact when building the specific artifact.
>>
>>
>
> --
> best regards,
>
> Stefan Seidel
> software developer
> 
> VUB Printmedia GmbH
> Chopinstraße 4
> D-04103 Leipzig
> Germany
> tel.+49 (341) 9 60 50 07
> fax.+49 (341) 9 60 50 92
> mail.   [EMAIL PROTECTED]
> web.www.vub.de
>
> HRB Köln 24015
> UStID DE 122 649 251
> GF Dr. Achim Preuss Neudorf,
> Dr. Christian Preuss Neudorf
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Any chance for maven and IDE (eclipse)?

2008-07-26 Thread Joerg Hohwiller

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Brian,
| [cut.]
|
| This is because M2e (and q4e) use the 2.1 embedder. If you grab a 2.1
| command line, you will see the same output. Additionally, the
| enforce-once goal is deprecated in the next release of enforcer as it
| causes Maven to do weird things (which is why in 2.1 binding an
| aggregator to a lifecycle is also deprecated).
|
| You can read more about this and all the related issues here:
| http://jira.codehaus.org/browse/MENFORCER-11
| The short thing is you should immediately change to use the "enforce"
| goal instead of "enforce-once"...this may actually be the root of many
| of your issues.
Thanks that helped for some problems. Still my major problems remain.
I will file some jira issues soon.
|
| --Brian
Thanks
~  Jörg
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIi5Y6mPuec2Dcv/8RAvNEAJ4znvuaONLETrNAGdstvEKL0I7KkQCfbzvF
9WaoWNaPdlAP5UMjyJ1POqI=
=fb3F
-END PGP SIGNATURE-

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



RE: Any chance for maven and IDE (eclipse)?

2008-07-26 Thread Brian E. Fox
>Besides when I have a look into the log of m2eclipse I get errors
>like:

>DEPRECATED: Binding aggregator mojos to lifecycle phases in the
>POM is considered dangerous. This feature has been deprecated.
>Please adjust your POM files accordingly.
>Offending mojo:
>org.apache.maven.plugins:maven-enforcer-plugin:1.0-alpha-3:enforce-once

>This does NOT show up, when I run maven on the commandline.
>What the hack is going on there.

This is because M2e (and q4e) use the 2.1 embedder. If you grab a 2.1
command line, you will see the same output. Additionally, the
enforce-once goal is deprecated in the next release of enforcer as it
causes Maven to do weird things (which is why in 2.1 binding an
aggregator to a lifecycle is also deprecated).

You can read more about this and all the related issues here:
http://jira.codehaus.org/browse/MENFORCER-11
The short thing is you should immediately change to use the "enforce"
goal instead of "enforce-once"...this may actually be the root of many
of your issues.

--Brian

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



Re: Any chance for maven and IDE (eclipse)?

2008-07-26 Thread Peter Karich

Hi Jörg!


Using Netbeans? I never tried this with maven. Any feedback?


First: I am new to maven.
Second: For me maven works good in NetBeans 6.1 even with projects + 
subprojects. It uses the pom directly (simply go to open projects) and 
so it is well integrated.

You can even search in the repositories if NetBeans can't find
a class (via ALT+ENTER) and solve that problem easily.

The only problem is that building the projects takes some more time than 
a 'normal' java project.


And keep in mind that NetBeans has no incremental compiler like eclipse 
(it will come in some of the next releases - I am sure ;-) ).
You will always has to build the (sub) project to run or test it, 
although you will get an red line from the built in compiler...

 and although NetBeans will compile only the changed file ...
BUT I think it is not the same like the incremental compiler, isn't it?

Regards,
Peter.

--
http://www.timefinder.de/ - free your timetabling


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