JOOQ Plugin in Maven pom.xml file - spring

I'm trying to build the example given on the official JOOQ git repo here. The maven pom.xml file contains the following plugin for JOOQ:
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>${org.jooq.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<jdbc>
<driver>${db.driver}</driver>
<url>${db.url}</url>
<user>${db.username}</user>
<password>${db.password}</password>
</jdbc>
<generator>
<target>
<packageName>com.learnd.jooq.db</packageName>
<directory>src/main/java</directory>
</target>
</generator>
</configuration>
</execution>
</executions>
</plugin>
However I'm not managing to mvn compile, the project, and I'm getting the following output because of the${org.jooq.version} variable in the <version> tag. But whenever I've seen this plugin inserted, I've seen it done this way, even here.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.jooq:jooq-spring-example:jar:3.10.0-SNAPSHOT
[WARNING] 'version' contains an expression but should be a constant. # org.jooq:jooq-spring-example:${org.jooq.version}, /home/lukec/Desktop/jOOQ-spring-example/pom.xml, line 8, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jOOQ Spring Example 3.10.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jooq:jooq-codegen-maven:jar:3.10.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.213 s
[INFO] Finished at: 2017-09-18T03:47:16+02:00
[INFO] Final Memory: 6M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.jooq:jooq-codegen-maven:3.10.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jooq:jooq-codegen-maven:jar:3.10.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Can anyone help me with this? Cheers.

Its most likely because Maven cant find the jOOQ-codegen-maven 3.10.0-SNAPSHOT version in your local .m2. I checked the link from your question and I see the spring project and its dependent project jOOQ-codegen-maven in this link, https://github.com/jOOQ/jOOQ/blob/master/jOOQ-codegen-maven/pom.xml, so import this and build it, so that this version gets into your local .m2. And I see jOOQ-codegen-maven project has a parent jooq-parent, so you will probably need to build that as well for the dependencies to get resolved.
Once you have built and run jOOQ-codegen-maven and jooq-parent successfully, your local .m2 should have these dependencies, try building jooq-spring-example again and now the 3.10.0-SNAPSHOT dependencies should be resolved properly.
The above should most likely fix the issue but in case if it doesn't work, you could possibly try using the version from central, https://mvnrepository.com/artifact/org.jooq/jooq-codegen-maven/3.9.5 and see if that helps build your spring example.

There's no official release of 3.10.x jooq-codegen-maven plugin.
https://mvnrepository.com/artifact/org.jooq/jooq-codegen-maven
You should try using any one of them found in the above link.

I believe that the code gen 3.10.0-SNAPSHOT has yet to be released, along with the rest of the 3.10.0-SNAPSHOT.
If you need the functionality that has been developed and are comforatable using a library that has not been released yet,
git clone https://github.com/jOOQ/jOOQ
then run
mvn install
To build jooq 3.10.0-SNAPSHOT to your local repository. The example should run on your local machine. Beware that it will not work elsewhere (EX: jenkins machine).
If you do not feel comfortable using this unreleased code, use the latest published published published release version's example:
https://github.com/jOOQ/jOOQ/tree/version-3.9.0-branch/jOOQ-examples/jOOQ-spring-example
As the dependency graph expects 3.10.0-SNAPSHOT.

Related

Committing an additional file during Maven Release: What if we need to add it to version control first?

Is there a known way to commit changes to an additional file during the Maven Release, and also add that file to version control if it's necessary?
We have a resource file that is potentially changed during our build process, and we want to commit any changes to this file during the Maven Release so the most accurate version is reflected in our tags.
We can get most of the way by configuring maven-scm-plugin to checkin changes to our file, and adding scm:checkin to the preparationGoals of maven-release-plugin, like so:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
<configuration>
<includes>resource.file</includes>
<message>[maven-scm-plugin] Committing resource.file from latest release</message>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<preparationGoals>clean verify scm:checkin</preparationGoals>
</configuration>
</plugin>
This approach handles new changes to an existing resource file just fine. Unfortunately, it fails when our build generates a new resource file that is not already added to version control:
[INFO] [ERROR] Provider message:
[INFO] [ERROR] The svn command failed.
[INFO] [ERROR] Command output:
[INFO] [ERROR] svn: E200009: Commit failed (details follow):
[INFO] svn: E200009: '/acme/builder/workspace/_experiment-commit-on-release/resource.file' is not under version control
While we can get around this case by adding scm:add to preparationGoals, that approach will break when our resource file is added to version control:
[INFO] [ERROR] Provider message:
[INFO] [ERROR] The svn command failed.
[INFO] [ERROR] Command output:
[INFO] [ERROR] svn: warning: W150002: '/acme/builder/workspace/_experiment-commit-on-release/resource.file' is already under version control
[INFO] svn: E200009: Could not add all targets because some targets are already versioned
[INFO] svn: E200009: Illegal target for the requested operation
I'm sure I can have Maven call some external script to handle this problem for us, but I'd rather keep this logic within Maven itself if at all possible.

sonar:sonar not working in jenkins maven build

I have a jenkins build, how should call the sonar plugin. But every time i get the error:
Downloaded: http://xxxx:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (165 KB at 20577.1 KB/sec)
[INFO] SonarQube version: 5.6.1
Downloading: http://talas:8081/nexus/content/groups/public/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.pom
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.pom
[WARNING] The POM for org.codehaus.sonar:sonar-maven3-plugin:jar:5.6.1 is missing, no dependency information available
Downloading: http://xxxx:8081/nexus/content/groups/public/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.jar
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:53 min
[INFO] Finished at: 2016-09-13T12:42:59+02:00
[INFO] Final Memory: 58M/1705M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project Core: Can not execute SonarQube analysis: Plugin org.codehaus.sonar:sonar-maven3-plugin:5.6.1 or one of its dependencies could not be resolved: Could not find artifact org.codehaus.sonar:sonar-maven3-plugin:jar:5.6.1 in server0001 (http://xxx:8081/nexus/content/groups/public/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
in my pom.xml i use the dependency:
<plugin>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>5.1</version>
</plugin>
I do not understand, why maven uses an other plugin than this which is included as dependency.
The Jenkins Job calls the following Targets:
clean
compile
sonar:sonar
-Dsonar.jdbc.url=jdbc:oracle:thin:#oracle11db:1521/orcl
-Dsonar.host.url=http://192.168.0.100:9000
I use Jenkins Version 2.21.
SonarQube scanner 2.6.1 is configured in global configuration
I also tried to call
org.codehaus.mojo:sonar-maven-plugin:2.3:sonar
directly. but it needs java8 and my Project was build with Java7
have you tried using the plugin from org.codehaus.mojo?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
Source:
http://docs.sonarqube.org/display/HOME/Frequently+Asked+Questions

How do I prevent Maven from assmebling my WAR if my integration tests fail?

I’m using Maven 3.3.3 with Java 8 on Mac Yosemite. I have a bunch of integration tests and I have my failsafe plugin (v 2.18.1) set up as such …
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<reuseForks>true</reuseForks>
<argLine>-Xmx4096m -XX:MaxPermSize=512M -noverify -XX:-UseSplitVerifier ${itCoverageAgent}</argLine>
<skipTests>${skipAllTests}</skipTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
However, when I run the command “mvn clean install,” even when I have failed unit tests, the build continues on to assembling the war. How do I prevent further Maven activity if I have failed integration tests? Below is example output of what I’m seeing. Note that the WAR plugin continues to run even after the tests have failed.
Results :
Failed tests:
MyProjectInstantLoginControllerIT.testInstantLoginSuccessNoCredentailsObj:245 View name is not equal to 'redirect:http://localhost:80/authenticate' but was 'redirect:http://localhost:80/home'
MyProjectInstantLoginControllerIT.testInstantLoginSuccessStudent:153 View name is not equal to 'redirect:http://localhost:80/authenticate' but was 'redirect:http://localhost:80/home'
MyProjectInstantLoginControllerIT.testInstantLoginSuccessTeacher:125 View name is not equal to 'redirect:http://localhost:80/authenticate' but was 'redirect:http://localhost:80/home'
MyProjectInstantLoginControllerIT.testInstantLoginSuccessWithApacheHeader:187 View name is not equal to 'redirect:http://localhost:80/authenticate' but was 'redirect:http://localhost:80/home'
Tests in error:
ClassController2IT.testUpdateClassWoSchedule:478->AbstractClassControllerTest.submitCreateClassForm:514 » LazyInitialization
Tests run: 157, Failures: 4, Errors: 1, Skipped: 4
[INFO]
[INFO] --- maven-war-plugin:2.6:war (default-war) # my-module ---
[INFO] Packaging webapp
[INFO] Assembling webapp [my-module] in [/Users/davea/Documents/my_workspace/my-module/target/my-module]
[INFO] Dependency [Dependency {groupId=org.mainco.subco, artifactId=second-module, version=87.0.0-SNAPSHOT, type=jar}] has changed (was Dependency {groupId=org.mainco.subco, artifactId=second-module, version=87.0.0-SNAPSHOT, type=jar}).
[WARNING] File to remove [/Users/davea/Documents/my_workspace/my-module/target/my-module/WEB-INF/lib/second-module-87.0.0-SNAPSHOT.jar] has not been found
[INFO] Dependency [Dependency {groupId=org.springframework, artifactId=spring-core, version=3.2.11.RELEASE, type=jar}] has changed (was Dependency {groupId=org.springframework, artifactId=spring-core, version=3.2.11.RELEASE, type=jar}).
[WARNING] File to remove [/Users/davea/Documents/my_workspace/my-module/target/my-module/WEB-INF/lib/spring-core-3.2.11.RELEASE.jar] has not been found
[INFO] Dependency [Dependency {groupId=org.springframework.security.extensions, artifactId=spring-security-saml2-core, version=1.0.0.RC2, type=jar}] has changed (was Dependency {groupId=org.springframework.security.extensions, artifactId=spring-security-saml2-core, version=1.0.0.RC2, type=jar}).
[WARNING] File to remove [/Users/davea/Documents/my_workspace/my-module/target/my-module/WEB-INF/lib/spring-security-saml2-core-1.0.0.RC2.jar] has not been found
[INFO] Dependency [Dependency {groupId=org.opensaml, artifactId=opensaml, version=2.6.1, type=jar}] has changed (was Dependency {groupId=org.opensaml, artifactId=opensaml, version=2.6.1, type=jar}).
[WARNING] File to remove [/Users/davea/Documents/my_workspace/my-module/target/my-module/WEB-INF/lib/opensaml-2.6.1.jar] has not been found
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/davea/Documents/my_workspace/my-module/src/main/webapp]
[INFO] Webapp assembled in [5454 msecs]
[INFO] Building war: /Users/davea/Documents/my_workspace/my-module/target/my-module.war
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:verify (default) # my-module ---
[INFO] Failsafe report directory: /Users/davea/Documents/my_workspace/my-module/target/failsafe-reports
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:17 min
[INFO] Finished at: 2015-11-09T11:23:47-06:00
[INFO] Final Memory: 48M/792M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project my-module: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/davea/Documents/my_workspace/my-module/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
You haven't specified any phase(s) you want failsafe plugin to run its goals on. By default, the goals integration-test and verify are bound to the integration-test and verify phases of the default life cycle.
Recall that these phases occur after the package phase is complete (refer the life cycle references), so with the configuration you have, you are not impacting the package phase in any way - your goals run after the package phase (i.e the goals set to run in that phase - the maven-war-plugin:2.6:war being one) is complete.
You could try running the integration tests and verifying them before the package phase if that's what you really want by specifying the appropriate phase(s) for your goals in the <execution> you've shown in your OP.
Unrelated to the problem, the maven-failsafe-plugin plugin is intended to target integration tests and decouple the build failures from the actual integration test results. You get around it by verifying your integration test results.
Here's a quote from the FAQ:
What is the difference between maven-failsafe-plugin and
maven-surefire-plugin?
maven-surefire-plugin is designed for running unit tests and if any of the tests fail then it will fail the build immediately.
maven-failsafe-plugin is designed for running integration tests, and decouples failing the build if there are test failures from
actually running the tests.
Further notes on this subject:
If you use the Surefire Plugin for running tests, then when you have a
test failure, the build will stop at the integration-test phase and
your integration test environment will not have been torn down
correctly.
The Failsafe Plugin is used during the integration-test and verify
phases of the build lifecycle to execute the integration tests of an
application. The Failsafe Plugin will not fail the build during the
integration-test phase, thus enabling the post-integration-test phase
to execute.

POM for org.springframework:springloaded:jar:1.2.0.BUILD-SNAPSHOT is missing

I followed the directions listed on the jHipster website under
http://jhipster.github.io/creating_an_app.html
yo jhipster
mvn spring-boot:run
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 53.3 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 93.3 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.382 s
[INFO] Finished at: 2014-05-03T21:45:53-05:00
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/jgs/.m2/repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
This is the reference for springloaded in the pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-XX:MaxPermSize=128m -Xmx256m</argLine>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<!-- Force alphabetical order to have a reproducible build -->
<runOrder>alphabetical</runOrder>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.springsource.loaded:springloaded</classpathDependencyExclude>
</classpathDependencyExcludes>
</configuration>
</plugin>
I think there is a bug in the current yeoman generator. I was able to resolve this by using the plugin in the jhipster sample project.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=prod</argument>
</arguments>
</configuration>
</plugin>
I have simply doubts that you will use SNAPSHOT as you required by using in your example.
org.springframework:springloaded:jar:1.2.0.BUILD-SNAPSHOT
You should use this:
org.springframework:springloaded:jar:1.2.0.RELEASE
instead. So you need to change the version entries in your pom file accordingly.
You must just choose you folder project:
Go to run → debug configuration → build maven → browser workspace.
Finally choose your project folder.
The same message is also displayed when you chose to use gradle during the jhipster setup phase (kinda obvious). Maven is not complaining about the missing pom.xml but generates this obscure message.
For gradle based builds the command is
gradlew bootRun
then get some coffe cause its gonna download loads! of stuff

Redeploy existing Nexus artifact to Weblogic

I have a Hudson build job that builds a Maven project, and redeploys the resulting artifact to Nexus and to a remote Weblogic instance for testing. I'm trying to create a separate job that would deploy the same artifact to another Weblogic instance, but to do so without recompiling the project and making a new WAR. The rationale here is, the bits already exist and were tested in the development environment, and only if that passes can they be promoted to the development-integration environment. Is this possible?
So far, I have tried:
1) using the existing POM and on the command line and declaring mvn deploy wls:undeploy wls:deploy - This deploys the project WAR to the new environment but also builds the project from scratch. The deploy goal also replaces the previously built project artifact (a snapshot) in Nexus, which makes sense.
2) Tried creating a new POM where the artifact from the previous build is a dependency, and the wls-maven-plugin is the only plugin declared. Running mvn wls:deploy here also fails, for different reasons.
Is there a way to perform such a deployment in a concise manner that I'm missing? Am I using the wrong mechanism (Maven) for this? Should I be using a more procedure based language like Ant? Any insight would be greatly appreciated. (Also if more information is required, please let me know!)
Edit: The redeployment succeeds if the built artifact is locally available in the target directory, and that location is referenced by the properties file. According to the documentation on Oracle's website that parameter can either be local or GAV coordinates. If I use GAV coordinates to pull the artifact directly from Nexus and then push it out to the remote Weblogic, I get the following Maven error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyWebApp 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- wls-maven-plugin:12.1.1.0:redeploy (default-cli) # MyWebApp-deploy-DIT ---
[INFO] ++====================================================================++
[INFO] ++ wls-maven-plugin: redeploy ++
[INFO] ++====================================================================++
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.480s
[INFO] Finished at: Wed Mar 20 10:19:22 EDT 2013
[INFO] Final Memory: 4M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.1.0:redeploy (default-cli) on project MyWebApp-deploy-DIT: Invalid file. Please provide an existing fully qualified path of the file. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
For completeness, I'm also posting the POM I'm using to perform option #2:
<?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>
<name>MyWebApp</name>
<parent>
<groupId>org.myorg.maven</groupId>
<artifactId>MyOrg-Parent</artifactId>
<version>2.0</version>
</parent>
<groupId>org.myorg.apps</groupId>
<artifactId>MyWebApp-deploy-DIT</artifactId>
<version>0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<drools.version>5.4.0.Final</drools.version>
<REGION>DEV</REGION>
<MyWebApp_LOGDIR>.</MyWebApp_LOGDIR>
<webapp.jsp.dir>src/main/webapp/WEB-INF/jsp</webapp.jsp.dir>
<buildMsgJsp>buildMsg.jsp</buildMsgJsp>
<DEPLOYMENT_NAME>MyWebApp</DEPLOYMENT_NAME>
<MIDDLEWARE_HOME>/ci/oracle/middleware</MIDDLEWARE_HOME>
<WLS_ADMIN_HOST>lncibd008</WLS_ADMIN_HOST>
<WLS_PORT>7001</WLS_PORT>
<STAGE>true</STAGE>
<!--<SOURCE>${project.build.directory}/MyWebApp-3.7-SNAPSHOT.war</SOURCE>-->
<SOURCE>org.myorg.apps:MyWebApp:war:3.7-SNAPSHOT</SOURCE>
<WLS_TARGETS>server1</WLS_TARGETS>
</properties>
<dependencies>
<dependency>
<groupId>org.myorg.apps</groupId>
<artifactId>MyWebApp</artifactId>
<version>3.7-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>wls-maven-plugin</artifactId>
<version>12.1.1.0</version>
<configuration>
<weblogicHome>wlserver_12.1</weblogicHome>
<upload>true</upload>
<remote>true</remote>
<stage>${STAGE}</stage>
<verbose>true</verbose>
<userConfigFile>wlsconfig/${WLS_ADMIN_HOST}${WLS_PORT}.config</userConfigFile>
<userKeyFile>wlsconfig/${WLS_ADMIN_HOST}${WLS_PORT}.key</userKeyFile>
<adminurl>http://${WLS_ADMIN_HOST}:${WLS_PORT}</adminurl>
<targets>${WLS_TARGETS}</targets>
<source>${SOURCE}</source>-->
<name>${DEPLOYMENT_NAME}</name>
<middlewareHome>C:\Oracle\Middleware</middlewareHome>
</configuration>
</plugin>
</plugins>
</build>
</project>
As you can see I have a commented-out and a GAV . Local one succeeds, GAV fails with the above error.

Resources