teamcity 2017.1.1 artifactory plugin release management - plugins

We are using TeamCity with the Artifactory plugin, utilising the release management functions for Maven builds.
However, I have just upgraded TeamCity from 8.1.4 to 2017.1.1 and following a successful run of a Release build using the Artifactory Release Management tab, the subsequent build displays a link to the build info but not the Artifactory Release Promotion.
We are running Artifactory Pro 4.15.0, v.2.3.1 of the plugin.
Any ideas why it might not be available?
We have a teamcity-server.log entry:
[2017-05-30 16:40:04,149] ERROR - jetbrains.buildServer.SERVER - Error java.lang.InstantiationException: bean buildId not found within scope while processing request: GET '/viewLog.html?buildId=1151702&tab=buildResultsDiv&buildTypeId=XXXXXXX_Compile', from client 162.11.60.209:58332, authenticated as XXXXXXX {id=2}
java.lang.InstantiationException: bean buildId not found within scope
at org.apache.jsp.plugins.artifactory.promotionResultsFragmentExtension_jsp._jspService(promotionResultsFragmentExtension_jsp.java:136)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

Please see this issue addressed in JIRA [TCAP-293][1]. This bug will be fixed in the next release of the TeamCity plugin which is scheduled for the end of June.

Related

How to fix this Maven error in eclipse - "Could not calculate build plan: Plugin or one of its dependencies cannot be resolved""

When trying to create a Maven project in Eclipse for Selenium, I am getting the following errors in my POM.xml :
CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.0 or one of its dependencies could not be resolved
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (execution: default-compile, phase: compile)
org.apache.maven.plugins:maven-resources-plugin:pom:3.0.2 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (execution: default-testCompile, phase: test-compile)
I am using the following artifacts :
Eclipse - Version: Kepler Service Release 2
Maven artifact id - maven-archetype-quickstart - v1.4
Group id - org.apache.maven.archetypes
You have to fix your settings or maven installation to use the HTTPS version of http://repo.maven.apache.org/maven2 (https://repo.maven.apache.org/maven2): that probably what is blocking your Eclipse installation from finding the dependency, and therefore from continuing.
This is what happens when you type in the HTTP url:
501 HTTPS Required.
Use https://repo.maven.apache.org/maven2/
More information at https://links.sonatype.com/central/501-https-required
To fix that:
Update your Eclipse installation to latest (2020.06)
Update your Maven to latest (3.6.3)
You may clean up the "*.lastUpdated" files from your local repository (%USERPROFILE%\.m2\repository\). They may block Maven from retrying to download dependency (their purpose is actually to avoid download missing dependency more than once a day).
If the previous items failed, you may also try to add the HTTPs repository in your settings: https://maven.apache.org/guides/mini/guide-multiple-repositories.html
Note: Kepler is very old. If you can't, for various reason, switch to latest Eclipse, you may also update maven and build the pom with maven directly rather than Eclipse. m2e (the Eclipse Plugin in charge of handling maven) does not use the mvn installation for dependency resolution.

Maven offline build fails when it encouners google guava url with invalid character

I need to make my Tycho-Maven build work in offline mode, so I can deploy it to environments with no Internet connection and let people run the build from the previously downloaded artifacts for the third party code my app depends on. The product being built is an Eclipse RCP product, using the org.eclipse.tycho:target-platform-configuration plug-in to load the dependencies from an RCP target file.
First I run mvn -Dmaven.repo.local=/some/path/ -DgeneratePom=true clean install to create the artifacts, and that build succeeds. Then when I run mvn -Dmaven.repo.local=/some/path/ -o clean install it fails because it's running in offline mode and there is no local cache available for http://download.eclipse.org/tools/cdt/releases/8.6
So then I run mvn -Dmaven.repo.local=/some/path/ dependency:go-offline to make it download all the artifacts it needs for the build, but it fails with this message:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins
(resolve-plugins) on project : Nested: Could not transfer
artifact com.google.guava:guava:jar:[10.0.1,14.0.1] from/to central
(https://repo.maven.apache.org/maven2): Illegal character in path at
index 60:
https://repo.maven.apache.org/maven2/com/google/guava/guava/[10.0.1,14.0.1]/guava-[10.0.1,14.0.1].jar
Index 60 is the "[" character in the version range specifier for the guava jar. I have no idea where that URL gets created and why it's not URL-encoded. It would be nice to get the dependency:go-offline goal to complete execution, but I don't think it's the source of my problem.
The reason I say that is when I run that goal, I see this in the output
[INFO] Adding repository
http://download.eclipse.org/tools/cdt/releases/8.6 [INFO] Fetching
p2.index from http://download.eclipse.org/tools/cdt/releases/8.6/r/
(0B at 0B/s)
I don't know why it downloads 0 Bytes, but I assume this is why I can't find a cache of the CDT bundles when I try to do an offline build.
If anyone has an idea how to work around this failure, or any other approach to make an offline build work, that would be very helpful.
I created this Maven bug report in the issue tracker.
In the course of creating a stripped down project to demonstrate the problem, I discovered the cause. The presence of org.eclipse.xtend:xtend-maven-plugin in the pom was causing the problem. The plug-in is not used, and was perhaps misconfigured, per a message I saw in the build output.

Unable to register extension org.sonar.plugins.scala.cobertura.CoberturaSensor

I am using SonarQube 5.1 and its running on localhost. It was working out of box for java, but when i added the plugin for scala - http://docs.codehaus.org/display/SONAR/Scala+Plugin (i checked out the code from github, build the jar and then installed in sonarqube installation), now every time i invoke the gradle command sonarRunner - I am getting this error:
19:52:55.232 [ERROR] [system.err] ERROR: Unable to execute Sonar
19:52:55.233 [ERROR] [system.err] ERROR: Caused by: Unable to register extension org.sonar.plugins.scala.cobertura.CoberturaSensor
19:52:55.233 [ERROR] [system.err] ERROR: Caused by: org/sonar/plugins/cobertura/api/AbstractCoberturaParser
19:52:55.233 [ERROR] [system.err] ERROR: Caused by: org.sonar.plugins.cobertura.api.AbstractCoberturaParser
I tried searching for cause of the issue but could not find anything online. Please help me.
It took me about a million years to find this, so I hope it's helpful to someone. This error is caused by updates to the sonar api that cause incompatibility with versions older than 4.5.
The solution is to use the updated version of the sonar scala plugin which is available here: https://github.com/1and1/sonar-scala
This built straight away for me and started analyzing scala without error.
There are several things you can update in your project and on your Sonar server.
Go to your SonarQube Update Center
Go to Administration -> System -> Update Center
Update the CorberturaSenor plugin
As per this screenshot, find the specific plugin you are using and click update if available(This screenshot is showing a findbugs plugin but it will be the same concept for CorberturaSenor).
Update sonarqube dependency in your project
This example is in Gradle:
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.1-rc1"
}
Update sonar version
This example is in Gradle
sonarqube {
version='2.1-rc1'
}
Update your CoberturaSensor plugin dependency in your project.
Get the fully qualified name of your dependency you are using and search for a new version. Then update it in your build tool.
Check here for more info on this error: Unable to register extension org.sonar.plugins.*

Eclipse maven plugin getting HTTP 416 when retrieving jar

I'm getting this error in the eclipse logs when I use the maven integration plugin for eclipse in my project:
Build errors for transport-data; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources (default-resources) on project transport-data: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, org.apache.maven.shared:maven-filtering:jar:1.0-beta-4, org.codehaus.plexus:plexus-interpolation:jar:1.13: Failure to transfer org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 from/to central (http://repo1.maven.org/maven2): Failed to transfer http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar. Error code 416, Requested Range Not Satisfiable
From the browser I can access the jar but how come the plugin gets a 416 status response?
I'm using STS 2.7.2.RELEASE (Eclipse 3.6) with the Maven Integration plugin on Maven 2.2.1
and my OS is Ubuntu 10.10. If someone could please help explain this mystery to me I'd be very grateful.
Thanks!
I know that this is a very old request, but I just came across it too. What worked for me was deleting the relevant downloaded components in the .m2 repository. I figured that there may be some partially-loaded bits in there as I had used both Eclipse and command line with maven.
Hope this helps...
HTTP 416 means that the client requested only a portion of the file, but the server probably doesn't support such requests. Though I would be surprised if maven would have broken their repo webserver.
Another possibility is that you are behind a proxy which doesn't support range requests.

m2eclipse can't resolve archetypes from nexus

in our company we're using a local nexus repository. If I now try to create a new Maven project using the eclipse project wizard (M2Eclipse 0.12.1 installed) I allways get an 503 error from nexus.
org.eclipse.core.runtime.CoreException: Could not resolve artifact
at org.maven.ide.eclipse.internal.embedder.MavenImpl.resolve(MavenImpl.java:577)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:526)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:437)
at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Contains: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.0-alpha-4 from/to nexus (http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public): Failed to transfer http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/1.0-alpha-4/maven-archetype-quickstart-1.0-alpha-4.pom. Error code 503, Service Unavailable
org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.0-alpha-4 from/to nexus (http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public): Failed to transfer http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/1.0-alpha-4/maven-archetype-quickstart-1.0-alpha-4.pom. Error code 503, Service Unavailable
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1413)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1404)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.flush(AsyncRepositoryConnector.java:895)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.flush(AsyncRepositoryConnector.java:889)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.get(AsyncRepositoryConnector.java:276)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:438)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:214)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:296)
at org.maven.ide.eclipse.internal.embedder.MavenImpl.resolve(MavenImpl.java:555)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:526)
at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:437)
at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.sonatype.aether.connector.async.TransferException: Failed to transfer http://vm-nexus-slx.heuboe.hbintern:8080/nexus/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/1.0-alpha-4/maven-archetype-quickstart-1.0-alpha-4.pom. Error code 503, Service Unavailable
Resolving 'normal' artifacts works fine either using the integrated build or running install as "run-as" task.
I'm short before going nuts on this problem.
All ideas welcome.
Thx in advance
JayBee
Well I figured out so far that it seems, that m2eclipse is using the proxy specified in .m2/settings.xml but if relolving an archetype it ignores the nonProxyHosts.
I submitted a Bug-Report to the m2eclipse projekt:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=348893
Thx for the help.
We (my team, that is) also get this issue. Command line Maven works like a charm, in Eclipse we get a red wall by Maven (we proxy all dependencies through our Nexus).
I have however noticed, that once I set m2eclipse in Offline mode, it finds all dependencies. Since I often build in command line, resolving new dependencies this way is not an issue for me (it still might annoying for some).
Eclipse -> Window -> Preferences -> Maven
Uncheck the option - Do not automatically update dependencies from remote repositories.
This should take care of the problem.