ignoring test dependencies when you run maven with maven.test.skip=true

2008-02-04 Thread Rohnny Moland
Hello,

I was reading this:

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

It works fine if I build my project and run the tests, but what if I
want to just build my project and skip the tests? I get a dependency
resolution error then, because my test dependency cannot be found.

I know 2 possible solutions:
1) Create a profile and include my test dependency in it. This is
misuse of a profile in my opinion.
2) Deploy the test dependency in a local repository and only depend on
it as a binary.

I dont really understand why the reactor does not ignore dependencies
with scope=test, when you run maven with the skip test option set to
true. Isnt this how it should be?


Regards,
Rohnny.

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



Re: ignoring test dependencies when you run maven with maven.test.skip=true

2008-02-04 Thread Rohnny Moland
Thanks. maven.test.skip.exec=true is what I was looking for.

Thanks again,
Rohnny

On Feb 4, 2008 11:31 AM, Simon Kitching [EMAIL PROTECTED] wrote:
  Simon Kitching [EMAIL PROTECTED] schrieb:
  Tests can take a long time to run, so it's useful to sometimes skip that. 
  But compiling them is not normally something that people want to skip; 
  checking in code that breaks the compilation of tests should almost always 
  be a build failure.
 
  If you read the surefire documentation, it explicitly says that *running* 
  of the tests is skipped, not compiling.
 
  And anyway, the surefire plugin has the responsibility for running the 
  tests, but it is the maven-compiler-plugin that has the responsibility for 
  compiling them.

  nicolas de loof [EMAIL PROTECTED] schrieb:
  Build your project with maven.test.skip.exec=true
 
  This will build the required test-jar dependencies but skip test execution.

 Thanks for pointing that out Nicolas. All this time, I had not realised that 
 maven.test.skip was also skipping compilation of test classes!

 The primary documentation on the surefire plugin is not at all clear on this 
 issue, BTW. But after drilling down into the plugin-documentation under the 
 project reports, it does indeed say so.

 And in compiler plugin, after drilling down into project-reports | 
 plugin-documenation it can be seen that this plugin uses the same flag to 
 disable compilation of test classes - interesting.

 BTW, just to clarify: I misunderstood the original email in this thread: the 
 original poster *wanted* to compile the unit tests but not run them, and was 
 surprised when maven.test.skip also prevented compilation. As Nicolas points 
 out, maven.test.skip.exec is the right thing to use in that case.

 Regards,
 Simon


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



organizing groups of dependencies

2008-01-27 Thread Rohnny Moland
Hei,

I am trying to figure out the best way to group dependencies for
easier maintainance. I was reading this:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg61076.html

Which is close to what I am looking for. Is this something that is
going to be implemented in a later maven version?

I also know that today it is possible to do what is described here:

http://jira.codehaus.org/browse/MNG-2059

This is a nice solution if you have 1 dependency group, but not so
nice if you have 3, because one pom can only inherit from one another
pom. Lets say:

parent pom
 ^
test-deps pom
^
gui-deps pom
^
product A
^
jar module 1
jar module 2
..

Any other ways to do this? Would be nice if maven had multiple inheritance.


Thanks,
Rohnny

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



Selenium jars not on the maven repository anymore

2008-01-16 Thread Rohnny Moland
Hello,

It seems like the selenium jars have been removed or moved tonight? At
least they are not on our mirror nor on repo1.maven.org today. Can the
person that removed them, please put the jars back?.


Regards,
Rohnny

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



Re: Selenium jars not on the maven repository anymore

2008-01-16 Thread Rohnny Moland
At least they are in my local repository and I dont use this
repository you mention.

But I could of course add those repositories, even if I dont want to do so.

Maybe I am just insane.

Regards,
Rohnny

On Jan 16, 2008 11:16 AM, Marco Huber [EMAIL PROTECTED] wrote:
 Hello Rohnny,

 I don't know really if the Selenium jars were ever in the
 repo1.maven.org. We used till now the repository from OpenQA directly,
 but it seems that they moved there repository.

 Look at http://maven.openqa.org/ (The old repository url).

 They split them into three new URL:

  * OpenQA Releases - http://archiva.openqa.org/repository/releases/
  * OpenQA Snapshots - http://archiva.openqa.org/repository/snapshots/
  * Third Party Dependecnies -
 http://archiva.openqa.org/repository/thirdparty/


 I think you must update your repository section.

 Regards,
 Marco


 Rohnny Moland wrote:
  Hello,
 
  It seems like the selenium jars have been removed or moved tonight? At
  least they are not on our mirror nor on repo1.maven.org today. Can the
  person that removed them, please put the jars back?.
 
 
  Regards,
  Rohnny
 
  -
  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]



[m2] aggregating javadoc

2006-12-28 Thread Rohnny Moland

Hello,

When I set aggregate to true, the javadoc link does not show in the
project report section of my root site. I guess this is a bug or do I
need to do something special for it to show up.

The javadoc _is_ generated with all the information, the link is just missing.

Using version 2.2 of the javadoc plugin.

Thanks in advance,
Rohnny

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



[m2] Adding a pre-process stage to the maven build

2006-11-29 Thread Rohnny Moland

Hi,

Is it a way I can specify the order of what should be build? If I have
a root pom with two trees, lets say one is the dev-tools and the other
is my business artifacts. I want to specify that the dev-tools should
be build (and installed) _before_ the business artifacts because the
business artifacts are dependent on the dev-tools.

In other words: What I am looking for is a way to create multiple
build stages in maven, without having a shell script that do that for
me. :)


Thanks in advance,
Rohnny

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



[m2] NP when developing a plugin

2006-11-21 Thread Rohnny Moland
Hi!

Under development, when I develop my maven plugin, I run mvn clean
install in the plugin dev dir, and then mvn goal in another directory
which contains my test pom.xml.

But, if I switch fast beween building/installing the plugin and trying
it out, I get a nullpointer exception. I would guess it is some option I
could set in the pom to avoid this.

The exception I get is:
java.lang.NullPointerException
at
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:163)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:381)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:135)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


Thanks in advance,
Rohnny


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



Re: [M2] How to softcode 'version' in dependency declaration

2006-08-17 Thread Rohnny Moland
I guess it should be possible to add something like:
properties
  gw-plugin.version1.0/gw-plugin.version
/properties

..to your pom or settings file.

HTH,
Rohnny

hamdard wrote:
 Hi
 
 Is it possible to softcode the version in the dependency declaration?
 
 For example, the pom could be like this:
 
 dependency
   groupIdcom.mycompany.ixaf/groupId
   artifactIdgw-plugin/artifactId
   version${myversion}/version
 /dependency
 
 And the myversion parameter is controllable from the settings.xml file.
 
 The motivation is that if we have a multi-module build in maven with all the
 different modules using the same 'one' version, we could control/update the
 version of the entire project from one place (settings.xml), instead of
 updating it in several places. 
 
 Thanks


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



Retrieving root directory in maven 2

2006-08-09 Thread Rohnny Moland

Hi there,

How can I retrieve the root directory in maven 2 from the pom?
${basedir} was the closest I found, but then I get the path from where
maven is running, so this seems to be the module path. I would guess
its a simple ${..} I can use..

BTW: Where can I find an overview over all the references I can use from a pom?


Thanks in advance,
Rohnny

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



Re: using apt (annotation processing) with maven 2

2006-08-04 Thread Rohnny Moland
Just for the record, if someone else needs to use maven 2 and APT, the
tobago apt-maven-plugin works fine. The only problem I have met so far,
is to pass in ann env options to the processor. Seems like there is a
bug here in the plugin. Example of usage:

plugin
  groupIdorg.apache.myfaces.tobago/groupId
  artifactIdmaven-apt-plugin/artifactId
  executions
execution
  phasegenerate-sources/phase
  configuration
generated.apt_generated/generated
aptOptionsx=3/aptOptions
target1.5/target
nocompiletrue/nocompile
showWarningstrue/showWarnings
  /configuration
  goals
goalexecute/goal
  /goals
/execution
  /executions
/plugin


Rohnny

Rohnny Moland wrote:
 Chris Hilton wrote:
 There is a source jar for an apt plugin at:

 http://www.mvnrepository.com/artifact/org.apache.myfaces.tobago/maven-ap
 t-plugin/1.0.7
 
 Thanks, I'll try that. Couldnt find how to add classpath and such things
 then, but I may ask more on the myfaces mailinglist.
 
 No idea if that works, but might be worth investigating. As far as the
 antrun option goes, you'll need to specify the ant-apt.jar as a
 dependency within the antrun execution, something like:

   plugin  
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-antrun-plugin/artifactId
   execution
 phaseprocess-classes/phase
 configuration
   tasks
 apt .../apt
   /tasks
 /configuration
 goals
   goalrun/goal
 /goals
   /execution
 /executions
 dependencies
   dependency
 groupIdant/groupId
 artifactIdant-apt/artifactId
 versionSOME_VERSION/version
   /dependency
 /dependencies
   /plugin

 Unfortunately, it doesn't appear that the ant-apt jar has been loaded
 into the main repository, so you can either (1) go through the process
 to add it to the main repository, (2) do an install:install-file to
 install it in your local repository, (3) do a deploy:deploy-file to
 deploy it your company repository (you do have one, right?), or (4) make
 your dependency a system dependency and specify a local path. (1) would
 be nice so everyone else can use it but might take a while, so you'll
 probably need to do (2) or (3) short-term. (4) should generally be
 avoided, but is mentioned for completeness.
 
 
 Tried this one (3) but ran into class loader problems. More exact:
 
 Caused by: Error starting apt compiler
 at
 org.apache.tools.ant.taskdefs.compilers.AptCompilerAdapter.execute(Unknown
 Source)
 at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
 at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
 at org.apache.tools.ant.taskdefs.Apt.execute(Unknown Source)
 at
 org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
 at org.apache.tools.ant.Task.perform(Task.java:364)
 at org.apache.tools.ant.Target.execute(Target.java:341)
 at
 org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
 ... 19 more
 Caused by: java.lang.NoSuchMethodException:
 com.sun.tools.apt.Main.compile([Ljava.lang.String;)
 at java.lang.Class.getMethod(Class.java:1581)
 
 Any good ideas here are welcome.
 
 
 Rohnny
 
 -
 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]



Getting the dependencies for a plugin

2006-08-04 Thread Rohnny Moland
Hi,

How can I get the dependencies for a plugin, from a plugin (in code) ?


Thanks in advance,
Rohnny

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



using apt (annotation processing) with maven 2

2006-08-03 Thread Rohnny Moland
Hi,

I wonder if any have got the ant apt plugin to work with maven 2? Just
trying to do something like this:

tasks
   apt srcdir=${basedir}/src/main/java   
destdir=${basedir}/src/main/resources/component
classpath=${project.compileClasspathElements} 
preprocessdir=${basedir}/src/main/java
debug=on
deprecation=off
optimize=on
includeAntRuntime=no
nocompile=false
factory=comtools.ConfigProcessorFactory
  /apt
/tasks


But I get a task not found exception because ant cannot find the
ant-apt.jar (I just put in in m2/lib).

Any good ideas? Or if someone knows some apt maven tool that _works_.


Thanks in advance,
Rohnny

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



Re: using apt (annotation processing) with maven 2

2006-08-03 Thread Rohnny Moland
Chris Hilton wrote:
 There is a source jar for an apt plugin at:
 
 http://www.mvnrepository.com/artifact/org.apache.myfaces.tobago/maven-ap
 t-plugin/1.0.7

Thanks, I'll try that. Couldnt find how to add classpath and such things
then, but I may ask more on the myfaces mailinglist.

 
 No idea if that works, but might be worth investigating. As far as the
 antrun option goes, you'll need to specify the ant-apt.jar as a
 dependency within the antrun execution, something like:
 
   plugin  
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-antrun-plugin/artifactId
   execution
 phaseprocess-classes/phase
 configuration
   tasks
 apt .../apt
   /tasks
 /configuration
 goals
   goalrun/goal
 /goals
   /execution
 /executions
 dependencies
   dependency
 groupIdant/groupId
 artifactIdant-apt/artifactId
 versionSOME_VERSION/version
   /dependency
 /dependencies
   /plugin
 
 Unfortunately, it doesn't appear that the ant-apt jar has been loaded
 into the main repository, so you can either (1) go through the process
 to add it to the main repository, (2) do an install:install-file to
 install it in your local repository, (3) do a deploy:deploy-file to
 deploy it your company repository (you do have one, right?), or (4) make
 your dependency a system dependency and specify a local path. (1) would
 be nice so everyone else can use it but might take a while, so you'll
 probably need to do (2) or (3) short-term. (4) should generally be
 avoided, but is mentioned for completeness.


Tried this one (3) but ran into class loader problems. More exact:

Caused by: Error starting apt compiler
at
org.apache.tools.ant.taskdefs.compilers.AptCompilerAdapter.execute(Unknown
Source)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at org.apache.tools.ant.taskdefs.Apt.execute(Unknown Source)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
... 19 more
Caused by: java.lang.NoSuchMethodException:
com.sun.tools.apt.Main.compile([Ljava.lang.String;)
at java.lang.Class.getMethod(Class.java:1581)

Any good ideas here are welcome.


Rohnny

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



Re: Getting project classpath in ant

2005-11-03 Thread Rohnny Moland

On 11/03/2005 02:32 AM, Brett Porter wrote:


It's a reference, you can't echo it.

try:
property name=out refid=maven.dependency.classpath /
echo${out}/echo



But artifacts with the system scope are not included in the 
maven.dependency.classpath. Is this a bug, or how can I retrieve a 
reference to them? I could of course use pathelement tags, but it must 
be a more elegant way.



Thanks,

--
Rohnny

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



Re: [m2] Image link when creating a site?

2005-10-28 Thread Rohnny Moland

On 10/28/2005 01:16 PM, Roland Bali wrote:

Hi,

I'm trying to add a image link to my site descriptor but the image is
 not added. I've tried the following:

menu name=Links item name=image1 
href=http://maven.apache.org; 
img=http://maven.apache.org/images/logos/maven-feather.png/ item 
name=image2 href=http://maven.apache.org; 
src=http://maven.apache.org/images/logos/maven-feather.png/ 
/menu


I also would like to have a image at the same level as the default 
created by Maven-image is it possible to add such a image in the 
site descriptor so I won't have to modify the  generated .html files?




Kind regards,

Roland



You can by creating a custom velocity template, and include it in your
src/site/resources directory. In your pom you also have to add something
like this:

[..]
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-site-plugin/artifactId
  configuration
templateDirectory
  file://${basedir}/src/site/resources/
/templateDirectory
templateyour-site.vm/template
  /configuration
/plugin
[..]

Look into the maven-site-plugin.jar for a default maven-site.vm
template, you can use as a start point.


Hope this helps,

--
Rohnny

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



[m2] artifact-resolver plugin

2005-10-27 Thread Rohnny Moland

Hi,

Does it exist something as easy as a plugin for inserting/copying an
artifact/file into a maven repository?

I have been looking at the maven-install-plugin which is nice, but it
has read-only properties, and I am looking for something I can include
in my pom. I dont want to do it manually..


Thank you,

--
Rohnny

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



[M1.1] Issue when calling an ant target and using property refs

2005-09-15 Thread Rohnny Moland
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello :)


I have an ant script like this:
property name=jdo.lib value=lib/jdo/

path id=compile.path
!-- Does not work with maven --
pathelement location=${jdo.lib}/odbfe.jar/
!-- works with maven --
pathelement location=lib/jdo/odbfe.jar/
/path

!-- Persistence enhance classes --
target name=persistence-enhancer
  java classname=com.objectdb.Enhancer fork=false
classpathref=compile.path
arg value=txn.Account/
  /java
/target


..and a maven script like this:
goal name=persistence-enhance
ant:ant dir=${basedir} antfile=build.xml
  target=persistence-enhancer/
/goal


When I use lib/jdo/odbfe.jar in compile.path it works, but I get a
classnotfound error when using ${jdo.lib}/odbfe.jar. I wonder if this
is a known bug or is it not allowed to use refs when calling an ant
target from maven?

BTW: I am using maven 1.1-beta-2.


Thank you.

- --
Rohnny
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDKY0/JQxWxLw8G9QRAuwHAJ4hMLXwJrp0oTBX1F08pELiiRSj7QCfWnYS
upJRmP/F29yISoAIKRZFG5Q=
=q9ND
-END PGP SIGNATURE-

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



Re: [M1.1] Issue when calling an ant target and using property refs

2005-09-15 Thread Rohnny Moland
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This is now solved. In case anyone cares, the reason why the reference
to the property didnt work, was that I had the same property defined in
both maven and ant.

- --
Rohnny

Rohnny Moland wrote:
 Hello :)
 
 
 I have an ant script like this:
 property name=jdo.lib value=lib/jdo/
 
 path id=compile.path
 !-- Does not work with maven --
 pathelement location=${jdo.lib}/odbfe.jar/
 !-- works with maven --
 pathelement location=lib/jdo/odbfe.jar/
 /path
 
 !-- Persistence enhance classes --
 target name=persistence-enhancer
   java classname=com.objectdb.Enhancer fork=false
 classpathref=compile.path
 arg value=txn.Account/
   /java
 /target
 
 
 ..and a maven script like this:
 goal name=persistence-enhance
 ant:ant dir=${basedir} antfile=build.xml
   target=persistence-enhancer/
 /goal
 
 
 When I use lib/jdo/odbfe.jar in compile.path it works, but I get a
 classnotfound error when using ${jdo.lib}/odbfe.jar. I wonder if this
 is a known bug or is it not allowed to use refs when calling an ant
 target from maven?
 
 BTW: I am using maven 1.1-beta-2.
 
 
 Thank you.
 

- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDKg19JQxWxLw8G9QRArQxAKD4PezcQWL9QRBTy9EiJHyean2XHQCfaMXN
RBBpf89FkmymPTB/E5aPpA4=
=FTsn
-END PGP SIGNATURE-

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