Re: Maven users in the industry

2007-04-11 Thread Niels Gylling

Or you could quote my customer:

A Danish banking IT services central with 160+ smaller banks within the 
Nordic region.


They have been using Maven 1 for several years and recently switched to 
Maven 2.


The applications cover Internet and intranet applications with well over 
 600 artifacts and 28 custom plugins.


The main reasons behind using m1 in the first place was uniform 
projects, central repository and dependency management.


Switching to m2 was done to use a 'supported' tool (that is, stuff 
happening here), faster build cycle (no scripts!) even more simple 
dependency management and better reporting facilities.


Debugging our custom plugins proved invaluable, and saved quite a lot of 
time compared to the old jelly scripts of the m1 days.


/Niels


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



Deploy exported-pom.xml with deploy plugin

2007-03-02 Thread Niels Gylling
I would like to release my pom info with resolved version info etc to 
our shared repository.



When I install an artifact, the exported-pom.xml file is generated - 
possibly if updateReleaseInfo is set to true.


Now if I perform a deploy also with the same parameter set, the pom 
deployed to the shared repository is not released, ie. contains varibles 
and reference to parent pom etc.


I would like this to happen as we have several parallel versions of the 
same artifact, and version number of dependencies are fetched from a 
parent pom - and I would hate to change the parent pom between the 
parallel versions.



Now I could override the deploy plugin to suit me, but still..

Lookin at deploy-plugin source, it looks like an issue with the deploy 
component.


(Still running maven 2.0.4)

/Niels

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



Re: Using alternative JDK

2007-02-27 Thread Niels Gylling

Or, if you for some obscure reason need jdk 1.3:


  org.apache.maven.plugins
  maven-compiler-plugin
  
true

1.3
  



AND if for some other obscure reason use w2k OR have very many source 
files, the forked compiler command line will blow up and fail.


There you will need a compiler component that will provide the source 
file names as a @ argument to javac.


Who said m2 was easy?

/Niels

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



How to generate a report

2007-02-27 Thread Niels Gylling
Can anyone provide a working example of a hello-world report that uses a 
 Sink to generate a simple html report?


I have seen various examples of current reports that generate the report 
 differently. It seems that eg. the SiteRenderer has changed location 
recently, and my report is not generated at all even if a link to is has 
been produced..


I tried to create a mojo that implements MavenReport or a plugin class 
that extend AbstractMavenReport with no luck.




/Niels

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



memory leak in m2 compile?

2007-02-01 Thread Niels Gylling

Our project set is very large, about 275 poms, and 5500 over java files.
When I do a full install of all these artifacts I see OutOfMemoryError 
after 30 mins of work.


Are there known memory leaks in any main maven2 component, or is this 
what to expect?


We use WinXP, jdk 142_10 and maven_opts=-Xmx500m

I will try to increase memory to an optimal setting.

For a reduced set with 150 poms and 2400 java files, the default jdk 
memory setting worked fine.


/Niels

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



Re: Dynamic dependencies

2007-01-31 Thread Niels Gylling
If the plugin dependency changes frequently, you might consider naming 
the version xx-SNAPSHOT and have a suitable snapshot update policy in 
your settings.xml


/Niels

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



Maven2 compile in windows 2000

2007-01-29 Thread Niels Gylling
Some of our users still run Windows 2000 and now they get an error 
during compile of max command length exceeded - propably around 2k chars..


I believe this happens during a forked compile where some artifacts 
required the 1.3 compiler.


Are there any known workarounds in m2?

/Niels

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



Re: How do I use a war as dependency?

2007-01-26 Thread Niels Gylling
Have both the war and the ejb depend on the common code, it will then be 
 bundled in WEB-INF/lib in the war.

Aleo ensure that the ejb has a classpath entry to the commmon code like

  org.apache.maven.plugins
  maven-ejb-plugin
  

  
true
  

  



At some point you will need to deploy the ejb to a container. The j2ee 
way of doing so is an ear file.


/Niels

Maruf Aytekin wrote:
The common code needs to into war file too. How could I do that without 
using two copies of the common code?


Thanks

Maruf



Niels Gylling wrote:
ejbs can only depend on jars, so create a shared module artifact 
containing common code.


/Niels

Maruf Aytekin wrote:

Hi

I have a multi module project as below:

main/pom
-
  |war/ pom
  | ejb/pom

ejb and war project are the subprojects for main. some classes in ejb 
depends on the classes in war project. Since packaging is war for 
this project howshould i define this dependency? Is there a standart 
way to do this?


Many thanks in advance

Maruf





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



Re: How do I use a war as dependency?

2007-01-26 Thread Niels Gylling
ejbs can only depend on jars, so create a shared module artifact 
containing common code.


/Niels

Maruf Aytekin wrote:

Hi

I have a multi module project as below:

main/pom
-
  |war/ pom
  | ejb/pom

ejb and war project are the subprojects for main. some classes in ejb 
depends on the classes in war project. Since packaging is war for this 
project howshould i define this dependency? Is there a standart way to 
do this?


Many thanks in advance

Maruf


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



Inherited plugin configuration

2007-01-22 Thread Niels Gylling
I have a plugin I wish to define at a parent pom so that all child 
projects can share the configuration.


At the parent level it is loaded as

 ..
 sample-plugin
 ..
 
   value
 


so that the child projects can invoke
mvn sample:some-goal

and refer to the parent level config.

This works fine, but if, in a child project, configure an execution
to this plugin as
  ..
  

  some-clean-goal

clean
   

the some-clean-goal gets executed twice when I invoke

mvn clean

Any clues??

/Niels

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



Re: How to make plugin see the full (project & plugin) classpath?

2007-01-17 Thread Niels Gylling

Also make sure you have the following mojo property set
@requiresDependencyResolution compile

That will populate ${plugin.artifacts}

/Niels

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



Re: Eclipse:eclipse and multiple modules

2007-01-15 Thread Niels Gylling

working as designed -
We had the same problem and created our own multi-project eclipse 
generator plugin.


Are there any plans from the maven2 gurus to extend this functionality 
to the 'org.apache.maven.plugins' domain?


/Niels

[EMAIL PROTECTED] wrote:

Weird shit is happening here.

 


We have a multiple modules project, which looks like this:

 


Top project

|- project-tier

|- business tier

|- integration tier

|- presentation-tier

   |- prg 1

   |- prg 2

 


The presentation tier has business tier and integration tier as dependencies.  
They are connected with each other through the pom-file.  (The same goes for 
business and integration).  Each project was generated by Maven.

 


We've created this setup and until now, we haven't had any problems with that.  
But now I ran into something very annoying.  Since this is a multiple module 
project, it's easy to run the mvn-commands from the top-folder.  So if you run 
mvn eclipse:clean or mvn eclipse:eclipse, all the necessary project files are 
created by Maven.  So far, so good.  But now, if I run these commands from the 
top-folder, the jar-files for business and integration aren't added to the 
build path in Eclipse for prg1 and prg2.  This is a problem, because if you run 
them inside Eclipse on Tomcat (they're Struts applications), you get a 404 
because the jar-files for business and integration aren't published.  If I run 
package or install, those dependencies are added to the war-file.

 


When I run the mvn eclipse:clean and mvn eclipse:eclipse commands in the prg1 
or prg2 folder, the jars for business and integration are added to the build 
path and I can publish it without any problem.

 

Can anybody explain to me why this doesn't work from the top-folder?  Working with multiple modules is nice because you can run the commands once for each project underneath it, but with this problem that advantage disappears.  

 


Tia

 


Björn De Bakker

 

 




This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.





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



Re: Obtaining a plugin's dependencies

2007-01-09 Thread Niels Gylling

Thanks Mark, it works.
Now next step is figuring out how I missed it from the documentation...

/Niels

Mark Hobson wrote:

On 08/01/07, Niels Gylling <[EMAIL PROTECTED]> wrote:

That did not work, ${plugin.artifacts} og ${plugin.artifactMap} did
resolved when the plugin was executed - I had to use the 'brute force'
method of resolving the plugin artifact dependencies manually.


Have you got @requiresDependencyResolution on your mojo?  See:
http://maven.apache.org/developers/mojo-api-specification.html

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: Obtaining a plugin's dependencies

2007-01-08 Thread Niels Gylling
That did not work, ${plugin.artifacts} og ${plugin.artifactMap} did 
resolved when the plugin was executed - I had to use the 'brute force' 
method of resolving the plugin artifact dependencies manually.


Tom Huybrechts wrote:

/**
 * @parameter expression="${plugin.artifacts}"
 * @required
 * @readonly
 */
private List pluginArtifacts;


On 1/8/07, Niels Gylling <[EMAIL PROTECTED]> wrote:

Java plugin question:

When writing a Java plugin, how do I obtain the currently executed
plugins's dependency list?

I tried project.getBuild().getPlugins() but the plugin models here seems
to be without dependencies.

Do I have to perform a lookup of the plugin as an artifact and get the
dependencies from there  - or just hard code the additional dependencies
in the plugin?

I need this because my plugin start a new java process with a classpath
that I do now wish to copy to all modules referring to this plugin.

/Niels

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




/Niels

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



Obtaining a plugin's dependencies

2007-01-08 Thread Niels Gylling

Java plugin question:

When writing a Java plugin, how do I obtain the currently executed 
plugins's dependency list?


I tried project.getBuild().getPlugins() but the plugin models here seems 
to be without dependencies.


Do I have to perform a lookup of the plugin as an artifact and get the 
dependencies from there  - or just hard code the additional dependencies 
in the plugin?


I need this because my plugin start a new java process with a classpath 
that I do now wish to copy to all modules referring to this plugin.


/Niels

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



Re: Src directory not in the same pom.xml directory

2007-01-05 Thread Niels Gylling

In you pom:

  anywhere


/Niels

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