3rdparty repository issues with maven pom.xml - spring-boot

I was looking for BIRT Dependency in the net. Package my code refers are
import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.model.attribute.Anchor;
It is using chartengineapi and below is the maven dependency entry for POM.
<!-- https://mvnrepository.com/artifact/org.eclipse.birt/chartengineapi -->
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>chartengineapi</artifactId>
<version>2.3.2</version>
</dependency>
Since it is part of other repository (https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/) it gives error in Pom.xml. Could any one help me to sort out this ?

added repository tag and resolved.
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
Add one more <repository></repository> and the give the new repo name and link. It worked for me though I am not sure whether this is a standard approach.

Related

How to correctly setup snapshots deeplearning4j

I tried re-configuring my project for snapshots in intellij, please why is my pom.xml not working according to the documentation
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<releases>..</releases> and <snapshots>..<snapshots/> are outlined in red with a Element 'releases' cannot have character [children], because the type's content type is element-only. error
I took your snippet and tried to build the project locally.
I haven't seen such kind of error, everything in tag looks valid.
The only thing that I have added to build you project is <version>${nd4j.version}</version> tag to
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>${nd4j.backend}</artifactId>
</dependency>
Could you please, make provided above changes and double check your pom.xml file syntax.

mvn release plugin releasing next snapshot not current release

Hello I've been releasing a project from my workstation with no problems. I've recently tried releasing another project from 1.0.0-SNAPSHOT. However when it actually does the release it releases 1.0.1-SNAPSHOT to the snapshots repository instead of 1.0.0 to releases repository.
I've done dryRun=true and it seems fine. In fact it defaults me to the versions:
What is the release version for "Appname"? (...) 1.0.0: :
What is SCM release tag or label for "Appname"? (...) Appname-1.0.0: :
What is the new development version for "Appname"? (...) 1.0.1-SNAPSHOT: :
I take all the defaults.
However when i do the "mvn release:perform"
This is what it does:
[INFO] Uploading: http://{corporate-nexus-site}/snapshots/{app-path}/1.0.1-SNAPSHOT/fei-logging-formatter-1.0.1-20140929.153303-1.jar
...
[INFO] [INFO] BUILD SUCCESS
I'm using latest maven and i manually added latest release plugin. And I can release another project using same parent and settings.xml setup.
Looking at the properties file after a dryrun and prepare it all looks right to me.
I thought originally i had my distribution set up wrong, and was releasing a release to the snapshot repository, but as you can see its actually thinking its doing a good job and releasing a snapshot.
confused royally.
Any ideas on what to try?
thanks.
UPDATE: In the project I updated the pom from 1.0.0-SNAPSHOT to 1.0.0 and did a "mvn deploy" and it put it exactly where I expected in releases, without out all the goodies of course.
UPDATE2: Pom (company name to protect the guilty)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>logging-formatter</groupId>
<artifactId>logging-formatter</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Logging Formatter</name>
<description>logging tool to format your logging in the standard cn way.</description>
<parent>
<groupId>com.companyname.pom.parent.master</groupId>
<artifactId>cn-pom-parent-master</artifactId>
<version>2014.3.0</version>
</parent>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
</build>
<scm>
<url>http://svn.sys.ds.companyname.com/svn/cn-logging</url>
<connection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</connection>
<developerConnection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</developerConnection>
</scm>
<organization>
<name>CompanyName Enterprises</name>
</organization>
<ciManagement>
<system>Jenkins</system>
<url>http://jenkins.sys.ds.companyname.com:8080/job/cn-logging-DEVELOP/</url>
</ciManagement>
</project>
UPDATE3: Adding parent settings info
SETTINGS.XML
<repositories>
<repository>
<id>fei-releases</id>
<name>Ferguson Release Repository</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://{companyname}/nexus/content/repositories/releases</url>
<layout>default</layout>
</repository>
<repository>
<id>fei-snapshots</id>
<name>Ferguson Snapshot Repository</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<url>http://{companyname}/nexus/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
<repository>
<id>fei-thirdparty</id>
<name>Ferguson 3rd Party Repository</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://{companyname}/nexus/content/repositories/thirdparty/</url>
<layout>default</layout>
</repository>
</repositories>
PARENT REPOSITORIES:
<repositories>
<repository>
<id>third-party</id>
<name>3rd Party Repository</name>
<url>http://{companyname}/nexus/content/repositories/thirdparty/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories/>
PARENT DISTRIBUTION MANAGEMENT:
<distributionManagement>
<repository>
<id>fei-releases</id>
<name>Ferguson Release Repository</name>
<url>http://{companyname}/nexus/content/repositories/releases</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>fei-snapshots</id>
<name>Ferguson Snapshot Repository</name>
<url>http://{companyname}/nexus/content/repositories/snapshots</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
i did a "mvn release:clean release:prepare" then a "mvn
release:perform" Same steps I used to release another project without
issue using the same parent.
So you have another project that is deployed fine after release? (you see the release version in the repo)?
If so, it sounds like an issue in your 'problematic' project. Can you share its pom.xml?
#SteveHolt,
I see a red flag in your pom.xml file:
<scm>
<url>http://svn.sys.ds.companyname.com/svn/cn-logging</url>
<connection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</connection>
<developerConnection>scm:svn:http://svn.sys.ds.companyname.com/svn/cn-logging</developerConnection>
</scm>
None of these urls contain the trunk, branches, or tags keywords.
Consequently, when Maven creates the release tag, it tells SVN to use the same url as before:
http://svn.sys.ds.companyname.com/svn/cn-logging
When release-prepare runs, it performs
$ svn checkout http://svn.sys.ds.companyname.com/svn/cn-logging/
but it can't tell apart the release tag from the development trunk.
Therefore it retrieves the post-release snapshot revision (which is the latest commit) rather than the release revision (the preceding commit).
Solution:
Create a trunk dir under cn-logging and move all your code into it:
svn/cn-logging/
trunk/
pom.xml
src/
main/
java/
branches/
tags/
Hope that helps.

Pom.xml throws Missing artifact error for org.springframework.security.extentions continously

Below is a small part my pom.xml for SSO using SAML,
<properties>
<SAML-version>1.0.0-RC2-SNAPSHOT</SAML-version>
</properties>
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>${SAML-version}</version>
</dependency>
for which STS(spring tool suite 3.1) throws below error continuosly,
"Missing artifact org.springframework.security.extensions:spring-security-saml2- core:jar:1.0.0-RC2-SNAPSHOT".
I navigated to maven repo and i can find the jar downloaded by maven.
Kindly help me.
Thanks,Selva
Add This
<repositories>
<repository>
<id>repo.springsource.org</id>
<name>repo.springsource.org-snapshots</name>
<url>http://repo.springsource.org/libs-snapshot</url>
</repository>
</repositories>
The Spring Security SAML website is currently incorrect.. The groupId should actually be org.springframework.security.extensions instead of just org.springframework.security.
The below dependency configuration works for me:
<dependencies>
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>1.0.0.RC2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

Twitter4j via maven - classes are missing

I have integrated twitter4j into my project via maven, using the depndencies / repositories as shown on the twitter4j homepage :
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>[2.2,)</version>
</dependency>
..
<repository>
<id>twitter4j.org</id>
<name>twitter4j.org Repository</name>
<url>http://twitter4j.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Unfortunately, not all resourcesfrom the twitter4j core project are available in my project. For example, the interface "StatusListener" is not.
Can maybe someone give me a hint what is wrong?
Looks like the twitter4j.StatusListener class moved to the twitter4j-stream artifact in version 2.2.0. Add it to your dependency list.

Maven repository lookup order

We have an internal Apache Archiva based repository and we have configured the repositories tag in pom.xml to be as follows. Can I assume that all dependency access will get resolved by internal repository if you have access to it and will get resolved by other repositories listed below, if internal repository is down for a certain reason.
<repositories>
<repository>
<id>internal</id>
<name>Internal Repository</name>
<url>http://192.168.1.2/archiva/repository/internal</url>
</repository>
<repository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
....
</repositories>
EDIT:
I want to do away with the .m2/settings.xml file. I want to define this in my pom.xml file, so that if my repository manager is UP and running I would want the runtime to connect there, else would want to fallback into the other repositories. Would this be possible?
Maven 3.0 had it fixed as you can see in Maven developer's Jira below. The lookup will be done in the order they are declared.
https://issues.apache.org/jira/browse/MNG-4400

Resources