Re: maven 2.0.7 reorders dependencies during build causing compilation failures

2008-10-18 Thread Barrie Treloar
On Sat, Oct 18, 2008 at 3:38 PM, Sahoo [EMAIL PROTECTED] wrote:
 I just don't believe what I am seeing. Despite adding a particular
 dependency directly in my pom.xml, maven reorders dependencies and hence we
 get compilation failure. e.g., take a look at the pom.xml available at [1].
 It declares a direct dependency on
dependency
   groupIdorg.glassfish/groupId
   artifactIdjavax.servlet/artifactId
   version${project.version}/version
/dependency

Yes.

Use 2.0.9

Dependencies were just HashMaps previously hence the order is random.
The dependency order is preserved in 2.0.9 but I cant remember what
ordering it used.

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



[ANN] Maven Shade Plugin 1.2 Released

2008-10-18 Thread Jason van Zyl
The Maven team is pleased to announce the release of the Maven Shade  
Plugin, version 1.2


This plugin provides the capability to package the artifact in an uber- 
jar, including its dependencies and to shade - i.e. rename - the  
packages of some of the dependencies.


http://maven.apache.org/plugins/maven-shade-plugin/

You can run mvn -up to get the latest version of the plugin, or  
specify the version in your project's plugin configuration:


plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-shade-plugin/artifactId
   version1.2/version
/plugin

Release Notes - Maven 2.x Shade Plugin - Version 1.2

** Bug
* [MSHADE-37] - Shading fails if output directory does not exist
* [MSHADE-38] - Names of excluded packages are relocated

** Improvement
* [MSHADE-35] - support basic component merging in components  
transformer


** New Feature
* [MSHADE-39] - Allow processing of MANIFEST.MF files
* [MSHADE-41] - Allow processing of META-INF/services entries

Enjoy,

-The Maven team


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



Using ${} notation as a literal

2008-10-18 Thread Okken,Brett

In my pom, I need to pass a configuration value to a plugin which contains 
${...} as part of the string. Is there a way to prevent maven from filtering 
this string? Currently the value passed to the plugin replaces the ${...} wil 
null.

Brett Okken | MMF Archive | Software Architect | 816.201.6112 | www.cerner.com 
| [EMAIL PROTECTED]

--
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.


Re: maven 2.0.7 reorders dependencies during build causing compilation failures

2008-10-18 Thread Sahoo

Barrie Treloar wrote:

On Sat, Oct 18, 2008 at 3:38 PM, Sahoo [EMAIL PROTECTED] wrote:
  

I just don't believe what I am seeing. Despite adding a particular
dependency directly in my pom.xml, maven reorders dependencies and hence we
get compilation failure. e.g., take a look at the pom.xml available at [1].
It declares a direct dependency on
   dependency
  groupIdorg.glassfish/groupId
  artifactIdjavax.servlet/artifactId
  version${project.version}/version
   /dependency



Yes.

Use 2.0.9

Dependencies were just HashMaps previously hence the order is random.
The dependency order is preserved in 2.0.9 but I cant remember what
ordering it used.
  
Sorry to ask again. Was the dependency order random in all versions 
previous to 2.0.9? I was under the impression that such was the case 
only in 2.0.8.


Thanks,
Sahoo

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



Re: maven 2.0.7 reorders dependencies during build causing compilation failures

2008-10-18 Thread Jörg Schaible
Sahoo wrote:

 Barrie Treloar wrote:
 On Sat, Oct 18, 2008 at 3:38 PM, Sahoo [EMAIL PROTECTED] wrote:
   
 I just don't believe what I am seeing. Despite adding a particular
 dependency directly in my pom.xml, maven reorders dependencies and hence
 we get compilation failure. e.g., take a look at the pom.xml available
 at [1]. It declares a direct dependency on
dependency
   groupIdorg.glassfish/groupId
   artifactIdjavax.servlet/artifactId
   version${project.version}/version
/dependency
 

 Yes.

 Use 2.0.9

 Dependencies were just HashMaps previously hence the order is random.
 The dependency order is preserved in 2.0.9 but I cant remember what
 ordering it used.
   
 Sorry to ask again. Was the dependency order random in all versions
 previous to 2.0.9? I was under the impression that such was the case
 only in 2.0.8.

No, it has always been so before :-/

- Jörg


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



Re: Multiple executions of goals under generate-sources: How to avoid?

2008-10-18 Thread stug23

As a clarification, the execution that I am trying to avoid is the second
execution of a code generator mojo that is bound to generate-sources phase.

The second execution results from uses the maven-sources-plugin which
states:

Invokes the execution of the lifecycle phase generate-sources prior to
executing itself.

The information above is from the following reference:

http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html

So my question is: Is there a way to still produce a sources jar using the
maven-source-plugin without invoking execution of the generate-sources
phase?

It doesn't make sense to me that this invocation cannot be switched off
since the code generation has already taken place and  it's not very
efficient to perform code generation all over again in a subsequent
lifecycle phase. Perhaps there are cases where this is needed, but mine is
not one of them, so I am hoping that someone can help me to disable this
feature of the maven-source-plugin.

TIA




stug23 wrote:
 
 I am working on a code generator plugin that ends up being executed
 multiple times when in fact I only want it to execute once in the
 generate-sources phase.
 
 According to this posting
 http://www.mail-archive.com/users@maven.apache.org/msg78484.html this is
 an expected behavior.
 
 How do I avoid multiple executions of my code generator which needs to run
 in the generate-sources phase?
 
 TIA
 
 

-- 
View this message in context: 
http://www.nabble.com/Multiple-executions-of-goals-under-generate-sources%3A-How-to-avoid--tp20038097p20047618.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: Multiple executions of goals under generate-sources: How to avoid?

2008-10-18 Thread jieryn
On Sat, Oct 18, 2008 at 11:00 AM, stug23 [EMAIL PROTECTED] wrote:

 So my question is: Is there a way to still produce a sources jar using the
 maven-source-plugin without invoking execution of the generate-sources
 phase?


I am extremely interested in the answer to this question as well.
Please Maven experts, help! :-)

-jieryn

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



Getting javadoc plugin to run

2008-10-18 Thread Chris
Newbie here -- sorry -- having some basic conceptual difficulties with 
the javadoc plugin.


How do I get the javadoc plugin to run when I execute mvn install? It 
runs ok when I do mvn javadoc:javadoc, but I want to regenerate 
everything when I do an install.


Also -- how do I include/exclude individual classes from Javadoc? The 
excludePackageNames works ok, but it's not specific enough.


One more -- how do I get it to delete previous Javadocs from the output 
directory first? If I delete a class, the old file is still left there.


I can do all this stuff in Ant just fine. There's got to be the 
equivalent in Maven.


Here's my current code:

reporting
  outputDirectorytarget/site/outputDirectory
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-javadoc-plugin/artifactId
  configuration
excludePackageNames*mypackage*/excludePackageNames
  /configuration
/plugin
  /plugins
/reporting


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



RE: Getting javadoc plugin to run

2008-10-18 Thread Martin Gainty

i thought you incorporated the link you want in the links group element as seen 
here
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-javadoc-plugin/artifactId
configuration
links
linkhttp://java.sun.com/j2ee/1.4/docs/api/link
/links
/configuration
/plugin

If you want to use offline mode try specifying offlineLinks as in this example
maven.javadoc.offlineLinks= \
  
http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/docs/api/, 
\
  http://maven.apache.org/apidocs/#/cvsroot/maven/target/docs/apidocs/
Anyone?
Martin
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 To: users@maven.apache.org
 From: [EMAIL PROTECTED]
 Subject: Getting javadoc plugin to run
 Date: Sat, 18 Oct 2008 13:08:45 -0500
 
 Newbie here -- sorry -- having some basic conceptual difficulties with 
 the javadoc plugin.
 
 How do I get the javadoc plugin to run when I execute mvn install? It 
 runs ok when I do mvn javadoc:javadoc, but I want to regenerate 
 everything when I do an install.
 
 Also -- how do I include/exclude individual classes from Javadoc? The 
 excludePackageNames works ok, but it's not specific enough.
 
 One more -- how do I get it to delete previous Javadocs from the output 
 directory first? If I delete a class, the old file is still left there.
 
 I can do all this stuff in Ant just fine. There's got to be the 
 equivalent in Maven.
 
 Here's my current code:
 
 reporting
outputDirectorytarget/site/outputDirectory
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-javadoc-plugin/artifactId
configuration
  excludePackageNames*mypackage*/excludePackageNames
/configuration
  /plugin
/plugins
 /reporting
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008

Re: Getting javadoc plugin to run

2008-10-18 Thread Wendy Smoak
On Sat, Oct 18, 2008 at 11:08 AM, Chris [EMAIL PROTECTED] wrote:

 Newbie here -- sorry -- having some basic conceptual difficulties with the
 javadoc plugin.

What do you want to do with it?  Generate Javadoc to view? To use in an IDE?

 How do I get the javadoc plugin to run when I execute mvn install? It runs
 ok when I do mvn javadoc:javadoc, but I want to regenerate everything when I
 do an install.

You could bind an execution of the javadoc plugin to the install
phase... but most people don't.  It depends on what you want them for.
 Usually Javadocs get published with the project website, and then
packaged into a jar and deployed to the repository along with a
release.

You can try this configuration to add the javadocs jar to your
build... it has a side effect of generating them in target/apidocs
which I assume is where you're looking at them now.

build
  plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-javadoc-plugin/artifactId
executions
  execution
idattach-javadocs/id
goals
  goaljar/goal
/goals
  /execution
/executions
  /plugin
...

 One more -- how do I get it to delete previous Javadocs from the output
 directory first? If I delete a class, the old file is still left there.

'mvn clean' will delete the target directory.  If you have deleted
things, try 'mvn clean install'.

-- 
Wendy

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



Jar problem

2008-10-18 Thread fx5900

Hi,

 I have an empty application, a main class with no code, and i want to
use the gt2-render jar file for my application. Now when i place the file
dependecy code in my pom file and build the application  i get the following
messages

Scanning for projects...
project-execute
[#process-resources]
[resources:resources]
Using default encoding to copy filtered resources.
[#compile]
Downloading:
http://lists.refractions.net/m2/xml-apis/xml-apis-xerces/2.7.1/xml-apis-xerces-2.7.1.jar
[ERROR]Runtime Exception thrown during execution
[ERROR]null
. 
My pom file is as follows:

?xml version=1.0 encoding=UTF-8?
!-- ===
User Prototype Configuration File   
 
 ===
--project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0   
 
http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdorg.luong/groupId
artifactIddisplaydemo/artifactId
packagingjar/packaging
version1.0-SNAPSHOT/version
namedisplaydemo/name
urlhttp://www.example.org/url

!-- TODO: Change the library number dependency to be a soft link rather 
 than a hard link to 2.6-SNAPSHOT as it is here.
--
dependencies
dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version3.8.1/version
scopetest/scope
/dependency
dependency
groupIdorg.geotools/groupId
artifactIdgt2-main/artifactId
version2.4.5/version
/dependency
dependency
groupIdorg.geotools/groupId
artifactIdgt2-render/artifactId
version2.4.5/version
/dependency
/dependencies
build
  !--finalNamegt-foo-1.0-SNAPSHOT/finalName--
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
archive
manifest
   
mainClassorg.example.geotools.base.DemoBase/mainClass
addClasspathtrue/addClasspath
/manifest
/archive
/configuration
/plugin
plugin
artifactIdmaven-compiler-plugin/artifactId
version2.0.2/version
configuration
source1.5/source
target1.5/target
/configuration
/plugin
/plugins
resources
resource
directory./directory
includes
includeLICENSE*/include
include*README*/include
/includes
/resource
resource
  !-- targetPathdata/targetPath --
directorysrc/main/resources/directory
includes
include**/include
/includes
/resource
/resources
/build
!-- === --
 !-- Repositories (ibiblio, refractions...). --
 !-- This is where Maven looks for dependencies. --
 !-- === --
repositories
repository
snapshots
enabledfalse/enabled
/snapshots
idibiblio/id
nameIbiblio - the public's library and digital archive/name
urlhttp://www.ibiblio.org/maven2/url
/repository
repository
idrefractions/id
nameRefractions Research Maven 2 Repository/name
urlhttp://lists.refractions.net/m2/url
/repository
repository
snapshots
enabledfalse/enabled
/snapshots
idgeotools/id
nameGeotools repository/name
urlhttp://maven.geotools.fr/repository/url
/repository
repository
snapshots
enabledfalse/enabled
/snapshots
idcentral/id
nameMaven Repository Switchboard/name
urlhttp://repo1.maven.org/maven2/url
/repository
/repositories
/project

Now when i take the gt2-render code out of my POM file and then build it, it
build fine. Can somebody tell me what is going on here please???

Thanks

-- 
View this message in context: 
http://www.nabble.com/Jar-problem-tp20051143p20051143.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]

Is it possible to use maven to remote deploy a war file?

2008-10-18 Thread BarryDev

Hello everyone,

Just wondering if there's a plugin to allow maven to deploy a war file to a
remote location using ftp?  I can probably write an ant script to do this
and add that to the build but just wondering if maven has anything built in. 
Have searched around and while finding some interesting reading with the
cargo plugin and maven deploy, they generally seem to be aimed to deploying
a maven artifact to a remote repo.

Barry
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-use-maven-to-remote-deploy-a-war-file--tp20051333p20051333.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]



Is it possible to use maven to remote deploy a war file?

2008-10-18 Thread BarryDev

Hello everyone,

Just wondering if there's a plugin to allow maven to deploy a war file to a
remote location using ftp?  I can probably write an ant script to do this
and add that to the build but just wondering if maven has anything built in. 
Have searched around and while finding some interesting reading with the
cargo plugin and maven deploy, they generally seem to be aimed to deploying
a maven artifact to a remote repo.

Barry
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-use-maven-to-remote-deploy-a-war-file--tp20051334p20051334.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]



when/does maven update its plugins?

2008-10-18 Thread Rusty Wright
After seeing the announcement of the new version of the Maven Resources 
Plugin I naively thought I could simply do mvn --update-plugins, but 
that didn't do anything, other than give me an error from not having a 
pom.xml in the directory I was in (and then it simply rebuilt my project 
when I chdir'd to to a directory with one).


So next I removed the Resources Plugin directory in my ~/.m2 local 
repository and ran mvn package and that downloaded the plugin, but 
version 2.2.


Is it documented somewhere if or when maven updates its plugins?


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



Re: Is it possible to use maven to remote deploy a war file?

2008-10-18 Thread Wendy Smoak
On Sat, Oct 18, 2008 at 3:18 PM, BarryDev [EMAIL PROTECTED] wrote:

 Just wondering if there's a plugin to allow maven to deploy a war file to a
 remote location using ftp?  I can probably write an ant script to do this
 and add that to the build but just wondering if maven has anything built in.
 Have searched around and while finding some interesting reading with the
 cargo plugin and maven deploy, they generally seem to be aimed to deploying
 a maven artifact to a remote repo.

The deploy plugin deploys to a remote repo, and the Cargo plugin helps
with deploying to an appserver like Tomcat.

To move an arbitrary file from one place to another, check the list
archives for mention of a 'wagon' plugin, and also look for an
'upload' plugin-- I believe the latter is from Atlassian.

-- 
Wendy

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



Re: when/does maven update its plugins?

2008-10-18 Thread Wendy Smoak
On Sat, Oct 18, 2008 at 3:35 PM, Rusty Wright [EMAIL PROTECTED] wrote:
 After seeing the announcement of the new version of the Maven Resources
 Plugin I naively thought I could simply do mvn --update-plugins, but that
 didn't do anything, other than give me an error from not having a pom.xml in
 the directory I was in (and then it simply rebuilt my project when I chdir'd
 to to a directory with one).

 So next I removed the Resources Plugin directory in my ~/.m2 local
 repository and ran mvn package and that downloaded the plugin, but version
 2.2.

It depends on what version of Maven you're using.  As of 2.0.9, many
of the plugins are locked down in the super pom inside Maven.  To get
a newer version, you'll need to declare it and specify the version you
want.  An organization- or project-level parent pom is a good place to
do this, and will keep a later upgrade of Maven client from changing
your builds.

-- 
Wendy

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



Re: when/does maven update its plugins?

2008-10-18 Thread Rusty Wright

Ok, thanks.


Wendy Smoak wrote:

On Sat, Oct 18, 2008 at 3:35 PM, Rusty Wright [EMAIL PROTECTED] wrote:
  

After seeing the announcement of the new version of the Maven Resources
Plugin I naively thought I could simply do mvn --update-plugins, but that
didn't do anything, other than give me an error from not having a pom.xml in
the directory I was in (and then it simply rebuilt my project when I chdir'd
to to a directory with one).

So next I removed the Resources Plugin directory in my ~/.m2 local
repository and ran mvn package and that downloaded the plugin, but version
2.2.



It depends on what version of Maven you're using.  As of 2.0.9, many
of the plugins are locked down in the super pom inside Maven.  To get
a newer version, you'll need to declare it and specify the version you
want.  An organization- or project-level parent pom is a good place to
do this, and will keep a later upgrade of Maven client from changing
your builds.

  


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



Re: Is it possible to use maven to remote deploy a war file?

2008-10-18 Thread Rusty Wright
Does anyone know if Cargo works with Tomcat 6?  I can't find any mention 
of it on the Cargo web site.



Wendy Smoak wrote:

On Sat, Oct 18, 2008 at 3:18 PM, BarryDev [EMAIL PROTECTED] wrote:

  

Just wondering if there's a plugin to allow maven to deploy a war file to a
remote location using ftp?  I can probably write an ant script to do this
and add that to the build but just wondering if maven has anything built in.
Have searched around and while finding some interesting reading with the
cargo plugin and maven deploy, they generally seem to be aimed to deploying
a maven artifact to a remote repo.



The deploy plugin deploys to a remote repo, and the Cargo plugin helps
with deploying to an appserver like Tomcat.

To move an arbitrary file from one place to another, check the list
archives for mention of a 'wagon' plugin, and also look for an
'upload' plugin-- I believe the latter is from Atlassian.

  


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



Re: Is it possible to use maven to remote deploy a war file?

2008-10-18 Thread Wendy Smoak
On Sat, Oct 18, 2008 at 9:30 PM, Rusty Wright [EMAIL PROTECTED] wrote:
 Does anyone know if Cargo works with Tomcat 6?  I can't find any mention of
 it on the Cargo web site.

I believe so... according to JIRA support was added in February, and
there have been some 1.0 alpha releases since then.
http://jira.codehaus.org/browse/CARGO-563  (And rumor has it, before
that it worked fine if you just used the tomcat5 instructions and
pointed it at tomcat6.)

Please ask on the Cargo user list if you're having trouble, you can
find subscription info here:  http://cargo.codehaus.org/Mailing+Lists

-- 
Wendy

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