Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Work around for Maven persistently using JDK 1.5 by default

When I try approach 3 the error reported changes to 
[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse-repo' from location http://download.eclipse.org/releases/mars: Unable to read repository at http://download.eclipse.org/releases/mars. http://download.eclipse.org/releases/mars is not a valid repository location. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse-repo' from location http://download.eclipse.org/releases/mars
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

On Wed, Mar 15, 2017 at 12:41 PM, khady lo seck <khady.engineering@xxxxxxxxx> wrote:
humm I haven't looked at how to add that to the classpath. I will try .settings/org.eclipse.jdt.core.prefs but up to now I tried these three ways suggested in this stackoverflow post (user : Henrik Steudel post). None work.


Unfortunately the code is company code and they are pretty strict on posting code externally. 

On Wed, Mar 15, 2017 at 12:27 PM, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
In addition to the manifest, are the .classpath and
.settings/org.eclipse.jdt.core.prefs also set to 1.8?

Do you have a minimal test case, perhaps on GitHub I can try out?
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 15 March 2017 at 18:30, khady lo seck <khady.engineering@xxxxxxxxx> wrote:
> Tried that it did not work.
>
> On Mar 15, 2017 2:29 PM, "Nick Boldt" <nickboldt@xxxxxxxxx> wrote:
>>
>> Do your MANIFEST.MF files specify JDK 8 too?
>>
>> If not, set this in your plugins' manifests:
>>
>> Bundle-RequiredExecutionEnvironment: JavaSE-1.8
>>
>>
>> On Wed, Mar 15, 2017 at 1:11 PM, khady lo seck
>> <khady.engineering@xxxxxxxxx> wrote:
>>>
>>> Hello,
>>>
>>> I am running Maven Tycho on an Eclipse Project that is using Java 8. The
>>> whole system knows I am using JDK 1.8. and even my POM mentions it.
>>>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>>    <artifactId>maven-compiler-plugin</artifactId>
>>>    <version>3.5.1</version>
>>>    <configuration>
>>>           <source>1.8</source>
>>>           <target>1.8</target>
>>>      <compilerId>groovy-eclipse-compiler</compilerId>
>>>      <verbose>true</verbose>
>>>      <fork>true</fork>
>>>      <compilerArguments>
>>>        <javaAgentClass>lombok.launch.Agent</javaAgentClass>
>>>      </compilerArguments>
>>>    </configuration>
>>> ...
>>>
>>> I tried different things to work around the issue including using
>>> org.codehaus.mojo and specifying 1.8 in the manifest.mf.
>>>
>>> <plugin>
>>> <groupId>org.codehaus.mojo</groupId>
>>> <artifactId>build-helper-maven-plugin</artifactId>
>>> <version>1.5</version>
>>>  <executions>
>>>    <execution>
>>>      <phase>validate</phase>
>>>      <goals>
>>>        <goal>maven-version</goal>
>>>      </goals>
>>>    </execution>
>>>  </executions>
>>> </plugin>
>>>
>>> but regardless I have  the same error due to Maven using jdk 1.5
>>> regardless of what is written in pom and manifest.
>>>
>>>
>>> Failed to execute goal
>>> org.eclipse.tycho:tycho-compiler-plugin:1.0.0:compile (default-compile) on
>>> project com.company.bbcode.parser: Compilation failure: Compilation failure:
>>> ...
>>>  Lambda expressions are allowed only at source level 1.8 or above
>>>
>>> In my POM I mentioned as one of the plugins
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>>     <artifactId>maven-compiler-plugin</artifactId>
>>>     <version>3.5.1</version>
>>>     <configuration>
>>>           <source>1.8</source>
>>>           <target>1.8</target>
>>>       <compilerId>groovy-eclipse-compiler</compilerId>
>>>       <verbose>true</verbose>
>>>       <fork>true</fork>
>>>       <compilerArguments>
>>>         <javaAgentClass>lombok.launch.Agent</javaAgentClass>
>>>       </compilerArguments>
>>>     </configuration>
>>>     <dependencies>
>>>         <dependency>
>>>             <groupId>org.codehaus.groovy</groupId>
>>>             <artifactId>groovy-eclipse-compiler</artifactId>
>>>             <version>2.9.1-01</version>
>>>         </dependency>
>>>         <!-- for 2.8.0-01 and later you must have an explicit dependency
>>> on groovy-eclipse-batch -->
>>>         <dependency>
>>>             <groupId>org.codehaus.groovy</groupId>
>>>             <artifactId>groovy-eclipse-batch</artifactId>
>>>             <version>2.3.7-01</version>
>>>         </dependency>
>>>         <dependency>
>>>             <groupId>com.company.lombok</groupId>
>>>             <artifactId>lombok</artifactId>
>>>             <version>1.16.8</version>
>>>         </dependency>
>>>     </dependencies>
>>> </plugin>
>>>
>>> --
>>> Best regards,
>>>
>>> Khady L. Seck
>>> Full Stack Java Developer
>>> Tel: 438-830-4117
>>>
>>> _______________________________________________
>>> tycho-user mailing list
>>> tycho-user@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or unsubscribe
>>> from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>>
>>
>>
>>
>> --
>> Nick Boldt :: Productization Lead :: JBoss Tools & Dev Studio :: Red Hat,
>> Inc.
>> http://nick.divbyzero.com
>>
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Best regards, 

Khady L. Seck
Full Stack Java Developer



--
Best regards, 

Khady L. Seck
Full Stack Java Developer
Tel: 438-830-4117

Back to the top