Re: Sending mail through maven2 using ant.

2008-06-16 Thread Shikha.Somani

I am able to send mails by calling a goal of ant script. The problem arises
when I send attachments in the mail. What can I do to send mails containing
attachments using ant task.


Wayne Fay wrote:
> 
> The basic Ant dependency does not include optional features like sending
> email.
> 
> This is discussed (and answer given to solve it) in the following JIRA:
> http://jira.codehaus.org/browse/MANTRUN-53
> 
> Wayne
> 
> On 6/16/08, Shikha.Somani <[EMAIL PROTECTED]> wrote:
>>
>> I need to send mail containing attachments through maven2. There is no
>> plugin
>> available so I made an ant plugin to send mails.
>>
>> The build script could send mails containing attachments but using the
>> same
>> build as plugin in maven could not send attachments. There is certaing
>> exception because of which the attachments could not be send.
>>
>> Exception: [mail] Failed to initialise MIME mail:
>> org.apache.tools.ant.taskdefs.email.MimeMailer
>>
>> Any help will be appreciated
>>
>> Thanks.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Sending-mail-through-maven2-using-ant.-tp17859708p17859708.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]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sending-mail-through-maven2-using-ant.-tp17859708p17878128.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: Question about why/when Maven will automatically exclude transitive dependencies.

2008-06-16 Thread Ryan Moquin
I guess when I think about it, this looks like a stupid question because it
could easily be that I excluded a dependency somewhere which caused the
problem.  I positive that isn't the issue, but let's pretend it could be..
is there any way to get a list of dependencies and what status maven
considers them in?  Such as if they are excluded or included for whichever
reasons?  I'm not sure how to troubleshoot this.. all I know is that it was
working a few days ago and I have no idea why all of a sudden my project
seems to be so problematic.. just hoping someone might have some suggestions
on how to troubleshoot this.

Thanks!
Ryan

On Mon, Jun 16, 2008 at 12:14 PM, Ryan Moquin <[EMAIL PROTECTED]>
wrote:

> I have never really been able to figure this out and it's really driving me
> up the wall at the moment.  Is there a time that Maven2 will automatically
> exclude transitive dependencies?  Here is the scenario:
>
> I have 2 projects, then both include the exact same dependency.  When I
> build the first library, it builds perfectly fine.  When I build the second
> library, it files during the unit tests with NoClassDefFoundErrors.  If I
> look at the dependencies being included, Maven2 isn't including the same
> transitive dependencies from that common dependency between the two
> projects.  Basically I have to include those transitive dependencies
> explicitly, which I don't want to do.  What are the causes where Maven won't
> include compile dependencies that a first level dependency is dependant on?
> It seems very nondeterministic, so I'm guessing there are some nonobvious
> reason behind the scenes for how it calculates this.
>
> Thanks!
> Ryan
>


RE: Apparent Plugin Version Mismatch with maven-deploy-plugin and wagon-ftp

2008-06-16 Thread Brian E. Fox
Those wagons are not compatible with maven 2.0.9 or less.

-Original Message-
From: Chris Lieb [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2008 12:10 PM
To: users@maven.apache.org
Subject: Re: Apparent Plugin Version Mismatch with maven-deploy-plugin
and wagon-ftp

I was accidentally overriding the versions that were set in the master 
POM in the project that I was testing in.  After I fixed that, the 
deploy phase started working again.  Is there a reason why 1.0-beta-3 of

wagon-ftp and wagon-provider-api don't seem to work?

Chris Lieb

Chris Lieb wrote:
> I have a project that deploys using the wagon-ftp plugin.  It has been

> building without issue for months now through CruiseControl.  Over the

> weekend when a build was triggered, it failed when it tried to deploy 
> the project's POM, the first item that is deployed in the build 
> process.  I get the following error message:
>
>
> [INFO] Retrieving previous build number from inhouse_snapshot
> [FATAL ERROR] org.apache.maven.plugin.deploy.DeployMojo#execute() 
> caused a linkage error (java.lang.AbstractMethodError) and may be 
> out-of-date. Check the realms:
> [FATAL ERROR] Plugin realm = 
> app0.child-container[org.apache.maven.plugins:maven-deploy-plugin]
> urls[0] = file:/C:/Documents and 
>
Settings/Administrator/.m2/repository/org/apache/maven/plugins/maven-dep
loy-plugin/2.3/maven-deploy-plugin-2.3.jar 
>
> urls[1] = file:/C:/Documents and 
>
Settings/Administrator/.m2/repository/org/codehaus/plexus/plexus-utils/1
.1/plexus-utils-1.1.jar 
>
> [FATAL ERROR] Container realm = plexus.core
> urls[0] = file:/C:/Program Files/Apache Software 
> Foundation/maven-2.0/bin/../lib/maven-2.0.9-uber.jar
> [INFO] 
>

> [ERROR] FATAL ERROR
> [INFO] 
>

> [INFO] org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection()V
> [INFO] 
>

> [DEBUG] Trace
> java.lang.AbstractMethodError: 
> org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection()V
>at 
> org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143)
>at 
>
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(Defa
ultWagonManager.java:435) 
>
>at 
>
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadat
aFromDeploymentRepository(DefaultWagonManager.java:379) 
>
>at 
>
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataM
anager.getArtifactMetadataFromDeploymentRepository(DefaultRepositoryMeta
dataManager.java:380) 
>
>at 
>
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataM
anager.resolveAlways(DefaultRepositoryMetadataManager.java:348) 
>
>at 
>
org.apache.maven.artifact.transform.SnapshotTransformation.resolveLatest
SnapshotBuildNumber(SnapshotTransformation.java:161) 
>
>at 
>
org.apache.maven.artifact.transform.SnapshotTransformation.transformForD
eployment(SnapshotTransformation.java:100) 
>
>at 
>
org.apache.maven.artifact.transform.DefaultArtifactTransformationManager
.transformForDeployment(DefaultArtifactTransformationManager.java:78) 
>
>at 
>
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Defaul
tArtifactDeployer.java:71) 
>
>at 
> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:152)
>at 
>
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451) 
>
>at 
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558) 
>
>at 
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:499) 
>
>at 
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:478) 
>
>at 
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330) 
>
>at 
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:291) 
>
>at 
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142) 
>
>at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39) 
>
>at 
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25) 
>
>at java.lang.reflect.Method.invoke(Method.java:585)
>at 
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>at org.co

RE: How to copy unpacked nar file contents into target directory?

2008-06-16 Thread Brian E. Fox
>I then added the dependency tags as described in your blog post as
follows:



You need to add the dependency to the maven-dependency-plugin unpack
execution


--Brian

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



pom downloading from codehaus.org

2008-06-16 Thread Marty La Jeunesse

All last week running mvn hightide:run was a breeze.
Every time today though, it can take up to 20 minutes while it plows through
Downloading: 
http://repository.codehaus.org/uk/ltd/getahead/dwr/2.0.3/dwr-2.0.3.pom
Downloading: 
http://snapshots.repository.codehaus.org/uk/ltd/getahead/dwr/2.0.3/dwr-2.0.3.pom
Downloading: 
http://people.apache.org/repo/m2-incubating-repository/uk/ltd/getahead/dwr/2.0.3/dwr-2.0.3.pom
Downloading: 
http://people.apache.org/repo/m2-snapshot-repository/uk/ltd/getahead/dwr/2.0.3/dwr-2.0.3.pom


 about 34 in total, including the unsnipped 

Downloading: 
http://people.apache.org/repo/m2-incubating-repository/com/atomikos/atomikos-util/3.2.3/atomikos-util-3.2.3.pom
Downloading: 
http://people.apache.org/repo/m2-snapshot-repository/com/atomikos/atomikos-util/3.2.3/atomikos-util-3.2.3.pom
Downloading: 
http://repo1.maven.org/maven2/com/atomikos/atomikos-util/3.2.3/atomikos-util-3.2.3.pom
Downloading: 
http://repo1.maven.org/maven2/com/atomikos/atomikos-util/3.2.3/atomikos-util-3.2.3.pom


Last week it flew right through these. I'm not sure why these are so 
slow today.
I'm pretty new to maven. I suspect that there is a way for me to avoid 
these downloads. Is it as simple as putting them in my .m2/repository ?


thanks
Marty

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



RE: How to copy unpacked nar file contents into target directory?

2008-06-16 Thread RalphWH

Thank you for your reply. I have tried to get your solution working, but I
have not quite succeeded.

To answer your assumption first:
> I'm assuming the nar is just a zip like jars and wars.
Yes, this is true.

This is what I've done:

I created a new jar with the components.xml file containing your
component-set tags in the specified directory path. I used maven to create
and install the jar and ended up with a jar called: narUnArchiver-0.1.jar

I then added the dependency tags as described in your blog post as follows:

...
   


 org.freehep 
 freehep-nar-plugin 


 download-a-nar 
 package 

 nar-download 
 nar-unpack 





 narUnArchiver 
 narUnArchiver 
 0.1 





...
This builds successfully, but the contents of the nar files are not included
in the target directory.

I also tried your other idea of adding it in the build extension:
...




 narUnArchiver 
 narUnArchiver 
 0.1 

 

...

With the build extension (above) I get a build error:
[ERROR] BUILD ERROR
[INFO]

[INFO] Internal error in the plugin manager executing goal
'org.freehep:freehep-nar-plugin:2.0-alpha-11-SNAPSHOT:nar-unpack': Unable to
find the mojo
'org.freehep:freehep-nar-plugin:2.0-alpha-11-SNAPSHOT:nar-unpack' in the
plugin 'org.freehep:freehep-nar-plugin'
org.codehaus.plexus.archiver.zip.ZipUnArchiver
...
Caused by: java.lang.ClassNotFoundException:
org.codehaus.plexus.archiver.zip.ZipUnArchiver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

So I believe the error is caused by the library not being found, but it is
in the repository and I've tried including it as a project.dependency and as
build.extensions.extension but to no avail. Any ideas as to what I am
missing here?

Thanks for your time and help!



Brian E Fox wrote:
> 
> I'm assuming the nar is just a zip like jars and wars. If so, you just
> need to map nar to the correct unarchiver and the dependency plugin will
> be able to unpack it.
> 
> Add the following to a jar in META-INF/plexus/components.xml (or just
> drop into src/main/resources/META-INF/plexus/components.xml of a new jar
> project and let maven pack it for you)
> 
> 
> 
>   
> 
>   org.codehaus.plexus.archiver.UnArchiver
>   nar
>   
>  
> org.codehaus.plexus.archiver.zip.ZipUnArchiver tation>
>   per-lookup
> 
>   
> 
> 
> Then add this jar to a dependency section inside the plugin config (as
> shown in [1]) if that doesn't work, then add it as a build extension. If
> you confirm this works, I'll add it to the dependency plugin ( I already
> have added support for SWC this way).
> 
> --Brian
> 
> [1] http://blogs.sonatype.com/brian/2008/04/23/120896598.html
> 
> -Original Message-
> From: RalphWH [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 13, 2008 8:22 PM
> To: users@maven.apache.org
> Subject: How to copy unpacked nar file contents into target directory?
> 
> 
> Hello All,
> 
> I have a project that is packaging into a jar and is using the
> freehep-nar-plugin to download and unpack the needed .nar files. This
> part
> works great. But what I haven't been able to figure out is how to then
> copy
> the .so files (in the .nar downloaded files) into the packaged .jar or
> into
> the assembly component .zip files. Since the nar files are downloaded
> and
> unpacked in the repository, how can I go about copying them into the
> target/
> directory?
> 
> This is the download and unpack snippet:
> 
>   org.freehep
>   freehep-nar-plugin
>   
> 
>download-nar
>package
>
>  nar-download
>  nar-unpack
>
> 
>   
> 
> 
> I have tried setting the targetDirectory tag in configuration, but this
> is
> ignored by the unpack goal. I have also tried to use the
> maven-dependency-plugin, but this seems to ignore nar files completely. 
> 
> I've also tried to use mvn's  tag directly with
> nar, but this doesn't work because the nar file that it
> tries
> to download doesn't include the ${aol} (ex:
> ${file_name}-i386-Linux-g++-shared.n

Best practice: copying deployable WAR folder

2008-06-16 Thread iwanj

I'm still learning Maven2 and so tried to follow the default directory
structure, etc.  On Windows, executing the "package" command produces a
folder like my-web-project.webapp within the target folder.  I have a
structure like this:

  /my-container-project
/my-common-project
/my-business-project
/my-web-project
 /src
 /target
   /classes
   /my-web-project.webapp
   /surefire-reports ...
   

somewhere else I had set up a folder which Tomcat will read upon start up,
let's call this folder F.

I'm using NetBeans and executing "Clean and Build" will refresh all the
builds, and I want to have
a one-click action to copy my-web-project.webapp to overwrite F.  EVen
better is there is something
that can "watch" this my-web-project.webapp folder and does automatic synch
(one-way) with F.

I'm wondering if I could achieve this by creating a custom Maven goal in
NetBeans but I don't know
which commands.  I had browsed this forum but couldn't find what I'm looking
for.  I thought this should be fairly common need, unless what I want to do
is not best practice.

Thanks for any input.
Iwan
-- 
View this message in context: 
http://www.nabble.com/Best-practice%3A-copying-deployable-WAR-folder-tp17874414p17874414.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: Incorporating DLL's into Maven Project.

2008-06-16 Thread Kalle Korhonen
If you don't need to worry about cross-platform compilation & support (and
sounds like you don't), the most straight-forwarded way to do this is to
deploy your dll to a Maven repository with type "dll", declare a straight-up
dependency to it in your pom and then use the dependency plugin to copy the
lib to the target dir or other suitable location for development environment
and structure you assembly (or whatever is the format of the actual
delivery) similarly. If cross-platform support is desired, nar plugin (
http://java.freehep.org/freehep-nar-plugin/intro.html) is a bit more
involving but simplifies things greatly. However, using it requires some
code changes.

Kalle


On Mon, Jun 16, 2008 at 11:19 AM, Mikel Cármenes Cavia <[EMAIL PROTECTED]>
wrote:

> Hey guys,
> I need to include three DLL's in my Maven project. Prior to deciding to
> email the list, I have looked around the archives, and haven't been able to
> find anything that would seem to answer my problem (which is a very easy
> one
> in nature).
>
> I use JNA to interface with two of the three DLL's (the third one is for
> Jacob, and its location needs to be set as a system variable).
>
> In Java, I do the following:
>
> URL libURL = this.getClass().getResource("/org/git/systems/DLLs/");
> System.setProperty("jna.library.path", libURL.getPath());
>
> And then declare the following interface
>
> public interface CurviLibrary extends Library {
> CurviLibrary CurviInitialization = (CurviLibrary)
> Native.loadLibrary("Curvi",CurviLibrary.class);
> CurviLibrary OptimizedSolver = (CurviLibrary)
> Native.loadLibrary("OptimizedSolver",CurviLibrary.class);
> DoubleByReference GIT_CURVIG(float[] timeData, float[] rawData, float[]
> relax, int rawDataSize, double alphaValue,
> long numberOfBins);
> }
>
> So when compiled via Eclipse, this works like a charm. I have tried placing
> the DLL's within /main/resources/org/git/systems/DLLs but this does not
> seem
> to work, as the jar looks in
>
> file:/C:/DEV/Maven/GITSYSTEMS/target/GITSYSTEMS-1.0-jar-with-dependencies.jar!/org/git/systems/DLLs/
> which would make sense, if only a jar wasn't a package.
>
> How may I go about adding these DLLs to my Maven project, without having to
> modify the existing Java code?
>
> I am assuming they will have to go outside of the jar, but I am unsure as
> to
> how to reference and go from there.
>
> Thanks guys!
>


Incorporating DLL's into Maven Project.

2008-06-16 Thread Mikel Cármenes Cavia
Hey guys,
I need to include three DLL's in my Maven project. Prior to deciding to
email the list, I have looked around the archives, and haven't been able to
find anything that would seem to answer my problem (which is a very easy one
in nature).

I use JNA to interface with two of the three DLL's (the third one is for
Jacob, and its location needs to be set as a system variable).

In Java, I do the following:

URL libURL = this.getClass().getResource("/org/git/systems/DLLs/");
System.setProperty("jna.library.path", libURL.getPath());

And then declare the following interface

public interface CurviLibrary extends Library {
CurviLibrary CurviInitialization = (CurviLibrary)
Native.loadLibrary("Curvi",CurviLibrary.class);
CurviLibrary OptimizedSolver = (CurviLibrary)
Native.loadLibrary("OptimizedSolver",CurviLibrary.class);
DoubleByReference GIT_CURVIG(float[] timeData, float[] rawData, float[]
relax, int rawDataSize, double alphaValue,
long numberOfBins);
}

So when compiled via Eclipse, this works like a charm. I have tried placing
the DLL's within /main/resources/org/git/systems/DLLs but this does not seem
to work, as the jar looks in
file:/C:/DEV/Maven/GITSYSTEMS/target/GITSYSTEMS-1.0-jar-with-dependencies.jar!/org/git/systems/DLLs/
which would make sense, if only a jar wasn't a package.

How may I go about adding these DLLs to my Maven project, without having to
modify the existing Java code?

I am assuming they will have to go outside of the jar, but I am unsure as to
how to reference and go from there.

Thanks guys!


plugin dependencies between two modules

2008-06-16 Thread Matt Wringe
Hi,

I have a project that has two child modules and a parent module.
The child modules both use the same plugin, but have different plugin
dependencies. 
If I run each child module separately, everything buids fine. If I build
the child modules as part of the parent modules build, it fails due to
the second modules dependencies being set to the first modules
dependencies.

ie (see below), if module 1 builds first and then module 2, module 2
won't be able to find any of the bar classes

Any thoughts on how to get around this?

Module 1:
  
 
example
example-plugin


Module 2:
  
 
example
example-plugin

   
  BAR
  BAR
   




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



executing a profile

2008-06-16 Thread Karan Malhi
Hi,

I have a requirement to configure the eclipse plugin within the pom so that
I can replace the following

mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true
-DsomeProperty

with something in the pom so that I should be able to simply run
mvn eclipse:eclipse and download sources and javadocs.

The "someProperty" is a system property which when set, executes a certain
profile.

I saw the docs on the maven eclipse plugin and figured out how to download
sources and javadocs without specifying the properties from the command
line.

How do I ensure that the profile is also executed?

-- 
Karan Singh Malhi


Re : Maven 2 / Web-Services (Axis2)

2008-06-16 Thread Julien HENRY
Hi,

You may try to create your own plugin or cargo extension to deploy aar to axis2 
server.

Alternatly you can use a fake web application to package your service as a WAR. 
It is no more an aar but perhaps it may help:

http://wso2.org/library/90

Regards,

Julien


- Message d'origine 
De : Karl Heinz Marbaise <[EMAIL PROTECTED]>
À : Maven Users List 
Envoyé le : Lundi, 16 Juin 2008, 14h22mn 15s
Objet : Re: Maven 2 / Web-Services (Axis2)

Hi,

after taken some deep looks into different areas I have found a way
which is 80% working...

I've found the cargo framework which is capeable to install, start and
deploy file to it...and in relationship with Maven 2 as well..

http://cargo.codehaus.org/Deploying+to+a+running+container

But currently i'm struggling with the Axis2 service archive which will
not be deployed to the Tomcat (in this case) and i have found no way to
deploy to the stand-alone server of Axis2 

May be i find a way

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen  http://www.soebes.de

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


  
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Re: Deployable archive including libs

2008-06-16 Thread Fabio Braga de Oliveira
A maven project has a default directory structure. Put your 
hibernate.cfg.xml in the src/main/resources directory, and it will be 
copied in the WEB-INF/classes, and probably will work.



sourcex escreveu:

Unfortunately, a new issue just popped up about the same topic - my hibernate
project has been included in my WAR but without hibernate.cfg.xml and the
other XML files. Only classes has been inserted. How could I import the
other configuration files like .xml, .log, .txt etc? 



--
Fabio Braga de Oliveira
Gerente de Projetos de Software
Work:   +55 19 3295-2111
Mobile: +55 19 9270-6574
E-mail: [EMAIL PROTECTED]

Símula Sistemas de Planejamento e Comércio Ltda.
Url: http://www.simula.com.br
Address: Av. José Bonifácio, 2510
 Zipcode 13093-240
 Campinas - SP - Brazil


begin:vcard
fn:Fabio Oliveira
n:Oliveira;Fabio
org;quoted-printable:S=C3=ADmula Sistemas de Planejamento e Com=C3=A9rcio Ltda.
adr;quoted-printable:;;Av. Jos=C3=A9 Bonif=C3=A1cio, 2510;Campinas;SP;13093-240;Brazil
email;internet:[EMAIL PROTECTED]
title:Gerente de Projetos de Software
tel;work:+55 19 3295-2111
tel;cell:+55 19 9270-6574
x-mozilla-html:FALSE
url:http://www.simula.com.br
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


Question about why/when Maven will automatically exclude transitive dependencies.

2008-06-16 Thread Ryan Moquin
I have never really been able to figure this out and it's really driving me
up the wall at the moment.  Is there a time that Maven2 will automatically
exclude transitive dependencies?  Here is the scenario:

I have 2 projects, then both include the exact same dependency.  When I
build the first library, it builds perfectly fine.  When I build the second
library, it files during the unit tests with NoClassDefFoundErrors.  If I
look at the dependencies being included, Maven2 isn't including the same
transitive dependencies from that common dependency between the two
projects.  Basically I have to include those transitive dependencies
explicitly, which I don't want to do.  What are the causes where Maven won't
include compile dependencies that a first level dependency is dependant on?
It seems very nondeterministic, so I'm guessing there are some nonobvious
reason behind the scenes for how it calculates this.

Thanks!
Ryan


Re: Apparent Plugin Version Mismatch with maven-deploy-plugin and wagon-ftp

2008-06-16 Thread Chris Lieb
I was accidentally overriding the versions that were set in the master 
POM in the project that I was testing in.  After I fixed that, the 
deploy phase started working again.  Is there a reason why 1.0-beta-3 of 
wagon-ftp and wagon-provider-api don't seem to work?


Chris Lieb

Chris Lieb wrote:
I have a project that deploys using the wagon-ftp plugin.  It has been 
building without issue for months now through CruiseControl.  Over the 
weekend when a build was triggered, it failed when it tried to deploy 
the project's POM, the first item that is deployed in the build 
process.  I get the following error message:



[INFO] Retrieving previous build number from inhouse_snapshot
[FATAL ERROR] org.apache.maven.plugin.deploy.DeployMojo#execute() 
caused a linkage error (java.lang.AbstractMethodError) and may be 
out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = 
app0.child-container[org.apache.maven.plugins:maven-deploy-plugin]
urls[0] = file:/C:/Documents and 
Settings/Administrator/.m2/repository/org/apache/maven/plugins/maven-deploy-plugin/2.3/maven-deploy-plugin-2.3.jar 

urls[1] = file:/C:/Documents and 
Settings/Administrator/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar 


[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/C:/Program Files/Apache Software 
Foundation/maven-2.0/bin/../lib/maven-2.0.9-uber.jar
[INFO] 


[ERROR] FATAL ERROR
[INFO] 


[INFO] org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection()V
[INFO] 


[DEBUG] Trace
java.lang.AbstractMethodError: 
org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection()V
   at 
org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:435) 

   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadataFromDeploymentRepository(DefaultWagonManager.java:379) 

   at 
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.getArtifactMetadataFromDeploymentRepository(DefaultRepositoryMetadataManager.java:380) 

   at 
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:348) 

   at 
org.apache.maven.artifact.transform.SnapshotTransformation.resolveLatestSnapshotBuildNumber(SnapshotTransformation.java:161) 

   at 
org.apache.maven.artifact.transform.SnapshotTransformation.transformForDeployment(SnapshotTransformation.java:100) 

   at 
org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForDeployment(DefaultArtifactTransformationManager.java:78) 

   at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:71) 

   at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:152)
   at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) 

   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) 

   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) 

   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) 

   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) 

   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) 

   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) 


   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at 
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

I have tried forcing the version numbers on wagon-ftp and 
wagon-provider-api to 1.0-beta-2 since I think that the newer 
1.0-beta-3 was pulled down last week, but I still get the same error.


Does anyone have any idea what is causing this?

Thanks,
Chris 

RE: Building Maven2

2008-06-16 Thread Michael Delaney
Mark,

Thank you for the explanation that makes a lot of sense to me. Looks like I 
know what to do now.

> Mike 

P.S: Hope your team won! \o/

-Original Message-
From: Mark Struberg [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 13, 2008 7:05 PM
To: Maven Users List
Subject: RE: Building Maven2

Hi Michael!

I did some research and compared the PerforceAddConsumer version you probably 
use (maven-scm-1.0) with the one from trunk:

< private static final String PATTERN = "^([^#]+)#1 - (.*)";
> private static final String PATTERN = "^([^#]+)#(\\d+) - (.*)";

The 2nd line is from trunk (anyone knows the Jira of this change?). So the reg 
exp which parses the line has changed! Maybe this is the problem you have :(
For looking at the RE quickly I would guess the original version only could 
handle #1 versions, whereas the newer RE also handles your #4.


I hope my thoughts are clear enough on the very long cheer- and beerfull 
soccer-EM evening :)

good night,
strub

PS: 
the good news: if I'm right, you do not have to change your perforce 
installation but only use the new perforce provider.
the bad news: you have to use the new perforce provider ;)


--- Mark Struberg <[EMAIL PROTECTED]> schrieb am Sa, 14.6.2008:

> Von: Mark Struberg <[EMAIL PROTECTED]>
> Betreff: RE: Building Maven2
> An: "Maven Users List" 
> Datum: Samstag, 14. Juni 2008, 0:32
> Hi Michael!
> 
> You don't need to build the whole maven2 stuff. My goal
> was to check if your perforce version generates slightly
> different logs than the one the maven-scm-provider-perforce
> was programmed with.
> 
> Please see the following debug output files and compare
> them with the propriate output from your p4:
> http://svn.apache.org/repos/asf/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/
> 
> The tests of a SCM provider can be separated into 2
> categories
> 
> 1.) tests which are run against pre generated output files
> (like the ones above)
> 2.) TCK tests which run real use cases. For this test
> cases, the PerforceAddConsumer has to parse the output of
> the real p4 command! That's what may fail on your
> computer.
> 
> I hope this explains why I asked you to run the tests, and
> which part is relevant and which not.
> 
> For not loosing the context, I copy the exception from your
> mvn release with your p4 installation from your previous
> post (titled "Release plugin questions"):
> Caused by: java.lang.IllegalStateException: Unknown input:
> //depot/sandboxes/mdelaney/utils/release-pom.xml#4 - opened
> for add
> at
> org.apache.maven.scm.provider.perforce.command.add.PerforceAddConsumer.consumeLine(PerforceAddConsumer.java:79)
> at
> org.apache.maven.scm.provider.perforce.command.add.PerforceAddCommand.executeAddCommand(PerforceAddCommand.java:63)
>   
> 
> At least this would be the first point to look at for
> searching the source of the problem. First guess: either p4
> is old, or the scm-provider is old. Which version are you
> using? This may also be a line delimiter problem or other
> wired stuff ...
> 
> LieGrü,
> strub
> 
> 
> --- Michael Delaney <[EMAIL PROTECTED]> schrieb
> am Fr, 13.6.2008:
> 
> > Von: Michael Delaney <[EMAIL PROTECTED]>
> > Betreff: RE: Building Maven2
> > An: "Maven Users List"
> 
> > Datum: Freitag, 13. Juni 2008, 16:58
> > Wayne,
> > 
> > Well, I am trying to debug a possible issue with the
> > Perforce SCM
> > provider. I was asked to build & run units tests
> > against the Perforce
> > SCM provider. Rather then just attempt to build then
> post
> > errors that
> > ended up being an issue with my environment, I decided
> it
> > would be a
> > good idea to build Maven 2 first to validate the
> > environment. That way
> > if any issue were found with the Perforce SCM
> provider, I
> > could at least
> > say that know my environment is good (or should be).
> > 
> > 
> > 
> > > Mike D.
> > 
> > -Original Message-
> > From: Wayne Fay [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, June 13, 2008 10:53 AM
> > To: Maven Users List
> > Subject: Re: Building Maven2
> > 
> > If you don't mind me asking, why are you trying to
> > build Maven? Just
> > for fun; because corporate says we have to be able to
> build
> > everything
> > (including our tools) from scratch; some other reason;
> etc?
> > 
> > Wayne
> > 
> > On 6/13/08, Michael Delaney
> <[EMAIL PROTECTED]>
> > wrote:
> > > Ram,
> > >
> > > I was trying to build everything, I went into the
> root
> > of the Maven 2
> > > source distribution and executed
> > "bootstrap.bat". The steps were as
> > > follows:
> > >cd /d
> > C:\tmp\maven-2.0.9-src\maven-2.0.9-src
> > >set M2_HOME=c:\apache-maven-2.0.9
> > >set PATH=%M2_HOME%\bin;%PATH%
> > >bootstrap.bat
> > >
> > > The documentation I followed is listed at
> > >
> >
> http://maven.apache.org/guides/development/guide-building-m2.html,
> > and
> > I
> > > was using the section "Building Maven 2.0
> Without

Re: Deployable archive including libs

2008-06-16 Thread sourcex

Unfortunately, a new issue just popped up about the same topic - my hibernate
project has been included in my WAR but without hibernate.cfg.xml and the
other XML files. Only classes has been inserted. How could I import the
other configuration files like .xml, .log, .txt etc? 
-- 
View this message in context: 
http://www.nabble.com/Deployable-archive-including-libs-tp17859844p17866340.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]



Apparent Plugin Version Mismatch with maven-deploy-plugin and wagon-ftp

2008-06-16 Thread Chris Lieb
I have a project that deploys using the wagon-ftp plugin.  It has been 
building without issue for months now through CruiseControl.  Over the 
weekend when a build was triggered, it failed when it tried to deploy 
the project's POM, the first item that is deployed in the build 
process.  I get the following error message:



[INFO] Retrieving previous build number from inhouse_snapshot
[FATAL ERROR] org.apache.maven.plugin.deploy.DeployMojo#execute() caused 
a linkage error (java.lang.AbstractMethodError) and may be out-of-date. 
Check the realms:
[FATAL ERROR] Plugin realm = 
app0.child-container[org.apache.maven.plugins:maven-deploy-plugin]
urls[0] = file:/C:/Documents and 
Settings/Administrator/.m2/repository/org/apache/maven/plugins/maven-deploy-plugin/2.3/maven-deploy-plugin-2.3.jar
urls[1] = file:/C:/Documents and 
Settings/Administrator/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar

[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/C:/Program Files/Apache Software 
Foundation/maven-2.0/bin/../lib/maven-2.0.9-uber.jar
[INFO] 


[ERROR] FATAL ERROR
[INFO] 


[INFO] org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection()V
[INFO] 


[DEBUG] Trace
java.lang.AbstractMethodError: 
org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection()V
   at 
org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:435)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadataFromDeploymentRepository(DefaultWagonManager.java:379)
   at 
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.getArtifactMetadataFromDeploymentRepository(DefaultRepositoryMetadataManager.java:380)
   at 
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:348)
   at 
org.apache.maven.artifact.transform.SnapshotTransformation.resolveLatestSnapshotBuildNumber(SnapshotTransformation.java:161)
   at 
org.apache.maven.artifact.transform.SnapshotTransformation.transformForDeployment(SnapshotTransformation.java:100)
   at 
org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForDeployment(DefaultArtifactTransformationManager.java:78)
   at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:71)
   at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:152)
   at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)

   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at 
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

I have tried forcing the version numbers on wagon-ftp and 
wagon-provider-api to 1.0-beta-2 since I think that the newer 1.0-beta-3 
was pulled down last week, but I still get the same error.


Does anyone have any idea what is causing this?

Thanks,
Chris Lieb

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



URLs in site.xml banner tags not rendered by site plugin if host not resolved by "nslookup"

2008-06-16 Thread Paul Spencer
The URL's in the banner tags of site.xml are the maven-site-plugin is 
the hostname is not found by nslookup.  In my case the hostname only 
exists in my hosts files on a the Windows machine running "mvn site".


In the example below, the generated URLs for bannerLeft will be absolute 
and the URL's for bannerRight will be relative.  Adding 
"badhost.apache.org" to the hosts file will not change the outcome.




  
Maven
http://maven.apache.org/images/apache-maven-project.png
http://maven.apache.org/
  
  
Maven
http://badhost.apache.org/images/apache-maven-project.png
http://badhost.apache.org/
  


It appears the plugin is validating the hostname.  Is their a way of 
turning this validation off?


Paul Spencer


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



Re: Sending mail through maven2 using ant.

2008-06-16 Thread Wayne Fay
The basic Ant dependency does not include optional features like sending email.

This is discussed (and answer given to solve it) in the following JIRA:
http://jira.codehaus.org/browse/MANTRUN-53

Wayne

On 6/16/08, Shikha.Somani <[EMAIL PROTECTED]> wrote:
>
> I need to send mail containing attachments through maven2. There is no plugin
> available so I made an ant plugin to send mails.
>
> The build script could send mails containing attachments but using the same
> build as plugin in maven could not send attachments. There is certaing
> exception because of which the attachments could not be send.
>
> Exception: [mail] Failed to initialise MIME mail:
> org.apache.tools.ant.taskdefs.email.MimeMailer
>
> Any help will be appreciated
>
> Thanks.
>
> --
> View this message in context: 
> http://www.nabble.com/Sending-mail-through-maven2-using-ant.-tp17859708p17859708.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]
>
>

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



Redundant profile activation definition in settings.xml and pom

2008-06-16 Thread nicolas.duminil

Greetings,

In my settings.xml file I have the following:


  env-dev
  
  .
  
  .


In my POM, I have:


.

  env-prod
  
  ...
  

.


The POM code between  and  didn't get called and I didn't
understand why. However, running "mvn help:active-profiles" showed me that
the appropriated profiles was selected. In order to get it working, I needed
to add to the pom the ... section, already present in
settings.xml. Now my POM looks like this:


.

  env-prod
  
 
 
  
  ...
  

.


Which is a shame as the activate section apears twice: once in settings and
once in the POM. I don't know if that's by design, but it doesn't make much
sense to me, since maven is anyway very un-modular.

I'd be interested to know if I'm wrong or if this is the normal case and, in
this eventuality, why ?

Many thanks in advance,

Nicolas
-- 
View this message in context: 
http://www.nabble.com/Redundant-profile-activation-definition-in-settings.xml-and-pom-tp17863825p17863825.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: Deployable archive including libs

2008-06-16 Thread sourcex

Thanks to you all - I was able to compile the both projects and deploy them
to Tomcat :jumping:

Best wishes,
sourcex
-- 
View this message in context: 
http://www.nabble.com/Deployable-archive-including-libs-tp17859844p17863668.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: Maven 2 / Web-Services (Axis2)

2008-06-16 Thread Karl Heinz Marbaise
Hi,

after taken some deep looks into different areas I have found a way
which is 80% working...

I've found the cargo framework which is capeable to install, start and
deploy file to it...and in relationship with Maven 2 as well..

http://cargo.codehaus.org/Deploying+to+a+running+container

But currently i'm struggling with the Axis2 service archive which will
not be deployed to the Tomcat (in this case) and i have found no way to
deploy to the stand-alone server of Axis2 

May be i find a way

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen   http://www.soebes.de

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



Re: Deployable archive including libs

2008-06-16 Thread James Rutherford
On Mon, Jun 16, 2008 at 12:06:14PM +, sourcex wrote:
> Thanks for the support - unfortunately my WAR archive is fine, but the JAR
> isn't bundled with its libraries. It's  declared as
> jar

You need jar-with-dependencies. See:

http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html

cheers,

Jim

> and the dependent libraries are not included
> there. My JSE project is actually the Hibernate DB part, which has 10
> required libs (jdbc, hibernate, asm, db driver etc) and they are not in my
> archive after 'mvn package'. If it's not possible to put them in, I could
> merge the projects in one project with WAR archive only, but it's too
> coupled this way.
> 
> I'll try to add my jse project as a dependency in the web one though, thanks
> again.
> 
> 
> --
> View this message in context: 
> http://www.nabble.com/Deployable-archive-including-libs-tp17859844p17863130.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]
> 

-- 
James Rutherford  |  Hewlett-Packard Limited registered Office:
Research Engineer |  Cain Road,
HP Labs   |  Bracknell,
Bristol, UK   |  Berks
+44 117 312 7066  |  RG12 1HN.
[EMAIL PROTECTED]   |  Registered No: 690597 England

The contents of this message and any attachments to it are confidential
and may be legally privileged. If you have received this message in
error, you should delete it from your system immediately and advise the
sender. To any recipient of this message within HP, unless otherwise
stated you should consider this message and attachments as "HP
CONFIDENTIAL".

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



RE: How to define that a new version of a dependency supersedes another artifact?

2008-06-16 Thread Jörg Schaible
Sören Chittka wrote:
> Hi,
> 
> currently I am in the process of building an
> inhouse-maven-repository for the company I am working at.
> While doing so I encountered the problem, that sometimes
> newer versions of dependencies do not only supersede their
> older version, but even
> other artifacts.
> 
> One example would be JAXP:
> On Java SE 5 JAXP 1.3 is provided, and I have to include a
> dependency to the StAX-API and an implementation for some
> applications (or libraries) that use this functionality.
> On Java SE 6 JAXP 1.4 is provided, which already includes the
> StAX-API and the reference implementation.
> 
> So what I would like to do is define a profile "JDK6" in a
> parent pom, with a dependencyManagement-section which tells Maven,
> that JAXP 1.4 is provided, which in turn should not only override
> JAXP 1.3 
> but also the defined version of the StAX-API and -implementation.
> 
> This pattern applies also to Jaxen, which from a specific
> version on includes the Saxpath-packages.
> 
> Is there any way to tell Maven to do what I described?

This is a long standing issue with no easy solution (MNG-177). Currently you 
will have to create such a profile for each artifact that uses the StaX-API 
directly and for artifacts that use it via transitive deps, you will have to 
use exclusions. The later can be declared in profiled dependencyManagement 
sections of an inherited POM. So, yes, it is possible, but there's a lot of 
individual POM management.

- Jörg

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



Re: Deployable archive including libs

2008-06-16 Thread sourcex

Hello,

Thanks for the support - unfortunately my WAR archive is fine, but the JAR
isn't bundled with its libraries. It's  declared as
jar and the dependent libraries are not included
there. My JSE project is actually the Hibernate DB part, which has 10
required libs (jdbc, hibernate, asm, db driver etc) and they are not in my
archive after 'mvn package'. If it's not possible to put them in, I could
merge the projects in one project with WAR archive only, but it's too
coupled this way.

I'll try to add my jse project as a dependency in the web one though, thanks
again.


-- 
View this message in context: 
http://www.nabble.com/Deployable-archive-including-libs-tp17859844p17863130.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: Deployable archive including libs

2008-06-16 Thread Fabio Braga de Oliveira

Hi sourcex,

It's incredible easy. In the WAR pom, declare 
war. Example:


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";>

4.0.0
com.your.company
yourArtifact
war
Web Application Name
1.0-SNAPSHOT
http://maven.apache.org


com.your.dependency
artifact-id
version



...




All its dependencies will be bundle in a .war file, including your JSE 
library. I suggest you to read any maven 2 book, there are some free in 
the web, see:


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

Good luck!

sourcex escreveu:

Hi there, I'm new with Maven and I'm trying to create a .WAR archive to be
deployed on a remote server with no Maven installed. I also need that .WAR
archive to be bundled with all the libraries that the project uses. There is
also a connection between a JSE project and JEE project, so I tried to
create a separate .pom file which creates a JAR file from my JSE project,
creates a WAR file for my JEE project and includes the first archive (and
all other libs) in the .WAR file (as with ant). 
Well, I didn't succeed with that.

Any recommendations? Thanks in advance.



--
Fabio Braga de Oliveira
Gerente de Projetos de Software
Work:   +55 19 3295-2111
Mobile: +55 19 9270-6574
E-mail: [EMAIL PROTECTED]

Símula Sistemas de Planejamento e Comércio Ltda.
Url: http://www.simula.com.br
Address: Av. José Bonifácio, 2510
 Zipcode 13093-240
 Campinas - SP - Brazil


begin:vcard
fn:Fabio Oliveira
n:Oliveira;Fabio
org;quoted-printable:S=C3=ADmula Sistemas de Planejamento e Com=C3=A9rcio Ltda.
adr;quoted-printable:;;Av. Jos=C3=A9 Bonif=C3=A1cio, 2510;Campinas;SP;13093-240;Brazil
email;internet:[EMAIL PROTECTED]
title:Gerente de Projetos de Software
tel;work:+55 19 3295-2111
tel;cell:+55 19 9270-6574
x-mozilla-html:FALSE
url:http://www.simula.com.br
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


How to define that a new version of a dependency supersedes another artifact?

2008-06-16 Thread Sören Chittka

Hi,

currently I am in the process of building an inhouse-maven-repository for the 
company I am working at.
While doing so I encountered the problem, that sometimes newer versions of dependencies do not only supersede their older version, but even 
other artifacts.


One example would be JAXP:
On Java SE 5 JAXP 1.3 is provided, and I have to include a dependency to the StAX-API and an implementation for some applications (or 
libraries) that use this functionality.

On Java SE 6 JAXP 1.4 is provided, which already includes the StAX-API and the 
reference implementation.

So what I would like to do is define a profile "JDK6" in a parent pom, with a dependencyManagement-section which tells Maven, that JAXP 1.4 
is provided, which in turn should not only override JAXP 1.3 but also the defined version of the StAX-API and -implementation.


This pattern applies also to Jaxen, which from a specific version on includes 
the Saxpath-packages.

Is there any way to tell Maven to do what I described?

--
Mit freundlichen Grüßen

V O L K S W O H L   B U N D
Lebensversicherung a.G.
Sachversicherung Aktiengesellschaft

Sören Chittka
EDV-Systementwicklung

Telefon: 0231/5433-6521
E-Mail:  [EMAIL PROTECTED]

VOLKSWOHL BUND LEBENSVERSICHERUNG a.G., Südwall 37 - 41, 44137 Dortmund
Vorstand: Dr. Joachim Maas (Vors.), Dietmar Bläsing, Dr. Ulf-Gerhard Gude, 
Martin Rohm
Vorsitzender des Aufsichtsrats: Werner Ackermann
Sitz des Unternehmens: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 
450

VOLKSWOHL BUND SACHVERSICHERUNG AG, Südwall 37 - 41, 44137 Dortmund
Vorstand: Dr. Joachim Maas (Vors.), Dietmar Bläsing, Martin Rohm
Vorsitzender des Aufsichtsrats: Werner Ackermann
Sitz des Unternehmens: Dortmund, Registergericht: Amtsgericht Dortmund, HRB 3134

Telefon: 0231/5433-0, Telefax: 0231/5433-400, E-Mail: [EMAIL PROTECTED]
Internet: www.volkswohl-bund.de

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



Invoke plugin functionality inside a custom Mojo

2008-06-16 Thread James Shute
Hi,

 

I'm writing a custom MOJO and have got most of the way to what I want using
the FAQs etc on the site.  There's one bit I can't work out how to do
though, so if anybody could point me in the right direction that would be
great.

 

Basically I'm interested to know how my MOJO code can invoke / access the
functionality of another plugin.  So for example, let's say what I want to
do is copy my dependencies to a directory by using
"dependency:copy-dependencies".  Now I could just look at the source code
for that plugin and cut'n'paste away, but I'm sure there must be a better
way - i.e. I can declare appropriate dependencies and somehow make use of
the existing plugin code.

 

Is this possible?  

 

NB - I know I can invoke copy-dependencies by declaring something in my
pom's plugins section.  I'm just using it for an example - let's say that
the target directory name can't be expressed in the pom for some reason
(needs to be generated in some way, perhaps)

 

Thanks in advance for any help!

 

James



Deployable archive including libs

2008-06-16 Thread sourcex

Hi there, I'm new with Maven and I'm trying to create a .WAR archive to be
deployed on a remote server with no Maven installed. I also need that .WAR
archive to be bundled with all the libraries that the project uses. There is
also a connection between a JSE project and JEE project, so I tried to
create a separate .pom file which creates a JAR file from my JSE project,
creates a WAR file for my JEE project and includes the first archive (and
all other libs) in the .WAR file (as with ant). 
Well, I didn't succeed with that.
Any recommendations? Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Deployable-archive-including-libs-tp17859844p17859844.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]



Sending mail through maven2 using ant.

2008-06-16 Thread Shikha.Somani

I need to send mail containing attachments through maven2. There is no plugin
available so I made an ant plugin to send mails.

The build script could send mails containing attachments but using the same
build as plugin in maven could not send attachments. There is certaing
exception because of which the attachments could not be send.

Exception: [mail] Failed to initialise MIME mail:
org.apache.tools.ant.taskdefs.email.MimeMailer

Any help will be appreciated 

Thanks.

-- 
View this message in context: 
http://www.nabble.com/Sending-mail-through-maven2-using-ant.-tp17859708p17859708.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]