I'm using the weblogic maven plugin to deploy my app on the server.
I'm not sure if I've done a mistake at the configuration.
The first maven build of the day takes a long time (~30 minutes) because the plugin seems to have a huge amount of dependencies to the complete weblogic stack and updates the maven-metadata.xml
files.
My configuration looks like this:
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>12.1.3-0-0</version>
<configuration>
<adminurl>t3://localhost:7001</adminurl>
<user>admin</user>
<password>pass</password>
<upload>true</upload>
<action>deploy</action>
<remote>false</remote>
<verbose>true</verbose>
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<name>${project.build.finalName}</name>
<targets>myserver</targets>
</configuration>
</plugin>
Maybe our Nexus-repo is too slow. ;-)
Thanks in advance
The weblogic-maven-plugin provides enhanced functionality to install, start and stop servers, create domains, execute WLST scripts, and compile and deploy applications. With the weblogic-maven-plugin , you can install WebLogic Server from within your Maven environment to fulfill the local WebLogic Server requirement.
Next, open the command console and go to the folder containing pom. xml and execute the following mvn command. Maven will start processing and displaying the clean phase of clean life cycle. Plugins are specified in pom.
Introduction. In Maven, there are two kinds of plugins, build and reporting: Build plugins are executed during the build and configured in the <build/> element. Reporting plugins are executed during the site generation and configured in the <reporting/> element.
Plugins are the central feature of Maven that allow for the reuse of common build logic across multiple projects. They do this by executing an "action" (i.e. creating a WAR file or compiling unit tests) in the context of a project's description - the Project Object Model (POM).
I found the problem and hopefully some good sollutions:
Note: I'm not using Nexus-Repo but Artifactory (but I guess Maven behaves the same on both).
The Problem occours due to a missconfiguration of our repository. Maven will always check for an update (by default) if your libraries are located in a snapshot-repository (defined in your settings.xml).
In my case a virtual repository for snapshots contained the Oracle libraries which caused Maven to treat them as snapshots.
There are some ways to avoid this:
Use the parameter "no-snapshot-updates" when executing a maven goal:
mvn goal --no-snapshot-updates
Add the following to the repositories where your Oracle libraries are located:
<repository>
<id>my-oracle-repo</id>
<url>http://someurl</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
EDIT: It seems like its not only related to the snapshots but also to the "updatePolicy" which is by default set to "daily". Change your maven settings.xml as follows:
<repository>
<id>my-oracle-repo</id>
<url>http://someurl</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With