Re: Performing tasks before a goal

2006-11-09 Thread Paul Barry

That might work, but I think what I'd rather do is just create a one
TestSuite that does the setup beforehand, then run the tests.  I have
noticed that maven seems to run the tests based on a naming
convention, *Test.java gets run, but *Tests.java don't.  Can I
override this somehow?  I'd like to make it so that only one specific
test suite gets called, like AllTests.java, but then none of the other
test get called.  I suppose I could just call my test suite
FullTest.java, and then name all my tests WhateverTests.java, but I'd
like to explicitly define it if it is possible.

On 11/8/06, Wayne Fay [EMAIL PROTECTED] wrote:

Assuming you're using Maven2... Have you looked at the complete list of phases?
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

Sounds to me like you might want to use @process-test-resources.

Wayne

On 11/7/06, Paul Barry [EMAIL PROTECTED] wrote:
 Is there a way to perform a task before a goal executes?  Specifically
 what I'm looking to do is load data into my test database before all
 my tests run.  I'm using Spring's
 AbstractTransactionalDataSourceSpringContextTests, which rolls back
 all changes after each test, so that I don't have to re-load the data
 after every test.

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




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



Performing tasks before a goal

2006-11-07 Thread Paul Barry

Is there a way to perform a task before a goal executes?  Specifically
what I'm looking to do is load data into my test database before all
my tests run.  I'm using Spring's
AbstractTransactionalDataSourceSpringContextTests, which rolls back
all changes after each test, so that I don't have to re-load the data
after every test.

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



Re: Creating a webapp archetype

2006-10-18 Thread Paul Barry

The standard directory layout says it should be in src/main/webapp

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

On 10/17/06, Wendy Smoak [EMAIL PROTECTED] wrote:

On 10/17/06, Paul Barry [EMAIL PROTECTED] wrote:

 When I create my project from this archetype, it doesn't copy over the
 webapp stuff, only Test.java.  Can I get the archetype to copy over
 the webapp stuff?

The tree structure seems to have src/webapp, not src/main/webapp.

Compare yours to the Maven provided webapp archetype:
http://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetype-bundles/maven-archetype-webapp/

--
Wendy

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




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



Re: custom archetype : filtering directory names

2006-10-18 Thread Paul Barry

Sorry to take this a little of topic, but what is ${keys}?  Is there
documentation somewhere that says what replacements you can use in
custom archetypes?

On 10/18/06, Jan-Christopher Bals [EMAIL PROTECTED] wrote:

Hi!

I am currently building a custom archetype.

In addition to the replacement of ${keys} in files i need a way to
rename files and directories.

Example:

archetype
|-- pom.xml
`-- src
 `-- main
 `-- resources
 |-- META-INF
 |   `-- archetype.xml
 `-- archetype-resources
 |-- pom.xml
 `-- src
 `-- main
 `-- java
 `-- ${packagename}
 `--${classname}.java



Is there a way to achieve replacements like that?

best regards

Jan

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




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



Re: Creating a webapp archetype

2006-10-18 Thread Paul Barry

Actually, it is in src/main/webapp:

http://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetype-bundles/maven-archetype-webapp/src/main/resources/archetype-resources/src/main/webapp/

I think my problem is that I have source instead of resources,
I'll give that a try.

On 10/18/06, Paul Barry [EMAIL PROTECTED] wrote:

The standard directory layout says it should be in src/main/webapp

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

On 10/17/06, Wendy Smoak [EMAIL PROTECTED] wrote:
 On 10/17/06, Paul Barry [EMAIL PROTECTED] wrote:

  When I create my project from this archetype, it doesn't copy over the
  webapp stuff, only Test.java.  Can I get the archetype to copy over
  the webapp stuff?

 The tree structure seems to have src/webapp, not src/main/webapp.

 Compare yours to the Maven provided webapp archetype:
 
http://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetype-bundles/maven-archetype-webapp/

 --
 Wendy

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



Creating a webapp archetype

2006-10-17 Thread Paul Barry

I have an archetype with the following structure:

maven-archetype-mywebapp
|-- pom.xml
`-- src
   `-- main
   `-- resources
   |-- META-INF
   |   `-- archetype.xml
   `-- archetype-resources
   |-- pom.xml
   `-- src
   |-- main
   |   `-- java
   |   `-- Test.java
   `-- webapp
   |-- index.jsp
   `-- WEB-INF
   `-- web.xml

The archetype.xml looks like this:

archetype
 idmywebapp/id
 sources
   sourcesrc/main/java/Test.java/source
 /sources
 resources
   sourcesrc/main/webapp/index.jsp/source
   sourcesrc/main/webapp/WEB-INF/web.xml/source
 /resources
/archetype

When I create my project from this archetype, it doesn't copy over the
webapp stuff, only Test.java.  Can I get the archetype to copy over
the webapp stuff?

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



Re: idea project jdk

2006-10-12 Thread Paul Barry

Fair enough, but the message does say:

jdkName is not set, using [java version1.5.0_08] as default.

Even when it uses 1.5, which is confusing.  How does maven know
which version of idea I am using?

On 10/12/06, Geoffrey De Smet [EMAIL PROTECTED] wrote:

I had this issue when I migrated from intellij idea 4 to 5.
Maven 2 is actually doing the best thing ... it can.

4 calls its jdk by default java version1.5.0_08 and 5 calls it by
default 1.5. So maven2 takes (if you don't override it with
configurationjdkName...) java version1.5.0_08 in 4 and 1.5 in 5.

The fun starts when you've migrated from idea 4 to 5: you could be in 5
with a name of java version1.5.0_08, because that name was imported
from 4.

Not sure what happens in the new idea 6 though, I would expect it to
behave like 5.

Paul Barry wrote, On 2006-10-11 10:20 PM:
 Maven says this:

 jdkName is not set, using [java version1.5.0_08] as default.

 But then if you look at the .ipr that it generates, you see this:

  component name=ProjectRootManager version=2
 assert-keyword=true jdk-15=true project-jdk-name=1.5 /

 So I renamed by jdk to 1.5 in IDEA and it works now.  But that
 message should porbably be changed to read:

 jdkName is not set, using [1.5] as default.



 On 10/11/06, Paul Barry [EMAIL PROTECTED] wrote:
 Hello,

 When I followed the tutorial at
 http://maven.apache.org/guides/getting-started/index.html, after I ran
 mvn idea:idea and opened the project in idea, the project jdk was not
 set.  Is there something I can do in maven to have the project jdk
 said.


--
With kind regards,
Geoffrey De Smet


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



idea project jdk

2006-10-11 Thread Paul Barry

Hello,

When I followed the tutorial at
http://maven.apache.org/guides/getting-started/index.html, after I ran
mvn idea:idea and opened the project in idea, the project jdk was not
set.  Is there something I can do in maven to have the project jdk
said.

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



Re: idea project jdk

2006-10-11 Thread Paul Barry

Maven says this:

jdkName is not set, using [java version1.5.0_08] as default.

But then if you look at the .ipr that it generates, you see this:

 component name=ProjectRootManager version=2
assert-keyword=true jdk-15=true project-jdk-name=1.5 /

So I renamed by jdk to 1.5 in IDEA and it works now.  But that
message should porbably be changed to read:

jdkName is not set, using [1.5] as default.



On 10/11/06, Paul Barry [EMAIL PROTECTED] wrote:

Hello,

When I followed the tutorial at
http://maven.apache.org/guides/getting-started/index.html, after I ran
mvn idea:idea and opened the project in idea, the project jdk was not
set.  Is there something I can do in maven to have the project jdk
said.



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