dcm4che-master (toolkit source) - import issues

143 views
Skip to first unread message

Nico

unread,
Jun 20, 2018, 6:12:28 PM6/20/18
to dcm4che
Hi everyone,

I'm having an issue while importing the maven dcm4che project. In eclipse I can see errors related to unresolved variables (Tag, StandardElementDictionary)

StandardElementDictionary cannot be resolved to a variable
Tag cannot be resolved to a type

Just before that errors I see the next error messages that belongs to the dcm4che-dict and dcm4che-js-dict.
As far as I know, the dcm4che-dict provides the dataelements definitions.

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:xml-maven-plugin:1.0.1:transform (execution: default, phase: generate-resources)

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:xml-maven-plugin:1.0:transform (execution: default, phase: generate-resources)


I tried different ways like ignoring within the pom.xml . Did not work and I don't think that's a good approach.

Note : I've ran the mvn install from console command line (linux ubuntu 16) within the dcm4che-master directory before importing the project as "Existing maven project" from Eclipse.

Me developing setup is the following:

Java
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Maven
Maven home: /home/user/tools/apache-maven-3.5.3
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.8.0_66/jre
Default locale: en_US, platform encoding: UTF-8
OS name
: "linux", version: "4.4.0-128-generic", arch: "amd64", family: "unix"


Eclipse
Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200



Please, could someone share any idea on how to fix this?

Regards,
Nicolás

Nico

unread,
Jun 20, 2018, 7:14:19 PM6/20/18
to dcm...@googlegroups.com
Hi,

I forgot to mention some warnings I had during the mvn install step

Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

Regards,
Nicolás

Nico

unread,
Jun 21, 2018, 12:36:08 AM6/21/18
to dcm...@googlegroups.com
Hi ,

I managed to solve part of the problem,



Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:xml-maven-plugin:1.0.1:transform (execution: default, phase: generate-resources)

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:xml-maven-plugin:1.0:transform (execution: default, phase: generate-resources)



by modifying the xml-maven-plugin, changing them from version 1.0.1 to 1.02 within the below pom.xml files

./dcm4che-dict/pom.xml:        <artifactId>xml-maven-plugin</artifactId>
./
dcm4che-dict-arc/pom.xml:    <artifactId>xml-maven-plugin</artifactId>
./
dcm4che-js-dict/pom.xml:     <artifactId>xml-maven-plugin</artifactId>
./
dcm4che-core/pom.xml:        <artifactId>xml-maven-plugin</artifactId>
./
dcm4che-assembly/pom.xml:    <artifactId>xml-maven-plugin</artifactId>



So, I just ran again the mvn install command within the dcm4che-master directory.

After importing the whole project to Eclipse I now see errors like below, in different modules.

StandardElementDictionary cannot be resolved to a variable
Tag cannot be resolved to a type
Tag cannot be resolved to a variable



As Gunterze mentioned in this post (https://groups.google.com/forum/#!searchin/dcm4che/maven|sort:date/dcm4che/b0TxyaXjnfA/SdfCOSmrGQAJ), the sources are auto-generated during the maven build.
I double checked the directory (dcm4che-core/target/generated-java/org/dcm4che3/data) and all this files (Keyword.java, StandardElementDictionary.java, Tag.java, UID.java ) exist.

I was about to add this auto-generated java files to the build-path but I don't think that's the right way to go.
Another option would be copying the auto-generated java into the org.dcm4che3.data package. This will work but this files could change in the future due some dicom standar update ... so I would have to update the org.dcm4che3.data package  again ...

Could someone point me out what should I check within Eclipse?

Regards,
Nicolás


Reply all
Reply to author
Forward
0 new messages