How to import ATG CRS module in eclipse and customize - atg

I am new to ATG and i installed ATG CRS 11.2 using CIM and it is installed properly and i am able to access the site but i want to import the CRS module in eclipse and customize the existing code for my learning purpose.
I tried the ways given on net, install atg plugin and trying to import but it is not importing.
Please explain the steps to do same.
Thanks

The Oracle A-Team have an article Building Oracle ATG Commerce With Maven. They have created a sample github project which uses CRS 11.2 as the basis for the project. You should be able to import this as a Maven project within Eclipse.

Create a new Java Project in Eclipse
Using windows browser, go to the location where your Java Project is created.
Open the Java Project folder, you will find .classpath and .project files there.
Now, go to your ATG_ROOT folder, and find the folder CommerceReferenceStore/Store
Copy-paste your .project and .classpath files here.
Edit the .project file and replace the project name by CommerceReferenceStore.Store.
CRS also has some other (nested) modules. Do the same for the nested modules you want to import in eclipse.
Re-open eclipse, Go to File -> Import -> Other -> Existing Projects into your workspace.
Browse to your ATG_ROOT directory and select the Store folder
Check on "Search for Nested Projects"
It will populate a list of all the projects, which you can now import.
For customizing CRS, it is not recommended to modify the existing CRS
code. You can create a new module, and layer it on top of CRS to
customize it. For more details on creating a new module above CRS, and
doing an assemble-deploy via CIM, you can follow this article provided
below. It has 3 small parts which can get your task done!
Here is the article:
http://learnoracleatg.blogspot.in/2016/12/create-and-deploy-new-atg-module-on-local-from-scratch-part-1.html

Related

Getting imported files from sample java program to new program

I'm trying to make a small java program revolving around Google Calendars. I've never worked with java before but I was able to get Google's sample code working. In Eclipse, I simply used Import -> Maven, and then made some small changes to the code so that it worked on my Calendar.
Ok, great, now I want to write my own code. I started a new project and imported the Google Calendar API. At the very beginning, there are several import actions:
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
.
.
.
It turns out that I'm missing the second and third files. How do I find these files and how to do import them to the new project?
Please note: I ultimately don't want to rely on importing the Google Calendar API or anything similar, as I will be using another non-java program to run and control this one.
Here's what I tried:
I go back to the sample code, expand Maven Dependencies and find:
google-oauth-client-jetty-1.19.0.jar
google-oauth-client-java6-1.19.0.jar
I see that these files are in:
C:\******\.m2\repository\com\google\oauth-client\google-oauth-client-jetty\1.19.0
C:\******\.m2\repository\com\google\oauth-client\google-oauth-client-java6\1.19.0
I tried to add these with Import -> Java EE -> App Client JAR file
Didn't work, do I need to change the file name or import name? Maybe these aren't the correct files anyway.
I also tried to add these by creating a lib folder in my project folder and add the JAR files directly there.
I guess from your question your project is just an Eclipse project rather than a Maven project. Obviously Maven automatically add the required jars of the dependencies stated in pom.xml for example google-oauth-client-java6-1.19.0.jar is a dependency of google-oauth-client-jetty-1.19.0.jar.
To add external jar to your project in Eclipse you need to select the project then from the Project menu select Properties. On the properties popup click on the Java Build Path, you have two options depending where the jars are stored, if you are referring to the maven .m2 directory then choose 'Add External Jars' otherwise if you added them to a lib folder in the project choose Add Jars

How to import or extend existing CRS (CommerceReferenceStore) project into eclipse

I have successfully installed ATG10.2 and deployed CRS using CIM.
Now i want to import CRS Project into eclipse.
But i am unable to import it.
Please help me to import into eclipse (elipse ATG Plugin already installed).
This is a common tweak, I use it. If you are able to create a new ATG web module then you would be able to do this too.
Create a test application from your atg plugin, and copy its .classpath and .project files to the CommerceReferenceStore Folder under ATG root directory, don't forget to change the name of the project in the .project file. You can change the classpath after importing the project to eclipse.
then go to eclipse and import an already existing project (without using atg plugin), you are good to go.
If you want to get the individual modules as projects, add these two files to the individual modules and import them to eclipse.
Hope this helps!
Install the Eclipse plugin from %DYNAMO_ROOT%\Eclipse folder. Then add new exusting ATG project.

IBM Worklight - How to import Worklight code into Eclipse?

I am looking for information on how to import existing Worklight code into a Worklight-enabled Eclipse environment.
In addition to importing a project, it seems that it is also possible to import an app and an adapter. What subcomponents would an app and an adapter have to consist of to make them importable and re-usable? Are there any examples of such importable components on the web?
I am aware of this discussion on the IBM support page but am looking for more detail.
The below will export and import both apps and adapters belonging to the same project.
Export
- In Eclipse, right-click a project and choose Export... choose to export the project as a zip file.
Import
- In Eclipse, right-click the Project Explorer view and choose Import... choose to import an existing project (your zip file).
An app is contained in the appName folder within the apps folder. And adapter is contained in the adapterName folder within the adapters folder.
There are no mechanisms to export and import the CODE of an adapter or application. You will need to copy-paste the files/folders manually and likely change many references in your files as many locations have different values based on the project name you've used.
Such an approach is highly not recommend by Worklight.
Starting Worklight 6.1, the training modules also contain a portion about how to import projects.

Importing a existing Web Application , into Eclipse

I need to import a existing Web Application , into Eclipse .
Please see the Structure of my Web Application as shown in the below figure .
http://imageshack.us/f/220/structurek.jpg/
From Eclipse IDE , while using import What option i need to select that is should i use
Existing projects into Eclipse
Archive File
File System
please see this image
http://imageshack.us/f/850/eclipseo.jpg/
Import existing projects into Eclipse works only for projects that were created in Eclipse.
And you're definitely not dealing with an Archive File here.
Import from the File System just copies the resources but does not actually create an Eclipse project for you.
What I would advise you, is to create a new Dynamic Web Project, configuring all the required facets, and then just copy all the contents of your existing app to the WebContent folder, either by drag'n'dropping it into the Project Explorer or by using Import from the File System, overwriting all the contents.
So far, there seems to be no other way to do it in Eclipse. However you may check out the similar post. The user #RC recommends using ant task for this process, but I'm more than sure that it won't configure all the required facets for you. It may work for some simple Java projects, but surely not enough for Java EE projects.

how to setup the sphinx with netbeans

i have successfully configured sphinx4 with eclipse.
for that these steps i have used.
copy my java and config files to SRC folder
all the necessary jar files (in the lib). the lib folder added to the root of the project
build those jar files (jsapi files too)
change the configuration file and give the proper path
test the java file
but in Netbeans i really dont understand how to do the proper steps. can someone help me. the jar files should be added to "Libraries" rite.
then after adding them how to build them.
in the netbeans it dont show a SRC folder. so all the java files and configuration files should go to Source Packages folder rite.
can someone help me with this. please
If you have sphinx4-1.0beta6 then you can just open the folder up as a netbeans project. Open netbeans, click open project, then navigate to the sphinx folder and open it. It is already a netbeans project file type as of this version. I assume this will work in later versions also. I have no clue why sphinx doesn't say this on their website.
Sphinx4 is a Java library available in OSS repository, so you can use it as any library.
If your project uses maven/gradle, add repository in your project configuration, then add dependency on two packages - sphinx4 core and sphinx4-data. The former is the main library, the latter is required if you want to recognize US English. Then just start writing the code.
If you want to rely on jar files, just download sphinx4-core and sphinx4-data files from the repository and add them as dependency to the project, then start writing code.
If you want to modify or develop sphinx4 itself, install Gradle support in your IDE, then import latest sphinx4 sources as a Gradle project.
For more details and links see the tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
click on Add JAR/Folder
select jar file you want to add