Re: How to call ant task from maven - can not find a good example

2009-04-10 Thread CheapLisa

thanks, I'm still lost.  This section did not make much sense to me.



David M. Karr wrote:
> 
> CheapLisa wrote:
>> I want to call some ant tasks when I run maven.
>> 
>> I have read all about the maven antrun plugin and found some
>> examples, but the documentation is a wee bit hard
>> for me to understand, and does not lead me to what I wish to accomplish.
>> 
>> I want all my ant tasks in a build.xml file (not in the pom.xml).
>> 
>> But when I execute:  mvn compile install
>> 
>> I want it to run (by default) one or more ant tasks 
>> (in a specific order) that are in the build.xml.
>> 
>> Is there a way to do this?  When I type $mvn compile install I want
>> the build process to be oblivous to the fact that ant is being called,
>> unless there is a problem.
>> 
>> If the ant tasks fails, I want to fail the build as well.
>> 
>> thanks
> 
> I would assume the following is a good example of this kind of thing: 
> <http://www.sonatype.com/books/maven-book/reference/lifecycle.html>.
> 
> You would use the "compile" phase instead of "pre-clean", and the inline 
> task configuration would just use an "ant" task to call a target in your 
> buildfile.
> 
> I don't know whether a failure in the Ant script will cause a top-level 
> build failure.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-call-ant-task-from-maven---can-not-find-a-good-example-tp22992996p22997778.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



How to call ant task from maven - can not find a good example

2009-04-10 Thread CheapLisa

I want to call some ant tasks when I run maven.

I have read all about the maven antrun plugin and found some
examples, but the documentation is a wee bit hard
for me to understand, and does not lead me to what I wish to accomplish.

I want all my ant tasks in a build.xml file (not in the pom.xml).

But when I execute:  mvn compile install

I want it to run (by default) one or more ant tasks 
(in a specific order) that are in the build.xml.

Is there a way to do this?  When I type $mvn compile install I want
the build process to be oblivous to the fact that ant is being called,
unless there is a problem.

If the ant tasks fails, I want to fail the build as well.

thanks
-- 
View this message in context: 
http://www.nabble.com/How-to-call-ant-task-from-maven---can-not-find-a-good-example-tp22992996p22992996.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



Re: Problems with maven building a "super jar"

2009-01-04 Thread CheapLisa

What I want to do is to include all jars from all modules/sub-modules that
are built from the top level when I do "mvn compile install".

in the top level C:\projects\\pom.xml 

there is no /src/main/java directory to build.  It is a top level
project/container only for submodules and the packaging in the top level
pom.xml is simply "pom".

How do I build a super jar containing all jars that were built as a result
of having a  line in a pom (or sub module pom), and have all
dependencies that that jar needs (downloaded to .m2/repository/ )
be included in a super jar?

thanks

I get this error:
 [INFO] Failed to create assembly: Error creating assembly archive superjar:
You must set at least on
e file.

--- This is my assembly.xml (I'm not sure exactly what everything here does
- got it from an example online)



  superjar
  true

  

true


${module.artifactId}-${module.version}







  
  
jar
  




-- 
View this message in context: 
http://www.nabble.com/Problems-with-maven-building-a-%22super-jar%22-tp21278586p21279575.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



Re: Problems with maven building a "super jar"

2009-01-04 Thread CheapLisa

thanks, I went over those, but nothing is being built.

I think the problem is that my top level project has no /src/main/java
directory.  In fact there is no /src/ directory at all meaning the pom.xml
(parent pom) of all sub modules has no dependencies.

It just has many modules which have sub modules.  The assembly plugin just
includes unpacked jars of dependencies but since there are no dependencies,
nothing is included in the jar.

How do I tell the assembly plugin to include all jars of submodules ? (the
top level project is just a container for sub-modules).  

I think most projects are like this so there must be a way.

LM



Baptiste MATHUS-4 wrote:
> 
> Lisa, I see you have learnt some good practice from your recent experience
> :
> no hello, no thanks. So far, so good :-/.
> 
> About having jars inside your jar, I suppose you want the other jars not
> to
> be unpacked. I asume you're familiar with the fact that having jars inside
> your jar isn't standard and just won't work by default.
> 
> Reading this
> http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencieswill
> show you why everything is unpacked (that's the default), but you
> surelyy already read this twice.
> 
> Maybe also have a look here:
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html.
> From what you describe, it might be what you need.
> 
> Cheers
> 
> 2009/1/4 CheapLisa 
> 
>>
>> I have a project directory like:
>>C:\home\projects\
>>
>> In  there is \pom.xml
>>
>> This pom is a top level pom (for many modules and those modules have
>> sub-modules)
>> and the packageing is set to "pom".
>>
>> What I want is to build one super jar that includes all jars in my
>> project
>> and all jars that were downloaded as dependencies (and dependencies of
>> dependencies).
>>
>> How do I do this?
>>
>> I included in my top level pom in the build section the maven-assembly
>> plugin
>> but that just created a jar with some apache classes and did not include
>> my
>> jars (my modules) or any dependencies (like Spring, Log4J, etc).
>>
>> This is the  section of my top level pom.xml
>> (pom
>>
>>
>>
>>
>>maven-compiler-plugin
>>
>>1.6
>>1.6
>>true
>>true
>>
>>
>>
>>
>>
>>
>>
>> 
>>maven-assembly-plugin
>>
>>
>>package
>>
>>assembly
>>
>>
>>
>>
>>
>>
>> jar-with-dependencies
>>
>>
>>
>>
>>
> 
> -- 
> Baptiste  MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-maven-building-a-%22super-jar%22-tp21278586p21279021.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



Problems with maven building a "super jar"

2009-01-04 Thread CheapLisa

I have a project directory like:
C:\home\projects\

In  there is \pom.xml

This pom is a top level pom (for many modules and those modules have
sub-modules)
and the packageing is set to "pom".

What I want is to build one super jar that includes all jars in my project
and all jars that were downloaded as dependencies (and dependencies of
dependencies).

How do I do this?

I included in my top level pom in the build section the maven-assembly
plugin
but that just created a jar with some apache classes and did not include my
jars (my modules) or any dependencies (like Spring, Log4J, etc).

This is the  section of my top level pom.xml
(pom




maven-compiler-plugin

1.6
1.6
true
true







 
maven-assembly-plugin


package

assembly





   
jar-with-dependencies





-- 
View this message in context: 
http://www.nabble.com/Problems-with-maven-building-a-%22super-jar%22-tp21278586p21278586.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



Re: How do I build one jar per class file controlling the name of the jar?

2008-12-17 Thread CheapLisa


Yes, I posted that I needed to create individual jar files for each class in
my posting for help so my question is , How do I create individual jar files
for each class?  If you have any ideas, and have an example, please let me
know.

In my original posting I ask for help with creating individual jar modules
for each .java file so what I am looking for is a way to create individual
jar modules for each .java file so if you have any ideas on how to create an
individual jar module for each .java file it would be appreciated because so
far I have not found a way to create an individual jar module for each .java
file when all .java files are in the same directory so if you have any
ideas, please let me know.  I  suppose that I need to create an individual
jar module for each .java file, what do you think?

Also in my original posting, I do not believe I stated the need to group
them together.  I need the separate unless I am mistaken.

thanks

L



Mick Knutson-4 wrote:
> 
> You need to create individual jar modules for each class, then use the
> assembly plugin to group them together.
> 
> ---
> Thank You…
> 
> Mick Knutson, President
> 
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
> 
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
> 
> 
> 
> On Tue, Dec 16, 2008 at 3:54 PM, CheapLisa  wrote:
> 
>>
>> I am using an open source product that requires a jar to be built for
>> every
>> single .java
>> file.
>>
>> The java files are all in the same directory like so:
>>src/main/java/com/acme/product/Name1.java
>>src/main/java/com/acme/product/Name2.java
>>src/main/java/com/acme/product/Name3.java
>>
>> What I need to build are 3 jar files with only one class in each
>> and have the name of each jar file be the same as the Java class
>> name so like:
>>Name1.jar
>>Name2.jar
>>Name3.jar
>>
>> and then I need to copy these files to a specific directory.
>>
>> Is there a way to do this with maven?  ( examples please !!!)
>> --
>> View this message in context:
>> http://www.nabble.com/How-do-I-build-one-jar-per-class-file-controlling-the-name-of-the-jar--tp21044507p21044507.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
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-build-one-jar-per-class-file-controlling-the-name-of-the-jar--tp21044507p21058176.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



How do I build one jar per class file controlling the name of the jar?

2008-12-16 Thread CheapLisa

I am using an open source product that requires a jar to be built for every
single .java
file.

The java files are all in the same directory like so:
src/main/java/com/acme/product/Name1.java
src/main/java/com/acme/product/Name2.java
src/main/java/com/acme/product/Name3.java

What I need to build are 3 jar files with only one class in each
and have the name of each jar file be the same as the Java class
name so like:
Name1.jar
Name2.jar
Name3.jar

and then I need to copy these files to a specific directory.

Is there a way to do this with maven?  ( examples please !!!)
-- 
View this message in context: 
http://www.nabble.com/How-do-I-build-one-jar-per-class-file-controlling-the-name-of-the-jar--tp21044507p21044507.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



RE: Is Maven / JUnit 4.x broken (annotations)

2008-12-12 Thread CheapLisa

What does group-a and artifact-a refer to?

so I have to do this in every pom in every sub-module?  Is there anything I
can do in the top level pom that will take care of the whole project?

What you are saying is that the surefire plugin is not JUnit4 enabled?

thanks

CL



mgainty wrote:
> 
> 
> place the groupId/artifactId/version in the dependencies in
> dependencyManagement Section of the parent pom
> 
>   ...
>   
> 
>   
> group-a
> artifact-a
> 1.0
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> 
> hth
> 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. 
> 
> 
> 
> 
>> Date: Wed, 10 Dec 2008 12:44:45 -0800
>> From: l...@purpleblade.net
>> To: users@maven.apache.org
>> Subject: Re: Is Maven / JUnit 4.x broken (annotations)
>> 
>> 
>> I looked at my effective pom.  I have a dependency there on JUnit 4.5.
>> The only reference to surefire was maven-surefire-reports-plugin in the
>> reporting section.
>> 
>> how do I know that surefire is using my dependency of JUnit 4.5?  Is
>> maven
>> bundled with another version of JUnit and using an earlier version that
>> I'm
>> not aware of?
>> 
>> How do I force the surefire plugin to use JUnit 4.5?
>> 
>> thanks
>> 
>> L
>> 
>> 
>> 
>> John Stoneham wrote:
>> > 
>> >>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa 
>> >>> wrote:
>> >>>> I have JUnit 4.5 as a dependency in my maven pom
>> >>>> and I have imported annotations into my test case but
>> >>>> it is not recognizing the @Test and @Ignore annotations.
>> >>>>
>> >>>> I still have to preface the method name with "test"
>> >>>> and the @Ignore tests get executed.
>> >>>>
>> >>>> Is something broken?  What do I need to do to get this
>> >>>> to work like expected and to take advantage of JUnit 4.x
>> >>>> which has over a year of release now.
>> > 
>> > Hm. Last time this happened to me it was because I was trying to
>> > repackage JUnit with a bunch of other things, and it turned out
>> > surefire was inspecting my POM to look for a junit:junit dependency,
>> > then pulling the version off that to determine whether to look for
>> > JUnit 4 tests.
>> > 
>> > Sounds to me like surefire thinks your JUnit dependency is version 3.
>> > We've got JUnit 4.4 configured here and it runs both 3- and 4-style
>> > tests properly.
>> > 
>> > Is it possible to post the output of mvn help:effective-pom here?
>> > 
>> > - John
>> > 
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: users-h...@maven.apache.org
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943444.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
>> 
> 
> _
> Send e-mail faster without improving your typing skills.
> http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20987238.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



Re: Is Maven / JUnit 4.x broken (annotations)

2008-12-12 Thread CheapLisa

I did this.  and if you do it, you will see no reference to surefire other
than surefire in the reporting section.

thanks


cl



Josh Suereth wrote:
> 
> Also to follow that up,
> 
> Although you didn't specify the maven-surefire-plugin, your build file has
> inherited it from the ethereal "maven super pom".
> 
> Type mvn help:effective-pom to see what your pom *really* looks like, so
> you
> can get an idea of how/what to configure for surefire.
> 
> On Thu, Dec 11, 2008 at 7:46 PM, Josh Suereth
> wrote:
> 
>> Lisa,
>>
>>
>> The answer is that although Junit4 might support finding the @Test
>> annotations, the maven surefire plugin (being backwards compatable, AND a
>> completely different tool) looks for Test* *Test and *TestSuite.   You
>> need
>> to configure the maven-surefire-plugin (This is the part of maven that
>> calls
>> into junit) for junit4 conventions, or you won't get your desired
>> behavior.
>>
>> -Josh
>>
>>
>> On Thu, Dec 11, 2008 at 6:39 PM, CheapLisa  wrote:
>>
>>>
>>> I do not believe this has anything to do with it and I don't understand
>>> what
>>> you are saying.
>>>
>>> L
>>>
>>>
>>>
>>> mgainty wrote:
>>> >
>>> >
>>> > place the groupId/artifactId/version in the dependencies in
>>> > dependencyManagement Section of the parent pom
>>> > 
>>> >   ...
>>> >   
>>> > 
>>> >   
>>> > group-a
>>> > artifact-a
>>> > 1.0
>>> >
>>> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>>> >
>>> > hth
>>> > 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.
>>> >
>>> >
>>> >
>>> >
>>> >> Date: Wed, 10 Dec 2008 12:44:45 -0800
>>> >> From: l...@purpleblade.net
>>> >> To: users@maven.apache.org
>>> >> Subject: Re: Is Maven / JUnit 4.x broken (annotations)
>>> >>
>>> >>
>>> >> I looked at my effective pom.  I have a dependency there on JUnit
>>> 4.5.
>>> >> The only reference to surefire was maven-surefire-reports-plugin in
>>> the
>>> >> reporting section.
>>> >>
>>> >> how do I know that surefire is using my dependency of JUnit 4.5?  Is
>>> >> maven
>>> >> bundled with another version of JUnit and using an earlier version
>>> that
>>> >> I'm
>>> >> not aware of?
>>> >>
>>> >> How do I force the surefire plugin to use JUnit 4.5?
>>> >>
>>> >> thanks
>>> >>
>>> >> L
>>> >>
>>> >>
>>> >>
>>> >> John Stoneham wrote:
>>> >> >
>>> >> >>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa
>>> 
>>> >> >>> wrote:
>>> >> >>>> I have JUnit 4.5 as a dependency in my maven pom
>>> >> >>>> and I have imported annotations into my test case but
>>> >> >>>> it is not recognizing the @Test and @Ignore annotations.
>>> >> >>>>
>>> >> >>>> I still have to preface the method name with "test"
>>> >> >>>> and the @Ignore tests get executed.
>>> >> >>>>
>>> >> >>>> Is something broken?  What do I need to do to get this
>>> >> >>>> to work like expected and to take advantage of JUnit 4.x
>>> >> >>>> which has over a year of release now.
>>> >> >
>>> >> > Hm. Last time this happened to me it was because I was trying to
>>> >> > repackage JUnit with a bunch of other things, and it turned out
>>> >> > surefire was inspecting my POM to look for a junit:junit
>>> depe

Re: How to have a single log4j.xml file in a multi-module project?

2008-12-12 Thread CheapLisa

OK, when I do this I get a cyclic reference and it does not work.

I have:
/pom.xml  <= this is referred to as my "parent 
pom"

and I have a sub-module for logging (has only the
/src/main/resources/log4j.xml
/utils/logging/pom.xml
/utils/logging/src/main/resources/log4j.xml

In the utils/logging/pom.xml I have this included
  
  log4j
  log4j
  1.2.15
  compile
  
  
so to use in every other project, I put in the top level (parent pom) 
this
dependency on
the logging sub-module:



com.acme
logging
1.0
compile




and I do not touch any other module anywhere because in every pom
everywhere I have
the following reference to the parent pom:


com.acme
acme.parent-pom
1.0


so the parent pom dependency is logging-1.0.jar but the first thing it tries
to compile also has
that dependency.


---
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] The projects in the reactor contain a cyclic reference: Edge between
'Vertex{label='com.avoce
nt.amp.patch:utils.logging'}' and
'Vertex{label='com.acme.patch:utils.logging'}' introduces t
o cycle in the graph com.acme:utils.logging --> com.acme.patch:utils.logging
[INFO]

[INFO] Trace
org.apache.maven.BuildFailureException: The projects in the reactor contain
a cyclic reference: Edge
 between 'Vertex{label='com.acme.patch:utils.logging'}' and
'Vertex{label='com.acme:utils.logging'}' introduces to cycle in the graph
com.acmepatch:utils.logging --> com.av
ocent.amp.patch:utils.logging
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:310)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)



Stephen Connolly-2 wrote:
> 
> In theory, yes, though I have not tried it myself
> 
> 2008/12/11 CheapLisa 
> 
>>
>> so I could make a module for it say logging/pom.xml and then put a
>>  to it in a parent pom that all sub-modules have as a
>> parent-pom
>> and this would work?
>>
>> thanks
>>
>> L
>>
>>
>>
>> Stephen Connolly-2 wrote:
>> >
>> > put it in a jar file (make a module just for it) and add that module
>> > as a dependency to all the projects that need it
>> >
>> > Sent from my iPod
>> >
>> > On 10 Dec 2008, at 20:35, CheapLisa  wrote:
>> >
>> >>
>> >>
>> >> I have a project with many modules (over 30) and some are nested 2-3
>> >> deep.
>> >>
>> >> With Maven / Log4J I have to put two log4j.xml files in every module:
>> >>src/main/resources/log4j.xml
>> >>src/test/resources/log4j.xml
>> >>
>> >>This is usually the same file over and over again.
>> >>
>> >>1)
>> >>How can I have one single log4j.xml file for all tests
>> >> (src/test/resources/) and one log4j.xml file for
>> >>all code (/src/main/resources/)
>> >>
>> >>2)
>> >>How can I have one single log4j.xml file for all modules in the
>> >> project?
>> >>
>> >>thanks
>> >>
>> >>L
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-have-a-single-log4j.xml-file-in-a-multi-module-project--tp20943438p20943438.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
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-have-a-single-log4j.xml-file-in-a-multi-module-project--tp20943438p20964994.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
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-have-a-single-log4j.xml-file-in-a-multi-module-project--tp20943438p20987209.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



Re: How to mkdir and move files as part of build

2008-12-12 Thread CheapLisa

yea, I already googled.  I already to that before posting.  Nothing came up. 
What does "modicum" mean?

thanks



Wayne Fay wrote:
> 
>> Somebody made me discover that recently: http://tinyurl.com/62f6ku ...
>>
>> No offense, week-end is coming :-).
>> Cheers
> 
> So long as "CheapLisa" continues sending emails like this without
> doing even a modicum of her own reading/research, I think she's going
> to have to accept an increasingly less than polite tone in the
> responses. Especially on a Friday afternoon. ;-)
> 
> This list is pretty tolerant and largely flame-free, but we respond
> much better to people who have done their homework (and Googling)
> before asking questions that are very clearly answered with 5 minutes
> of self-help before asking someone in the community to do their
> work/searching for them...
> 
> Wayne
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-mkdir-and-move-files-as-part-of-build-tp20983063p20987174.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



Re: How to mkdir and move files as part of build

2008-12-12 Thread CheapLisa

great.  Do you remember the name of the plugin and have an example?

thanks

L


Wei Tan wrote:
> 
> there is a maven plug-in that can run ant tasks, I remember
> 
> 
> 
> On Fri, Dec 12, 2008 at 2:25 PM, CheapLisa  wrote:
> 
>>
>> Before the build takes place, I need to create a directory
>> /target/
>> and then copy some files from /src/main/resources/* to there.
>>
>> How do I do this with maven?
>>
>> thanks
>>
>> cl
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-mkdir-and-move-files-as-part-of-build-tp20983063p20983063.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
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-mkdir-and-move-files-as-part-of-build-tp20983063p20983705.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



Re: How to mkdir and move files as part of build

2008-12-12 Thread CheapLisa

great.  I will try it.  Will it automatically create the directory if the
destination dir does not exist?
If now how do I make it create the directory?

thanks

L

Olivier Lamy wrote:
> 
> Hi,
> The sample here [1] should help.
> 
> --
> Olivier
> [1]
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html
> 
> 2008/12/12 CheapLisa :
>>
>> Before the build takes place, I need to create a directory
>> /target/
>> and then copy some files from /src/main/resources/* to there.
>>
>> How do I do this with maven?
>>
>> thanks
>>
>> cl
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-mkdir-and-move-files-as-part-of-build-tp20983063p20983063.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-mkdir-and-move-files-as-part-of-build-tp20983063p20983685.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



How to mkdir and move files as part of build

2008-12-12 Thread CheapLisa

Before the build takes place, I need to create a directory /target/
and then copy some files from /src/main/resources/* to there.

How do I do this with maven?

thanks

cl
-- 
View this message in context: 
http://www.nabble.com/How-to-mkdir-and-move-files-as-part-of-build-tp20983063p20983063.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



Re: How to have a single log4j.xml file in a multi-module project?

2008-12-11 Thread CheapLisa

so I could make a module for it say logging/pom.xml and then put a
 to it in a parent pom that all sub-modules have as a parent-pom
and this would work?

thanks

L



Stephen Connolly-2 wrote:
> 
> put it in a jar file (make a module just for it) and add that module  
> as a dependency to all the projects that need it
> 
> Sent from my iPod
> 
> On 10 Dec 2008, at 20:35, CheapLisa  wrote:
> 
>>
>>
>> I have a project with many modules (over 30) and some are nested 2-3  
>> deep.
>>
>> With Maven / Log4J I have to put two log4j.xml files in every module:
>>src/main/resources/log4j.xml
>>src/test/resources/log4j.xml
>>
>>This is usually the same file over and over again.
>>
>>1)
>>How can I have one single log4j.xml file for all tests
>> (src/test/resources/) and one log4j.xml file for
>>all code (/src/main/resources/)
>>
>>2)
>>How can I have one single log4j.xml file for all modules in the  
>> project?
>>
>>thanks
>>
>>L
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-to-have-a-single-log4j.xml-file-in-a-multi-module-project--tp20943438p20943438.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-have-a-single-log4j.xml-file-in-a-multi-module-project--tp20943438p20964994.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



RE: Is Maven / JUnit 4.x broken (annotations)

2008-12-11 Thread CheapLisa

I do not believe this has anything to do with it and I don't understand what
you are saying.

L



mgainty wrote:
> 
> 
> place the groupId/artifactId/version in the dependencies in
> dependencyManagement Section of the parent pom
> 
>   ...
>   
> 
>   
> group-a
> artifact-a
> 1.0
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> 
> hth
> 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. 
> 
> 
> 
> 
>> Date: Wed, 10 Dec 2008 12:44:45 -0800
>> From: l...@purpleblade.net
>> To: users@maven.apache.org
>> Subject: Re: Is Maven / JUnit 4.x broken (annotations)
>> 
>> 
>> I looked at my effective pom.  I have a dependency there on JUnit 4.5.
>> The only reference to surefire was maven-surefire-reports-plugin in the
>> reporting section.
>> 
>> how do I know that surefire is using my dependency of JUnit 4.5?  Is
>> maven
>> bundled with another version of JUnit and using an earlier version that
>> I'm
>> not aware of?
>> 
>> How do I force the surefire plugin to use JUnit 4.5?
>> 
>> thanks
>> 
>> L
>> 
>> 
>> 
>> John Stoneham wrote:
>> > 
>> >>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa 
>> >>> wrote:
>> >>>> I have JUnit 4.5 as a dependency in my maven pom
>> >>>> and I have imported annotations into my test case but
>> >>>> it is not recognizing the @Test and @Ignore annotations.
>> >>>>
>> >>>> I still have to preface the method name with "test"
>> >>>> and the @Ignore tests get executed.
>> >>>>
>> >>>> Is something broken?  What do I need to do to get this
>> >>>> to work like expected and to take advantage of JUnit 4.x
>> >>>> which has over a year of release now.
>> > 
>> > Hm. Last time this happened to me it was because I was trying to
>> > repackage JUnit with a bunch of other things, and it turned out
>> > surefire was inspecting my POM to look for a junit:junit dependency,
>> > then pulling the version off that to determine whether to look for
>> > JUnit 4 tests.
>> > 
>> > Sounds to me like surefire thinks your JUnit dependency is version 3.
>> > We've got JUnit 4.4 configured here and it runs both 3- and 4-style
>> > tests properly.
>> > 
>> > Is it possible to post the output of mvn help:effective-pom here?
>> > 
>> > - John
>> > 
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: users-h...@maven.apache.org
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943444.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
>> 
> 
> _
> Send e-mail faster without improving your typing skills.
> http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20964992.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



maven plugin problem (can not solve after many tries)

2008-12-11 Thread CheapLisa



I am getting this error message:

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin
'org.apache.maven.plugins:maven-i
zpack-plugin' does not exist or no valid version could be found
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor

---
this is my pom.xml that includes the maven plugin - any ideas?  Everything
looks correct to me.

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.acme
izpack.parent-pom
1.0


com.acme
izpack-maven-plugin
2.1.0
Amp Patch (izpack)
pom
  




org.izpack
izpack
4.1.1

true

  
 
 
  
package
  
  



org.apache.maven.plugins
maven-antrun-plugin
1.3











create-staging-area
process-resources


run








  org.codehaus.izpack
  izpack-maven-plugin
  1.0-alpha-4

  
  
${staging.dir}
  
  
  

  standard-installer
  package
  
izpack
  




  









${project.build.directory}/staging




-- 
View this message in context: 
http://www.nabble.com/maven-plugin-problem-%28can-not-solve-after-many-tries%29-tp20964990p20964990.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



Re: How to run JUnit tests in sub-modules without surefire reference?

2008-12-10 Thread CheapLisa

thanks, what is the difference between dependency and dependencyManagement?

thanks

L



Stephen Connolly-2 wrote:
> 
> You could add junit as a test  to your parent pom... that is a
> dependency not dependencyManagement
> 
> Might cause more problems than it fixes though!
> 
> -Stephen
> 
> 2008/12/10 CheapLisa <[EMAIL PROTECTED]>
> 
>>
>> thanks, so there is absolutely no way to rid every single pom.xml with
>> some
>> reference to junit for example?
>>
>> Lisa
>>
>>
>>
>> Wayne Fay wrote:
>> >
>> >>I do not want this plugin section in every pom.xml in
>> >> every sub-module
>> >> (some 5 deep)
>> >>How do I do this to make it go?
>> >
>> > Generally, you should configure plugins like this in the
>> >  section in the top parent, and then when you
>> > declare the plugin in each child, it will inherit the configuration
>> > from the parent.
>> >
>> > So the parent has the "big configuration" section in pluginMgmt, and
>> > the children just have:
>> > 
>> >   org.apache.maven.plugins
>> >   maven-surefire-plugin
>> > 
>> >
>> > Of course, surefire is already declared in the super pom, so you
>> > shouldn't even need to include that in the children. Check "mvn
>> > help:effective-pom" in a child once you've added that configuration to
>> > the top parent -- it should show up.
>> >
>> > Wayne
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-run-JUnit-tests-in-sub-modules-without-surefire-reference--tp20924140p20929409.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]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-run-JUnit-tests-in-sub-modules-without-surefire-reference--tp20924140p20943650.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: How to run JUnit tests in sub-modules without surefire reference?

2008-12-10 Thread CheapLisa

I did this and only see a reference to maven-surefire-reports in the
reporting section but not elsewhere.

My objective is to clean up my pom's and not repeat what is not really
needed.  It seams like having a reference to surefire in a build section in
every module pom is tedious to include and maintain.


thanks

L



Wayne Fay wrote:
> 
>> thanks, so there is absolutely no way to rid every single pom.xml with
>> some
>> reference to junit for example?
> 
> I guess I still don't know what your objective is.
> 
> Surefire is in the super pom (in Maven's jars), so *all* poms will
> have a reference to it, directly or inherited. If you make a new
> project with a nearly empty pom and try "mvn help:effective-pom",
> you'll see Surefire in it.
> 
> As for JUnit, Surefire knows how to run JUnit tests, but it doesn't
> explicitly depend on JUnit, so you'll need to include a reference to
> it at least in the top parent's pom files and it should be inherited
> by the children. So no, you don't need to include junit in "every
> single pom.xml".
> 
> I think you need to make some sample projects and play around with
> help:effective-pom to see how it all works, then come back with
> specific questions if you have any.
> 
> Wayne
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-run-JUnit-tests-in-sub-modules-without-surefire-reference--tp20924140p20943614.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: Is Maven / JUnit 4.x broken (annotations)

2008-12-10 Thread CheapLisa

I can get my tests to execute if the class name ends in Test.java and only if
the method begins
with "testSomeMethod".

otherwise the test will not run.  I should be able to name the class
anything I want (not include "Test"), extend TestCase and name the method
anything I want as long as there is an @Test annotation there.

Also I would like to use the @Ignore annotation.

Is Maven broken when it comes to running Junit4 annotations?

thanks


L



Anders Hammar wrote:
> 
> Or "*Test.java", or "*TestCase.java". That's the names surefire is
> configured for by default.
> (http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#includes)
> I would suggest trying it in Eclipse first. If it works there, then there
> is some configuration issue for Maven.
> 
> /Anders
> 
> 
> Josh Suereth wrote:
>> 
>> I believe the name of  the class still matters.  Try calling it
>> "Test*.java"
>> 
>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa <[EMAIL PROTECTED]> wrote:
>> 
>>>
>>> I have JUnit 4.5 as a dependency in my maven pom
>>> and I have imported annotations into my test case but
>>> it is not recognizing the @Test and @Ignore annotations.
>>>
>>> I still have to preface the method name with "test"
>>> and the @Ignore tests get executed.
>>>
>>> Is something broken?  What do I need to do to get this
>>> to work like expected and to take advantage of JUnit 4.x
>>> which has over a year of release now.
>>>
>>>
>>> thanks
>>>
>>> Lisa
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20929389.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]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943507.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: Is Maven / JUnit 4.x broken (annotations)

2008-12-10 Thread CheapLisa

What is the name of your test?

L


Anders Hammar wrote:
> 
> Hi,
> 
> Just tried it and it works for me, both in Eclipse and from command
> prompt.
> How are you executing?
> 
> /Anders
> 
> 
> CheapLisa wrote:
>> 
>> I have JUnit 4.5 as a dependency in my maven pom
>> and I have imported annotations into my test case but
>> it is not recognizing the @Test and @Ignore annotations.
>> 
>> I still have to preface the method name with "test"
>> and the @Ignore tests get executed.
>> 
>> Is something broken?  What do I need to do to get this
>> to work like expected and to take advantage of JUnit 4.x
>> which has over a year of release now.
>> 
>> 
>> thanks
>> 
>> Lisa
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943448.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: Is Maven / JUnit 4.x broken (annotations)

2008-12-10 Thread CheapLisa

What's Eclipse?

Also JUnit4 annotations have  no restrictions on file nameing if annotations
are used.  I simply want
to use the JUnit4 features and not name my files the JUnit 3.x way.

L



Anders Hammar wrote:
> 
> Or "*Test.java", or "*TestCase.java". That's the names surefire is
> configured for by default.
> (http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#includes)
> I would suggest trying it in Eclipse first. If it works there, then there
> is some configuration issue for Maven.
> 
> /Anders
> 
> 
> Josh Suereth wrote:
>> 
>> I believe the name of  the class still matters.  Try calling it
>> "Test*.java"
>> 
>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa <[EMAIL PROTECTED]> wrote:
>> 
>>>
>>> I have JUnit 4.5 as a dependency in my maven pom
>>> and I have imported annotations into my test case but
>>> it is not recognizing the @Test and @Ignore annotations.
>>>
>>> I still have to preface the method name with "test"
>>> and the @Ignore tests get executed.
>>>
>>> Is something broken?  What do I need to do to get this
>>> to work like expected and to take advantage of JUnit 4.x
>>> which has over a year of release now.
>>>
>>>
>>> thanks
>>>
>>> Lisa
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20929389.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]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943447.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: Is Maven / JUnit 4.x broken (annotations)

2008-12-10 Thread CheapLisa

I looked at my effective pom.  I have a dependency there on JUnit 4.5.
The only reference to surefire was maven-surefire-reports-plugin in the
reporting section.

how do I know that surefire is using my dependency of JUnit 4.5?  Is maven
bundled with another version of JUnit and using an earlier version that I'm
not aware of?

How do I force the surefire plugin to use JUnit 4.5?

thanks

L



John Stoneham wrote:
> 
>>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa <[EMAIL PROTECTED]>
>>> wrote:
>>>> I have JUnit 4.5 as a dependency in my maven pom
>>>> and I have imported annotations into my test case but
>>>> it is not recognizing the @Test and @Ignore annotations.
>>>>
>>>> I still have to preface the method name with "test"
>>>> and the @Ignore tests get executed.
>>>>
>>>> Is something broken?  What do I need to do to get this
>>>> to work like expected and to take advantage of JUnit 4.x
>>>> which has over a year of release now.
> 
> Hm. Last time this happened to me it was because I was trying to
> repackage JUnit with a bunch of other things, and it turned out
> surefire was inspecting my POM to look for a junit:junit dependency,
> then pulling the version off that to determine whether to look for
> JUnit 4 tests.
> 
> Sounds to me like surefire thinks your JUnit dependency is version 3.
> We've got JUnit 4.4 configured here and it runs both 3- and 4-style
> tests properly.
> 
> Is it possible to post the output of mvn help:effective-pom here?
> 
> - John
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943444.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: Is Maven / JUnit 4.x broken (annotations)

2008-12-10 Thread CheapLisa

I'm not sure I understand.  I don't have the surefire plugin in any of my
pom's.  It's in the superpom so I can use it from there.

I have a multi-module project.

L



Jörg Schaible-2 wrote:
> 
> CheapLisa wrote at Mittwoch, 10. Dezember 2008 17:16:
> 
>> 
>> I should not have to name it anything but put an annotation there like
>> @Test. This is OK with JUnit 4.x.
> 
> Surefire cannot know which JUnit version you're going to use. So simply
> configure the includes of the surefire plugin to use any java file.
> 
> - Jörg
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943440.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]



How to have a single log4j.xml file in a multi-module project?

2008-12-10 Thread CheapLisa


I have a project with many modules (over 30) and some are nested 2-3 deep.

With Maven / Log4J I have to put two log4j.xml files in every module:
src/main/resources/log4j.xml
src/test/resources/log4j.xml

This is usually the same file over and over again.  

1)
How can I have one single log4j.xml file for all tests
(src/test/resources/) and one log4j.xml file for
all code (/src/main/resources/)

2)
How can I have one single log4j.xml file for all modules in the project?

thanks

L
-- 
View this message in context: 
http://www.nabble.com/How-to-have-a-single-log4j.xml-file-in-a-multi-module-project--tp20943438p20943438.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: Is Maven / JUnit 4.x broken (annotations)

2008-12-10 Thread CheapLisa

I should not have to name it anything but put an annotation there like @Test. 
This is OK with JUnit 4.x.



Josh Suereth wrote:
> 
> I believe the name of  the class still matters.  Try calling it
> "Test*.java"
> 
> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa <[EMAIL PROTECTED]> wrote:
> 
>>
>> I have JUnit 4.5 as a dependency in my maven pom
>> and I have imported annotations into my test case but
>> it is not recognizing the @Test and @Ignore annotations.
>>
>> I still have to preface the method name with "test"
>> and the @Ignore tests get executed.
>>
>> Is something broken?  What do I need to do to get this
>> to work like expected and to take advantage of JUnit 4.x
>> which has over a year of release now.
>>
>>
>> thanks
>>
>> Lisa
>> --
>> View this message in context:
>> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20929389.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]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20937849.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: How to run JUnit tests in sub-modules without surefire reference?

2008-12-09 Thread CheapLisa

thanks, so there is absolutely no way to rid every single pom.xml with some
reference to junit for example?

Lisa



Wayne Fay wrote:
> 
>>I do not want this plugin section in every pom.xml in
>> every sub-module
>> (some 5 deep)
>>How do I do this to make it go?
> 
> Generally, you should configure plugins like this in the
>  section in the top parent, and then when you
> declare the plugin in each child, it will inherit the configuration
> from the parent.
> 
> So the parent has the "big configuration" section in pluginMgmt, and
> the children just have:
> 
>   org.apache.maven.plugins
>   maven-surefire-plugin
> 
> 
> Of course, surefire is already declared in the super pom, so you
> shouldn't even need to include that in the children. Check "mvn
> help:effective-pom" in a child once you've added that configuration to
> the top parent -- it should show up.
> 
> Wayne
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-run-JUnit-tests-in-sub-modules-without-surefire-reference--tp20924140p20929409.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 Maven / JUnit 4.x broken (annotations)

2008-12-09 Thread CheapLisa

I have JUnit 4.5 as a dependency in my maven pom
and I have imported annotations into my test case but
it is not recognizing the @Test and @Ignore annotations.

I still have to preface the method name with "test"
and the @Ignore tests get executed.

Is something broken?  What do I need to do to get this
to work like expected and to take advantage of JUnit 4.x
which has over a year of release now.


thanks

Lisa
-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20929389.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]



How to run JUnit tests in sub-modules without surefire reference?

2008-12-09 Thread CheapLisa

I want to run JUnit tests in every module and sub-module (some 5 deep),
but I do not want to put a reference to the surefire plugin 
in every pom.xml  in every module and sub-module (some 5 deep).

How do I make this work?

--- More Info

I have a top level pom for all modules and use the  tag in every
module and sub-module
(some 5 deep).  

In the top level pom, I have a reference to the surefire plugin,
but this strategy does not seem
to work.

This is what I have:

dir structure
/pom.xml  <= this is my parent pom

///../pom.xml
In this pom.xml (and in every sub-module pom - some 5 deep) I have:



com.acme
my-parent-pom
1.0


...
and later in the parent pome mentioned above I have the 
following:


org.apache.maven.plugins
maven-surefire-plugin

true
true
false



I do not want this plugin section in every pom.xml in every 
sub-module
(some 5 deep)
How do I do this to make it go?
-- 
View this message in context: 
http://www.nabble.com/How-to-run-JUnit-tests-in-sub-modules-without-surefire-reference--tp20924140p20924140.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 Jaxb plugin?

2008-12-09 Thread CheapLisa

Another question, is there a maven2 plugin that will generate an XSD from XML
?

thanks

Lisa



Adam Leggett wrote:
> 
> Try http://mojo.codehaus.org/jaxb2-maven-plugin/index.html
> 
> For example:
> 
> 
>   org.codehaus.mojo
>   jaxb2-maven-plugin
>   
>   
>   
>   xjc
>   
>   
>   
>   
>   com.acme
>   
> 
> 
> -Original Message-
> From: CheapLisa [mailto:[EMAIL PROTECTED] 
> Sent: 09 December 2008 16:33
> To: users@maven.apache.org
> Subject: Maven Jaxb plugin?
> 
> 
> I searched for a maven jaxb plugin and found xjc-maven-plugin but it is
> not
> documented.
> 
> Does anyone have an example of generating an xsd from xml and then the
> java
> objects from xsd?
> 
> Does anyone know why this plugin is not documented?
> -- 
> View this message in context:
> http://www.nabble.com/Maven-Jaxb-plugin--tp20918118p20918118.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/Maven-Jaxb-plugin--tp20918118p20920625.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 Jaxb plugin?

2008-12-09 Thread CheapLisa

thanks!  I was able to get a little further but got this error message:

[ERROR] null[-1,-1]
java.io.FileNotFoundException: \jaxb\first\src\main\xsd (The
system cannot find the file specified)

I do not have a directory called /src/main/xsd/  I do have
/src/main/resources/xsd.  Is there a way to specify to the plugin where the
xsd files are?  I have a directory structure that I can not change.


Adam Leggett wrote:
> 
> Try http://mojo.codehaus.org/jaxb2-maven-plugin/index.html
> 
> For example:
> 
> 
>   org.codehaus.mojo
>   jaxb2-maven-plugin
>   
>   
>   
>   xjc
>   
>   
>   
>   
>   com.acme
>   
> 
> 
> -Original Message-
> From: CheapLisa [mailto:[EMAIL PROTECTED] 
> Sent: 09 December 2008 16:33
> To: users@maven.apache.org
> Subject: Maven Jaxb plugin?
> 
> 
> I searched for a maven jaxb plugin and found xjc-maven-plugin but it is
> not
> documented.
> 
> Does anyone have an example of generating an xsd from xml and then the
> java
> objects from xsd?
> 
> Does anyone know why this plugin is not documented?
> -- 
> View this message in context:
> http://www.nabble.com/Maven-Jaxb-plugin--tp20918118p20918118.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/Maven-Jaxb-plugin--tp20918118p20920566.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]



Maven Jaxb plugin?

2008-12-09 Thread CheapLisa

I searched for a maven jaxb plugin and found xjc-maven-plugin but it is not
documented.

Does anyone have an example of generating an xsd from xml and then the java
objects from xsd?

Does anyone know why this plugin is not documented?
-- 
View this message in context: 
http://www.nabble.com/Maven-Jaxb-plugin--tp20918118p20918118.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: Need *end-to-end* example using the maven assembly plugin

2008-11-26 Thread CheapLisa

thanks John:

I will go through this and give it a try.  If the simplest example will
work, then I want to exclude things like the docs/ directory and other
artifacts from the jar that is produced.

The book example might work, but most likely not.  The  section
was left completely out.  It was probably not tried first before going to
press.


Lisa



John Stoneham wrote:
> 
> On Wed, Nov 26, 2008 at 10:22 AM, CheapLisa <[EMAIL PROTECTED]> wrote:
>> Does anyone have an *end-to-end* example (with files you can send or
>> attach)
>> that will allow me to create a single jar with all dependencies using
>> maven?
> 
> Lisa,
> 
> I believe that Sonatype's Maven book has exactly the example you're 
> looking for. The key piece is to build up all your artifacts with 
> dependencies as usual and then use the Maven assembly plugin using the 
> built-in descriptor "jar-with-dependencies". Turns out your particular 
> use case is actually very simple.
> 
> The example is covered from start to finish in chapter 4. Start with 
> http://books.sonatype.com/maven-book/reference/customizing.html#section-custom-packaged
>  
> and work backwards until you reach the point you're at.
> 
> Hope this helps,
> 
> - John
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-*end-to-end*-example-using-the-maven-assembly-plugin-tp20692137p20696818.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: Need *end-to-end* example using the maven assembly plugin

2008-11-26 Thread CheapLisa

setting the Class-Path in MANIFEST.MF can be done (and should be done) with
the assembly plugin.  There is an option for that.

Also copying jars to a lib/ directory (and checking them in) is the reason
we moved away from ant to maven and I do not believe this is necessary.

Lisa



baerrach wrote:
> 
> On Wed, Nov 26, 2008 at 10:22 AM, CheapLisa <[EMAIL PROTECTED]> wrote:
>>
>> Does anyone have an *end-to-end* example (with files you can send or
>> attach)
>> that will allow me to create a single jar with all dependencies using
>> maven?
> 
> This is more than just the assembly.
> Setting the MANIFEST.MF correctly with Class-Path is the jar plugin's job.
> 
> See http://maven.apache.org/shared/maven-archiver/examples/classpath.html
> 
>> In the end I want to be able to:
>>  $cd dist
>>  $java -jar patch-main.jar
> 
> We are doing this.
> 
> You need to setup both maven-jar-plugin and maven-assembly-plugin.
> 
> I copy all my dependencies into the lib/ directory of the binary
> bundle and always include the config/ on the classpath so that I can
> include files like log4j.properties, spring configs, etc so the
> admin/user can customize the files outside of jars.
> 
> Here are snippets from the files you need.
> 
>  pom.xml --
>   
> 
>   
> org.apache.maven.plugins
> maven-assembly-plugin
>   
> 
>   assembly:package
>   package
>   
> 
> single
>   
>   
> 
>   src/main/assembly/bin.xml
> 
>   
> 
>   
>   
>   
> org.apache.maven.plugins
> maven-jar-plugin
> 
>   
> 
>   your.fully.qalified.MainClassname
> 
> 
>   config/
> 
> 
>   true
>   lib/
> 
>   
> 
>   
> 
>   
> -
> 
> 
>  src/main/assembly/bin.xml
> --
> 
>   bin
>   
> dir
> zip
>   
>   true
>   
> 
>   src/main/config
>   config/
>   
> *
>   
>   
> CVS
>   
> 
> 
>   target
>   
>   
> ${artifactId}-${version}.jar
>   
> 
>   
>   
> 
>   src/main/scripts/start_debug.bat
>   true
> 
> 
>   src/main/scripts/start.bat
>   true
> 
> 
>   src/main/scripts/stop.bat
>   true
> 
> 
>   src/main/scripts/start.sh
>   true
>   0744
> 
> 
>   src/main/scripts/stop.sh
>   true
>   0744
> 
>   
>   
> 
>   lib
>   false
> 
>   
> 
> -
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-*end-to-end*-example-using-the-maven-assembly-plugin-tp20692137p20696754.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]



Need *end-to-end* example using the maven assembly plugin

2008-11-25 Thread CheapLisa

Does anyone have an *end-to-end* example (with files you can send or attach)
that will allow me to create a single jar with all dependencies using maven?

In the end I want to be able to:
  $cd dist
  $java -jar patch-main.jar

and have it run the public static void main(String[] args) method in one of
my classes in a sub module
of the project.  So therefore the super jar needs to package all dependent
jars from other modules and their dependencies.

=> 

I have module dependencies (things I have written in subdirectories that
compile to
a jar) and inside these modules they have dependencies and there are over
400 jars 
in my maven repo (many of them mine but mostly not)

What I am looking for is a *complete end-to-end* example of how to do this
and
what to type on the command line to do this so that I get an output jar in
dist/.

I have looked at the maven assembly plugin and after a day of editing XML
files
and trying things, I have absolutely nothing.

My project looks like this:

trunk/
/patch/
/dist/
pom.xml
/main/src/main/java/com/...
/main/src/main/resources/
/main/src/main/assembly/
/main/pom.xml
/utils/pom.xml
/utils/src/main/java/com/...
/src/main/java/com/...
pom.xml
/src/main/java/com/...
/pom.xml
 and 

What I want to be able to do is cd into /patch/ and run some maven 
command
and
end up with a single jar in the /dist/ directory that I can then do:
java -jar patch.jar

the static main method is in
/main/src/main/java/com/company/main/PatchManagerImpl.java

--- 
Please help, the maven assembly documemtation does not provide a clear 
cut
example
of how to do this with modules and sub modules nor does it explain each
line in 
the examples given.

If anyone has the xml text that I could simply paste into 
/patch/pom.xml 
and an assembly.xml that I can drop into place (to be put under
/src/main/assembly/assembly.xml, 
it would be greatly appreciated.

I have lost a day trying to get this to work and not sure what I am 
doing
wrong so an *end-to-end*
example would get me going.

thank you so much


Lisa
-- 
View this message in context: 
http://www.nabble.com/Need-*end-to-end*-example-using-the-maven-assembly-plugin-tp20692137p20692137.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]