Forum Stats

  • 3,815,350 Users
  • 2,259,003 Discussions
  • 7,893,050 Comments

Discussions

Can't build with Maven anymore?

Alejandro Tovar Lanz
Alejandro Tovar Lanz Member Posts: 1,631 Bronze Trophy

Hi,

(JDev 12.2.1.4)

I've configured few project to be built using Maven. It all used to work on my machine but not in the build automation tool. When checking logs, I could see it would fail with:

" Could not find artifact com.oracle.adf:adf-parent:pom:12.2.1-4-0 in centralhttps (https://repo1.maven.org/maven2/)"

I went to my local environment where the built used to work and after deleting the .m2 folder, it now fails with the same message:

" Could not find artifact com.oracle.adf:adf-parent:pom:12.2.1-4-0 in centralhttps (https://repo1.maven.org/maven2/)"

I've checed on the repo and there is no trace of com.oracle.adf libraries.

Question - does the local repository get populated using JDeveloper on first attempt or something?

Thanks

Answers

  • dvohra21
    dvohra21 Member Posts: 14,486 Gold Crown

    You may need to install the Oracle Maven Synchronization Plug-In. What is the OS? Linux or Windows?

    The Maven settings file, settings.xml, is usually kept in the .m2 directory inside your home directory.

    After you have configured your Maven Repository Manager, you populate it with Oracle artifacts.

    For this reason, a Maven Synhronization plug-in is provided, which allows you to populate a local or shared Maven repository from an Oracle home. When you install a Fusion Middleware 12c product, the Maven archetypes, plug-ins, and POMs are installed with the product so that the synchronization plug-in can find them.


    Please refer Fusion Middleware Developing Applications Using Continuous Integration>Installing and Configuring Maven for Build Automation and Dependency Management

  • Alejandro Tovar Lanz
    Alejandro Tovar Lanz Member Posts: 1,631 Bronze Trophy

    @dvohra21 thanks for your reply. I did notice that from time to time JDev does 'deploy libraries'. Is there any way for us to manually trigger this process?

  • dvohra21
    dvohra21 Member Posts: 14,486 Gold Crown

    Run the the push goal in Oracle Maven Synchronization Plug-In.

    Detail at https://docs.oracle.com/middleware/1221/core/MAVEN/config_maven.htm#MAVEN314

  • Alejandro Tovar Lanz
    Alejandro Tovar Lanz Member Posts: 1,631 Bronze Trophy

    @dvohra21 thanks. After running push and waiting for it to complete, it now fails with:

    The following artifacts could not be resolved: com.oracle.weblogic:jms-internal-notran-adp:jar:12.2.1-4-0, com.oracle.weblogic:jms-internal-xa-adp:jar:12.2.1-4-0, com.oracle.weblogic:jms-local-adp:jar:12.2.1-4-0, com.oracle.weblogic:jms-notran-adp:jar:12.2.1-4-0, com.oracle.weblogic:jms-xa-adp:jar:12.2.1-4-0: Could not find artifact com.oracle.weblogic:jms-internal-notran-adp:jar:12.2.1-4-0 

    I assume jdev does this deploy automatically?

  • dvohra21
    dvohra21 Member Posts: 14,486 Gold Crown

    Add exclusions for the not found libs in pom.xml:

    <dependency>

               <groupId>com.oracle.adf.library</groupId>

               ...

    ...

               <type>pom</type>

               <scope>provided</scope>

               <exclusions>

                   <exclusion>

                       <groupId>com.oracle.weblogic</groupId>

                       <artifactId>jms-xa-adp</artifactId>

                   </exclusion>

                   <exclusion>

                       <groupId>com.oracle.weblogic</groupId>

                       <artifactId>jms-internal-notran-adp</artifactId>

                   </exclusion>

                   <exclusion>

                       <groupId>com.oracle.weblogic</groupId>

                       <artifactId>jms-internal-xa-adp</artifactId>

                   </exclusion>

                   <exclusion>

                       <groupId>com.oracle.weblogic</groupId>

                       <artifactId>jms-notran-adp</artifactId>

                   </exclusion>

                   <exclusion>

                       <groupId>com.oracle.weblogic</groupId>

                       <artifactId>jms-local-adp</artifactId>

                   </exclusion>

               </exclusions>

           </dependency>