Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build fail in sonar. #15

Closed
ujjboy opened this issue Apr 16, 2018 · 1 comment
Closed

Build fail in sonar. #15

ujjboy opened this issue Apr 16, 2018 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ujjboy
Copy link
Member

ujjboy commented Apr 16, 2018

When running findbug plugin of sonar:

mvn clean package -DskipTests=true org.codehaus.mojo:sonar-maven-plugin:2.6:sonar \
-Dsonar.sensor.inclusions=JavaSourceImporter,JavaSquidSensor,CpdSensor,FindbugsSensor,ProfileSensor \
-Dsonar.dynamicAnalysis=reuseReports \
-Dsonar.branch=dev_1.0 \
-Dsonar.host.url=http://xxx:9000/ \
-Dsonar.host.username=xxx \
-Dsonar.host.password=xxx \
-Dsonar.jdbc.url='jdbc:mysql://xxxx:3306/sonar?useUnicode=true&characterEncoding=utf8' \
-Dsonar.jdbc.username=mysql \
-Dsonar.jdbc.password=xx_mysql \
-Dsonar.sourceEncoding=UTF-8

It 's will build fail, and the exception like this:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project xxx-parent: Can not execute SonarQube analysis: Unable to determine structure of project. Probably you use Maven Advanced Reactor Options, which is not supported by SonarQube and should not be used. -> [Help 1]
@ujjboy
Copy link
Member Author

ujjboy commented Apr 16, 2018

The recently suspicious change is in all/pom.xml.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>2.4.3</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <createSourcesJar>true</createSourcesJar>
                <!-- changed 4 rows below -->
                <promoteTransitiveDependencies>false</promoteTransitiveDependencies>
                <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
                <createDependencyReducedPom>true</createDependencyReducedPom>
                <dependencyReducedPomLocation>${basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>                             
            </configuration>
        </execution>
    </executions>
</plugin>

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant