You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mi...@faa.gov on 2016/05/10 14:12:36 UTC

Problem With Maven Compiler Plugin

When attempting to build with Maven from Eclipse I am getting the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project camel-activemq: Fatal error compiling: tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar -> [Help 1]

I'm confused about why the plugin is looking in the JRE for tools.jar, when this JAR exists in the JDK.

Here is the build tag in my POM:
  <build>
    <defaultGoal>install</defaultGoal>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
       </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <encoding>UTF-8</encoding>
       </configuration>
      </plugin>

      <!-- allows the route to be ran via 'mvn camel:run' -->
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <version>2.15.1.redhat-620133</version>
      </plugin>
    </plugins>
  </build>

Thanks,
Mike

Michael Tarullo
Contractor (Engility Corp)
Software Engineer
FAA WJH Technical Center
(609)485-5294


Re: Problem With Maven Compiler Plugin

Posted by Anders Hammar <an...@hammar.net>.
http://www.eclipse.org/m2e/m2e-downloads.html

/Anders

On Thu, May 12, 2016 at 9:20 PM, <Mi...@faa.gov> wrote:

> Thanks to everyone.
>
> I'll try with the 1.8 JDK and the Maven plug-in version I have now (1.5.1).
>
> BTW, is 1.5.1 the latest version or is there a more recent version of the
> Eclipse plug-ins?
>
> Thanks again.
>
> Michael Tarullo
> Contractor (Engility Corp)
> Software Engineer
> FAA WJH Technical Center
> (609)485-5294
>
>
> -----Original Message-----
> From: Manfred Moser [mailto:manfred@simpligility.com]
> Sent: Thursday, May 12, 2016 3:14 PM
> To: users@maven.apache.org
> Subject: Re: Problem With Maven Compiler Plugin
>
> Just to confirm though.. latest versions of M2e need Java 1.8...
>
> Anders Hammar wrote on 2016-05-12 09:25:
>
> > As Mark pointed out, m2e requires a JDK. Initially you were using a
> > JRE and it will then not work. Now you changed to a JDK and it works.
> > It has nothing to do with the Java version.
> >
> > /Anders (mobile)
> > On May 12, 2016 18:08, <Mi...@faa.gov> wrote:
> >
> >> I thought I'd post one last comment about this.
> >>
> >> For a brief period I was under the impression that fixing my
> >> dependencies somehow fixed this problem.  That was not the case.
> >>
> >> It appears the root cause was that in Eclipse I configured the
> >> installed JRE for Java 1.8.  Since I have several versions of the
> >> Java JDK installed I simply changed my JAVA_HOME environment variable
> >> to point to the 1.7 JDK and then changed my installed JRE in Eclipse to
> also point to JDK 1.7.
> >> problem solved!
> >>
> >> I assume the Maven plug-ins for Eclipse (at least the version I'm
> >> using,
> >> 1.5.1) require Java 1.7!!!
> >>
> >> It would be great if someone would confirm this.
> >>
> >> Thanks
> >>
> >> Michael Tarullo
> >> Contractor (Engility Corp)
> >> Software Engineer
> >> FAA WJH Technical Center
> >> (609)485-5294
> >>
> >> -----Original Message-----
> >> From: Martin Gainty [mailto:mgainty@hotmail.com]
> >> Sent: Wednesday, May 11, 2016 1:13 PM
> >> To: users@maven.apache.org
> >> Subject: RE: Problem With Maven Compiler Plugin
> >>
> >> Nota Bene: to detect missing dependencies i run dependency:tree and
> >> bind to initialize phase before compilation
> >> http://stackoverflow.com/questions/17978768/how-to-determine-which-ma
> >> ven-dependency-is-needing-a-missing-dependency
> >> HTH!
> >> Martin (decidedly left of CTR) Gainty
> >>
> >>
> >>
> >> > From: Michael.CTR.Tarullo@faa.gov
> >> > To: users@maven.apache.org
> >> > Subject: RE: Problem With Maven Compiler Plugin
> >> > Date: Wed, 11 May 2016 15:14:24 +0000
> >> >
> >> > Thank you for the reply Mark.
> >> >
> >> > This problem "fixed itself".  Just thought I'd explain here in the
> >> > event
> >> anyone else was having the same problem.
> >> >
> >> > There were some dependencies I was missing in my POM.  They were
> >> libraries needed by the app (I'm new to this app and it is not
> >> normally built with Maven) and I had not included them in the POM or
> our repo yet.
> >> But they were not related to a plugin in any way.
> >> >
> >> > When I added these dependencies to the POM and tried a compile from
> >> > the
> >> command line, the build worked.  Then with no changes to Eclipse I
> >> submitted the compile using Run As..... Maven build and it also worked
> fine.
> >> >
> >> > So the error message about not being able to find tools.jar, and
> >> > the
> >> fact that it appeared to be looking for it in the wrong place,
> >> appears to be just a distraction from the actual problem, in this
> >> case not including all the dependencies.  I'm not sure why that would
> >> result in the error message I was seeing, but at this stage, that's a
> moot point.
> >> >
> >> > Mike
> >> >
> >> > Michael Tarullo
> >> > Contractor (Engility Corp)
> >> > Software Engineer
> >> > FAA WJH Technical Center
> >> > (609)485-5294
> >> >
> >> > -----Original Message-----
> >> > From: Mark Prins [mailto:mc.prins@gmail.com]
> >> > Sent: Tuesday, May 10, 2016 10:24 AM
> >> > To: users@maven.apache.org
> >> > Subject: Re: Problem With Maven Compiler Plugin
> >> >
> >> > On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
> >> > > When attempting to build with Maven from Eclipse I am getting the
> >> following error:
> >> > >
> >> > > [ERROR] Failed to execute goal
> >> > > org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
> >> > > (default-compile) on project camel-activemq: Fatal error compiling:
> >> > > tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar ->
> >> > > [Help 1]
> >> > >
> >> > > I'm confused about why the plugin is looking in the JRE for
> >> > > tools.jar,
> >> when this JAR exists in the JDK.
> >> > >
> >> >
> >> > I think the eclipse maven plugin uses the JVM that eclipse is
> >> > running in, so you need to specify either a specific JDK or run
> >> > eclipse in a JDK VM (this is configured in eclipse.ini if I recall
> >> > correctly)
> >> >
> >> > (or -not recommended- specify a specific compiler in your
> >> > pom/compiler
> >> > plugin)
> >> >
> >> > -M
> >> >
> >> > -------------------------------------------------------------------
> >> > -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >> >
> >> > -------------------------------------------------------------------
> >> > -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Problem With Maven Compiler Plugin

Posted by Mi...@faa.gov.
Thanks to everyone.

I'll try with the 1.8 JDK and the Maven plug-in version I have now (1.5.1).

BTW, is 1.5.1 the latest version or is there a more recent version of the Eclipse plug-ins?

Thanks again.

Michael Tarullo
Contractor (Engility Corp)
Software Engineer
FAA WJH Technical Center
(609)485-5294


-----Original Message-----
From: Manfred Moser [mailto:manfred@simpligility.com] 
Sent: Thursday, May 12, 2016 3:14 PM
To: users@maven.apache.org
Subject: Re: Problem With Maven Compiler Plugin

Just to confirm though.. latest versions of M2e need Java 1.8... 

Anders Hammar wrote on 2016-05-12 09:25:

> As Mark pointed out, m2e requires a JDK. Initially you were using a 
> JRE and it will then not work. Now you changed to a JDK and it works. 
> It has nothing to do with the Java version.
> 
> /Anders (mobile)
> On May 12, 2016 18:08, <Mi...@faa.gov> wrote:
> 
>> I thought I'd post one last comment about this.
>>
>> For a brief period I was under the impression that fixing my 
>> dependencies somehow fixed this problem.  That was not the case.
>>
>> It appears the root cause was that in Eclipse I configured the 
>> installed JRE for Java 1.8.  Since I have several versions of the 
>> Java JDK installed I simply changed my JAVA_HOME environment variable 
>> to point to the 1.7 JDK and then changed my installed JRE in Eclipse to also point to JDK 1.7.
>> problem solved!
>>
>> I assume the Maven plug-ins for Eclipse (at least the version I'm 
>> using,
>> 1.5.1) require Java 1.7!!!
>>
>> It would be great if someone would confirm this.
>>
>> Thanks
>>
>> Michael Tarullo
>> Contractor (Engility Corp)
>> Software Engineer
>> FAA WJH Technical Center
>> (609)485-5294
>>
>> -----Original Message-----
>> From: Martin Gainty [mailto:mgainty@hotmail.com]
>> Sent: Wednesday, May 11, 2016 1:13 PM
>> To: users@maven.apache.org
>> Subject: RE: Problem With Maven Compiler Plugin
>>
>> Nota Bene: to detect missing dependencies i run dependency:tree and  
>> bind to initialize phase before compilation 
>> http://stackoverflow.com/questions/17978768/how-to-determine-which-ma
>> ven-dependency-is-needing-a-missing-dependency
>> HTH!
>> Martin (decidedly left of CTR) Gainty
>>
>>
>>
>> > From: Michael.CTR.Tarullo@faa.gov
>> > To: users@maven.apache.org
>> > Subject: RE: Problem With Maven Compiler Plugin
>> > Date: Wed, 11 May 2016 15:14:24 +0000
>> >
>> > Thank you for the reply Mark.
>> >
>> > This problem "fixed itself".  Just thought I'd explain here in the 
>> > event
>> anyone else was having the same problem.
>> >
>> > There were some dependencies I was missing in my POM.  They were
>> libraries needed by the app (I'm new to this app and it is not 
>> normally built with Maven) and I had not included them in the POM or our repo yet.
>> But they were not related to a plugin in any way.
>> >
>> > When I added these dependencies to the POM and tried a compile from 
>> > the
>> command line, the build worked.  Then with no changes to Eclipse I 
>> submitted the compile using Run As..... Maven build and it also worked fine.
>> >
>> > So the error message about not being able to find tools.jar, and 
>> > the
>> fact that it appeared to be looking for it in the wrong place, 
>> appears to be just a distraction from the actual problem, in this 
>> case not including all the dependencies.  I'm not sure why that would 
>> result in the error message I was seeing, but at this stage, that's a moot point.
>> >
>> > Mike
>> >
>> > Michael Tarullo
>> > Contractor (Engility Corp)
>> > Software Engineer
>> > FAA WJH Technical Center
>> > (609)485-5294
>> >
>> > -----Original Message-----
>> > From: Mark Prins [mailto:mc.prins@gmail.com]
>> > Sent: Tuesday, May 10, 2016 10:24 AM
>> > To: users@maven.apache.org
>> > Subject: Re: Problem With Maven Compiler Plugin
>> >
>> > On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
>> > > When attempting to build with Maven from Eclipse I am getting the
>> following error:
>> > >
>> > > [ERROR] Failed to execute goal
>> > > org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
>> > > (default-compile) on project camel-activemq: Fatal error compiling:
>> > > tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar -> 
>> > > [Help 1]
>> > >
>> > > I'm confused about why the plugin is looking in the JRE for 
>> > > tools.jar,
>> when this JAR exists in the JDK.
>> > >
>> >
>> > I think the eclipse maven plugin uses the JVM that eclipse is 
>> > running in, so you need to specify either a specific JDK or run 
>> > eclipse in a JDK VM (this is configured in eclipse.ini if I recall 
>> > correctly)
>> >
>> > (or -not recommended- specify a specific compiler in your 
>> > pom/compiler
>> > plugin)
>> >
>> > -M
>> >
>> > -------------------------------------------------------------------
>> > -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>> > -------------------------------------------------------------------
>> > -- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


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


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


Re: Problem With Maven Compiler Plugin

Posted by Manfred Moser <ma...@simpligility.com>.
Just to confirm though.. latest versions of M2e need Java 1.8... 

Anders Hammar wrote on 2016-05-12 09:25:

> As Mark pointed out, m2e requires a JDK. Initially you were using a JRE and
> it will then not work. Now you changed to a JDK and it works. It has
> nothing to do with the Java version.
> 
> /Anders (mobile)
> On May 12, 2016 18:08, <Mi...@faa.gov> wrote:
> 
>> I thought I'd post one last comment about this.
>>
>> For a brief period I was under the impression that fixing my dependencies
>> somehow fixed this problem.  That was not the case.
>>
>> It appears the root cause was that in Eclipse I configured the installed
>> JRE for Java 1.8.  Since I have several versions of the Java JDK installed
>> I simply changed my JAVA_HOME environment variable to point to the 1.7 JDK
>> and then changed my installed JRE in Eclipse to also point to JDK 1.7.
>> problem solved!
>>
>> I assume the Maven plug-ins for Eclipse (at least the version I'm using,
>> 1.5.1) require Java 1.7!!!
>>
>> It would be great if someone would confirm this.
>>
>> Thanks
>>
>> Michael Tarullo
>> Contractor (Engility Corp)
>> Software Engineer
>> FAA WJH Technical Center
>> (609)485-5294
>>
>> -----Original Message-----
>> From: Martin Gainty [mailto:mgainty@hotmail.com]
>> Sent: Wednesday, May 11, 2016 1:13 PM
>> To: users@maven.apache.org
>> Subject: RE: Problem With Maven Compiler Plugin
>>
>> Nota Bene: to detect missing dependencies i run dependency:tree and  bind
>> to initialize phase before compilation
>> http://stackoverflow.com/questions/17978768/how-to-determine-which-maven-dependency-is-needing-a-missing-dependency
>> HTH!
>> Martin (decidedly left of CTR) Gainty
>>
>>
>>
>> > From: Michael.CTR.Tarullo@faa.gov
>> > To: users@maven.apache.org
>> > Subject: RE: Problem With Maven Compiler Plugin
>> > Date: Wed, 11 May 2016 15:14:24 +0000
>> >
>> > Thank you for the reply Mark.
>> >
>> > This problem "fixed itself".  Just thought I'd explain here in the event
>> anyone else was having the same problem.
>> >
>> > There were some dependencies I was missing in my POM.  They were
>> libraries needed by the app (I'm new to this app and it is not normally
>> built with Maven) and I had not included them in the POM or our repo yet.
>> But they were not related to a plugin in any way.
>> >
>> > When I added these dependencies to the POM and tried a compile from the
>> command line, the build worked.  Then with no changes to Eclipse I
>> submitted the compile using Run As..... Maven build and it also worked fine.
>> >
>> > So the error message about not being able to find tools.jar, and the
>> fact that it appeared to be looking for it in the wrong place, appears to
>> be just a distraction from the actual problem, in this case not including
>> all the dependencies.  I'm not sure why that would result in the error
>> message I was seeing, but at this stage, that's a moot point.
>> >
>> > Mike
>> >
>> > Michael Tarullo
>> > Contractor (Engility Corp)
>> > Software Engineer
>> > FAA WJH Technical Center
>> > (609)485-5294
>> >
>> > -----Original Message-----
>> > From: Mark Prins [mailto:mc.prins@gmail.com]
>> > Sent: Tuesday, May 10, 2016 10:24 AM
>> > To: users@maven.apache.org
>> > Subject: Re: Problem With Maven Compiler Plugin
>> >
>> > On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
>> > > When attempting to build with Maven from Eclipse I am getting the
>> following error:
>> > >
>> > > [ERROR] Failed to execute goal
>> > > org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
>> > > (default-compile) on project camel-activemq: Fatal error compiling:
>> > > tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar ->
>> > > [Help 1]
>> > >
>> > > I'm confused about why the plugin is looking in the JRE for tools.jar,
>> when this JAR exists in the JDK.
>> > >
>> >
>> > I think the eclipse maven plugin uses the JVM that eclipse is running
>> > in, so you need to specify either a specific JDK or run eclipse in a
>> > JDK VM (this is configured in eclipse.ini if I recall correctly)
>> >
>> > (or -not recommended- specify a specific compiler in your pom/compiler
>> > plugin)
>> >
>> > -M
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


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


RE: Problem With Maven Compiler Plugin

Posted by Anders Hammar <an...@hammar.net>.
As Mark pointed out, m2e requires a JDK. Initially you were using a JRE and
it will then not work. Now you changed to a JDK and it works. It has
nothing to do with the Java version.

/Anders (mobile)
On May 12, 2016 18:08, <Mi...@faa.gov> wrote:

> I thought I'd post one last comment about this.
>
> For a brief period I was under the impression that fixing my dependencies
> somehow fixed this problem.  That was not the case.
>
> It appears the root cause was that in Eclipse I configured the installed
> JRE for Java 1.8.  Since I have several versions of the Java JDK installed
> I simply changed my JAVA_HOME environment variable to point to the 1.7 JDK
> and then changed my installed JRE in Eclipse to also point to JDK 1.7.
> problem solved!
>
> I assume the Maven plug-ins for Eclipse (at least the version I'm using,
> 1.5.1) require Java 1.7!!!
>
> It would be great if someone would confirm this.
>
> Thanks
>
> Michael Tarullo
> Contractor (Engility Corp)
> Software Engineer
> FAA WJH Technical Center
> (609)485-5294
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: Wednesday, May 11, 2016 1:13 PM
> To: users@maven.apache.org
> Subject: RE: Problem With Maven Compiler Plugin
>
> Nota Bene: to detect missing dependencies i run dependency:tree and  bind
> to initialize phase before compilation
> http://stackoverflow.com/questions/17978768/how-to-determine-which-maven-dependency-is-needing-a-missing-dependency
> HTH!
> Martin (decidedly left of CTR) Gainty
>
>
>
> > From: Michael.CTR.Tarullo@faa.gov
> > To: users@maven.apache.org
> > Subject: RE: Problem With Maven Compiler Plugin
> > Date: Wed, 11 May 2016 15:14:24 +0000
> >
> > Thank you for the reply Mark.
> >
> > This problem "fixed itself".  Just thought I'd explain here in the event
> anyone else was having the same problem.
> >
> > There were some dependencies I was missing in my POM.  They were
> libraries needed by the app (I'm new to this app and it is not normally
> built with Maven) and I had not included them in the POM or our repo yet.
> But they were not related to a plugin in any way.
> >
> > When I added these dependencies to the POM and tried a compile from the
> command line, the build worked.  Then with no changes to Eclipse I
> submitted the compile using Run As..... Maven build and it also worked fine.
> >
> > So the error message about not being able to find tools.jar, and the
> fact that it appeared to be looking for it in the wrong place, appears to
> be just a distraction from the actual problem, in this case not including
> all the dependencies.  I'm not sure why that would result in the error
> message I was seeing, but at this stage, that's a moot point.
> >
> > Mike
> >
> > Michael Tarullo
> > Contractor (Engility Corp)
> > Software Engineer
> > FAA WJH Technical Center
> > (609)485-5294
> >
> > -----Original Message-----
> > From: Mark Prins [mailto:mc.prins@gmail.com]
> > Sent: Tuesday, May 10, 2016 10:24 AM
> > To: users@maven.apache.org
> > Subject: Re: Problem With Maven Compiler Plugin
> >
> > On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
> > > When attempting to build with Maven from Eclipse I am getting the
> following error:
> > >
> > > [ERROR] Failed to execute goal
> > > org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
> > > (default-compile) on project camel-activemq: Fatal error compiling:
> > > tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar ->
> > > [Help 1]
> > >
> > > I'm confused about why the plugin is looking in the JRE for tools.jar,
> when this JAR exists in the JDK.
> > >
> >
> > I think the eclipse maven plugin uses the JVM that eclipse is running
> > in, so you need to specify either a specific JDK or run eclipse in a
> > JDK VM (this is configured in eclipse.ini if I recall correctly)
> >
> > (or -not recommended- specify a specific compiler in your pom/compiler
> > plugin)
> >
> > -M
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Problem With Maven Compiler Plugin

Posted by Mi...@faa.gov.
I thought I'd post one last comment about this.

For a brief period I was under the impression that fixing my dependencies somehow fixed this problem.  That was not the case.

It appears the root cause was that in Eclipse I configured the installed JRE for Java 1.8.  Since I have several versions of the Java JDK installed I simply changed my JAVA_HOME environment variable to point to the 1.7 JDK and then changed my installed JRE in Eclipse to also point to JDK 1.7.  problem solved!

I assume the Maven plug-ins for Eclipse (at least the version I'm using, 1.5.1) require Java 1.7!!!

It would be great if someone would confirm this.

Thanks

Michael Tarullo
Contractor (Engility Corp)
Software Engineer
FAA WJH Technical Center
(609)485-5294

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Wednesday, May 11, 2016 1:13 PM
To: users@maven.apache.org
Subject: RE: Problem With Maven Compiler Plugin

Nota Bene: to detect missing dependencies i run dependency:tree and  bind to initialize phase before compilation http://stackoverflow.com/questions/17978768/how-to-determine-which-maven-dependency-is-needing-a-missing-dependency
HTH!
Martin (decidedly left of CTR) Gainty 



> From: Michael.CTR.Tarullo@faa.gov
> To: users@maven.apache.org
> Subject: RE: Problem With Maven Compiler Plugin
> Date: Wed, 11 May 2016 15:14:24 +0000
> 
> Thank you for the reply Mark.
> 
> This problem "fixed itself".  Just thought I'd explain here in the event anyone else was having the same problem.
> 
> There were some dependencies I was missing in my POM.  They were libraries needed by the app (I'm new to this app and it is not normally built with Maven) and I had not included them in the POM or our repo yet.  But they were not related to a plugin in any way.
> 
> When I added these dependencies to the POM and tried a compile from the command line, the build worked.  Then with no changes to Eclipse I submitted the compile using Run As..... Maven build and it also worked fine.
> 
> So the error message about not being able to find tools.jar, and the fact that it appeared to be looking for it in the wrong place, appears to be just a distraction from the actual problem, in this case not including all the dependencies.  I'm not sure why that would result in the error message I was seeing, but at this stage, that's a moot point.
> 
> Mike
> 
> Michael Tarullo
> Contractor (Engility Corp)
> Software Engineer
> FAA WJH Technical Center
> (609)485-5294
> 
> -----Original Message-----
> From: Mark Prins [mailto:mc.prins@gmail.com]
> Sent: Tuesday, May 10, 2016 10:24 AM
> To: users@maven.apache.org
> Subject: Re: Problem With Maven Compiler Plugin
> 
> On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
> > When attempting to build with Maven from Eclipse I am getting the following error:
> >
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
> > (default-compile) on project camel-activemq: Fatal error compiling: 
> > tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar -> 
> > [Help 1]
> >
> > I'm confused about why the plugin is looking in the JRE for tools.jar, when this JAR exists in the JDK.
> >
> 
> I think the eclipse maven plugin uses the JVM that eclipse is running 
> in, so you need to specify either a specific JDK or run eclipse in a 
> JDK VM (this is configured in eclipse.ini if I recall correctly)
> 
> (or -not recommended- specify a specific compiler in your pom/compiler
> plugin)
> 
> -M
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  

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


RE: Problem With Maven Compiler Plugin

Posted by Martin Gainty <mg...@hotmail.com>.
Nota Bene: to detect missing dependencies i run dependency:tree and  bind to initialize phase before compilation
http://stackoverflow.com/questions/17978768/how-to-determine-which-maven-dependency-is-needing-a-missing-dependency
HTH!
Martin (decidedly left of CTR) Gainty 



> From: Michael.CTR.Tarullo@faa.gov
> To: users@maven.apache.org
> Subject: RE: Problem With Maven Compiler Plugin
> Date: Wed, 11 May 2016 15:14:24 +0000
> 
> Thank you for the reply Mark.
> 
> This problem "fixed itself".  Just thought I'd explain here in the event anyone else was having the same problem.
> 
> There were some dependencies I was missing in my POM.  They were libraries needed by the app (I'm new to this app and it is not normally built with Maven) and I had not included them in the POM or our repo yet.  But they were not related to a plugin in any way.
> 
> When I added these dependencies to the POM and tried a compile from the command line, the build worked.  Then with no changes to Eclipse I submitted the compile using Run As..... Maven build and it also worked fine.
> 
> So the error message about not being able to find tools.jar, and the fact that it appeared to be looking for it in the wrong place, appears to be just a distraction from the actual problem, in this case not including all the dependencies.  I'm not sure why that would result in the error message I was seeing, but at this stage, that's a moot point.
> 
> Mike
> 
> Michael Tarullo
> Contractor (Engility Corp)
> Software Engineer
> FAA WJH Technical Center
> (609)485-5294
> 
> -----Original Message-----
> From: Mark Prins [mailto:mc.prins@gmail.com] 
> Sent: Tuesday, May 10, 2016 10:24 AM
> To: users@maven.apache.org
> Subject: Re: Problem With Maven Compiler Plugin
> 
> On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
> > When attempting to build with Maven from Eclipse I am getting the following error:
> >
> > [ERROR] Failed to execute goal 
> > org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile 
> > (default-compile) on project camel-activemq: Fatal error compiling: 
> > tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar -> [Help 
> > 1]
> >
> > I'm confused about why the plugin is looking in the JRE for tools.jar, when this JAR exists in the JDK.
> >
> 
> I think the eclipse maven plugin uses the JVM that eclipse is running in, so you need to specify either a specific JDK or run eclipse in a JDK VM (this is configured in eclipse.ini if I recall correctly)
> 
> (or -not recommended- specify a specific compiler in your pom/compiler
> plugin)
> 
> -M
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  

RE: Problem With Maven Compiler Plugin

Posted by Mi...@faa.gov.
Thank you for the reply Mark.

This problem "fixed itself".  Just thought I'd explain here in the event anyone else was having the same problem.

There were some dependencies I was missing in my POM.  They were libraries needed by the app (I'm new to this app and it is not normally built with Maven) and I had not included them in the POM or our repo yet.  But they were not related to a plugin in any way.

When I added these dependencies to the POM and tried a compile from the command line, the build worked.  Then with no changes to Eclipse I submitted the compile using Run As..... Maven build and it also worked fine.

So the error message about not being able to find tools.jar, and the fact that it appeared to be looking for it in the wrong place, appears to be just a distraction from the actual problem, in this case not including all the dependencies.  I'm not sure why that would result in the error message I was seeing, but at this stage, that's a moot point.

Mike

Michael Tarullo
Contractor (Engility Corp)
Software Engineer
FAA WJH Technical Center
(609)485-5294

-----Original Message-----
From: Mark Prins [mailto:mc.prins@gmail.com] 
Sent: Tuesday, May 10, 2016 10:24 AM
To: users@maven.apache.org
Subject: Re: Problem With Maven Compiler Plugin

On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
> When attempting to build with Maven from Eclipse I am getting the following error:
>
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile 
> (default-compile) on project camel-activemq: Fatal error compiling: 
> tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar -> [Help 
> 1]
>
> I'm confused about why the plugin is looking in the JRE for tools.jar, when this JAR exists in the JDK.
>

I think the eclipse maven plugin uses the JVM that eclipse is running in, so you need to specify either a specific JDK or run eclipse in a JDK VM (this is configured in eclipse.ini if I recall correctly)

(or -not recommended- specify a specific compiler in your pom/compiler
plugin)

-M

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


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


Re: Problem With Maven Compiler Plugin

Posted by Mark Prins <mc...@gmail.com>.
On 10-05-16 16:12, Michael.CTR.Tarullo@faa.gov wrote:
> When attempting to build with Maven from Eclipse I am getting the following error:
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project camel-activemq: Fatal error compiling: tools.jar not found: C:\Dev\Java\jre1.8.0_51\..\lib\tools.jar -> [Help 1]
>
> I'm confused about why the plugin is looking in the JRE for tools.jar, when this JAR exists in the JDK.
>

I think the eclipse maven plugin uses the JVM that eclipse is running 
in, so you need to specify either a specific JDK or run eclipse in a JDK 
VM (this is configured in eclipse.ini if I recall correctly)

(or -not recommended- specify a specific compiler in your pom/compiler 
plugin)

-M

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