SonarQube Scanner - Long pause between plugin downloads - java

Maven Sonar scanner is taking a long time to download the plugins ( [INFO] Load/download plugins (done) | time=495872ms) approx. 9 mins every time a build is triggered. Also, the cache is not working as the builds are triggered on the cloud (Azure DevOps)) with an agentless/serverless architecture. What could be solutions to reduce this time that is built faster?
[INFO] User cache: /home/vsts/.sonar/cache
[INFO] SonarQube version: 7.9.1
[INFO] Default locale: "en", source code encoding: "UTF-8"
[INFO] Load global settings
[INFO] Load global settings (done) | time=1097ms
[INFO] Server id: #####-$$xxxxx$$$
[INFO] User cache: /home/vsts/.sonar/cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=211ms
[INFO] Load/download plugins (done) | time=495872ms
[INFO] Loaded core extensions: developer-scanner

You can build a self-hosted agent to run the pipeline. So that the plugins can be cached on the local agent machine. Refer to the detailed steps here to create self-hosted agent.
You can also manually download the plugin jars with its dependencies, and include them in the code repo. Then you can install them manually in your pipeline using a script task to run below commands: See here.
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
For example:
mvn install:install-file -Dfile=/plugins/sonar-maven-plugin-3.6.0.1398.jar -DgroupId=org.sonarsource.scanner.maven -DartifactId=sonar-maven-plugin -Dversion=3.6.0.1398 -Dpackaging=jar`
mvn install:install-file -Dfile=/plugins/sonar-scanner-api-2.12.0.1661.jar -DgroupId=org.sonarsource.scanner.api -DartifactId=sonar-scanner-api -Dversion=2.12.0.1661 -Dpackaging=jar
You can also try using maven-install-plugin in pom file to install the local jars. See this thread for more information.

Related

maven release plugin fails second time on gitlab

I setup a pipeline on gitlab but I get a weird error "You don't have a SNAPSHOT project in the reactor projects list"
I'm just trying to deploy a java spring boot.
Below the pom.xml (only what's relevant)
<name>Project Phoenix - Base</name>
<groupId>com.gfs</groupId>
<artifactId>phoenix</artifactId>
<version>1.12-SNAPSHOT</version>
<packaging>pom</packaging>
...
<scm>
<developerConnection>scm:git:${project.scm.url}</developerConnection>
<url>git#gitlab.com:"myuser"/phoenix.git</url>
<tag>HEAD</tag>
</scm>
....
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven.release.plugin}</version>
<configuration>
<scmDevelopmentCommitComment>#{prefix} prepare for next development iteration [skip ci]</scmDevelopmentCommitComment>
</configuration>
</plugin>
My gitlab-ci.yml looks like this:
workflow:
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == 'master'
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
MAVEN_CLI_OPTS: "-s settings.xml --batch-mode --errors --fail-at-end --show-version"
MAVEN_IMAGE: maven:3.8.5-openjdk-17-slim
services:
- docker:dind
stages:
- build
- release
cache:
paths:
- .m2/repository/
- target/
build-job:
image: $MAVEN_IMAGE
stage: build
script:
- echo "Building $MODULE"
- mvn clean package -B $MAVEN_CLI_OPTS
release-job:
image: $MAVEN_IMAGE
stage: release
tags:
- local-runner
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- apt-get update -qq
- apt-get install -qq git
- git config --global user.email "hidden"
- git config --global user.name "hidden"
- git checkout -B "$CI_COMMIT_REF_NAME"
script:
- echo "Creating the release"
- mvn $MAVEN_CLI_OPTS clean deploy release:prepare release:perform
only:
- master
After I push, gitlab starts a pipeline on the commit which is successful and it deploys in the gitlab package registry the snapshot and the release.
However, there are other 2 pipeline starting
[maven-release-plugin] which it seems it does the same things but it fails:
First it says:
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Then it says: You don't have a SNAPSHOT project in the reactor projects list
$ git checkout -B "$CI_COMMIT_REF_NAME"
Switched to and reset branch 'master'
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
$ echo "Creating the release"
Creating the release
$ mvn $MAVEN_CLI_OPTS clean deploy release:prepare release:perform
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /usr/share/maven
Java version: 17.0.2, vendor: Oracle Corporation, runtime: /usr/local/openjdk-17
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.10.104-linuxkit", arch: "aarch64", family: "unix"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.gfs:phoenix >---------------------------
[INFO] Building Project Phoenix - Base 1.11
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # phoenix ---
[INFO] Deleting /builds/gfalco77/phoenix/target
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.8:prepare-agent (default) # phoenix ---
[INFO] argLine set to -javaagent:/builds/gfalco77/phoenix/.m2/repository/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar=destfile=/builds/gfalco77/phoenix/target/jacoco.exec
[INFO]
[INFO] --- spring-boot-maven-plugin:2.6.7:repackage (repackage) # phoenix ---
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M6:integration-test (default) # phoenix ---
[INFO] No tests to run.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.8:report (report) # phoenix ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M6:verify (default) # phoenix ---
[INFO] Failsafe report directory: /builds/gfalco77/phoenix/target/failsafe-reports
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # phoenix ---
[INFO] Installing /builds/gfalco77/phoenix/pom.xml to /builds/gfalco77/phoenix/.m2/repository/com/gfs/phoenix/1.11/phoenix-1.11.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) # phoenix ---
[INFO] Uploading to gitlab-maven: https://gitlab.com/api/v4/projects/36116501/packages/maven/com/gfs/phoenix/1.11/phoenix-1.11.pom
[INFO] Uploaded to gitlab-maven: https://gitlab.com/api/v4/projects/36116501/packages/maven/com/gfs/phoenix/1.11/phoenix-1.11.pom (6.5 kB at 2.2 kB/s)
[INFO] Downloading from gitlab-maven: https://gitlab.com/api/v4/projects/36116501/packages/maven/com/gfs/phoenix/maven-metadata.xml
[INFO] Downloaded from gitlab-maven: https://gitlab.com/api/v4/projects/36116501/packages/maven/com/gfs/phoenix/maven-metadata.xml (361 B at 334 B/s)
[INFO] Uploading to gitlab-maven: https://gitlab.com/api/v4/projects/36116501/packages/maven/com/gfs/phoenix/maven-metadata.xml
[INFO] Uploaded to gitlab-maven: https://gitlab.com/api/v4/projects/36116501/packages/maven/com/gfs/phoenix/maven-metadata.xml (361 B at 111 B/s)
[INFO]
[INFO] --------------------------< com.gfs:phoenix >---------------------------
[INFO] Building Project Phoenix - Base 1.11
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-release-plugin:3.0.0-M5:prepare (default-cli) # phoenix ---
[INFO] phase verify-release-configuration
[INFO] starting prepare goal, composed of 17 phases: check-poms, scm-check-modifications, check-dependency-snapshots, create-backup-poms, map-release-versions, input-variables, map-development-versions, rewrite-poms-for-release, generate-release-poms, run-preparation-goals, scm-commit-release, scm-tag, rewrite-poms-for-development, remove-release-poms, run-completion-goals, scm-commit-development, end-release
[INFO] [prepare] 1/17 check-poms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.246 s
[INFO] Finished at: 2022-07-13T16:57:18Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M5:prepare (default-cli) on project phoenix: You don't have a SNAPSHOT project in the reactor projects list. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M5:prepare (default-cli) on project phoenix: You don't have a SNAPSHOT project in the reactor projects list.
The third and last pipeline is
[maven-release-plugin] prepare for next development iteration [skip ci] which is Skipped..
Does anybody know what it should happen, why does it complain on the snapshot?
Thanks
Basically, if not that error you would run in infinite loop :) The release:prepare performs the following steps:
Check that there are no uncommitted changes in the sources
Check that there are no SNAPSHOT dependencies
Change the version in the POMs from x-SNAPSHOT to a new version (you will be prompted for the versions to use)
Transform the SCM information in the POM to include the final destination of the tag
Run the project tests (preparation goals) against the modified POMs to confirm everything is in working order
Commit the modified POMs
Tag the code in the SCM with a version name (this will be prompted for)
Bump the version in the POMs to a new value y-SNAPSHOT (these values will also be prompted for)
Eventually run completion goal(s) against the project (since 2.2)
Commit the modified POMs
So, upon completion of your CI pipeline you are getting two new commits into master branch:
[maven-release-plugin] prepare for next development iteration
[maven-release-plugin] prepare release XXX
which in turn triggers your CI pipeline again, you just need to disable pipeline triggering for specific CI_COMMIT_MESSAGE (or setup scmReleaseCommitComment, which actually looks not so good as well as scmDevelopmentCommitComment)
UPD.
I have revised your release pipeline I can definitely say everything you are doing is wrong. The main problem is you are trying to implement release pipeline relying on suggestions from internet (e.g. what you have provided looks very similar to https://forum.gitlab.com/t/getting-mvn-release-to-work-with-gitlab-ci/4904) instead of basing on best practices and common sense...
what is the purpose of the following code snippet?
stages:
- build
- release
...
build-job:
image: $MAVEN_IMAGE
stage: build
script:
- echo "Building $MODULE"
- mvn clean package -B $MAVEN_CLI_OPTS
...
release-job:
stage: release
...
script:
- echo "Creating the release"
- mvn $MAVEN_CLI_OPTS clean deploy release:prepare release:perform
mvn package performs compile, test and package
mvn deploy performs compile, test, package, verify and deploy
release:prepare by default performs mvn clean verify
so, in your release pipeline you perform compile and test three times, and verify two times, which actually sounds good for your SaaS provider: more resources you consume - more money you spend.
following code snippet:
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- apt-get update -qq
- apt-get install -qq git
- git config --global user.email "hidden"
- git config --global user.name "hidden"
actually assumes you supposed to create your own docker images which contains jdk, maven, ssh, git and other toolchain stuff.
following code snippet:
before_script:
...
- git checkout -B "$CI_COMMIT_REF_NAME"
reveals that Gitlab is neither CI nor CD, the question is: what commit your release is based on? The answer is: on something after my commit :)

Problem with Maven plugin :maven-enforcer-plugin:3.0.0-M3:enforce Some Enforcer rules have failed

A little bit of context:
Im working as a FE developer for an AEM project. The project is a SPA AEM as cloud service. I am running the author instance from the command line.
My pc specs are:
CPU: Intel(R) Core(TM) i5-7400 CPU # 3.00GHz 3.00 GHz
RAM: 24.0 GB
SSD: 476 GB
OS: Windows 10 Pro
For the AEM Project we are using
Java sdk 11
Maven 3.6.3
I have already set up everything, the path variables, JAVA_HOME, mvn. All of them work fine, even trying to build other type of projects with "older" versions of AEM like 6.5 build perfectly. I don't have a problem with them. But with this version of AEM I am getting this error
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
[WARNING] Rule 10: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/virtualhosts/default_virtualhosts.any
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for xxxxxx 1.0.0-SNAPSHOT:
[INFO]
[INFO] xxxxxx ................................. SUCCESS [ 0.270 s]
[INFO] xxxxxx - Core .......................... SUCCESS [ 59.232 s]
[INFO] xxxxxx - UI Frontend ................... SUCCESS [ 19.876 s]
[INFO] xxxxxx - UI Frontend React ............. SUCCESS [ 39.613 s]
[INFO] xxxxxx - Repository Structure Package .. SUCCESS [ 0.991 s]
[INFO] xxxxxx - UI apps ....................... SUCCESS [ 12.990 s]
[INFO] xxxxxx - UI content .................... SUCCESS [ 4.178 s]
[INFO] xxxxxx - UI config ..................... SUCCESS [ 0.314 s]
[INFO] xxxxxx - All ........................... SUCCESS [ 1.052 s]
[INFO] xxxxxx - Integration Tests ............. SUCCESS [ 12.166 s]
[INFO] xxxxxx - Dispatcher .................... FAILURE [ 0.030 s]
[INFO] xxxxxx - UI Tests ...................... SKIPPED
[INFO] xxxxxx - Project Analyser .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:34 min
[INFO] Finished at: 2021-08-22T15:11:20-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) on project xxxxxxx.dispatcher.cloud: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :xxxxxx.dispatcher.cloud
I've been searching in sites, some of the answers for this problem haven't work for me.
I tried to run everything from the "gitbash"
command line and I had the same problem.
I tried to change the version in the pom.xml, didnt work.
I tried to build the project using eclipse IDE and all the build-in tools, I get an error that org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce is missing
Disable firewall and antivirus, nope
Use other versions of maven like 3.8.2
Delete the .m2 directory and download again all the plugins, not working
One of many answers tell me to comment out the dispatcher module in the pom.xml and after I did that builds fine. Other is doing the same and upload the ui.apps/target/*.zip with the crx package manager I did it but im not sure if the result is the "best".
To end, I installed the same project in a Mac Pro and i did without a problem. I hope someone can help me with this. Thanks for reading.
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
The Maven Enforcer Plugin is checking for some files to have an specific checksum using requireFileChecksum rule
Somewhere in your pom.xml the Enforcer Maven plugin should be declared, so you will be able to see the rule and the hash it is applying. This xml snippet is from the maven plugin documentation.
<requireTextFileChecksum>
<file>E:\java-workspace\apache-maven-enforcer\maven-enforcer\target\checkout\enforcer-rules\target\classes/foo.txt</file>
<checksum>d41d8cd98f00b204e9800998ecf8427e</checksum>
<type>md5</type>
</requireTextFileChecksum>
Check that hash against the hash of the file of your filesystem. Maybe when you change aem version, you need to upgrade some of those files.
As discussed here: https://github.com/adobe/aem-guides-wknd/pull/202
Adobe have reported the issue and the fix to Adobe AEM WKND project:
Some Windows users experience a Maven enforcer issue where it appears that default dispatcher files have been modified. Unclear if this is a result of differences between Mac and Windows or something that occurs during the checkout process. Most users simply want to install the code base to a local environment and this check is unnecessary. Removing the enforcement for windows builds.
so you can :
Skips Dispatcher enforcement plugin for users on windows environments.
doing a change you dispatcher/pom.xml
with the commit reported here:
https://github.com/adobe/aem-guides-wknd/pull/202/commits/bebcf5d2236c75a95055d5ff71ea58f66379f271
replacing the line:
<goal>enforce</goal>
with:
<goal>display-info</goal>

How run tests on Heroku with Maven

How do I run tests on Java Maven app on Heroku. I am using autodeploy linked to a branch on Github.
The default Maven command run on Heroku is:
mvn -DskipTests clean dependency:list install
To remove the skipTests, I set the MAVEN_CUSTOM_OPTS as described on https://github.com/heroku/heroku-buildpack-java#customize-maven.
However this does not result on the tests to be run. Looking at the build log I can see:
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (java-test-compile) # myapp ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M1:test (default-test) # myapp ---
[INFO] No tests to run.
Compared to running Maven locally, I can see:
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (java-test-compile) # myapp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 65 source files to ...
So it would seem there is an issue with Heroku ignoring my test resources and code.
the Heroku deployment only builds and deploys your application into a Dyno.
If you need a CI environment there's Heroku CI (not free) or you can use the Azure GitHub pipelines (free for GitHub projects)
Beppe

Why my maven package triggered by Jenkins failed but can be success if I manually execute it?

I have a jenkins job which tend to build my java application using maven, but it always gets failure during the compile phase.
[[1;34mINFO[m] Changes detected - recompiling the module!
[[1;34mINFO[m] Compiling 550 source files to /var/lib/jenkins/workspace/test/target/classes
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 9.575 s
[[1;34mINFO[m] Finished at: 2017-12-02T07:47:47+08:00
[[1;34mINFO[m] Final Memory: 24M/346M
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;33mWARNING[m] The requested profile "nexus" could not be activated because it does not exist.
[[1;31mERROR[m] Failed to execute goal [32morg.apache.maven.plugins:maven-compiler-plugin:3.1:compile[m [1m(default-compile)[m on project [36mtest[m: [1;31mCompilation failure[m -> [1m[Help 1][m
[[1;31mERROR[m]
I find and copied the below command in the Jenkins job's console output(on the webpage).
/opt/apache-maven-3.5.0/bin/mvn -f pom.xml -s /var/lib/jenkins/test-maven-setting/setting.xml -gs /var/lib/jenkins/test-maven-setting/setting.xml -Dmaven.repo.local=/var/lib/jenkins/workspace/test/.repository clean package
Then I switched to the jenkins user in the Linux console and go to the job's workspace directory and tried to manually execute the above commands I copied.
but it success!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.994 s
[INFO] Finished at: 2017-12-02T07:50:17+08:00
[INFO] Final Memory: 35M/298M
so it's very strange, same commands, same user, same directory, but it can success when I execute it manually while fail when Jenkins build the job. Does anyone know what's the problem that Jenkins job failed?
here I retested the maven plugin and pasted some screenshots.
You as using "use default maven settings" option in invoke-maven-targets.
select option for "settings file in filesystem" for both default and global

Maven release plugin fails when creating tag

I'm trying to use Maven release plugin 2.0 to tag the version and hopefully deploy the resulting jar to the repository.
I got stuck at release:prepare, getting this cryptic error:
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-950614965.commit --targets C:\Users\ME~1\AppData\Local\Temp\maven-scm-35306-targets"
[INFO] Working directory: c:\workspace\release-test-trunk
[INFO] Tagging release with the label release-test-1.3.0...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-829250416.commit --revision 1885 http://myserver/myproject/sandbox/release-test/trunk http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0"
[INFO] Working directory: c:\workspace\release-test-trunk
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20 seconds
[INFO] Finished at: Tue Aug 24 19:31:55 GMT 2010
[INFO] Final Memory: 14M/56M
[INFO] ------------------------------------------------------------------------
The tag folder does exist and is empty
I executed the command mvn clean release:clean release:prepare to be sure have a fresh run
Every time I got the error I executed mvn release:rollback to have everything back to normal
It doesn't seem to be a credentials problem, the pom file is effectively commited with the -SNAPSHOT removed and the scm information switched to the tag folder.
The strange part is I don't understand how the pom file is commited since I did not specify any credentials neither in the pom nor in the settings.xml file located in maven local install
I saw many people having a similar issue but with the folder already exist error message. Mine doesn't tell me what the error is precisely.
Do you have any ideas ?
Many thanks.
EDIT:
#Colin
If I browse svn://myserver/myproject/sandbox/release-test using tortoise svn for example it works fine. However if I type http://myserver/myproject/sandbox/release-test in Firefox the page is not found.
Also I think it should be ok since the pom file gets commited before trying to create the tag.
My scm section in the pom file :
<scm>
<connection>scm:svn:http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</connection>
<developerConnection>scm:svn:http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</developerConnection>
<url>http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</url>
</scm>
I tried removing the "http:" but that didn't work.
The problem isn't really maven here. It's more about svn itself. Maven stops its operation when svn send this error message :
svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)
Are you absolutly sure about the http://myserver/myproject/sandbox/release-test adress ?
If http://myserver/myproject/sandbox/release-test doesn't exists svn won't commit anything. Just replace the http:// by svn://
<scm>
<connection>scm:svn:svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</connection>
<developerConnection>scm:svn:svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</developerConnection>
<url>svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</url>
</scm>
Links :
svnforum.org
An SVN error (200 OK) when checking out from my online repo
Tortoise svn Subversion Update Error

Categories