Re: Documentation on profile activation by property

2008-04-11 Thread Matt Campbell
I've found a little documentation and a blog posting that may be of help to
you.

http://maven.apache.org/guides/introduction/introduction-to-profiles.html
http://techpolesen.blogspot.com/2007/08/maven-profiles-activation-by-property.html


On 4/11/08, Trevor Torrez [EMAIL PROTECTED] wrote:

 Is there documentation available on the specifics of profile
 activation?  I think I read somewhere that
 activation
property
namestage/name
value!test/value
/property
 /activation

 will activate a profile if the stage property does NOT have the
 value test, but I can't remember where.

 Thanks

 -trevor

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




[M2] Referencing Project Modules in plugin

2006-11-15 Thread Matt Campbell

I need my plugin to make an arraylist out of the modules in the parent pom.

I'm creating a List out of them. I'm trying

[EMAIL PROTECTED] expression=${project.modules}

But i get an error saying I didnt specify

configuration
 ...
childrenVALUE/children
/configuration.


Is there a way to directly reference my modules listed in
project
   modules
   modulemodule1/module
   modulemodule2/module
   /modules
/project


[M2] Maven Plugin Phases

2006-11-08 Thread Matt Campbell

I'm having some trouble understanding how to get my plugin I created to
execute specific plugins that it depends on.

When my plugin executes I need it to run compile and ear on the project.  My
plugin than takes the ear, deploys it to a server, and runs a few scripts.

Is there a way I can tell my plugin to run compile and ear beforehand
without having to specify the plugin properties in my projects pom.xml?


Re: [M2] Maven Plugin Phases

2006-11-08 Thread Matt Campbell

The Maven Faq says this:

The way to 'call goals' in maven 2 is using plugin. I think what you should
do is write a plugin that comprises of other plugins (goals) that you wish
to call with their respective phase. So when you call this plugin (say
during compile phase), it in turn will call your 'configured plugins' to do
their work. This has the same effect of specifying multiple goals.

It says when you call your plugin it will call your configured plugins to
do their work. I'm wondering where I need to specifiy my configured plugins.
Do they have to be in the project's pom.xml that im running the plugin for,
or do I put the configured plugin settings in my plugins pom.xml?

On 11/8/06, Matt Campbell [EMAIL PROTECTED] wrote:


I'm having some trouble understanding how to get my plugin I created to
execute specific plugins that it depends on.

When my plugin executes I need it to run compile and ear on the project.
My plugin than takes the ear, deploys it to a server, and runs a few
scripts.

Is there a way I can tell my plugin to run compile and ear beforehand
without having to specify the plugin properties in my projects pom.xml?



Re: MOJO Paramater Question

2006-11-07 Thread Matt Campbell

The @parameter  refers to the pom configuration or system properties

so if you had @parameter expression=${project.build.resources}  the could
either mean your looking for a system property named 
project.build.resources  or your looking for the resources listed in the
pom, which would be defined like this:

project
   build
   resources
   resourcesrc/main/resources/resource
   /resources
   /build
/project

A good reference for the pom structure is
http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html?page=1

Hope that helps.

On 11/7/06, Adam Lewis [EMAIL PROTECTED] wrote:


My understanding of mojo parameters is that when declaring paramters
for a mojo, the
@parameter expression=${...} syntax allows access to various
properties that already exist in the environment.  Is there a unfied
list of what can be put there floating around out there?  Is there a
good way of finding out what objects have been put into the
environment at any given point?  I'm sorry if this is a question with
an obvious answer, but I can't figure out what it is maven puts there
from the pom, etc..


Thanks,
Adam

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




Re: mvn site running test cases twice

2006-11-07 Thread Matt Campbell

From what i read on the maven site plugin, it forks the different

report plugins into separate lifecycles. So since both of the plugins
require the test cases to be compiled, both lifecycles are going to have to
compile them in there own lifecycles.

Not sure as I havent done much research on this yet, but what if the maven
site plugin compiled the sources then ran the report plugins, neither of the
plugins would need to compile the test sources then.

Please correct me if im wrong.




On 11/7/06, Craig McClanahan [EMAIL PROTECTED] wrote:


On 11/7/06, jp4 [EMAIL PROTECTED] wrote:


 This seems like a big issue since our nightly builds usually run all of
 our
 unit and container test cases.  If we have to run the tests twice, it
will
 almost double the build time which is already several hours.


The Shale build also includes Cobertura (thanks to Wendy :-), and it only
runs the second set of tests twice if you execute site ... if you
execute
only install it just does the normal one time.  Is it required that your

nightly builds generate the site?

If it is, you might see if Maven has a command line option to suppress the
normal test phase ... since you know the tests will be run anyway by the
plugin.  Before relying on this, though, I'd want to verify that a test
failure during the Cobertura part actually does abort the build so you
hear
about them.

Is there any way to instrument without invoking the test cases?  It seems
 like you would want to clean, compile, instrument, test, install create
 site
 docs.  Has anyone found a workaround?


The way that Cobertura works, it has to actually execute the tests (using
the instrumented classes) in order to determine which code paths you've
covered and which you haven't.  Just instrumenting wouldn't accomplish
much
that is useful.

Thanks,

 jp4


Craig


Wendy Smoak-3 wrote:
 
  On 11/7/06, jp4  [EMAIL PROTECTED] wrote:
 
  I removed the coberatura plugin and unit test cases run only once...
  Here is
  what I have in my pom
  ...
  Any ideas?  Looks like the test cases get run during instrumentation?
 
  I think it's normal based on Maven's current design.  The tests are
  run once during the 'test' phase, then in order to produce the
  coverage report, the tests have to be re-run on the instrumented code.
 
  Take a look at this post from Vincent which talks about a similar
  issue with the Clover plugin:
 

http://www.nabble.com/-M2--My-tests-are-launched-3-times-%21-t2190279s177.html#a6075779
 
  --
  Wendy
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:

http://www.nabble.com/mvn-site-running-test-cases-twice-tf2571386s177.html#a7226443
 Sent from the Maven - Users mailing list archive at 
Nabble.comhttp://nabble.com/
.


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






Maven 2 jasper-reports-plugin

2006-07-17 Thread Matt Campbell

Could someone that is currently using this plugin give me some information
on setting it up. Were having problems getting the plugin downloaded.

What repository are you currently using to download the plugin from? The
mojo plugin repository seems to be missing it.


Maven 1.0.2 Updating a jar automatically

2006-06-28 Thread Matt Campbell

Hello, all my projects pull in a jar file that is stored on my company
repository. This jar is constantly updated, and i want all the projects that
build it to automatically grab the jar from the company repository rather
than grabbing the one in their local repository. Is there a maven property
or plugin that i could use to do this?


Maven 1.0.2 Junit problem

2006-05-30 Thread Matt Campbell

When running maven test goal, i receive the following errors.
Has anyone had this problem or know how to solve this problem.
The tests work fine when ran from ant 1.6.5.



 build:start:
console:
console:help:
java:prepare-filesystem:
java:compile:
[echo] Compiling to build/classes
java:jar-resources:
test:prepare-filesystem:
test:test-resources:
test:compile:
[javac] Compiling 3 source files to
C:\source\workspace\Infrastructure\build\test-classes
test:test:
[junit] Running AllTest
[junit] java.lang.NoClassDefFoundError:
org/apache/tools/ant/util/TeeOutputStream
[junit] Exception in thread main
[junit] [ERROR] TEST AllTest FAILED
[junit] Running ApplicationLevelDelegateTest
[junit] java.lang.NoClassDefFoundError:
org/apache/tools/ant/util/TeeOutputStream
[junit] Exception in thread main
[junit] [ERROR] TEST ApplicationLevelDelegateTest FAILED
[junit] Running ApplicationUserInfoDelegateTest
[junit] java.lang.NoClassDefFoundError:
org/apache/tools/ant/util/TeeOutputStream
[junit] Exception in thread main
[junit] [ERROR] TEST ApplicationUserInfoDelegateTest FAILED
*org.apache.commons.jelly.JellyTagException*: C:\data\dev\java\api\*maven*
-1.0.2\cache\maven-test-plugin-1.6.2\plugin.jelly:181:54: fail There
were test failures.




the test-reports .txt output says


Testsuite: ApplicationLevelDelegateTest

Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

Null Test: Caused an ERROR

ApplicationLevelDelegateTest

java.lang.ClassNotFoundException: ApplicationLevelDelegateTest

at java.net.URLClassLoader$1.run(URLClassLoader.java:199)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:187)

at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(
MavenGoalTag.java:79)

at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction
(MavenGoalTag.java:110)

at com.werken.werkz.Goal.fire(Goal.java:639)

at com.werken.werkz.Goal.attain(Goal.java:575)

at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

at com.werken.werkz.Goal.attain(Goal.java:573)

at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)

at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(
MavenAttainGoalTag.java:127)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java
:145)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

at org.apache.commons.jelly.tags.core.CatchTag.doTag(CatchTag.java:90)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java
:87)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:84)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

at org.apache.commons.jelly.tags.core.WhileTag.doTag(WhileTag.java:108)

at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(
MavenGoalTag.java:79)

at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction
(MavenGoalTag.java:110)

at com.werken.werkz.Goal.fire(Goal.java:639)

at com.werken.werkz.Goal.attain(Goal.java:575)

at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java
:671)

at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)

at org.apache.maven.cli.App.doMain(App.java:488)

at 

Re: Maven 1.0.2 Junit problem

2006-05-30 Thread Matt Campbell

which version  of ant optional should i be using. The most recent version in
ibibio is 1.5

On 5/30/06, Lukas Theussl [EMAIL PROTECTED] wrote:


You need to add ant-optional to your dependencies.

HTH,
-Lukas

Matt Campbell wrote:
 When running maven test goal, i receive the following errors.
 Has anyone had this problem or know how to solve this problem.
 The tests work fine when ran from ant 1.6.5.



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




Re: OutOfMemoryError when creating Javadoc

2006-02-24 Thread Matt Campbell
Where you running maven within an IDE such as MyEclipse? Today i attemped it
inside MyEclipse and always received an OutOfMemoryError. Ran it within
command prompt and had no problems.

On 2/24/06, Yann Le Du [EMAIL PROTECTED] wrote:

 OK, so the problem is not about 256 Mo then. Still the memory grows and
 never goes over some value (90 Mo for you). I think it's worth a JIRA
 issue,
 can you create one ?

 To solve your problem, you can try and fork the compile and test tasks,
 maybe you'll gain enough memory so that javadoc do not fail :
 ~ plugin
 ~   artifactIdmaven-compiler-plugin/artifactId
 ~   configuration
 ~ forktrue/fork
 ~   /configuration
 ~ /plugin
 ~ plugin
 ~   artifactIdmaven-surefire-plugin/artifactId
 ~   configuration
 ~ forkModeonce/forkMode
 ~   /configuration
 ~ /plugin

 2006/2/24, Thorsten Heit [EMAIL PROTECTED]:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
   I'm not even sure MAVEN_OPTS=-Xmx is efficient over 256 Mo. I tried
  several
   values and always the mvn task grew to about 256 Mo then stopped. Can
  you
   try again and watch in the task manager how the used memory evolves ?
 
  I watched Maven's memory consumption with Sysinternals Process Explorer,
  but the whole process never comsumed more than 90MB, independent of
  whether I used -Xmx384m or -Xmx256m in MAVEN_OPTS. In both cases the
  OOME occurs after quite a lot of time...
 
 
  Thorsten
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.2.1 (MingW32)
 
  iD8DBQFD/zXxQvObkgCcDe0RAlZfAJ44iJTdCPoTCi7k6tbJLmfPHrcBUwCgyv3H
  Vt+dEm3suYW8aIbIpRna6pA=
  =C5wA
  -END PGP SIGNATURE-
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




Edit read only properties of plugins

2006-02-20 Thread Matt Campbell
Hello, im having problems customizing some of the plugins. A few plugins
have properties i cannot change.

I wanted to change the outputDirectory property for the plugin
maven-compiler-plugin. When i run mvn compile i get the Build Error :
Cannot Override Read-Only parameter: outputDirectory in goal
compiler:compile

The documentation for Maven 2 said that we could customize the layout for
the project, and that the basic plugins that come with maven 2 would work.
It has to be possible to edit these properties. Any suggestions?