jenkinsci / jenkinsci/release-plugin

[JENKINS-12877] Problem to configure perforce plugin and maven release plugin

Open
#96 4 comments 0 reactions 0 assignees View on GitHub
component:release-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
24
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Hi,

I try to use jenkins maven release plugin on Jenkins with a perforce SCM.

However, I have a weird error. In debug mode I see the following messages :

[DEBUG] SCM path in pom: //depot/AirTravelServer/main/

[DEBUG] Executing: /bin/sh -c p4 -p srvpar5p4p01:1992 where /home/www-data/.jenkins/jobs/ATS-TRUNK-RELEASE/workspace/pom.xml

[DEBUG] p4 can not support a wide charset unless

and the stacktrace :

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -2

at java.lang.String.substring(String.java:1937)
at org.apache.maven.scm.provider.perforce.command.PerforceWhereCommand.getDepotLocation(PerforceWhereCommand.java:117)
at org.apache.maven.scm.provider.perforce.command.PerforceWhereCommand.getDepotLocation(PerforceWhereCommand.java:61)
at org.apache.maven.scm.provider.perforce.PerforceScmProvider.getRepoPath(PerforceScmProvider.java:466)
at org.apache.maven.scm.provider.perforce.command.status.PerforceStatusCommand.executeStatusCommand(PerforceStatusCommand.java:57)
at org.apache.maven.scm.command.status.AbstractStatusCommand.executeCommand(AbstractStatusCommand.java:44)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)

The problem is due to : "p4 can not support a wide charset unless"

I've configured P4CHARSET to utf16le-bom and I've tried several different charsets for P4COMMANDCHARSET : winansi, utf8, none

The problem exists only for maven release plugin. I don't have this error with mvn install.

Do you know what is the right configuration to make it works ?

---
Originally reported by lassiege, imported from: Problem to configure perforce plugin and maven release plugin


  • assignee: petehayes
  • status: Open
  • priority: Major
  • component(s): release-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251223-222157

Raw content of original issue

Hi,

I try to use jenkins maven release plugin on Jenkins with a perforce SCM.

However, I have a weird error. In debug mode I see the following messages :

[DEBUG] SCM path in pom: //depot/AirTravelServer/main/
[DEBUG] Executing: /bin/sh -c p4 -p srvpar5p4p01:1992 where /home/www-data/.jenkins/jobs/ATS-TRUNK-RELEASE/workspace/pom.xml
[DEBUG] p4 can not support a wide charset unless

and the stacktrace :


Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -2

at java.lang.String.substring(String.java:1937)
at org.apache.maven.scm.provider.perforce.command.PerforceWhereCommand.getDepotLocation(PerforceWhereCommand.java:117)
at org.apache.maven.scm.provider.perforce.command.PerforceWhereCommand.getDepotLocation(PerforceWhereCommand.java:61)
at org.apache.maven.scm.provider.perforce.PerforceScmProvider.getRepoPath(PerforceScmProvider.java:466)
at org.apache.maven.scm.provider.perforce.command.status.PerforceStatusCommand.executeStatusCommand(PerforceStatusCommand.java:57)
at org.apache.maven.scm.command.status.AbstractStatusCommand.executeCommand(AbstractStatusCommand.java:44)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)

The problem is due to : "p4 can not support a wide charset unless"

I've configured P4CHARSET to utf16le-bom and I've tried several different charsets for P4COMMANDCHARSET : winansi, utf8, none

The problem exists only for maven release plugin. I don't have this error with mvn install.

Do you know what is the right configuration to make it works ?


environment

```
unix (centos)

jenkins 1.447

perforce plugin 1.3.7

jenkins maven release plugin 0.9.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.