I am actually developing a plugin for Jenkins, and I want to integrate 
Scala, Java and Maven in my plugin. I developed part of my plugin in Java 
and I would like to develop other parts in Scala. 
The thing is when I integrate all of them (maven, Scala, and Java), I get 
this error from the scala maven plugin : 

        [INFO] artifact org.kohsuke.stapler:stapler: checking for updates 
from scala
    [INFO] D:\workspace\remote-deployment-new\src\main\java:-1: info: 
compiling
    [INFO] 
D:\workspace\remote-deployment-new\target\generated-sources\localizer:-1: 
info: compiling
    [INFO] Compiling 4 source files to 
D:\workspace\remote-deployment-new\target\classes at 1352200897840
    [ERROR] 
D:\workspace\remote-deployment-new\src\main\java\com\ebiznext\plugins\RemoteDeployment.java:33:
 
error: RemoteDep
    loyment is already defined as package RemoteDeployment
    [INFO] public class RemoteDeployment extends Plugin implements Action, 
ExtensionPoint, Describable<RemoteDeployment> {
    [INFO]              ^
    [ERROR] one error found
    [INFO] 
------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] 
------------------------------------------------------------------------
    [INFO] Total time: 52.801s
    [INFO] Finished at: Tue Nov 06 12:21:39 CET 2012
    [INFO] Final Memory: 27M/370M
    [INFO] 
------------------------------------------------------------------------
    [ERROR] Failed to execute goal 
net.alchim31.maven:scala-maven-plugin:3.1.0:compile (default) on project 
remote-deploymen
    t-new: wrap: org.apache.commons.exec.ExecuteException: Process exited 
with an error: 1(Exit value: 1) -> [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



I totally understand the error  saying that the class `RemoteDeployment` is 
already defined as a package. It's true, since RemoteDeployment is a class, 
that extends Plugin, defined in the package com.ebiznext.plugins and follow 
Jenkins convention to create a package 
`com.ebiznext.plugins.RemoteDeployment` under `src/main/resources`.

How can I correct this problem?

Reply via email to