com.springsource.org.aopalliance Jar is missing from Nexus repository. Which Repository to add to get the same - spring

I had tried adding Repository by using this blog post.
But Still Not able to get the dependency http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.aopalliance&version=1.0.0&searchType=bundlesBySymbolicName&searchQuery=com.springsource.org.aopalliance
Then I read ebr.springsource.com/repository/app/faq Which says that "The repository is frozen "
So Which repository should I configure to Nexus Server to get the mentioned jar and get the data.

I didn't find "com.springsource.org.aopalliance" either.
So I check the Spring's dependencies (its pom.xml, version 4.1) And I found the following:
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
I almost sure Spring uses the same version of aopalliance for a while.

Related

Nexus sonatype does not get zip dependency

I have setup Sonatype Nexus with Maven and seems to be working. However, my project depends (transitively) on docbook-xsl-1.75.2 but instead of a jar there you find a zip file. Is this the reason why Nexus is not getting it, that it is a zip file? I haven't found any Nexus configuration page in the web console offering a possible filter.
I browse my Nexus repository and see it gets the pom file but nothing else.
That module has no main artifact, it's packaging type is set to "pom".
What it does have is two additional artifacts which can be retrieved using Maven module classifiers as follows:
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xsl</artifactId>
<version>1.75.2</version>
<classifier>resources</classifier>
<type>zip</type>
</dependency>
And
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xsl</artifactId>
<version>1.75.2</version>
<classifier>ns-resources</classifier>
<type>zip</type>
</dependency>
Sorry, I have no idea how you'd retrieve these as transitive dependencies.
The next day, and after restarting Nexus it pulled the dependency. I don't still understand the magic behind Nexus not seeing the dependencies while they are clearly available but at least this question is resolved.

how to add my one project jar in another maven project in netbeans

I have one project jar oauth.
I want to add it in another maven project . I tried to change pom.xml file but no effect. Can anyone please suggest me?
I tried to add following dependency in my pom.xml file:
<dependency>
<groupId>com.payupaisa.oauth</groupId>
<artifactId>auth</artifactId>
<version>1.0.0</version>
<type>jar</type>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapps/WEB-INF/lib/auth.jar</systemPath>
</dependency>
With the assumption that you have that auth.jar in your local repository (as it builds fine).
Why don't you give a try like this.
<dependency>
<groupId>com.payupaisa.oauth</groupId>
<artifactId>auth</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Honestly speaking I don't prefer to give the jar location in my pom file and using scope as system, I leave this task to handle by Maven to resolve all the artifacts either by searching in local maven repository first(/.m2) or in MAVEN CENTRAL REPO if it is a 3rd party jar.

can't find valid maven repository for hibernate-search-4.2.0.Final.jar

I use maven.
I want to use the last version of hibernate-search : 4.2.0.Final
I was under 3.3.0.Final
I can't a valid maven repository for this version.
Which maven repository I have to use to get this version of hibernate search ?
Because if you go there :
https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.hibernate~hibernate-search~~~~kw,versionexpand
You'll find the version I need, but when I download hibernate-search-4.2.0.Final.jar and I unarchive it, I see there is only META-INF folder but no class in the jar : the jar is invalid !
Thanks for your help !
The hibernate-search project changed their artifact structure to use hibernate-search-orm instead of hibernate-search. Hibernate-search is now just a jar that declares a dependency on hibernate-search-orm which maven will resolve transitively and include in your project.
See the upgrade notes here - https://community.jboss.org/wiki/HibernateSearchMigrationGuide
More specifically this note - https://community.jboss.org/wiki/HibernateSearchMigrationGuide#New_jars_Maven_modules_reorganization
If you look in the pom for hibernate search you will see the dependency - this should all be resolved from central without any additional repository.
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>${project.version}</version>
</dependency>
The best repository for JBoss artifacts is: https://repository.jboss.org/nexus/content/groups/public-jboss/
The available repositories are explained in their wiki: https://community.jboss.org/wiki/MavenRepository
The group public-jboss contains all releases and third-party artifacts required to by JBoss artifacts.
Isn't maven central good enough ?
http://search.maven.org/#search|ga|1|hibernate-search
Since this is a JBoss project, you can get newest builds from our Nexus repository. Here is how to configure it in your ~/.m2/settings.xml. Your pom.xml then should contain this dependecy.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>4.2.0.Final</version>
</dependency>

Can I download a jar file from maven central using maven?

I have a dependency problem with maven. I used to have saxon 8.7 that is located on maven central. Then, I had to upgrade to the latests saxon-b 9.1.0.0 which is only partially on maven central.
This is a snippet of my dependencies:
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon-dom</artifactId>
<version>9.1.0.8</version>
<scope>runtime</scope>
</dependency>
The first artifact 'saxon' is available on maven central, but the secon 'saxon-dom'. Here is the artifact I want.
Can I tell maven to download the "jar" file or am I obliged to download the jar and publish it locally on my maven repo to use it as a dependency?
Did not expect to resolve this so easily :
<dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
<version>9.1.0.8</version>
<classifier>dom</classifier>
</dependency>
Basically, I can get the dependencies that are "attached" to the 'saxon' artifact using the classifier tag. Did not know about this and I found out that the tag existed when I searched for 'saxon' on Sonatype repository (which is quite good). It gave me the dependency snippet above.
Reference : http://maven.apache.org/pom.html
If the required version is not in the repo, then yes you need to do one of the following alternatives
Search for a public repo containing the required version of jar. And add the repo to your pom.xml file. OR
Download it manually, and install it locally on your machine, to help the project build completely.

spring maven repository issue (blog references but wanting to use newer version)

I have created a maven web project using the below site.
http://www.mkyong.com/maven/how-to-create-a-web-application-project-with-maven/
I have performed all the steps given there and executed a simple hello world program. Now, I have to include spring dependencies into my eclipse web project.
So
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>3.1.2</version>
</dependency>
In the dependencies tag, I added the above configuration. Now, it is saying as below:
unable to find jars from the repositories (local and as well as remote)
It gave suggestion to execute the command:
mvn install -artifactid=springframework (something like this)
But when I mentioned version as 2.5.6 it's correctly taken. Is it the problem with the version 3.1.2 being unavailable at maven repository? How do I get the latest versions if maven is not working properly for latest versions?
It also gave me the suggestion to go for manual download and put in local repository.
The Maven coordinates changed over time.
Try:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.core</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
OR Try:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
I'll just find if there is an all-in-one POM or dependency. But "spring-full" looks 1.2.x only and "spring" 2.5.x. CHECKED: Can't find one I've been using separate modules in all projects for sometime (this is better anyway, fine grained dependencies).
The location you can search is at http://ebr.springsource.com/repository/app/
for 3.1.2 see http://ebr.springsource.com/repository/app/library/version/detail?name=org.springframework.spring&version=3.1.2.RELEASE&searchType=librariesByName&searchQuery=spring
Spring have changed their repository URL and online locations at least 3 times to my knowledge over the past 4 years. So I'd look for current information on their website about setting up a Maven <repositories> config to obtain their JARs. Beware of articles with out of date information :(
Also notice the artifactId is different in the 2 example this is another gotcha issue with spring. The "org.springframework.core" are their EBR and OSGi compliant versions of their software. The "spring-core" is the older pre-OSGi co-ordinates. Find what works for you and don't mix them in the same project. For example I am using "spring-core" because I use 3.2.0.M2 which are Milestone releases. But the production release EBR co-ordinates are the best to use.
Sorry for so many edits... but it has been a minefield even if you understand the heritage of getting Spring Source software.

Resources