Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0
-
None
-
None
Description
I wanted to use a CVS URL without username or password no matter what in the SCM configuration.
I was able to do that successfuly for a project without reports using the following:
... <scm> <connection> scm:cvs:pserver:cvs.domain.com.br:/opt/CVS/root:myproject </connection> <developerConnection> scm:cvs:pserver:cvs.domain.com.br:/opt/CVS/root:myproject </developerConnection> </scm> ...
and
... <activeProfiles> <activeProfile>cvs-username</activeProfile> </activeProfiles> <profiles> <profile> <id>cvs-username</id> <properties> <username>myusername</username> </properties> </profile> </profiles> ...
and using CVS login that generates a .cvspass for the user. This way, the pom.xml file is totally free of usernames and passwords. But when generating the site of a project with reports, I got the following error:
[INFO] Generate "Checkstyle" report. [INFO] There are 17 checkstyle errors. [INFO] Generate "JavaDocs" report. [INFO] Generate "Test JavaDocs" report. [INFO] Generate "Source Xref" report. [INFO] Generate "Test Source Xref" report. [INFO] Generate "CPD Report" report. [INFO] Generate "PMD Report" report. [INFO] Generate "Continuous Integration" report. [INFO] Generate "Dependencies" report. [INFO] Generate "Issue Tracking" report. [INFO] Generate "Project License" report. [INFO] Generate "About" report. [INFO] Generate "Project Summary" report. [INFO] Generate "Source Repository" report. [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Username isn't defined. [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.IllegalArgumentException: Username isn't defined. at org.apache.maven.scm.provider.cvslib.repository.CvsScmProviderRepository.getCvsRootForCvsPass(CvsScmProviderRepository.java:105) at org.apache.maven.scm.provider.cvslib.repository.CvsScmProviderRepository.getCvsRoot(CvsScmProviderRepository.java:73) at org.apache.maven.report.projectinfo.ScmReport$ScmRenderer.developerAccessCVS(ScmReport.java:479) at org.apache.maven.report.projectinfo.ScmReport$ScmRenderer.renderDeveloperAccessSection(ScmReport.java:323) at org.apache.maven.report.projectinfo.ScmReport$ScmRenderer.renderBody(ScmReport.java:186) at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:65) at org.apache.maven.report.projectinfo.ScmReport.executeReport(ScmReport.java:87) at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101) at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:67) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:239) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:115) at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:124) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:92) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Like magic, I found a strange workaround for this. No more errors when using the following SCM configuration:
... <scm> <connection> scm:cvs:pserver:@cvs.domain.com.br:/opt/CVS/root:myproject </connection> <developerConnection> scm:cvs:pserver:@cvs.domain.com.br:/opt/CVS/root:myproject </developerConnection> </scm> ...
YES! A @ difference...
And yes, it is necessary on both connection and developer connection.
Well... It works for now, but surely is something to fix.
Attachments
Attachments
Issue Links
- relates to
-
SCM-376 'Username isn't defined.' when generating SCM report if CVS port number is specified in SCM URL
- Closed