RE: Migrate existing java project to maven2

2009-07-20 Thread Jonathan Woods
You can sometimes locate artifacts in repositories other than Maven Central,
and then you can not only have Maven download them for you but you can
depend on them in your POMs:

1.  Try Googling "maven activation-1.1.1.jar" and so on to find a suitably
large/public repo holding the artifact you need.  There are some useful repo
index sites out there, e.g. http://mvnrepository.com/ and
http://www.mvnbrowser.com/index.html.

2.  Make the target repo available to your local Maven installation.
Generally, you can either (i) declare the repo in your project's POM, or
(ii) declare it in your Maven installation's settings.xml file (see
http://maven.apache.org/settings.html).  Option (i) means other people to
whom you distribute your POM don't need separate instructions about how to
get access to artifacts, but there's no guarantee someone else's Maven
installation will honour your repo declaration (e.g. their organisation may
confine access to internal repos).  If you go for option (ii), though,
you'll have to tell people how to reach the repos they need.

3.  Declare the dependency's Maven coordinates as appropriate.

activation-1.1.1.jar can be found at the large JBoss public repo:


jboss
JBoss Repository
http://repository.jboss.org/maven2


and its coords are


javax.activation
activation
1.1.1


By the look of it
(http://repository.jboss.org/maven2/org/apache/santuario/xmlsec/1.4.2/)
xmlsec can be found at JBoss too.

Jon  

> -Original Message-
> From: Rusty Wright [mailto:rusty.wri...@gmail.com] 
> Sent: 20 July 2009 16:01
> To: Maven Users List
> Subject: Re: Migrate existing java project to maven2
> 
> What I do is install the jars in my local repository (for 
> example, ~/.m2 on unix).  I use the following shell script to 
> install the hamcrest jars:
> 
> #! /bin/sh
> 
> VERSION=1.2
> DIR=hamcrest-${VERSION}
> 
> for NAME in \
> hamcrest-all \
> hamcrest-core \
> hamcrest-generator \
> hamcrest-integration \
> hamcrest-library
> do
> mvn install:install-file \
> -DgroupId=org.hamcrest \
> -DartifactId=${NAME} \
> -Dversion=${VERSION} \
> -Dpackaging=jar \
> -DcreateChecksum=true \
> -DpomFile=${NAME}-${VERSION}.pom \
> -Dfile=${DIR}/${NAME}-${VERSION}.jar
> done
> 
> You'll also need to create a pom for each jar, but it's quite 
> small and easy to make; for example:
> 
> 
> 
>  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";>
> 
> 4.0.0
> 
> org.hamcrest
> hamcrest-all
> hamcrest all
> 1.2
> 
> http://code.google.com/p/hamcrest/
> 
> 
> 
> ykyuen wrote:
> > Hi all,
> > 
> > i am new to maven and i just go thru the examples in the Maven: The 
> > Definitive Guide.
> > 
> > i am going to migrate a project to maven2. but i find that 
> there are 
> > some jars which are not found in the maven repository 
> > http://repo1.maven.org/maven2/.
> > 
> > for example. the java project needs activation-1.1.1.jar, 
> > xmlsec-1.4.2.jar... etc.
> > so i cannot set them as a dependency in the pom.xml
> > 
> > how can i deal with that?
> > 
> > Thanks for your help =)
> > 
> > Regards,
> > Kit
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: the nexus repositories only show .index and .meta

2009-07-21 Thread Jonathan Woods
Have you tried 'by hand' to make HTTP requests from your Ubuntu box?  E.g.

wget
http://repo1.maven.org/maven2/org/apache/commons/commons-email/1.1/commons-e
mail-1.1.pom

Jon

> -Original Message-
> From: ykyuen [mailto:yingkity...@gmail.com] 
> Sent: 21 July 2009 15:36
> To: users@maven.apache.org
> Subject: the nexus repositories only show .index and .meta
> 
> 
> hi all,
> 
> i just installed the nexus 1.3.6 to my ubuntu. everything 
> works fine except when i browse the repositories such as 
> Public Repositories only 2 folders named as .meta and .index 
> are shown...
> 
> the ubuntu is behind a firewall in the network and i have 
> already set the proxy setting in nexus. so i think it should 
> be able to download the files outside. but i found the 
> connection refused in the nexus.log
> 
> here is the nexus.log
> --
> 2009-07-21 22:46:08 INFO  [pool-1-thread-2] - 
> o.s.n.i.IndexerMana~:default
> - Cascading merge of group indexes for group 
> 'public-snapshots', where repository 'codehaus-snapshots' is member.
> 2009-07-21 22:46:09 INFO  [pool-1-thread-2] - 
> o.s.n.i.IndexerMana~:default
> - Publishing best index for repository apache-snapshots
> 2009-07-21 22:46:11 INFO  [pool-1-thread-2] - 
> o.s.n.i.IndexerMana~:default
> - Publishing best index for repository codehaus-snapshots
> 2009-07-21 22:53:59 INFO  [qtp0-10] - 
> o.a.c.h.HttpMethodD~ 
> - I/O exception (java.net.ConnectException) caught when 
> processing request:
> Connection refused
> 2009-07-21 22:53:59 INFO  [qtp0-10] - 
> o.a.c.h.HttpMethodD~ 
> - Retrying request
> 2009-07-21 22:54:15 INFO  [qtp0-13] - 
> o.s.n.p.m.ArtifactP~:default 
> - User mappings file not found, will work with defaults...
> 2009-07-21 22:54:20 INFO  [qtp0-10] - 
> o.a.c.h.HttpMethodD~ 
> - I/O exception (java.net.ConnectException) caught when 
> processing request:
> Connection refused
> 
> 
> anything i have missed?
> 
> Thanks for your help.
> 
> Regards,
> Kit
> --
> View this message in context: 
> http://www.nabble.com/the-nexus-repositories-only-show-.index-
> and-.meta-tp24588856p24588856.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: the nexus repositories only show .index and .meta

2009-07-22 Thread Jonathan Woods
Perhaps you need to tell Maven how to get to your proxy:

http://maven.apache.org/guides/mini/guide-proxies.html

Jon 

> -Original Message-
> From: ykyuen [mailto:yingkity...@gmail.com] 
> Sent: 22 July 2009 05:53
> To: users@maven.apache.org
> Subject: RE: the nexus repositories only show .index and .meta
> 
> 
> 
> Jonathan Woods wrote:
> > 
> > Have you tried 'by hand' to make HTTP requests from your 
> Ubuntu box?  E.g.
> > 
> > wget
> > 
> http://repo1.maven.org/maven2/org/apache/commons/commons-email/1.1/com
> > mons-e
> > mail-1.1.pom
> > 
> > Jon
> > 
> 
> i try wget
> http://repo1.maven.org/maven2/activecluster/activecluster/2004
> 0408.185106/activecluster-20040408.185106.pom
> after export the http_proxy in the shell
> 
> and it is ok, i can download the file.
> 
> but the repo still cannot show other files.
> 
> The Ubuntu is a vm in my Deskop which is windows. The desktop 
> is behind a firewall but after setting proxy, it can get into 
> the internet by http.
> 
> Regards,
> Kit
> 
> --
> View this message in context: 
> http://www.nabble.com/the-nexus-repositories-only-show-.index-
> and-.meta-tp24588856p24600048.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: Excluding Build Resources Within POM File

2009-07-22 Thread Jonathan Woods
This should do the trick:

http://www.mailinglistarchive.com/users@maven.apache.org/msg21096.html 

In other words, you need to supply the Maven compiler plugin with the
appropriate configuration.  The build/resources node you configured
corresponds to resources per se, i.e. not to Java sources.

Jon

> -Original Message-
> From: Gadbury [mailto:gadb...@googlemail.com] 
> Sent: 22 July 2009 11:46
> To: users@maven.apache.org
> Subject: Excluding Build Resources Within POM File
> 
> 
> Hi all,
> 
> I am temporarily trying to exclude various packages and 
> source files from my web-app's build process.
> 
> I first tried in Eclipse: right click package/file > build 
> path > exclude. 
> That doesn't work.
> 
> I then tried adding build resources excludes to my POM.  
> Unfortunately, despite trying a combination of directories 
> and exclude patterns, my build still attempts to compile all 
> sources.  Shouldn't the following example should exclude all 
> files under src?
> 
> 
>   
>   myApp
>   
>   
>   src
>   
>   **/*
>   
>   
>   
>   
> 
> 
> I have spent some time trying to figure out what I may be 
> doing wrong, along with a fair bit of experimentation.  
> Please could someone help put me out of my misery! :D
> --
> View this message in context: 
> http://www.nabble.com/Excluding-Build-Resources-Within-POM-Fil
e-tp24604045p24604045.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: Define a special JDK for compilation

2009-07-22 Thread Jonathan Woods
Assuming you mean you want to specify a particular javac for Maven to use
when compiling code... compilation is carried out (by default) by the Maven
compiler plugin, so it's this you need to configure.  Details on configuring
it to use a specific JDK are given here:

http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using
-different-jdk.html

Jon

> -Original Message-
> From: Roman Kournjaev [mailto:kournj...@gmail.com] 
> Sent: 22 July 2009 14:18
> To: Maven Users List
> Subject: Define a special JDK for compilation
> 
> Hi Guys
> 
> Do you know where do i adjust the JDK for maven specially ? I 
> know that maven takes the JAVA_HOME as a default, but i have 
> a problem with that , i want it to take a special javac from 
> some other JDK.
> 
> Thanks
> Roman
> 


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



RE: copy\move plugin

2009-07-23 Thread Jonathan Woods
Then it might be more naturally 'Maven' to have 3 projects, 2 of them
depending on the common third. 

> -Original Message-
> From: Alexander [mailto:the.malk...@gmail.com] 
> Sent: 23 July 2009 10:37
> To: Maven Users List
> Subject: Re: copy\move plugin
> 
> Nope, client looks exactly like server. They have no code 
> difference. Only some configuration files.
> 
> 2009/7/23 Alexander Vaysberg 
> 
> > The simply was create 2 project client and server. You can it make 
> > with multi-project. In this case you have a separetly you 
> client and 
> > server application.
> >
> > Alexander schrieb:
> >
> >  Hello,
> >>
> >> I must distribute different set of resource files\ bat 
> files\ images 
> >> at server and client application. For server I have to 
> copy bat files 
> >> to register in servers, properties with db configuration 
> and so on. 
> >> But client don't need them - it only connects to server.
> >>
> >> I want to type "mvn package" and after moment see two distrinct 
> >> folders for server and client use.
> >>
> >> 2009/7/23 Alexander Vaysberg 
> >>
> >>
> >>
> >>> The Maven is not same as Ant. The first question is why 
> you need the 
> >>> same file on different places? If you try make a project 
> for alls, 
> >>> that the maven, isn't for you.
> >>>
> >>> Alexander schrieb:
> >>>
> >>>  Hello,
> >>>
> >>>
>  It seems like it is impossible to copy one file to several 
>  different locations not under target directory. Sure, I can copy 
>  several different files to one directory but not otherwise.
> 
>  2009/7/23 Lewis, Eric 
> 
> 
> 
> 
> 
> > No, by specifying outputDirectory, you can copy 
> anywhere you like.
> >
> > See
> >
> >
> > 
> http://maven.apache.org/plugins/maven-resources-plugin/copy-resour
> > ces-mojo.html
> >
> > Just make sure your files aren't filtered, for instance
> >
> > 
> >  my_output
> >  
> >  
> >my_input
> >false
> >  
> >  
> > 
> >
> > It's really flexible, read the examples, for instance 
> 'Including 
> > and excluding files and directories'.
> >
> > Best regards,
> > Eric
> >
> >
> >
> >
> >
> >> -Ursprüngliche Nachricht-
> >> Von: Alexander [mailto:the.malk...@gmail.com]
> >> Gesendet: Donnerstag, 23. Juli 2009 09:48
> >> An: Maven Users List
> >> Betreff: Re: copy\move plugin
> >>
> >> Hello,
> >>
> >> You copy files to output (target) directory or to any other? I 
> >> thought resource plugin helps with copying files from 
> somewhere 
> >> to output (target) only directory.
> >>
> >> 2009/7/23 Lewis, Eric 
> >>
> >>
> >>
> >>
> >>
> >>> I do my copying with the resource plugin, which works nicely.
> >>>
> >>> Best regards,
> >>> Eric
> >>>
> >>>
> >>>
> >>>
> >>>
>  -Ursprüngliche Nachricht-
>  Von: Alexander [mailto:the.malk...@gmail.com]
>  Gesendet: Donnerstag, 23. Juli 2009 08:32
>  An: Maven Users List
>  Betreff: Re: copy\move plugin
> 
>  Hello,
> 
>  I knew about that plugin, but thanks anyway. With that
> 
> 
> 
> 
> >>> plugin I could
> >>>
> >>>
> >>
> >>
> >>> emulate so many maven plugins, you know.. But I'm trying to
> >>>
> >>>
>  move to maven
>  from ant and wondering if I could use some maven kung-fu.
> 
>  2009/7/23 Dan Tran 
> 
> 
> 
> 
> 
> > maven-antrun-plugin?
> >
> >
> >
> > On Wed, Jul 22, 2009 at 11:24 PM,
> >
> >
> >
> >
>  Alexander wrote:
> 
> 
> 
> 
> > Hello all,
> >
> >
> >> Does maven have any plugin that provides simple task as
> >>
> >>
> >>
> >>
> > copy\move files?
> >
> >
> 
> 
> > Sure, I could invoke ant task but really want to do all
> >
> >
> >>
> >>
> > in *maven style.
> >
> >
> 
> 
> > *I
> >
> >
> >
> >
> >> need to juggle with files a little. *
> >> *
> >>
> >>
> >>
> >>
> >>
> >
> >
> 
>  
> ---
>  --
> 
> 
> >>>
> >>
> >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >>>
> >>>
>  For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
> >
> >
> >
> >
> 
>  
> 

RE: Primary and secondary dependencies

2009-07-24 Thread Jonathan Woods
I find the phrase "they are not transitive" a bit confusing here.  Anyway,
the way it should work is shown in the table at
http://maven.apache.org/guides/introduction/introduction-to-dependency-mecha
nism.html#Dependency_Scope, which shows that the scope of dependencies
contributed by your 'provided' dependency should never be greater than
'provided'.  In other words, you shouldn't be getting the transitive deps
either... but I have no explanation as to why you might be!  Are you sure
some other dependency which is tighter than 'provided' isn't bringing them
in?

Try running   mvn dependency:tree  on your project and seeing what it tells
you.

Jon

> -Original Message-
> From: monkeyden [mailto:monk...@monkeyden.com] 
> Sent: 24 July 2009 17:50
> To: users@maven.apache.org
> Subject: Re: Primary and secondary dependencies
> 
> 
> Based on this definition, which comes from the maven docs, I 
> should NOT get the "primary" dependency in my build, but what 
> about the transitive dependencies?  Do you suggest I should 
> not be seeing this behavior when the primary dependency is 
> provided?  thanks again.
> 
> provided
> provided dependencies are used when you expect the JDK or a 
> container to provide them. For example, if you were 
> developing a web application, you would need the Servlet API 
> available on the compile classpath to compile a servlet, but 
> you wouldn't want to include the Servlet API in the packaged 
> WAR; the Servlet API JAR is supplied by your application 
> server or servlet container. provided dependencies are 
> available on the compilation classpath (not runtime). They 
> are not transitive, nor are they packaged.
> 
> 
> 
> 
> Juven Xu wrote:
> > 
> > they are _transitive_ dependencies :) but you name them _secondary_ 
> > dependencies :)
> > 
> > you would want to read this document:
> > 
> http://www.sonatype.com/books/maven-book/reference/pom-relationships-s
> > ect-project-dependencies.html
> > 
> > On Sat, Jul 25, 2009 at 12:41 AM, monkeyden 
>  wrote:
> > 
> >>
> >> I have the scope of some 3rd party dependencies set to "provided", 
> >> but keep getting all the secondary dependencies in my 
> build.  I have 
> >> 3 versions of ant, when I don't even need 1.
> >>
> >> How best to prevent secondary dependencies from being 
> added to the build?
> >>
> >> Do the secondary dependencies inherit scope from the primary 
> >> dependency or do they sneak in?  I'd prefer not to 
> explicitly do any 
> >> of this for secondaries.
> >>
> >> thanks
> >> --
> >> View this message in context:
> >> 
> http://www.nabble.com/Primary-and-secondary-dependencies-tp24647841p2
> >> 4647841.html Sent from the Maven - Users mailing list archive at 
> >> Nabble.com.
> >>
> >>
> >> 
> -
> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>
> >>
> > 
> > 
> > --
> > - juven
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/Primary-and-secondary-dependencies-tp246
47841p24647985.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: Maven Source Plugin config to include generated-sources?

2009-08-08 Thread Jonathan Woods
Maybe it doesn't work because the sources plugin is bound to some phase
earlier than generate-sources - I haven't checked.

Jon 

> -Original Message-
> From: David Hoffer [mailto:dhoff...@gmail.com] 
> Sent: 07 August 2009 06:07
> To: Maven Users List
> Subject: Re: Maven Source Plugin config to include generated-sources?
> 
> That does sound good.  I found a workaround by adding the 
> generated-sources folder as a resource, then the source 
> plugin picked these up.  But feels like a hack.  I never like 
> to use non standard approaches because you never know when 
> they will come back to bite you. :)
> 
> IMHO, it seems the sources plugin should be handling these 
> configuration tasks.
> 
> 
> 
> 
> ${basedir}/target/generated-sources
> true
> 
> 
> 
> I'll checkout the plugin you mentioned.
> 
> -Dave
> 
> 
> 
> On Thu, Aug 6, 2009 at 10:55 PM, Markku Saarela 
> wrote:
> 
> > Hi,
> >
> > Try build-helper plugin for adding this 
> target/geratated-sources directory.
> >
> > 
> http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.htm
> > l
> >
> > rgds,
> >
> > Markku
> >
> >
> > David Hoffer wrote:
> >
> >> As far as I can tell this won't work, I think this just includes 
> >> excludes files that are already in the right/included folders.
> >>
> >> I need a way to add the files in 
> ${basedir}/target/generated-sources 
> >> to jar of sources that it creates.
> >>
> >> Does anyone know how to do this?
> >>
> >> -Dave
> >>
> >>
> >> On Thu, Aug 6, 2009 at 7:05 PM, David Hoffer 
>  wrote:
> >>
> >>
> >>
> >>> Any idea what the format of path1 & path2 are?
> >>>
> >>> I have tried:
> >>>
> >>> 
> >>>
> >>> ${basedir}/src/main/java/**
> >>>
> >>> ${basedir}/target/generated-sources/**
> >>>
> >>>
> >>> And
> >>>
> >>> 
> >>>${basedir}/src/main/java
> >>>
> >>> ${basedir}/target/generated-sources
> >>> 
> >>>
> >>> Always says no files have been included so it errors out.
> >>>
> >>> -Dave
> >>>
> >>>
> >>> On Thu, Aug 6, 2009 at 3:57 PM, Benson Margulies 
> >>>  >>> >wrote:
> >>>
> >>>
> >>>
>  
>   path1
>   path2
>  
> 
>  On Thu, Aug 6, 2009 at 5:14 PM, David 
> Hoffer wrote:
> 
> 
> > Here is the error.
> >
> > Cause: Cannot assign configuration entry 'includes' to 'class 
> > [Ljava.lang.String ;' from
> >
> > 
> 'C:\iss_svn\CDF\trunk\cdf-webtas/src/main/java/**/*.java,C:\iss_sv
> > n\CDF\ 
> trunk\cdf-webtas/target/generated-sources/**/*.java', which 
> > is of type
> >
> >
>  class
> 
> 
> > jav
> > a.lang.String
> >
> > -Dave
> >
> > On Thu, Aug 6, 2009 at 3:12 PM, David Hoffer 
> 
> >
> >
>  wrote:
> 
> 
> > Perhaps I don't understand the format of this, I tried the 
> > following
> >>
> >>
> > and
> 
> 
> > get an error:
> >>
> >> 
> >>
> >>
> >>
> >>
> >
>  
> ${basedir}/src/main/java/**/*.java,${basedir}/target/gene
>  rated-sources/**/*.java
> 
> 
> > 
> >>
> >> -Dave
> >>
> >>
> >> On Thu, Aug 6, 2009 at 2:45 PM, Alexander 
> 
> >>
> >>
> > wrote:
> 
> 
> > Wont help you *includes *goal?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
>  
> http://maven.apache.org/plugins/maven-source-plugin/aggregate-mojo.
>  html#includes
> 
> 
> > 2009/8/7 David Hoffer 
> >>>
> >>>
> >>>
>  How can I configure the Maven Source Plugin to 
> include source 
>  files
> 
> 
> >>> in
> 
> 
> > the
> >>>
> >>>
>  /target/generated-sources folder?  I would assume it 
> would do 
>  this
> 
> 
> >>> by
> 
> 
> > default but I don't even see a way to configure this.  It always
> 
> 
> >>> ignores
> 
> 
> > additional source here.  Can somebody help me?
> 
>  -Dave
> 
> 
> 
> >>>
> >>> --
> >>> Regards,
> >>> Alexander
> >>>
> >>>
> >>>
> >>
> >>
> > 
> --
> > ---
>  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>  For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 
> 
> >>>
> >>
> >>
> >
> >
> > 
> -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
> 


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



RE: Profile Activation Help?

2009-08-10 Thread Jonathan Woods
${project.artifactId} might help.

Jon 

> -Original Message-
> From: David C. Hicks [mailto:dhi...@i-hicks.org] 
> Sent: 10 August 2009 18:12
> To: Maven Users
> Subject: Profile Activation Help?
> 
> I'm trying to get a profile to activate for my parent project 
> but not for the children.  Unfortunately, the children 
> inherit from the parent to get dependency information.  So, 
> they also inherit everything else. 
> My solution (or so I thought) was to use the 
> project.artifactId property in my activation section...
> 
> 
> false
> 
> project.artifactId
> salient
> 
> 
> 
> Since only the parent project has this artifact Id, I assumed 
> that it would activate only for the parent.  However, there 
> was no activation of this profile at all.
> 
> My overall goal is to try to get the maven-changes-plugin to 
> do an announcement email using changes.xml in the parent 
> project.  I do not want announcements for all of the children, though.
> 
> Any help?
> Thanks,
> Dave
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: FATAL ERROR: Unable to read settings.xml

2009-08-11 Thread Jonathan Woods
Slightly lame suggestion, but... have you tried a different JVM, not
forgetting to set JAVA_HOME?  From your stack trace it's a JVM error, and
nothing to do with settings.xml files.

> -Original Message-
> From: RFatton [mailto:conorg...@hotmail.com] 
> Sent: 11 August 2009 14:00
> To: users@maven.apache.org
> Subject: FATAL ERROR: Unable to read settings.xml
> 
> 
> Hi all, 
> 
> New to maven, having trouble getting it working.
> 
> I'm using ubuntu and ran "sudo apt-get install maven2" for install.
> 
> Also added M2_HOME=/usr/share/maven2, export M2=$M2_HOME/bin, 
> export PATH=$M2:$PATH to enviroment.
> 
> When I run mvn -version I get:
> 
> Maven version: 2.0.9
> Java version: 1.5.0
> OS name: "linux" version: "2.6.24-23-xen" arch: "x86_64" 
> Family: "unix"
> 
> But when I try to do anything with mvn I get an error (full 
> error below) saying Unable to read settings.xml.
> 
> I've found the setting.xml at /etc/maven2/settings.xml 
> (/usr/share/maven2/conf is linked to this file location) so 
> tried "mvn -s /etc/maven2/settings.xml" and "mvn -s 
> /usr/share/maven2/conf/settings.xml"
> resulting in the sam error.
> 
> Tried copying settings.xml to ~/.m2, same error.
> 
> Same error when i tried very smiple settings.xml file with:
> 
> 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/xsd/settings-1.0.0.xsd";>
>   
>
>   true
>   http
>   MYPROXY
>   8080
> 
>   
> 
> 
> 
> and 
> 
> 
>   
>
>   true
>   http
>   MYPROXY
>   8080
> 
>   
> 
> 
> 
> 
> Does this error mean that maven can't find the settings.xml 
> file? (if so how do I fix it)
> 
> How do I know which settings.xml file is being used, system or user?
> 
> Do I need to edit settings.xml from it's default at the 
> beginning? If so wouldn't one of the simple versions I hev work?
> 
> Thanks for help,
> 
> 
> 
> 
> ERROR:
> 
> When I try "mvn -e package":
> 
> + Error stacktraces are turned on.
> -
> this realm = plexus.core
> urls[0] = file:/usr/share/maven2/lib/jsch.jar
> urls[1] = file:/usr/share/maven2/lib/wagon-provider-api.jar
> urls[2] = file:/usr/share/maven2/lib/wagon-file.jar
> urls[3] = file:/usr/share/maven2/lib/doxia-sink-api.jar
> urls[4] = file:/usr/share/maven2/lib/maven2.jar
> urls[5] = file:/usr/share/maven2/lib/plexus-interactivity-api.jar
> urls[6] = file:/usr/share/maven2/lib/wagon-ssh.jar
> urls[7] = file:/usr/share/maven2/lib/wagon-ssh-external.jar
> urls[8] = file:/usr/share/maven2/lib/xml-apis.jar
> urls[9] = file:/usr/share/maven2/lib/plexus-interpolation.jar
> urls[10] = file:/usr/share/maven2/lib/plexus-container-default.jar
> urls[11] = file:/usr/share/maven2/lib/wagon-ssh-common.jar
> urls[12] = file:/usr/share/maven2/lib/wagon-http-shared.jar
> urls[13] = file:/usr/share/maven2/lib/wagon-http-lightweight.jar
> urls[14] = file:/usr/share/maven2/lib/commons-cli.jar
> urls[15] = file:/usr/share/maven2/lib/plexus-utils.jar
> urls[16] = file:/usr/share/maven2/lib/jtidy.jar
> Number of imports: 0
> -
> FATAL ERROR: Unable to read settings.xml Error stacktrace:
> org.codehaus.plexus.component.repository.exception.ComponentLo
> okupException:
> Unable to lookup component 
> 'org.apache.maven.settings.MavenSettingsBuilder',
> it could not be created
>at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexu
> sContainer.java:335)
>at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
>at org.apache.maven.cli.MavenCli.buildSettings(MavenCli.java:309)
>at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>at java.lang.reflect.Method.invoke(libgcj.so.90)
>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)
> Caused by:
> org.codehaus.plexus.component.factory.ComponentInstantiationEx
> ception: Could not instanciate component: role:
> 'org.apache.maven.settings.MavenSettingsBuilder', implementation:
> 'org.apache.maven.settings.DefaultMavenSettingsBuilder'
>at
> org.codehaus.plexus.component.factory.java.JavaComponentFactor
> y.makeException(JavaComponentFactory.java:77)
>at
> org.codehaus.plexus.component.factory.java.JavaComponentFactor
> y.newInstance(JavaComponentFactory.java:62)
>at
> org.codehaus.plexus.DefaultPlexusContainer.createComponentInst
> ance(DefaultPlexusContainer.java:1464)
>at
> org.codehaus.plexus.component.manager.AbstractComponentManager
> .createComponentInstance(AbstractComponentManager.java:93)
>at
> org.codehaus.plexus.component.manager.ClassicSingletonComponen
> tManager.getComponent(Classi

RE: speedier builds possible?

2009-08-12 Thread Jonathan Woods
Couple of simple ideas: not 'clean'ing unless you need to; and skipping
tests when it's safe to do so:

mvn Dmaven.test.skip=true (or -DskipTests=true)

> -Original Message-
> From: Roger Pack [mailto:rogerdpa...@gmail.com] 
> Sent: 12 August 2009 18:17
> To: users@maven.apache.org
> Subject: speedier builds possible?
> 
> Hi. I was wondering if there are any industry standard ways 
> of speeding up a maven build, like in a project with a single 
> parent and multiple children modules
> 
> "only building dependencies that have changed since the last 
> svn commit"
> or
> "building things in parallel where possible"
> Or anything else.
> Anybody know of much on that topic?
> Thanks!
> -r
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



RE: Tests Not Running After Executing SQL Script

2009-09-03 Thread Jonathan Woods
Sounds like Ant is running the script then System.exit(0)-ing!  Can't see
why.  But you could try the Maven SQL plugin instead.

Jon

> -Original Message-
> From: Neil Chaudhuri [mailto:nchaudh...@potomacfusion.com] 
> Sent: 02 September 2009 20:12
> To: users@maven.apache.org
> Subject: Tests Not Running After Executing SQL Script
> 
> I am using Surefire and Failsafe to perform unit testing and 
> integration testing respectively. In the latter case, I want 
> to run a sql script in the pre-integration-test phase to put 
> the database into a known state (not using DBUnit but the 
> same idea). Here is what I have in my pom:
> 
> 
> 
> maven-antrun-plugin
> 
> 
> pre-integration-test
> 
> 
>   url="${db.url}"
>  userid="id"
>  password="pwd"
>  src="${sql.dir}/script.sql">
> 
>  location="${user.home}/.m2/repository/com/oracle/jdbc/ojdbc6/1
> 1.1.0.7.0/ojdbc6-11.1.0.7.0.jar"/>
> 
> 
> 
> 
> 
> run
> 
> 
> 
> 
> 
> org.codehaus.mojo
> failsafe-maven-plugin
> 2.4.3-alpha-1
> 
> 
> 
> integration-test
> verify
> 
> 
> 
> 
> 
> The problem is that when I run verify, I get the following:
> 
> [sql] Executing resource: C:\myapp\sql\script.sql Process 
> finished with exit code 0
> 
> In other words, the script executes just fine, but then 
> nothing else happen--namely, the tests don't run.
> 
> Any insight into what I need to tweak to get my tests to run 
> after the script executes is much appreciated.
> 
> Thanks.
> 
> 


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