Re: java import package and maven dependencies

2015-03-24 Thread Mirko Friedenhagen
Hello Lin,

maybe while struggling with this you could ask for help at the
m2-us...@eclipse.org mailing list.

Gruss
Mirko
-- 
Sent from my mobile
On Mar 25, 2015 1:52 AM, "Lin Ma"  wrote:

> Thanks Gruss,
>
> Following your guidance I found the maven dependencies, and where is the
> .classpath file you are referring to? I do not find it in workspace of the
> project. I created a new maven project in Eclipse.
>
> [image: Inline image 2]
>
> regards,
> Lin
>
> On Tue, Mar 24, 2015 at 4:38 PM, Bernd Eckenfels 
> wrote:
>
>> Am Tue, 24 Mar 2015 16:23:23 -0700
>> schrieb Lin Ma :
>>
>> > How to find Maven updated Classpath and its priority over existing
>> > Classpath in Eclipse? I use both and Eclipse is less. :)
>>
>> Not sure I understand the question, but in Eclipse you can see in the
>> (Right click -> Project settings -> Java Build Path -> Libraries in what
>> sequence manual/eclipse/maven libs are searched. (Same is true for
>> source and generated-source folders). 'You also see this in
>> the .classpath file (it must contain:)
>>
>> > path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
>> ... > value="true"/>
>>
>> And when you open "Maven Dependencies" in the Package Explorer you see
>> the dependencies on your build path (inserted by maven). With Alt+F5
>> they get refreshed. (It will use eclipse internal maven+settings to
>> populate this list).
>>
>> Note that there is no 100% match between compile dependencies, pluigins
>> and stuff between Eclipse and M2e (but for normal projects its not an
>> issue).
>>
>> Gruss
>> Bernd
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>


AUTO: Warren Cook is out of the office (returning 03/25/2015)

2015-03-24 Thread wcook


I am out of the office until 03/25/2015.

Hello,

this is a test.

thx,
Warren


Note: This is an automated response to your message  "[IMPORTANT NOTICE]
Jira migration from Codehaus to Apache on April 4th" sent on 3/24/2015
9:44:07 PM.

This is the only notification you will receive while this person is away.

[IMPORTANT NOTICE] Jira migration from Codehaus to Apache on April 4th

2015-03-24 Thread Hervé Boutemy
Hi,

As announced in our quarterly report from january, we were studying Jira 
migration from Codehaus to Apache: the migration will happen during the week-
end of April 4th.

We'll create the exact same Jira projects at ASF  than what we have at 
Codehaus, copy the whole content and mark Codehaus read-only.
See https://issues.apache.org/jira/browse/INFRA-9116 for exact list.

For example, it was done a few years ago with (near empty) MPOM, which was 
moved from http://jira.codehaus.org/browse/MPOM to 
https://issues.apache.org/jira/browse/MPOM


How will username migration from Codehaus to ASF happen?

When migrating existing content, user accounts will be migrated too (that's 
the way Jira works).

To avoid creating accounts that already exist at Apache, matching will be done 
on account's e-mail address. The mapping will look something like:

for each e-mail/username pair in the Codehaus content
  if the email is associated with a user in the ASF Jira instance, reuse:
update the username from imported content to the ASF username
  else we'll create a new account in the ASF Jira instance: 
if the username already exists in the ASF Jira instance (another email)
  update the imported username to append -[SUFFIX] to the end
else
  use the imported username/email as is

The exact [SUFFIX] still needs to be defined.

If you want to be sure of your username at Apache Jira, please take a look at 
your e-mail at Codehaus and check that it matches the e-mail at your Apache 
Jira account.


If you have any question, don't hesitate to ask.

We'll keep you informed as the operation is planned more in details.

-The Apache Maven team

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



Custom plugin modifying effective pom problem

2015-03-24 Thread Federico Bertola

Hi all,
I'm experimenting with a custom plugin that simply need to inject some 
dependencies at build time.

If i run:

mvn customplugin:goal help:effective-pom

I'm able to see the injected dependency, but if I run:

mvn customplugin:goal compile

The compilation fails miserably because some class that rely on that 
dependency.
Why it ignores the effective pom? It's some particular phase to wire my 
plugin to? And ultimately, it is possible to achieve what i want?


I would also like to note that it works wonderfully with the maven 
eclipse plugin, so maybe it's a simple issue.


Thank in advance for your help!

Best regards,
Federico.

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



Re: java import package and maven dependencies

2015-03-24 Thread Lin Ma
Thanks Gruss,

Following your guidance I found the maven dependencies, and where is the
.classpath file you are referring to? I do not find it in workspace of the
project. I created a new maven project in Eclipse.

[image: Inline image 2]

regards,
Lin

On Tue, Mar 24, 2015 at 4:38 PM, Bernd Eckenfels 
wrote:

> Am Tue, 24 Mar 2015 16:23:23 -0700
> schrieb Lin Ma :
>
> > How to find Maven updated Classpath and its priority over existing
> > Classpath in Eclipse? I use both and Eclipse is less. :)
>
> Not sure I understand the question, but in Eclipse you can see in the
> (Right click -> Project settings -> Java Build Path -> Libraries in what
> sequence manual/eclipse/maven libs are searched. (Same is true for
> source and generated-source folders). 'You also see this in
> the .classpath file (it must contain:)
>
>  path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
> ...  value="true"/>
>
> And when you open "Maven Dependencies" in the Package Explorer you see
> the dependencies on your build path (inserted by maven). With Alt+F5
> they get refreshed. (It will use eclipse internal maven+settings to
> populate this list).
>
> Note that there is no 100% match between compile dependencies, pluigins
> and stuff between Eclipse and M2e (but for normal projects its not an
> issue).
>
> Gruss
> Bernd
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: java import package and maven dependencies

2015-03-24 Thread Bernd Eckenfels
Am Tue, 24 Mar 2015 16:23:23 -0700
schrieb Lin Ma :

> How to find Maven updated Classpath and its priority over existing
> Classpath in Eclipse? I use both and Eclipse is less. :)

Not sure I understand the question, but in Eclipse you can see in the
(Right click -> Project settings -> Java Build Path -> Libraries in what
sequence manual/eclipse/maven libs are searched. (Same is true for
source and generated-source folders). 'You also see this in
the .classpath file (it must contain:)


... 

And when you open "Maven Dependencies" in the Package Explorer you see
the dependencies on your build path (inserted by maven). With Alt+F5
they get refreshed. (It will use eclipse internal maven+settings to
populate this list).

Note that there is no 100% match between compile dependencies, pluigins
and stuff between Eclipse and M2e (but for normal projects its not an
issue).

Gruss
Bernd

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



Re: java import package and maven dependencies

2015-03-24 Thread Lin Ma
Thanks Markus,

How to find Maven updated Classpath and its priority over existing
Classpath in Eclipse? I use both and Eclipse is less. :)

regards,
Lin

On Tue, Mar 24, 2015 at 4:16 PM, Markus Karg  wrote:

> Sorry I have no experience with IntelliJ, as I solely use Eclipse.
>
> -Original Message-
> From: Lin Ma [mailto:lin...@gmail.com]
> Sent: Montag, 23. März 2015 23:05
> To: Maven Users List
> Subject: Re: java import package and maven dependencies
>
> Thanks Markus,
>
> Do you know on IntelliJ, how to see Maven update Classpath and settings in
> IntelliJ how Classpath by Maven is prioritized among other Jars/paths on
> Classpath?
>
> regards,
> Lin
>
> On Mon, Mar 23, 2015 at 2:07 AM, Markus Karg  wrote:
>
> > With "at runtime" I mean "when Eclipse is performing the 'organize
> import'
> > functionality" or its various variants.
> >
> > -Ursprüngliche Nachricht-
> > Von: Lin Ma [mailto:lin...@gmail.com]
> > Gesendet: Montag, 23. März 2015 08:59
> > An: Maven Users List
> > Betreff: Re: java import package and maven dependencies
> >
> > Thanks Markus,
> >
> > For "at runtime", I think you do not mean when running the Java
> > application, but when we add a new dependency in pom.xml, Maven will
> > download the dependency and add the JAR into Classpath which Eclipse
> > will recognize? -- so that the import package statements could be
> > recognized and resolved in IDE?
> >
> > regards,
> > Lin
> >
> > On Mon, Mar 23, 2015 at 12:29 AM, Markus Karg  wrote:
> >
> > > Lin,
> > >
> > > there is no magic involved. Maven produces a Class Path at runtime
> > > made up from the declared dependencies in the effective POM (i. e.
> > > your explicit POM and any explicit and implicit parent POMs, and any
> > > implied POMs due to dependencies). Eclipse uses that Class Path as
> > > part of the one it constructs on its own, you even can tell Eclipse
> > > the rank where to put the Maven Classpath relatively to siblings.
> > > Eclipse just checks all Classes in the Classpath for name equality,
> > > picks the sole match automatically, or provides a list of possible
> > matches for the user to pick from. That's all.
> > > Pretty simple and straightforward, and everything but magic.
> > >
> > > Regards
> > > -Markus
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: Lin Ma [mailto:lin...@gmail.com]
> > > Gesendet: Montag, 23. März 2015 06:24
> > > An: Maven Users List
> > > Betreff: java import package and maven dependencies
> > >
> > > Hi Maven masters,
> > >
> > > It is magic when we add dependencies in Maven pom.xml, IDE like
> > > IntelliJ could resolve it for java import package statement at the
> > > beginning of each .java file.
> > >
> > > Want to learn a bit more how Maven or IDE will use dependencies in
> > > Maven pom.xml file to resolve import package in .java file
> > > automatically? Does it on the backend download and put the jar in
> > > dependencies in class path, and treat it the same as manually add an
> > external jar file?
> > >
> > > Any good articles are appreciated.
> > >
> > > thanks in advance,
> > > Lin
> > >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>


RE: java import package and maven dependencies

2015-03-24 Thread Markus Karg
Sorry I have no experience with IntelliJ, as I solely use Eclipse.

-Original Message-
From: Lin Ma [mailto:lin...@gmail.com] 
Sent: Montag, 23. März 2015 23:05
To: Maven Users List
Subject: Re: java import package and maven dependencies

Thanks Markus,

Do you know on IntelliJ, how to see Maven update Classpath and settings in 
IntelliJ how Classpath by Maven is prioritized among other Jars/paths on 
Classpath?

regards,
Lin

On Mon, Mar 23, 2015 at 2:07 AM, Markus Karg  wrote:

> With "at runtime" I mean "when Eclipse is performing the 'organize import'
> functionality" or its various variants.
>
> -Ursprüngliche Nachricht-
> Von: Lin Ma [mailto:lin...@gmail.com]
> Gesendet: Montag, 23. März 2015 08:59
> An: Maven Users List
> Betreff: Re: java import package and maven dependencies
>
> Thanks Markus,
>
> For "at runtime", I think you do not mean when running the Java 
> application, but when we add a new dependency in pom.xml, Maven will 
> download the dependency and add the JAR into Classpath which Eclipse 
> will recognize? -- so that the import package statements could be 
> recognized and resolved in IDE?
>
> regards,
> Lin
>
> On Mon, Mar 23, 2015 at 12:29 AM, Markus Karg  wrote:
>
> > Lin,
> >
> > there is no magic involved. Maven produces a Class Path at runtime 
> > made up from the declared dependencies in the effective POM (i. e.
> > your explicit POM and any explicit and implicit parent POMs, and any 
> > implied POMs due to dependencies). Eclipse uses that Class Path as 
> > part of the one it constructs on its own, you even can tell Eclipse 
> > the rank where to put the Maven Classpath relatively to siblings.
> > Eclipse just checks all Classes in the Classpath for name equality, 
> > picks the sole match automatically, or provides a list of possible
> matches for the user to pick from. That's all.
> > Pretty simple and straightforward, and everything but magic.
> >
> > Regards
> > -Markus
> >
> > -Ursprüngliche Nachricht-
> > Von: Lin Ma [mailto:lin...@gmail.com]
> > Gesendet: Montag, 23. März 2015 06:24
> > An: Maven Users List
> > Betreff: java import package and maven dependencies
> >
> > Hi Maven masters,
> >
> > It is magic when we add dependencies in Maven pom.xml, IDE like 
> > IntelliJ could resolve it for java import package statement at the 
> > beginning of each .java file.
> >
> > Want to learn a bit more how Maven or IDE will use dependencies in 
> > Maven pom.xml file to resolve import package in .java file 
> > automatically? Does it on the backend download and put the jar in 
> > dependencies in class path, and treat it the same as manually add an
> external jar file?
> >
> > Any good articles are appreciated.
> >
> > thanks in advance,
> > Lin
> >
>

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


[ANN] Apache Maven Shared Maven Invoker 2.2 Released

2015-03-24 Thread Robert Scholte
The Apache Maven team is pleased to announce the release of the Apache  
Maven Shared Maven Invoker, version 2.2


This API is concerned with firing a Maven build in a new JVM. It  
accomplishes its task by building up a conventional Maven command line  
from options given in the current request, along with those global options  
specified in the invoker itself. Once it has the command line, the invoker  
will execute it, and capture the resulting exit code or any exception  
thrown to signal a failure to execute. Input/output control can be  
specified using an InputStream and up to two InvocationOutputHandlers.


http://maven.apache.org/shared/maven-invoker/


Important message for Windows users who want to invoke Apache Maven 3.3.1  
and above:


Due to http://jira.codehaus.org/browse/MNG-5776 the start-script has been  
renamed from mvn.bat to mvn.cmd, which caused the previous versions of  
Maven Invoker to not being able to find the executable file anymore. This  
critical issue has been fixed in this release.
In the next release of the maven-invoker-plugin, which should be released  
soon, we'll add this fix as well.

In the meantime you can configure the plugin like this:


  org.apache.maven.plugins
  maven-invoker-plugin
  1.9
  
 
  org.apache.maven.shared
  maven-invoker
  2.2

  


Release Notes - Maven Shared Components - Version maven-invoker-2.2

** Bug
* [MSHARED-261] - DefaultInvoker does not set M2_HOME
* [MSHARED-278] - NullPointerException in MavenCommandLineBuilder
* [MSHARED-411] - maven-invoker - addShellEnvironment forgets variable  
settings on successive calls


** Improvement
* [MSHARED-358] - Update version of plexus-utils to 3.0.15
* [MSHARED-371] - Increase chance of java8 compliance by updating to  
plexus-component-* 1.6

* [MSHARED-379] - Upgrade plexus-utils to 3.0.20
* [MSHARED-413] - Invoker fails on Windows since Maven-3.3.x
* [MSHARED-414] - Upgrade to JUnit4


Enjoy,

-The Apache Maven team

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