I follow this tutorial to install weblogic plugin: http://docs.oracle.com/cd/E21764_01/web.1111/e13702/maven_deployer.htm and now I can see this jar in my local repository but when I run mvn weblogic:deploy I have still this error:
No versions are present in the repository for the artifact with a range [9.0,11.0)
weblogic:weblogic:jar:null
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
codehaus.org (http://snapshots.repository.codehaus.org)
Path to dependency:
1) org.codehaus.mojo:weblogic-maven-plugin:maven-plugin:3.9.3
maven setting:
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<localRepository>/path...</localRepository>
<profiles>
<profile>
<id>ext</id>
<repositories>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>java.net</id>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>maven2-repository.dev.java.net</id>
<url>http://download.java.net/maven/2/</url>
</repository>
<repository>
<id>Mirrors.ibiblio.org</id>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</repository>
<repository>
<id>mojo-executor-repository</id>
<url>http://mojo-executor.googlecode.com/svn/repo/</url>
</repository>
<repository>
<id>spring-maven-milestone</id>
<name>Springframework Maven Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>java.net</id>
<name>Java.net Repository for Maven2</name>
<url>http://download.java.net/maven/1/</url>
<layout>legacy</layout>
</pluginRepository>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.eviware.com/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
You need to check your settings.xml file. You need to add the following into your settings.xml com.oracle.weblogic
Also you need to follow a two step process for installing the weblogic maven plugin jar. First use the jarbuilder tool for generating the uber jar.
java -jar wljarbuilder.jar -profile weblogic-maven-plugin
This command would create a 65MB jar named weblogic-maven-plugin jar. Now you need to provision your jar into the repo. Use the command and remove the pom.xml from the jar.
jar xvf MW_HOME/wlserver_10.3/server/lib/weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
cp MW_HOME/wlserver_10.3/server/lib/META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml MW_HOME/wlserver_10.3/server/lib
The next step is most important. You need to be in the MW_HOME/wlserver_10.3/server/lib directory for this.
mvn install
And then you need to do a ....
mvn install:install-file -Dfile="MW_HOME/wlserver_10.3/server/lib/weblogic-maven-plugin.jar -DpomFile="pom.xml"
It looks like you are not referring to the Oracle WebLogic Maven Plugin. In the error you see this: org.codehaus.mojo:weblogic-maven-plugin:maven-plugin:3.9.3. Perhaps you were trying the codehaus plugin and need to update your pom with the coordinates to the Oracle one that you installed. For example:
groupId=com.oracle.weblogic artifactId=weblogic-maven-plugin version=10.3.4
this is what i did for weblogic 12c
This basically
See http://docs.oracle.com/middleware/1212/core/MAVEN/config_maven.htm http://docs.oracle.com/middleware/1212/wls/WLPRG/maven.htm
if you a developer using zip installation follow these instruction to install weblogic zip
clean /home/oracle/.m2/repository dir
cd /home/oracle/wls12120/wlserver/server/lib
cp weblogic.jar weblogic-classes.jar
java -jar wljarbuilder.jar -profile weblogic-maven-plugin
mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=pom.xml
mvn install
cd /home/oracle/wls12120/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.2
mvn install:install-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=/home/oracle/wls12120 -Doracle-maven-sync.testingOnly=false -X
For windows I wrote this script that you can run from home dir tested in 12.1.2
cls
echo about to delete %USERPROFILE%\.m2\repository
pause
del /Q/F %USERPROFILE%\.m2\repository
set WL_HOME=%~dp0
set ORACLE_HOME=%~dp0
set WLV=12.1.2
set w
set M2_HOME=%WL_HOME%\oracle_common\modules\org.apache.maven_3.0.4
setlocal
pushd
cd %WL_HOME%\wlserver\server\lib
cp weblogic.jar weblogic-classes.jar
call java -jar wljarbuilder.jar -profile weblogic-maven-plugin
call mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=pom.xml
echo on
call mvn install
pause
echo on
cd %WL_HOME%\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\%WLV%
echo on
call mvn install:install-file -DpomFile=oracle-maven-sync.%WLV%.pom -Dfile=oracle-maven-sync.%WLV%.jar
echo on
call mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=%WL_HOME% -Doracle-maven-sync.testingOnly=false -X
popd
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.