licel / jcardsim

https://jcardsim.org
224 stars 123 forks source link

How do load the project in Eclipse Neon? #96

Closed totszwai closed 2 years ago

totszwai commented 7 years ago

I've checked out the project in the latest Eclipse Neon but the POM.xml is throwing errors

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.4.0:java (execution: default, phase: process-classes)

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (execution: default, phase: initialize)

Missing artifact oracle.javacard:api_classic:jar:3.0.4

Can someone help me set this up? I tried to run the JUnit tests as well, but it just says class not found for those tests.

Class not found javacard.framework.OwnerPinTest Class not found javacard.framework.UtilTest

bondhan commented 7 years ago

I face the same issue also with the "Plugin execution not covered...", I hope @licel can explain how to solve this..

Regarding the missing artifact, you must install javacard from oracle website and copy the file "api_classic.jar" to C:\Users[your username].m2\repository\oracle\javacard\api_classic\3.0.5 and rename it to api_classic-3.0.5.jar, and update the maven.

You have also to re-arrange the import lib and making the jre as the first imported lib...

bondhan commented 7 years ago

Hello,

I found out how to solve the 2 issues "Plugin execution not covered...":

  1. insert <pluginManagement> on top <plugins>...</plugins>
  2. Select window->preferences->Maven->LifeCycleMappings and open the lifecycle-mapping-metadata.xml and insert below configuration:

<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
    <pluginExecutions>
        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <versionRange>2.5.2</versionRange>
                <goals>
                    <goal>install-file</goal>
                </goals>
            </pluginExecutionFilter>
            <action>
                <ignore />
            </action>
        </pluginExecution>
    </pluginExecutions>
</lifecycleMappingMetadata>

Check here also