RE: Using ant-contrib in ant based plugin development

2012-07-27 Thread Manfred Moser
Why are you not implementing your plugin in Java or even Groovy?

http://www.sonatype.com/books/mcookbook/reference/writing-plugins-alternative-sect-writing-groovy.html

Shell script seems like a bad idea to me if you want it to run everywhere..

manfred

On Fri, July 27, 2012 2:26 pm, Lyons, Roy wrote:
> Update:
>
> Not hearing anything made me give up on pure ant...  I was able to get
> things working with the  task, and just embedding
> kornshell.  That, of course, defeats the usual idea of a plugin since it
> is platform specific...  but later on, I can add in support for windows by
> doing a similar shellscript directive with cmd based on the osfamily task.
>  Interestingly, I was able to use both of those from ant-contrib...  but
> not 
> Odd.
>
>
> I am still interested in possibilities of using ant in its pure form, so
> any responses to this thread are still welcome.
>
> Thanks,
>
> Roy
> 
> From: Lyons, Roy
> Sent: Friday, July 27, 2012 12:16 PM
> To: Maven Users List
> Subject: RE: Using ant-contrib in ant based plugin development
>
> my webmail made me login again, and I didnt see part of my message was
> missing.  here is the full thing:
>
>
> Maven User List,
>
> I waited in sending to this list until after I had exhausted my other
> resources, including google searching, documentation, and experimentation
> of my own.
>
> As such, I hope that your collective minds can take on this challenge.
>
>
> So here is the problem:
>
> [INFO]task-segment: [com.cme.plugins:cme-packaging:cme-packaging]
> (aggregator-style)
> [INFO]
> 
> [INFO] [cme-packaging:cme-packaging {execution: default-cli}]
>
> cmepackage:
>  [echo] We are in UNIX
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] Failed to execute: Executing Ant script: package.build.xml
> [cmepackage]: Failed to execute.
>
> Could not create task or type of type: for.
>
> Ant could not find the task or a class this task relies upon.
>
> This is common and has a number of causes; the usual
> solutions are to read the manual pages then download and
> install needed JAR files, or fix the build file:
>  - You have misspelt 'for'.
>Fix: check your spelling.
>  - The task needs an external JAR file to execute
>  and this is not found at the right place in the classpath.
>
>
> What is extremely interesting to me is the fact that it can use the task
> definition for "osfamily", but not for the "for" task.  Also of interest
> to me is the fact that I can use this script with "ant -f" without a
> problem.
>
> Before I get suggestions that I should use java instead, I need to confess
> that I am only now just learning java.  My job in configuration management
> uses a whole lot more in perl and ksh than anything...
>
> Also, my research showed lots of ways to cope with it in antrun, with an
> inline script -- but that won't do so much for me as I am trying to make a
> plugin...
>
> Here is my declaration in my pom:
>
> 
> 
>   
> maven-plugin-plugin
> 2.5
> 
> 
>   
> org.apache.maven.plugin-tools
> maven-plugin-tools-ant
> 2.5
>   
>   
>  ant-contrib
>  ant-contrib
>  1.0b3
> 
>
>
> I also placed a dependency on ant-contrib in my pom's dependencies
> section.
>
> my build xml has this in it...  as you can see, I was experimenting with
> different methods of forcing it to find the items.  I have nothing special
> in mojos xml.  Perhaps that is where my issue is?
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> I had the most luck so far with
> 
> 
>  location="${user.home}/.m2/repository/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar"
> />
> 
> 
>
> 
> From: Lyons, Roy
> Sent: Friday, July 27, 2012 12:15 PM
> To: Maven Users List
> Subject: Using ant-contrib in ant based plugin development
>
> Maven User List,
>
> I waited in sending to this list until after I had exhausted my other
> resources, including google searching, documentation, and experimentation
> of my own.
>
> As such, I hope that your collective minds can take on this challenge.
>
>
> So here is the problem:
>
> [INFO]task-segment: [com.cme.plugins:cme-packaging:cme-packaging]
> (aggregator-style)
> [INFO]
> 
> [INFO] [cme-packaging:cme-packaging {execution: default-cli}]
>
> cmepackage:
>  [echo] We are in UNIX
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] 

RE: Using ant-contrib in ant based plugin development

2012-07-27 Thread Lyons, Roy
Update:

Not hearing anything made me give up on pure ant...  I was able to get things 
working with the  task, and just embedding kornshell.  
That, of course, defeats the usual idea of a plugin since it is platform 
specific...  but later on, I can add in support for windows by doing a similar 
shellscript directive with cmd based on the osfamily task.  Interestingly, I 
was able to use both of those from ant-contrib...  but not 

  
maven-plugin-plugin
2.5


  
org.apache.maven.plugin-tools
maven-plugin-tools-ant
2.5
  
  
 ant-contrib
 ant-contrib
 1.0b3



I also placed a dependency on ant-contrib in my pom's dependencies section.

my build xml has this in it...  as you can see, I was experimenting with 
different methods of forcing it to find the items.  I have nothing special in 
mojos xml.  Perhaps that is where my issue is?













I had the most luck so far with







From: Lyons, Roy
Sent: Friday, July 27, 2012 12:15 PM
To: Maven Users List
Subject: Using ant-contrib in ant based plugin development

Maven User List,

I waited in sending to this list until after I had exhausted my other 
resources, including google searching, documentation, and experimentation of my 
own.

As such, I hope that your collective minds can take on this challenge.


So here is the problem:

[INFO]task-segment: [com.cme.plugins:cme-packaging:cme-packaging] 
(aggregator-style)
[INFO] 
[INFO] [cme-packaging:cme-packaging {execution: default-cli}]

cmepackage:
 [echo] We are in UNIX
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to execute: Executing Ant script: package.build.xml [cmepackage]: 
Failed to execute.

Could not create task or type of type: for.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'for'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.


What is extremely interesting to me is the fact that it can use the task 
definition for







Here is my declaration in my pom:



  
maven-plugin-plugin
2.5


  
org.apache.maven.plugin-tools
maven-plugin-tools-ant
2.5
  
  
 ant-contrib
 ant-contrib
 1.0b3



I also placed a dependency on ant-contrib in my pom's dependencies section.

my build xml has this in it...  as you can see, I was experimenting with 
different methods of forcing it to find the items.  I have nothing special in 
mojos xml.  Perhaps that is where my issue is?













I had the most luck so far with






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


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



Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

2012-07-27 Thread Ansgar Konermann
If you don't need resource filtering, you could just put the jar with your
resources on the test classpath, i. e. add a test-scoped dependency to the
module containing the integration test.
Am 27.07.2012 15:06 schrieb "Markus Karg" :

> Hello Maven Community,
>
>
>
> I have a complex setup to do for an end-to-end integration test. For
> this, I am using the Maven Failsafe plugin. As the test needs some
> resources to run (which I plan to put into Nexus as this feels just
> natural), I want to tell Maven that when the integration test is
> running, it shall download them and put them on the HDD. Is there a way
> to specifiy such "intergration-test"-scoped dependencies?
>
>
>
> Thanks!
>
> Markus
>
>
>
>


RE: Using ant-contrib in ant based plugin development

2012-07-27 Thread Lyons, Roy
my webmail made me login again, and I didnt see part of my message was missing. 
 here is the full thing:


Maven User List,

I waited in sending to this list until after I had exhausted my other 
resources, including google searching, documentation, and experimentation of my 
own.

As such, I hope that your collective minds can take on this challenge.


So here is the problem:

[INFO]task-segment: [com.cme.plugins:cme-packaging:cme-packaging] 
(aggregator-style)
[INFO] 
[INFO] [cme-packaging:cme-packaging {execution: default-cli}]

cmepackage:
 [echo] We are in UNIX
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to execute: Executing Ant script: package.build.xml [cmepackage]: 
Failed to execute.

Could not create task or type of type: for.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual 
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file: 
 - You have misspelt 'for'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.


What is extremely interesting to me is the fact that it can use the task 
definition for "osfamily", but not for the "for" task.  Also of interest to me 
is the fact that I can use this script with "ant -f" without a problem.  

Before I get suggestions that I should use java instead, I need to confess that 
I am only now just learning java.  My job in configuration management uses a 
whole lot more in perl and ksh than anything...

Also, my research showed lots of ways to cope with it in antrun, with an inline 
script -- but that won't do so much for me as I am trying to make a plugin...

Here is my declaration in my pom:



  
maven-plugin-plugin
2.5


  
org.apache.maven.plugin-tools
maven-plugin-tools-ant
2.5
  
  
 ant-contrib
 ant-contrib
 1.0b3



I also placed a dependency on ant-contrib in my pom's dependencies section.

my build xml has this in it...  as you can see, I was experimenting with 
different methods of forcing it to find the items.  I have nothing special in 
mojos xml.  Perhaps that is where my issue is?













I had the most luck so far with 







From: Lyons, Roy
Sent: Friday, July 27, 2012 12:15 PM
To: Maven Users List
Subject: Using ant-contrib in ant based plugin development

Maven User List,

I waited in sending to this list until after I had exhausted my other 
resources, including google searching, documentation, and experimentation of my 
own.

As such, I hope that your collective minds can take on this challenge.


So here is the problem:

[INFO]task-segment: [com.cme.plugins:cme-packaging:cme-packaging] 
(aggregator-style)
[INFO] 
[INFO] [cme-packaging:cme-packaging {execution: default-cli}]

cmepackage:
 [echo] We are in UNIX
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to execute: Executing Ant script: package.build.xml [cmepackage]: 
Failed to execute.

Could not create task or type of type: for.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'for'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.


What is extremely interesting to me is the fact that it can use the task 
definition for







Here is my declaration in my pom:



  
maven-plugin-plugin
2.5


  
org.apache.maven.plugin-tools
maven-plugin-tools-ant
2.5
  
  
 ant-contrib
 ant-contrib
 1.0b3



I also placed a dependency on ant-contrib in my pom's dependencies section.

my build xml has this in it...  as you can see, I was experimenting with 
different methods of forcing it to find the items.  I have nothing special in 
mojos xml.  Perhaps that is where my issue is?













I had the most luck so far with






-
To unsubscribe,

Using ant-contrib in ant based plugin development

2012-07-27 Thread Lyons, Roy
Maven User List,

I waited in sending to this list until after I had exhausted my other 
resources, including google searching, documentation, and experimentation of my 
own.

As such, I hope that your collective minds can take on this challenge.


So here is the problem:

[INFO]task-segment: [com.cme.plugins:cme-packaging:cme-packaging] 
(aggregator-style)
[INFO] 
[INFO] [cme-packaging:cme-packaging {execution: default-cli}]

cmepackage:
 [echo] We are in UNIX
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to execute: Executing Ant script: package.build.xml [cmepackage]: 
Failed to execute.

Could not create task or type of type: for.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual 
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file: 
 - You have misspelt 'for'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
 and this is not found at the right place in the classpath.


What is extremely interesting to me is the fact that it can use the task 
definition for 







Here is my declaration in my pom:



  
maven-plugin-plugin
2.5


  
org.apache.maven.plugin-tools
maven-plugin-tools-ant
2.5
  
  
 ant-contrib
 ant-contrib
 1.0b3



I also placed a dependency on ant-contrib in my pom's dependencies section.

my build xml has this in it...  as you can see, I was experimenting with 
different methods of forcing it to find the items.  I have nothing special in 
mojos xml.  Perhaps that is where my issue is?













I had the most luck so far with 






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



Re: Filter bug with specified characters in xml comments

2012-07-27 Thread Aliaksei Lahachou
Even if it knew about formats, how would it know that filtering comments is
not what you want? ;)
Am 25.07.2012 15:25 schrieb "Wayne Fay" :

> > One might think that it would be ignored due to it being within a
> commented
> > region of the xml, but I guess Maven filtering has no relevance to the
> type
> > of file it's filtering?
>
> Maven Filtering has no knowledge of file types and thus no knowledge
> of comments in one file type vs another. It simply "blindly" tries to
> filter everything it sees.
>
> Wayne
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Unexpected and not-intentional switching of thread during a test method execution by maven-surefire-plugin

2012-07-27 Thread Arata Yamamoto
Thank you for your replies and advises, Wayne and Kristian.

First, I must apologize. By the further analysis of the test log, I found
that the failure log snippet in my previous post wasn't the one of the
failed test. And found out that it's not switching the thread unexpectedly.
I'm really sorry.

And the test failure was not repro after updating the dependency and plugin.

> Can you try Maven 3.0.4 and Surefire 2.12?
It didn't repro after I updated the version of following dependency and
plugin:
org.aspectj:aspectjtools:1.6.12 -> 1.7.0
org.apache.maven.plugins:maven-compiler-plugin:2.3.2 -> 2.5.1
I also updated surefire to 2.12 from 2.11, but I encountered the test
failure with using surefire 2.12 at first. I just used 2.11 to check
whether this could repro when it executed as single test by using -Dtest
command line option since surefire 2.12's bug:
https://jira.codehaus.org/browser/SUREFIRE-827 (and SUREFIRE-760).

Warm regards,
Arata

On Thu, Jul 26, 2012 at 4:21 PM, Kristian Rosenvold <
kristian.rosenv...@gmail.com> wrote:

> The *only* way to make surefire use threads is to set the 
> attribute to some legal value. Use mvn help:effective-pom to see if
> this is set. I can see from your log output that this is not set, so
> this is something happening in your code/libs.
>
> I might suggest using -Dmaven.surefire.debug=true and attach a
> debugger to the tests in question to inspect the call stack/threads to
> find out WTF is going on.
>
> Kristian
>
>
> 2012/7/27 Wayne Fay :
> >> Maven version 3.0.1
> >> maven-surefire-plugin version 2.11
> >> I haven't set other than exclude and include optional parameters of
> >> surefire.
> >> JUnit 4.10
> >> So, I believe that surefire is using junit 4 provider.
> >> JRE version 1.6
> >> OS: Windows XP
> >
> > Can you try Maven 3.0.4 and Surefire 2.12? Also perhaps try specifying
> > forkMode=never in Surefire. And finally check "mvn help:effective-pom"
> > to be certain there is not some additional Surefire configuration
> > coming in from a parent etc that you did not even realize is impacting
> > your build.
> >
> > Hopefully Kristian will see this thread, he is the expert in these
> areas... :)
> >
> > Wayne
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Test Debug Flag Causes Hang

2012-07-27 Thread John Kramer
Ah, perhaps I misunderstood that flag.

Never mind and please disregard!

John Kramer
email: jkra...@mojiva.com
mobile: 314.435.2370
skype: kramer.mojiva
0xCAFEBABE0032







On 7/27/12 12:01 PM, "Rodriguez, John"  wrote:

>Sounds like mvn is waiting for your remote debugger to attach?
>See: 
>http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.h
>tml
>-JR
>
>-Original Message-
>From: John Kramer [mailto:jkra...@mojiva.com]
>Sent: Friday, July 27, 2012 11:45 AM
>To: Maven Users List
>Subject: Test Debug Flag Causes Hang
>
>So I discovered an issue.
>
>If I run the following command:
>
>mvn clean install -Dmaven.surefire.debug=true
>
>on a project with an empty src/test directory, mvn hangs.
>
>Note that I am not using the latest (3.0.3 not 3.0.3).
>
>This isn't blocking or anything, but the surefire plugin probably should
>fail or ignore rather than hang.
>
>
>John Kramer
>email: jkra...@mojiva.com
>mobile: 314.435.2370
>skype: kramer.mojiva
>0xCAFEBABE0032
>
>http://mlbfancave.com";>src="http://mlb411.mlb.com/fancave.gif"; border="0"
>vspace="4">Check out the Cave.
>Visit http://mlbfancave.com";>MLBFanCave.com
>
>
>-
>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>For additional commands, e-mail: users-h...@maven.apache.org
>


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



RE: Test Debug Flag Causes Hang

2012-07-27 Thread Rodriguez, John
Sounds like mvn is waiting for your remote debugger to attach?
See: 
http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html
-JR

-Original Message-
From: John Kramer [mailto:jkra...@mojiva.com] 
Sent: Friday, July 27, 2012 11:45 AM
To: Maven Users List
Subject: Test Debug Flag Causes Hang

So I discovered an issue.

If I run the following command:

mvn clean install -Dmaven.surefire.debug=true

on a project with an empty src/test directory, mvn hangs.

Note that I am not using the latest (3.0.3 not 3.0.3).

This isn't blocking or anything, but the surefire plugin probably should fail 
or ignore rather than hang.


John Kramer
email: jkra...@mojiva.com
mobile: 314.435.2370
skype: kramer.mojiva
0xCAFEBABE0032

http://mlbfancave.com";>http://mlb411.mlb.com/fancave.gif"; border="0" vspace="4">Check out the Cave. Visit http://mlbfancave.com";>MLBFanCave.com


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



Test Debug Flag Causes Hang

2012-07-27 Thread John Kramer
So I discovered an issue.

If I run the following command:

mvn clean install -Dmaven.surefire.debug=true

on a project with an empty src/test directory, mvn hangs.

Note that I am not using the latest (3.0.3 not 3.0.3).

This isn't blocking or anything, but the surefire plugin probably should fail 
or ignore rather than hang.


John Kramer
email: jkra...@mojiva.com
mobile: 314.435.2370
skype: kramer.mojiva
0xCAFEBABE0032



Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

2012-07-27 Thread Laird Nelson
On Fri, Jul 27, 2012 at 7:27 AM, Martin Gainty  wrote:

> Marcus
> you can copy applicable resources with maven-resources-plugin
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.htmljustremember
>  to hook the phase you want to bind to e.g.
> validatemaven phases are listed here:
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html


You might also find this helpful:
http://maven.apache.org/plugins/maven-remote-resources-plugin/

Best,
Laird

-- 
http://about.me/lairdnelson


Re: Failsafe Plugin: How to get resource dependencies for integration-tests?

2012-07-27 Thread Wayne Fay
> natural), I want to tell Maven that when the integration test is
> running, it shall download them and put them on the HDD. Is there a way
> to specifiy such "intergration-test"-scoped dependencies?

I am unaware of any such integration-test scope for dependencies. I
would just use "test" scope for this purpose.

You may also find this plugin helpful: maven-remote-resources-plugin

Wayne

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



Re: install jar file into local repository

2012-07-27 Thread Matthias Pfeifer
Hello,

Thanks for the hint. In fact somehow qls was attached to my commandline.
Thanks for all answers. please consider my question closed.

Matthias



--

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



RE: Failsafe Plugin: How to get resource dependencies for integration-tests?

2012-07-27 Thread Martin Gainty

Marcus
you can copy applicable resources with maven-resources-plugin 
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.htmljust
 remember to hook the phase you want to bind to e.g. 
validatemaven phases are listed 
here:http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Viel Gluck!
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
 > Subject: Failsafe Plugin: How to get resource dependencies for 
 > integration-tests?
> Date: Fri, 27 Jul 2012 15:06:06 +0200
> From: k...@quipsy.de
> To: users@maven.apache.org
> 
> Hello Maven Community,
> 
>  
> 
> I have a complex setup to do for an end-to-end integration test. For
> this, I am using the Maven Failsafe plugin. As the test needs some
> resources to run (which I plan to put into Nexus as this feels just
> natural), I want to tell Maven that when the integration test is
> running, it shall download them and put them on the HDD. Is there a way
> to specifiy such "intergration-test"-scoped dependencies?
> 
>  
> 
> Thanks!
> 
> Markus
> 
>  
> 
  

Re: install jar file into local repository

2012-07-27 Thread Stuart McCulloch
On 27 July 2012 14:05, Matthias Pfeifer  wrote:

> Hello,
>
> I have a jar file that i plan to add to a projects dependencies. I
> need to test this jar file as a dependency of some project and
> therefore did
>
> $ mvn -l mvn.log -e -X install:install-file -Dfile=myartifact.jar
> -DgroupId=com.mycompany -DartifactId=myartifact -Dversion="6.1.0 RC"
> -Dpackaging=jar
>
> to install it.
>
> Maven informs me about "BUILD SUCCESS" (mvn.log is attached). Taking a
> look into the repository
>
> $ ls $HOME/.m2/repository/com/mycompany/myartifact/6.1.0\ RC/
> -rwx--+ 1 myusername Domain Users  184 Jul 27 14:54
> _maven.repositories
> -rwx--+ 1 myusername Domain Users 453125 Jul 19 10:53
> ndf-core-6.1.0 RC.jarqls
>

^ this extension looks odd, almost as if "qls" was somehow attached to the
end of your command (making it -Dpackaging=jarqls instead
of -Dpackaging=jar)

-rwx--+ 1 myusername Domain Users  497 Jul 27 14:54
> ndf-core-6.1.0 RC.pom
>
> Reveals that the jar file is not present. Either I have the wrong
> expectation here or something else i am doing wrong.
>
> Is this not the way to install a jar-file to a local repository?
> According to official FAQ Question 11 it is...
>
> Matthias
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

-- 
Cheers, Stuart


Re: install jar file into local repository

2012-07-27 Thread Matthias Pfeifer
Changing the version to "6.1.0" as proposed by jörg did not change anything.

matthias

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



Re: install jar file into local repository

2012-07-27 Thread Jörg Schaible
Matthias Pfeifer wrote:

> Hello,
> 
> I have a jar file that i plan to add to a projects dependencies. I
> need to test this jar file as a dependency of some project and
> therefore did
> 
> $ mvn -l mvn.log -e -X install:install-file -Dfile=myartifact.jar
> -DgroupId=com.mycompany -DartifactId=myartifact -Dversion="6.1.0 RC"
> -Dpackaging=jar
> 
> to install it.
> 
> Maven informs me about "BUILD SUCCESS" (mvn.log is attached). Taking a
> look into the repository
> 
> $ ls $HOME/.m2/repository/com/mycompany/myartifact/6.1.0\ RC/
> -rwx--+ 1 myusername Domain Users  184 Jul 27 14:54
> _maven.repositories -rwx--+ 1 myusername Domain Users 453125 Jul 19
> 10:53 ndf-core-6.1.0 RC.jarqls
> -rwx--+ 1 myusername Domain Users  497 Jul 27 14:54
> ndf-core-6.1.0 RC.pom
> 
> Reveals that the jar file is not present. Either I have the wrong
> expectation here or something else i am doing wrong.
> 
> Is this not the way to install a jar-file to a local repository?
> According to official FAQ Question 11 it is...

Use a valid version. It may definitely not contain a space character.

- Jörg


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



Re: JDT compiler compliance level as a parameter for eclipse:eclipse target of maven-eclipse-plugin

2012-07-27 Thread Mikhail Kalkov
Thanks for suggestions, Barrie and Wayne! I will have a look at 
maven-eclipse-plugin source code later.

To clarify,
  1.5 corresponds to javac "-source" option and to ECJ 
"org.eclipse.jdt.core.compiler.source" setting
  1.6 corresponds to javac "-target" option and to ECJ 
"org.eclipse.jdt.core.compiler.codegen.targetPlatform" setting
  org.eclipse.jdt.core.compiler.compliance is an ECJ setting, which doesn't 
have a direct counterpart either in javac options or in maven-compiler-plugin 
settings. I've really tried hard to figure out what exactly it means but 
Eclipse documentation [1] is vague about the meaning of this option. According 
to the JDT settings compatibility table [2], codegen.targetPlatform specifies 
the target VM version, and should never be less then the source version, 
whereas the source version and compliance settings are quite similar, but the 
former seems to be a refinement of the latter. After reading [3], [4] and [5] 
my best guess is that
   - compliance corresponds to Java language version,
   - source corresponds to Java class library version (see -bootclasspath 
option for javac),
   - target corresponds to Java VM version,
   - and Execution Environment setting would correspond to Java runtime version 
(see [6]).

At least, this explanation clarifies why I was able to use Java6 syntax sugar 
(@Override on interface implementation) with compliance set to 1.6, whereas 
source and target were set to 1.5. Still I may be wrong and the only way to get 
an authoritative answer is to ask on the JDT DEV mailing list. I'll ask them 
and hopefully come back later with an answer.

As for Sun's javac, it seems that compliance is always set to the jdk level, 
e.g. "javac -source 1.5 -target 1.5" with javac from jdk6u27 allows using 
@Override annotation on interface implementation.

[1] 
http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.user/reference/preferences/java/ref-preferences-compiler.htm
[2] Open 
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Fguide%2Fjdt_api_options.htm
 , scroll down to "JDT Core options descriptions", click on "Builder options" 
and scroll a bit up to see the compatibility table
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633#c23
[4] 
http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.7/org.eclipse.jdt/core/3.7.0/org/eclipse/jdt/internal/compiler/batch/Main.java#Main.validateOptions%28boolean%29
[5] http://wiki.eclipse.org/index.php/Execution_Environment
[6] http://wiki.eclipse.org/PDE/Resources/Execution_Environments

Regards,
Mikhail

- Original Message -
From: "Barrie Treloar" 
To: "Maven Users List" 
Sent: Friday, July 27, 2012 12:29:04 AM
Subject: Re: JDT compiler compliance level as a parameter for eclipse:eclipse 
target of maven-eclipse-plugin

On Fri, Jul 27, 2012 at 7:57 AM, Barrie Treloar  wrote:
> On Fri, Jul 27, 2012 at 7:13 AM, Wayne Fay  wrote:
>>> Long story short, I tried to modify eclipse project generation so that
>>> in the .settings/org.eclipse.jdt.core.prefs instead of this:
>>> org.eclipse.jdt.core.compiler.compliance=1.5
>>> I get this (look at the compliance):
>>> org.eclipse.jdt.core.compiler.compliance=1.6
>>> but didn't find a way to configure maven-eclipse-plugin.
>>
>> Most likely you are the first person to want this specific
>> configuration of the plugin, thus it does not currently exist. You'll
>> probably need to scratch your own itch.
>>
>> Pull down the source code for maven-eclipse-plugin, tweak it somehow
>> to add this feature, and contribute the code back for (possible)
>> inclusion in a future release.
>>
>> Here's a hint: you're going to want to adjust EclipseSettingsWriter
>> and probably some Eclipse plugin Mojo code too since this should be an
>> extra configuration item in the plugin...
>> http://maven.apache.org/plugins/maven-eclipse-plugin/xref/org/apache/maven/plugin/eclipse/writers/workspace/EclipseSettingsWriter.html
>
> Also remember, that the maven-eclipse-plugin reads the configuration
> of the maven-compiler-plugin.
> See 
> http://maven.apache.org/plugins/maven-eclipse-plugin/trouble-shooting/jdk-being-used-is-different-than-expected.html
>
> So you ideally need to configure that the way you want.
> I'm not sure what
> org.eclipse.jdt.core.compiler.compliance=1.6
> actually does.
> Is this equivalent to
>
> 
>maven-compiler-plugin
>2.0.2
>
>1.5
>1.6
>
> 

Alternatively, you can fix your problem with the overrides and mark it
as something to worry about manually.
The time invested to fix this automatically may not be worth the effort.

-
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...@mav

Failsafe Plugin: How to get resource dependencies for integration-tests?

2012-07-27 Thread Markus Karg
Hello Maven Community,

 

I have a complex setup to do for an end-to-end integration test. For
this, I am using the Maven Failsafe plugin. As the test needs some
resources to run (which I plan to put into Nexus as this feels just
natural), I want to tell Maven that when the integration test is
running, it shall download them and put them on the HDD. Is there a way
to specifiy such "intergration-test"-scoped dependencies?

 

Thanks!

Markus

 



install jar file into local repository

2012-07-27 Thread Matthias Pfeifer
Hello,

I have a jar file that i plan to add to a projects dependencies. I
need to test this jar file as a dependency of some project and
therefore did

$ mvn -l mvn.log -e -X install:install-file -Dfile=myartifact.jar
-DgroupId=com.mycompany -DartifactId=myartifact -Dversion="6.1.0 RC"
-Dpackaging=jar

to install it.

Maven informs me about "BUILD SUCCESS" (mvn.log is attached). Taking a
look into the repository

$ ls $HOME/.m2/repository/com/mycompany/myartifact/6.1.0\ RC/
-rwx--+ 1 myusername Domain Users  184 Jul 27 14:54 _maven.repositories
-rwx--+ 1 myusername Domain Users 453125 Jul 19 10:53
ndf-core-6.1.0 RC.jarqls
-rwx--+ 1 myusername Domain Users  497 Jul 27 14:54
ndf-core-6.1.0 RC.pom

Reveals that the jar file is not present. Either I have the wrong
expectation here or something else i am doing wrong.

Is this not the way to install a jar-file to a local repository?
According to official FAQ Question 11 it is...

Matthias


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