You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ognjen Blagojevic (JIRA)" <ji...@apache.org> on 2011/06/08 17:31:58 UTC

[jira] [Created] (OPENJPA-2009) OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist

OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist
------------------------------------------------------------------------------------------------------------

                 Key: OPENJPA-2009
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2009
             Project: OpenJPA
          Issue Type: Bug
         Environment: Windows XP, Maven 2.2.1, Oracle JDK 1.6.0_24
            Reporter: Ognjen Blagojevic
            Priority: Minor


With clean maven repo, when running mvn compile it fails with message:

[INFO] Building OpenJPA Examples - OpenBooks
...
[INFO] Executing tasks
     [echo] Running OpenBooks genmodel

info:
     [echo]
     [echo]                     Builds OpenBooks demo application.
     [echo]                     OpenJPA Library: d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT
     [echo]                     Build mode     : jse
     [echo]                     Deploy Location: D:\java-ext\openjpa\openjpa-examples\openbooks/target/openbooks
     [echo]

check-env:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: The following error occurred while executing this line:
D:\java-ext\openjpa\openjpa-examples\openbooks\build.xml:116: *** Error:
                   The directory for OpenJPA libraries can not be located at d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT.
                   Make sure openjpa.lib property value is correct in build.properties file.


Workaround:

1. add

    <dependencies>
      <dependency>
        <groupId>org.apache.openjpa</groupId>
        <artifactId>openjpa-all</artifactId>
        <version>2.2.0-SNAPSHOT</version>
      </dependency>
    </dependencies>

to openjpa-examples\pom.xml, run:

2. Fetch jar file using:

  cd openjpa-examples
  mvn dependency:tree


3. Return to root and compile:

  cd ..
  mvn compile





--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-2009) OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist

Posted by "Ognjen Blagojevic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048436#comment-13048436 ] 

Ognjen Blagojevic commented on OPENJPA-2009:
--------------------------------------------

'mvn install' also works for me.

'mvn compile' of top level OpenJPA project fails. 'mvn compile' of openjpa-examples, or openbooks works ok.

Steps to reproduce:

1. Checkout top level OpenJPA trunk (http://svn.apache.org/repos/asf/openjpa/trunk)
2. make sure that %MAVEN_REPO%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist
3. mvn compile (at the top level)



> OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2009
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2009
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: Windows XP, Maven 2.2.1, Oracle JDK 1.6.0_24
>            Reporter: Ognjen Blagojevic
>            Priority: Minor
>
> With clean maven repo, when running mvn compile it fails with message:
> [INFO] Building OpenJPA Examples - OpenBooks
> ...
> [INFO] Executing tasks
>      [echo] Running OpenBooks genmodel
> info:
>      [echo]
>      [echo]                     Builds OpenBooks demo application.
>      [echo]                     OpenJPA Library: d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT
>      [echo]                     Build mode     : jse
>      [echo]                     Deploy Location: D:\java-ext\openjpa\openjpa-examples\openbooks/target/openbooks
>      [echo]
> check-env:
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] An Ant BuildException has occured: The following error occurred while executing this line:
> D:\java-ext\openjpa\openjpa-examples\openbooks\build.xml:116: *** Error:
>                    The directory for OpenJPA libraries can not be located at d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT.
>                    Make sure openjpa.lib property value is correct in build.properties file.
> Workaround:
> 1. add
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.openjpa</groupId>
>         <artifactId>openjpa-all</artifactId>
>         <version>2.2.0-SNAPSHOT</version>
>       </dependency>
>     </dependencies>
> to openjpa-examples\pom.xml, run:
> 2. Fetch jar file using:
>   cd openjpa-examples
>   mvn dependency:tree
> 3. Return to root and compile:
>   cd ..
>   mvn compile

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENJPA-2009) OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046630#comment-13046630 ] 

Kevin Sutter commented on OPENJPA-2009:
---------------------------------------

On second thought, the "mvn install" is not even necessary.  Using the code in Trunk, I removed my repo entry for 2.2.0-SNAPSHOT.  From the openjpa-examples directory, I performed a "mvn clean" followed by a "mvn compile".  Since the 2.2.0-SNAPSHOT dependency is already part of the openbooks pom, this dependency was automatically downloaded into my repo without having to modify the examples pom.

So, I'm not sure that we have an issue here.  You definitely ran into a problem, but given the information thus far, I can't seem to reproduce it.  There must be something in your environment that is causing our build process to take a left turn.  If you can help narrow down the specific scenario for reproducing the problem, we'll take a further look.  But, otherwise, I might have to return this JIRA as unreproducible.

Thanks,
Kevin

> OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2009
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2009
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: Windows XP, Maven 2.2.1, Oracle JDK 1.6.0_24
>            Reporter: Ognjen Blagojevic
>            Priority: Minor
>
> With clean maven repo, when running mvn compile it fails with message:
> [INFO] Building OpenJPA Examples - OpenBooks
> ...
> [INFO] Executing tasks
>      [echo] Running OpenBooks genmodel
> info:
>      [echo]
>      [echo]                     Builds OpenBooks demo application.
>      [echo]                     OpenJPA Library: d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT
>      [echo]                     Build mode     : jse
>      [echo]                     Deploy Location: D:\java-ext\openjpa\openjpa-examples\openbooks/target/openbooks
>      [echo]
> check-env:
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] An Ant BuildException has occured: The following error occurred while executing this line:
> D:\java-ext\openjpa\openjpa-examples\openbooks\build.xml:116: *** Error:
>                    The directory for OpenJPA libraries can not be located at d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT.
>                    Make sure openjpa.lib property value is correct in build.properties file.
> Workaround:
> 1. add
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.openjpa</groupId>
>         <artifactId>openjpa-all</artifactId>
>         <version>2.2.0-SNAPSHOT</version>
>       </dependency>
>     </dependencies>
> to openjpa-examples\pom.xml, run:
> 2. Fetch jar file using:
>   cd openjpa-examples
>   mvn dependency:tree
> 3. Return to root and compile:
>   cd ..
>   mvn compile

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-2009) OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046651#comment-13046651 ] 

Michael Dick commented on OPENJPA-2009:
---------------------------------------

Running mvn install resolved the problem for me. The install phase will copy the openjpa-all artifact to the local repository before the openbooks sample is compiled so all is good. 

The problem with mvn compile, is that the dependency on openjpa-all is picked up from the local workspace (assuming you've done a build from the root openjpa directory). But the ant task relies on the output of the build being copied to your local maven repository. 

If you've already downloaded the right level of OpenJPA, or regularly do mvn install builds this is no problem - openjpa-all is already in place.

Probably the best fix is to update build.xml so it picks up the maven classpath (if it's available). Might be a little ticklish if build.xml is intended for use outside of maven though. 

In the mean time, I found that step 1 in the workaround isn't needed. Just running mvn dependency:tree or mvn install, or running mvn compile from the openjpa-examples directory will suffice. 


> OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2009
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2009
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: Windows XP, Maven 2.2.1, Oracle JDK 1.6.0_24
>            Reporter: Ognjen Blagojevic
>            Priority: Minor
>
> With clean maven repo, when running mvn compile it fails with message:
> [INFO] Building OpenJPA Examples - OpenBooks
> ...
> [INFO] Executing tasks
>      [echo] Running OpenBooks genmodel
> info:
>      [echo]
>      [echo]                     Builds OpenBooks demo application.
>      [echo]                     OpenJPA Library: d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT
>      [echo]                     Build mode     : jse
>      [echo]                     Deploy Location: D:\java-ext\openjpa\openjpa-examples\openbooks/target/openbooks
>      [echo]
> check-env:
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] An Ant BuildException has occured: The following error occurred while executing this line:
> D:\java-ext\openjpa\openjpa-examples\openbooks\build.xml:116: *** Error:
>                    The directory for OpenJPA libraries can not be located at d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT.
>                    Make sure openjpa.lib property value is correct in build.properties file.
> Workaround:
> 1. add
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.openjpa</groupId>
>         <artifactId>openjpa-all</artifactId>
>         <version>2.2.0-SNAPSHOT</version>
>       </dependency>
>     </dependencies>
> to openjpa-examples\pom.xml, run:
> 2. Fetch jar file using:
>   cd openjpa-examples
>   mvn dependency:tree
> 3. Return to root and compile:
>   cd ..
>   mvn compile

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-2009) OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046077#comment-13046077 ] 

Kevin Sutter commented on OPENJPA-2009:
---------------------------------------

Why not just run "mvn install" and let it take care of the dependency management and populating the repository?  Your workaround is basically doing the same operations, but via manual steps.

> OpenJPA trunk won't compile if folder %m2_home%/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT does not exist
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2009
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2009
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: Windows XP, Maven 2.2.1, Oracle JDK 1.6.0_24
>            Reporter: Ognjen Blagojevic
>            Priority: Minor
>
> With clean maven repo, when running mvn compile it fails with message:
> [INFO] Building OpenJPA Examples - OpenBooks
> ...
> [INFO] Executing tasks
>      [echo] Running OpenBooks genmodel
> info:
>      [echo]
>      [echo]                     Builds OpenBooks demo application.
>      [echo]                     OpenJPA Library: d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT
>      [echo]                     Build mode     : jse
>      [echo]                     Deploy Location: D:\java-ext\openjpa\openjpa-examples\openbooks/target/openbooks
>      [echo]
> check-env:
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] An Ant BuildException has occured: The following error occurred while executing this line:
> D:\java-ext\openjpa\openjpa-examples\openbooks\build.xml:116: *** Error:
>                    The directory for OpenJPA libraries can not be located at d:/java/lib-maven2/repo/org/apache/openjpa/openjpa-all/2.2.0-SNAPSHOT.
>                    Make sure openjpa.lib property value is correct in build.properties file.
> Workaround:
> 1. add
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.openjpa</groupId>
>         <artifactId>openjpa-all</artifactId>
>         <version>2.2.0-SNAPSHOT</version>
>       </dependency>
>     </dependencies>
> to openjpa-examples\pom.xml, run:
> 2. Fetch jar file using:
>   cd openjpa-examples
>   mvn dependency:tree
> 3. Return to root and compile:
>   cd ..
>   mvn compile

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira