9 Replies Latest reply on Sep 6, 2011 7:53 PM by Gerardo Navarro Suarez

    Maven problems for jBPM-Examples

    Gerardo Navarro Suarez Newbie

      Hello guys,

       

      I was importing the jbpm-examples-5.1.0.Final (the project that can be downloaded officially) into my Eclispe. There I faced a maven issue. Right after the import I get this error message: Project build error: Non-resolvable parent POM: Failure to find org.jbpm:jbpm:pom:5.1.0 in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM.

       

      I didn't toched the pom.xml of the project. But nevertheless, here you see how my pom.xml looks like:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

       

        <modelVersion>4.0.0</modelVersion>

        <parent>

          <groupId>org.jbpm</groupId>

          <artifactId>jbpm</artifactId>

          <version>5.1.0</version>

        </parent>

       

        <artifactId>jbpm-examples</artifactId>

       

        <name>jBPM examples</name>

       

        <repositories>

          <!-- TODO remove this once maven central replicates the jboss repository -->

          <!-- Included so the examples sources in the distribution zip build out-of-the-box with maven -->

          <repository>

            <id>jboss-public-repository-group</id>

            <name>JBoss Public Repository Group</name>

            <url>http://repository.jboss.org/nexus/content/groups/public/</url>

            <layout>default</layout>

            <releases>

              <enabled>true</enabled>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <enabled>true</enabled>

              <updatePolicy>daily</updatePolicy>

            </snapshots>

          </repository>

        </repositories>

       

        <build>

          <pluginManagement>

            <plugins>

              <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-jar-plugin</artifactId>

                <configuration>

                  <archive>

                    <manifest>

                      <!-- Needed for runExamples.sh and runExamples.bat -->

                      <addClasspath>true</addClasspath>

                      <classpathPrefix>../../binaries/</classpathPrefix>

                    </manifest>

                  </archive>

                </configuration>

              </plugin>

            </plugins>

          </pluginManagement>

          <plugins>

            <plugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-eclipse-plugin</artifactId>

              <configuration>

                <additionalBuildcommands>

                  <buildcommand>org.drools.eclipse.droolsbuilder</buildcommand>

                </additionalBuildcommands>

              </configuration>

            </plugin>

          </plugins>

        </build>

       

        <dependencies>

          <!-- Internal dependencies -->

          <dependency>

            <groupId>org.jbpm</groupId>

            <artifactId>jbpm-bpmn2</artifactId>

          </dependency>

          <dependency>

            <groupId>org.jbpm</groupId>

            <artifactId>jbpm-human-task</artifactId>

          </dependency>

          <dependency>

            <groupId>junit</groupId>

            <artifactId>junit</artifactId>

          </dependency>

        </dependencies>

      </project>


      Does anyone has an idea??

       

      Cheers

       

      Gerardo

        • 1. Re: Maven problems for jBPM-Examples
          Mauricio Salatino Master

          Hi Gerardo,

          How do you get the example code? Did you clone the entire repository from github?

          The error inside eclipse is basically saying that you have the jbpm-example project but you don't have the parent project.

          Please let us know how do you download that code. You can always try to build it from the console with:

          mvn clean install -DskipTests eclipse:eclipse

           

          Notice that eclipse:eclipse will create all the artifacts required by eclipse to work

          • 2. Re: Maven problems for jBPM-Examples
            Gerardo Navarro Suarez Newbie

            Hi Mauricio,

             

            I downloaded the example code directly from the download section (here is the link - http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.1.0.Final/jbpm-5.1.0.Final-examples.zip/download). I didn't clone the git repo.

             

            So you are saying that the examples are part of the jBPM project and doesn't work standalone?

             

            As the pom is referencing the jBoss repository and the parant pom that is inside this repo, I thought that maven might be able to use that parent pom in order to get all the necessary dependencies. But it doesn't seem so.

             

            However, do you have any idea how my pom should look like in order to execute the examples without having to integrate it into jBPM project environment?

             

            Cheers

            • 3. Re: Maven problems for jBPM-Examples
              Mauricio Salatino Master

              Can you review the Pom.xml file to see if it has a reference to the jboss repository?

              If those examples are not working out of the box we should report it. But I want to discard that is an Eclipse issue.

              Cheers

              • 4. Re: Maven problems for jBPM-Examples
                Gerardo Navarro Suarez Newbie

                HI Mauricio,

                 

                the pom that I used is shown in the original post of this thread. As you can see there. It does have a reference to the public jboss repo. So he should be able to access the necessary dependencies. I also checked my settings.xml. I didn"t include any repo there.

                 

                I don"t that it is an Eclipse issue becasue I never faced a problem like this in the other maven project. And my Eclipse is using the local maven installation on my computer, not the embedded version.

                 

                I hope that helped.

                 

                Best Regards,

                 

                Gerardo

                • 5. Re: Maven problems for jBPM-Examples
                  Gerardo Navarro Suarez Newbie

                  Hi,

                   

                  here is my pom.xml that will work in order to execute the examples:

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

                   

                   

                            <modelVersion>4.0.0</modelVersion>

                            <!-- <parent> -->

                            <!-- <groupId>org.jbpm</groupId> -->

                            <!-- <artifactId>jbpm</artifactId> -->

                            <!-- <version>5.1.0</version> -->

                            <!-- </parent> -->

                   

                   

                            <groupId>org.jbpm</groupId>

                            <version>5.1.0</version>

                            <artifactId>jbpm-examples</artifactId>

                   

                   

                            <name>jBPM examples</name>

                   

                   

                   

                   

                            <properties>

                                      <jBPM.version>5.1.0.Final</jBPM.version>

                            </properties>

                   

                   

                            <repositories>

                                      <!-- TODO remove this once maven central replicates the jboss repository -->

                                      <!-- Included so the examples sources in the distribution zip build out-of-the-box

                                                with maven -->

                                      <repository>

                                                <id>jboss-public-repository-group</id>

                                                <name>JBoss Public Repository Group</name>

                                                <url>http://repository.jboss.org/nexus/content/groups/public/</url>

                                                <layout>default</layout>

                                                <releases>

                                                          <enabled>true</enabled>

                                                          <updatePolicy>never</updatePolicy>

                                                </releases>

                                                <snapshots>

                                                          <enabled>true</enabled>

                                                          <updatePolicy>daily</updatePolicy>

                                                </snapshots>

                                      </repository>

                            </repositories>

                   

                   

                            <build>

                                      <pluginManagement>

                                                <plugins>

                                                          <plugin>

                                                                    <groupId>org.apache.maven.plugins</groupId>

                                                                    <artifactId>maven-jar-plugin</artifactId>

                                                                    <configuration>

                                                                              <archive>

                                                                                        <manifest>

                                                                                                  <!-- Needed for runExamples.sh and runExamples.bat -->

                                                                                                  <addClasspath>true</addClasspath>

                                                                                                  <classpathPrefix>../../binaries/</classpathPrefix>

                                                                                        </manifest>

                                                                              </archive>

                                                                    </configuration>

                                                          </plugin>

                                                </plugins>

                                      </pluginManagement>

                                      <plugins>

                                                <plugin>

                                                          <groupId>org.apache.maven.plugins</groupId>

                                                          <artifactId>maven-eclipse-plugin</artifactId>

                                                          <configuration>

                                                                    <additionalBuildcommands>

                                                                              <buildcommand>org.drools.eclipse.droolsbuilder</buildcommand>

                                                                    </additionalBuildcommands>

                                                          </configuration>

                                                </plugin>

                                      </plugins>

                            </build>

                   

                   

                            <dependencies>

                                      <!-- Internal dependencies -->

                                      <dependency>

                                                <groupId>org.jbpm</groupId>

                                                <artifactId>jbpm-bpmn2</artifactId>

                                                <version>${jBPM.version}</version>

                                      </dependency>

                                      <dependency>

                                                <groupId>org.jbpm</groupId>

                                                <artifactId>jbpm-human-task</artifactId>

                                                <version>${jBPM.version}</version>

                                      </dependency>

                                      <dependency>

                                                <groupId>junit</groupId>

                                                <artifactId>junit</artifactId>

                                                <version>4.5</version>

                                      </dependency>

                                      <dependency>

                                                <groupId>com.thoughtworks.xstream</groupId>

                                                <artifactId>xstream</artifactId>

                                                <version>1.4.1</version>

                                      </dependency>

                            </dependencies>

                  </project>

                   

                  Cheers,

                   

                  Gerardo

                  • 6. Re: Maven problems for jBPM-Examples
                    Esteban Aliverti Master

                    Which version of maven are you using? I think I saw similar issues when trying to use maven 2.2.1. You must use 3.0.3 or grater.

                    • 7. Re: Maven problems for jBPM-Examples
                      Mauricio Salatino Master

                      I think I've found the problem.

                      The pom.xml file uses the parent version 5.1.0 but at that point the jboss guys move to use the standard proposed versioning. That means that you should change the parent version from 5.1.0 to 5.1.0.Final and it works like a charm!

                      Cheers

                       

                      PS: I will report this asap

                      • 8. Re: Maven problems for jBPM-Examples
                        Mauricio Salatino Master

                        can you please mark this question as answered?

                        Cheers

                        • 9. Re: Maven problems for jBPM-Examples
                          Gerardo Navarro Suarez Newbie

                          You are right. It works really like a charm. Thanks