Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to find out actual jar file name for some classes

Hi Ming,

You are using a now ancient version of CDT tar file as your starting point. You are using org.eclipse.cdt.core_5.2.1.201102110609.jar, - the date stamp of that is 2011, 8+ years ago. The InternalCoreModelUtil was created in 2015. You can find links to CDT downloads here: https://www.eclipse.org/cdt/downloads.php - that would point you at org.eclipse.cdt.core_6.9.0.201909091953.jar, the most recent release with a Sept 2019 timestamp.

That said, you are welcome to continue doing a pure maven build, but you are setting yourself up for (lots of?) extra work. Eclipse CDT does not publish to maven central, and OSGi bundles do not list Maven dependencies in pom.xml, instead relying on Eclipse Tycho to extract dependencies from the MANIFEST.MF. 

Perhaps check out a tutorial on building with Tycho to see how to achieve builds that understand P2 repositories and OSGi dependencies: https://www.vogella.com/tutorials/EclipseTycho/article.html

If you are looking to make a command line program, you can do that with Eclipse, see https://wiki.eclipse.org/FAQ_What_is_an_Eclipse_application%3F

I hope that helps,
Jonah





~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Mon, 25 Nov 2019 at 00:50, Ming Cheng <chengm349@xxxxxxxxxxx> wrote:

Let me do more checking. Thanks.

 

Sent from Mail for Windows 10

 


From: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Ming Cheng <chengm349@xxxxxxxxxxx>
Sent: Monday, November 25, 2019 11:47:19 AM
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] How to find out actual jar file name for some classes
 

Hi Jonah,

 

Please kindly bear with me for a lengthy email. Java/Maven stc are still quite new to me. So I may say something does not make sense.

 

It seems pom.xml could not find all CDT jars from Maven central repository (https://search.maven.org/). So I tried to add CDT libraries to a local maven repo.

First I installed a Eclipse (CDT) tar build and I can see quite some org.eclipse.cdt.core_5.2.1.201102110609.jar, org.eclipse.cdt.debug.core_7.0.0.201102110609.jar etc under eclipse/plugins.

Then I ran command “mvn install:install-file -Dfile= org.eclipse.cdt.core_5.2.1.201102110609.jar.jar -DgroupId= org.eclipse.cdt -DartifactId=core -Dversion=5.2.1 -Dpackaging=jar”

 

I can see this information under .m2\repository\org\eclipse\cdt\core\5.2.1

 

I have certain confidence this way it should work on my PC because it reduced a lot Not Found complains.

 

In my pom.xml, I have these lines:

<dependency>

                        <groupId>org.eclipse.cdt</groupId>

                        <artifactId>core</artifactId>

                        <version>5.2.1</version>

</dependency>

 

But I still got these errors:

 

symbol:   class InternalCoreModelUtil

location: package org.eclipse.cdt.internal.core.model

com/baselet/cdt/core/helper/CProjectHelper.java:[49,30] cannot find symbol

symbol:   class IOverwriteQuery

location: package org.eclipse.ui.dialogs

com/baselet/cdt/core/helper/CProjectHelper.java:[60,30] cannot find symbol

symbol:   class IOverwriteQuery

location: class com.baselet.cdt.core.helper.CProjectHelper

com/baselet/cdt/core/helper/TestCfgDataProvider.java:[14,50] cannot find symbol

symbol:   variable CTestPlugin

location: class com.baselet.cdt.core.helper.TestCfgDataProvider

com/baselet/cdt/core/helper/ResourceHelper.java:[117,17] cannot find symbol

symbol:   variable Assert

location: class com.baselet.cdt.core.helper.ResourceHelper

 

 

According to your reply, it seems it should not happen as below:

 

symbol:   class InternalCoreModelUtil

location: package org.eclipse.cdt.internal.core.model

 

 

Sincerely Yours.

 

Sent from Mail for Windows 10

 

From: Jonah Graham
Sent: Friday, November 22, 2019 8:59 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] How to find out actual jar file name for some classes

 

They are both in org.eclipse.cdt.core. You can find which bundle a file is in by checking which directory it is in in git.

 

However, most classes in CDT need to be run with OSGi and then OSGi can help handle all your build and runtime dependencies. So you could be writing a new bundle and then connecting that way to CDT classes. You can have command line applications, having a bundle does not imply on its own that you need a GUI.

 

Jonah 

 

 

 

On Fri., Nov. 22, 2019, 04:48 Ming Cheng, <chengm349@xxxxxxxxxxx> wrote:

Is there a check list to find out a class’s jar file name?

 

Sent from Mail for Windows 10

 

From: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Ming Cheng <chengm349@xxxxxxxxxxx>
Sent: Friday, November 22, 2019 5:41:10 PM
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] How to find out actual jar file name for some classes

 

Hi,

 

What’s the actual jar file name containing the following 2 classes?

 

import org.eclipse.cdt.internal.core.model.InternalCoreModelUtil;

import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;

 

 

Thanks.

Sent from Mail for Windows 10

 

 

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

 

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top