Search code examples
javamavenosgiaemosgi-bundle

Shows one warning during "mvn install"


I am learning Apache Sling, Apache felix , OSGI these days. Whenever I run command mvn clean install. After building any project. It shows one warning. Can you tell me the reason behind this?enter image description here

I am implementing this tutorial.

At 25th line in pom.xml ,I added these lines.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <source>1.5</source>
            <target>1.5</target>
        </configuration>
    </plugin>

Edited

What is the difference between dependency and plugin?


Solution

  • You should add a version to your plugin to make the build reliable (otherwise things maybe will change if maven fetches a never version and uses this in the future)

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
            <source>1.5</source>
            <target>1.5</target>
        </configuration>
    </plugin>