I have full Business Central JBPM 7.29.0. I want to use Nexus for the storing my drool's jars and it's dependencies instead of maven repository of business central.
In documentation I have found nothing. Is it posiible?
follow below steps to configure the external Maven repository :
Create a Maven settings.xml file with connection and access details for your external repository. For details about the settings.xml file, see the Maven Settings Reference[1].
Save the file in a known location, for example, /opt/custom-config/settings.xml.
In your jBPM installation directory, navigate to the standalone-full.xml file. For example, if you use a JBoss EAP installation for jBPM, go to /EAP_HOME/standalone/configuration/standalone-full.xml.
Open standalone-full.xml and under the tag, set the kie.maven.settings.custom property to the full path name of the settings.xml file.
For example:
<property name="kie.maven.settings.custom" value="/opt/custom-config/settings.xml"/>
Start or restart Business Central and Process Server.
[1] https://maven.apache.org/settings.html
Related
Using the URL:
http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/
as a repository in the settings.xml and then adding the dependencies in pom.xml as described here:
https://www.ibm.com/support/knowledgecenter/en/was_beta/com.ibm.websphere.wdt.doc/topics/localrepo.htm
my libraries based on Liberty v17.0.0.1 are not found.
For example latest version of the basics.jar is 1.2.16 in my server installation, but the website only goes to 1.2.12.
Where should I find the jar files matching what gets installed with 17.0.0.1 for my repository entry in the settings.xml and dependencies in the pom.xml?
The Liberty dependencies were moved into maven central to simplify the process. There is no longer a need to depend on the special repository.
Using Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 2
Build id: 20140224-0627.
When I select File -> new -> Maven Project -> Use Default Workspace Location. I get the following Dialog. Local Default Catalog is empty:
I click Configure button, and then click on Maven Architecture Catalogs. The page says:
Location of catalog files
The Archetype Plugin knows by default about its internal catalog. It
also knows about the local and remote catalogs.
local represents the ~/.m2/archetype-catalog.xml catalog file.
remote represents the
http://repo.maven.apache.org/maven2/archetype-catalog.xml catalog
file.
The Archetype Plugin can also read catalogs from filesystem/HTTP by
providing the path/URL of a catalog file or of a directory containing
an archetype-catalog.xml file.
If Execute the following on the command line (I have everyhing under tools directory, Eclipse, Maven, WildFly, etc.)
C:\Tools>dir archetype-catalog.xml /s
It doesn't find any file.
So default local catalog doen't exist! Why is that?
I have downloaded http://repo.maven.apache.org/maven2/archetype-catalog.xml, but I don't know where to put it to become the default local catalog, because I don't know what ~/.m2/archetype-catalog.xml file path is. I tried with C:\Tools\eclipse\.m2\archetype-catalog.xml and several other locations without luck. Sorry, I'm new to Java eco-system and Eclipse IDE.
I have the latest M2Eclipse found here: http://download.eclipse.org/technology/m2e/releases
EDIT: I figured out what ~ means on ~/.m2/archetype-catalog.xml. I have put archetype-catalog.xml into c:\users\my.user.name\.m2\ and voilĂ default local catalog is now full of archetypes. But still. Why it didn't exist in the first place? This is very annoying.
The archetype catalogs used by eclipse can be found in Window -> Preferences, then in the section Maven -> Archetypes. If no catalog is listed there, you can add the official maven remote catalog: http://repo.maven.apache.org/maven2/archetype-catalog.xml
No need to configure local archetypes unless you have created your own archetype. In this case, when you install it on your machine, the maven will create the archetype-catalog.xml file on the ~/.m2/repository path. In another case, to retrieve any artifact the only things that you need to do is configure the remote catalog, for example, to configure Spring Catalog, you need the following
If you see the following screen, you can observe that I don't have anything in my Default Local Catalog similar to you while in All Catalogs, I have the archetypes from other repositories.
Finally is important to know the difference between archetypes and dependencies. The archetypes let us create a project from it, the others are the libraries to own the project.
Background
My Eclipse RCP application is built using Tycho. It consists of multiple components (in the form of OSGi bundles/Eclipse plug-ins). One of these component contains the product file and materializes the product.
There is a reactor POM at the application root, which builds all components in order, but I also want to build other components independently (using mvn deploy) .
Building such a single component works as follows:
Retrieve the latest versions of all the component's dependencies from our company (p2) repository.
Build the component.
Deploy the component to our company repository to be used as a dependency for other components itself.
Note: Our repository is a normal maven2 repository hosted on a Nexus, whose RCP artifacts are automatically mapped to a p2 repository format as well. This way, Tycho can use the p2 repository format to find dependencies, while the standard Maven deployment can be used. This works fine.
Note: My parent POM makes sure that we look for dependencies at the p2 repository URL. The deployment URL is the default maven2 format location of the repository. This works fine.
Problem
When building such a single component through the command-line (mvn deploy), Maven looks for intra-project dependencies in the p2 repository and they are correctly resolved (i.e. latest version is automatically downloaded and used in build).
However, when developing in Eclipse, the IDE cannot resolve them. The manifest files gives an error at each of my intra-project dependencies that they cannot be resolved.
Question
My question is: How can I make the Eclipse IDE look for dependencies (and new versions of dependencies) in either:
My local p2 repository (~/.m2/repository/p2/osgi/bundles)
My company p2 repository (nexus.mycompany.com/myproduct-snapshots/.meta/p2)
Ideally, it would look for them every time and fetch the latest version if a newer version is available.
If it does not use the p2 repository URLs in the POM, how should I configure Eclipse?
Example
Consider an eclipse plug-in com.mycompany.myproduct.fancy, which depends on another eclipse plug-in com.mycompany.myproduct.core.
Both also have a POM (configured for Tycho use), which (through their parent POM) have my Nexus repositories configured correctly: maven2 repository URL for deployment and p2 repository URL to look for dependencies.
First I deploy the core plug-in to my maven repository (using the default mvn deploy). The Nexus repository will provide this deployed plug-in in both maven and p2 format.
When I build the fancy component through the command line (using mvn install), the (earlier deployed) core component is found and downloaded automatically.
project/com.mycompany.myproduct.fancy$ mvn clean install
<searches in p2 repository, download core>
<builds fancy>
<SUCCESS>
When I open a new Eclipse workspace and open the fancy component, its Manifest (which contains its dependencies) gives the following error:
Bundle 'com.mycompany.myproduct.core' cannot be resolved.
My question is: how can I develop the fancy component in the Eclipse IDE without the need to open core as project in Eclipse.
Speculation
This is some speculation from my side. Please correct me if I'm wrong and any other solution to the actual problem is also welcome!
I know the m2e plug-in of the Eclipse IDE currently maps Maven POMs to Eclipse concepts (using m2e connectors). I have installed the dedicated Tycho connectors. For example, the mvn compile step is actually performed by the Eclipse JDT compiler.
I also know that when a complete Tycho product is started in Eclipse, it is run in the Eclipse PDE environment. For example, I need to a specify a target platform in my Run configuration.
I know I can open all components in my Eclipse workspace. This would solve the problem, but is not feasible as I have many components and this would break independent component development.
I assume the Eclipse m2e mapping and/or the PDE build environment is not smart enough to fetch (latest) dependencies automatically at build time. Please correct me if I'm wrong. :)
Therefore, I assume I need to specify the target platform at build time too. I have taken a look at Window > Preferences > Plug-in Development > Target Platform. I can add our p2 repository to the Target Platform, which solves the problem. However this gives many problems:
I need a feature containing all components for this to work. Only features can be added.
Every time I deploy a new build of a single component, I would have to rebuild the complete feature (to create a new feature version on our p2 repository).
Every time I update a component and build the feature, I would have to manually change the Target Platform.
If the above is all correct, I speculate I need an m2e connector (or a different one from the current one) that actually checks the p2 repositories specified in the POM when resolving the OSGi dependencies and automatically adds those to the target platform.
As indicated by Nick Wilson, you will need to install the m2e Tycho Configurator, which basically "links up" Eclipse and Tycho (i.e., makes Tycho available in Eclipse).
You should've been pointed towards it after having installed m2e, but you can also install it manually:
Go to Window > Preferences > Maven > Discovery.
Click the "Open Catalog" button. This will open the "m2e Marketplace" window.
Search for "tycho", this should give you the "Tycho Configurator" as sole search result.
Click "Finish", you're done.
I've had this issue as well, and it isn't simple to find the solution, so I hope this helps!
The "most automated" way to configure your target platform in Eclipse is to use a target file. That file can be checked in with your sources, so every developer only needs to open the file and click on "Set as Target Platform" to activate it. AFAIK there is no m2e connector or Eclipse plug-in which does that automatically.
Given your development process, setting up this target file is a little more tricky. Since you don't have a feature which contains the latest version of all your bundles, you need to include the bundles directly in the target file. This is not possible via the rich editor, but can be done with a text editor:
Create a target definition file, add your p2 repository, and select any feature from that p2 repository. Save the file.
Open the target file in a text editor, remove the <unit> entry for the feature you added.
Instead, add an entry for each of your bundles:
<unit id="a.bundle.symbolic.name" version="0.0.0"/>
This target file then contains the latest version of each of the listed bundles. To see the content, open the file with the "Target Editor" again and switch to the "Content" tab. This file can now be used by all developers.
Note: When a new version of one of the bundles is deployed to Nexus, the developers will only see that new version if they open the target file and choose "Set as Target Platform" again.
I made a Hello word example in springMVC.Following are my steps.
1.Installed maven-eclipse integeration in eclipse.
2.Download maven and set environment variables,JAVA_HOME etc.
3.Check to see if maven is running via cmd and it is.
4.Create new maven project and in pom.xml,set spring core,web,web-mvc dependencies.
5.Create new Dynamic web project and under its properties->Deployment assembly I have added maven project.
6.Added spring jars core,mvc,web,context etc in dynamic web project lib folder.
It's all working now but I am not able to understand the working.
Before,I was trying to make it work without maven by copy and paste jars into lib,classpath,by makiing user library and adding jars to it and then add it to current project but every time it was giving some error.Sometimes it was classnotfound,sometimes it was context related.
Finally i tried this maven thing by searching some online tutorials and it works now.
But I am not able get it.Can anybody explain me in detail that how those spring jars getting picked during development and deployment.What exactly is maven doing that I was not doing before.I am in the state of total confusion.I know the flow of my mvc project(controllers,views etc.).
Maven searches the libraries (they are also called artifacts in the Maven language) in repositories. In the Maven Central Repository many libraries are hosted - http://search.maven.org/. After Maven finds the libraries in a repository, it caches them in your local repository. It is in ${userDir}/.m2 The next time, Maven will look in your local repository, instead of downloading again from the Central Repository.
P.S You can specify many other repositories different than the Central Repository. This is done in the <repositories> tag in your pom.xml. The Central Repository is always searched by default.
if you don't want use maven you have change your project setup. remove the pom.xml and copy all needed jar into the webapp/WEB-INF/libs folder.
Copy the jar from the a maven build(target folder). in this case you have all together without grabbing them one by one over then.
Hello!
My question is related to eclipse and maven integration, maven repositories and global index update from central mirror.
The quiz is:
Let's supose that I don't have specified any special mirror, nor
{maveninstallationfolder}\conf\settings.xml
neither
{user-home}.m2\settings.xml
So then, why or how eclipse 'maven repositories' tab decides to fetch central at
repo.maven.apache.org/maven2
or
repo1.maven.org/maven2
?
Which settings.xml is reloading eclipse when I click on 'reload settings' button?
I ask this because I have two different eclipse installations ('indigo' at work, 'juno' at home).
At home when I click on 'update index' it works ok. It updates it from central mirror repo.maven.apache.org
At work, doing the same operation it always fails trying to update it from repo1.maven.org (I don't know neither I care if because of firewall or proxy issues)
I would like to know how to change it and force it to fetch it from one or another.
I attach a picture to clarify
thanks in advance
If you have a preferred central repo or if you are using a company maven proxy (like nexus or artifactory) you can set it in the user settings.xml. You may have to create this file. This is normally in ~/.m2 on linux or c:\Users\YourUser\.m2 on Win7 or c:\Documents and Settings\YourUser\.m2 on WinXP (IIRC). Note that this is the same place as your local repostitory base folder.
When I create a new settings.xml on a machine that doesn't have one, I go to the maven2 documentations web pages, find the sample settings.xml that is there and copy it to a new file I create.
There is a global settings.xml in $M2_HOME\conf but it usually isn't changed from the default. It does document all the sections you can add to your settings.xml since both have the same sections. (If you are using the embedded version of maven in something like MyEclipse or the maven eclipse plugin, I don't know where they put it.)
For another question, if you need to configure Maven to use a corporate proxy to get out of the company network to maven central, you can put that information in your user settings.xml file--the same one you create to set the URL to use.
You may have different versions of Maven running on the two machines. That would explain the different names for central. But the two names both point to the same place.