Trying to download JAR from Artifactory. Maven searches local repository instead of public maven server - maven

My goal is to make a Jenkins job that downloads lastest jar from Artifactory.
I'm trying to use Maven default command clean and install but job fails.
Maven should be downloading them from https://repo1.maven.org/maven2/ but Jenkins tries to download them from my local Artifactory repository http://localhost:8081/artifactory/bpidev/.
Jenkins Fail Log :
Jenkins Artifactory Plugin version: 2.7.2
Artifactory integration is enabled
[S3_CbbCustom_Deploy_UAT] $ java -classpath /jenkins/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.6.0.jar -Dmaven.home=/jenkins/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven -DbuildInfoConfig.propertiesFile=/tmp/buildInfo6009671373604071834.properties -Dm3plugin.lib=/jenkins/jenkins/cache/artifactory-plugin/2.7.2 -Dclassworlds.conf=/tmp/classworlds1010245859327507063conf -Dmaven.multiModuleProjectDirectory=/jenkins/jenkins/workspace/S3_CbbCustom_Deploy_UAT/pom.xml org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml install
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant - [buildinfo] Properties file found at '/tmp/buildInfo6009671373604071834.properties'
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------< cbp.cbb:cbb-custom-3 >------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building cbb-custom-3 [4.3.3,)
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ jar ]---------------------------------
Downloading from central: http://localhost:8081/artifactory/bpidev/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[main] WARNING org.codehaus.plexus.PlexusContainer - The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 is missing, no dependency information available
Downloading from artifactory-release: http://localhost:8081/artifactory/bpidev/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 0.563 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2022-05-02T15:02:03+08:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.6 in artifactory-release (http://localhost:8081/artifactory/bpidev/) -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Build step 'Invoke Artifactory Maven 3' changed build result to FAILURE
Build step 'Invoke Artifactory Maven 3' marked build as failure
Finished: FAILURE
Target jar
Jenkins configuration
pom.xml I used
Question 1. My goal is to make a Jenkins job that downloads lastest jar from Artifactory.
Am I doing it right? or is there a much simpler way?
Question 2. Why is Maven searching local Artifactory for its plugins? Where is the connnect?
Question 3. Can I make Maven to download its plugins from https://repo1.maven.org/maven2/? or should I just upload clean and install to my Artifactory repository?

It seems that your configuration for 'Resolution release repository' contains a local Artifactory repository.
Instead, you should point it to a virtual repository.
Virtual repositories will aggregate your local repository 'bpidev' and another remote repository which will point to https://repo1.maven.org/maven2/.
Maven depends on the settings.xml generated, so if it is configured to point to 'bpidev' only, he wont be able to reach the remote repository.
plugins resolution is also configured through the settings.xml as 'pluginRepository' which can also point to the same virtual repository in Artifactory which can aggregates the same remote repository so Maven will be able to download the plugins.

Related

Maven build failure in Jenkins pipeline

I've Jenkins as my CI/CD with over 30 multi-branch pipelines running and I have started getting this error at "artifactory configuration stage" when trying to deploy the artifactory to Jfrog. The snippet of my Jenkinsfile is as follows:
// Artifactory Intigration
stage('Artifactory configuration') {
container('mvn') {
// Obtain an Artifactory server instance, defined in Jenkins --> Manage:
server = Artifactory.server 'dlight-jfrog'
rtMaven = Artifactory.newMavenBuild()
rtMaven.tool = 'mvn' // Tool name from Jenkins configuration
rtMaven.opts = "-Denv=dev"
rtMaven.deployer releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local', server: server
rtMaven.resolver releaseRepo: 'libs-release', snapshotRepo: 'libs-snapshot', server: server
rtMaven.deployer.deployArtifacts = false // Disable artifacts deployment during Maven run
buildInfo = Artifactory.newBuildInfo()
}
}
// sonarqube configuration
stage('SonarQube analysis') {
withSonarQubeEnv('dlight sonar') {
//rtMaven.run pom: 'pom.xml', goals: 'package sonar:sonar -Dsonar.branch.name=develop', buildInfo: buildInfo
rtMaven.run pom: 'pom.xml', goals: 'package sonar:sonar', buildInfo: buildInfo
}
}
stage("Quality Gate"){
timeout(time: 1, unit: 'HOURS') {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
}
}
// build artifact
stage ('MVN Install') {
rtMaven.run pom: 'pom.xml', goals: 'install', buildInfo: buildInfo
}
And the pipeline aborts with this error message
Downloaded from central: https://xxx.xxx.xxx.com/libs-release/org/apache/maven/surefire/surefire-junit4/2.18.1/surefire-junit4-2.18.1.jar (68 kB at 6.2 MB/s)
-------------------------------------------------------
T E S T S
-------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Skipping pipeline-name
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - This project has been banned from the build due to previous failures.
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 27.139 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-10-06T12:08:08Z
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 163M/962M
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project pipeline-name: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[main] ERROR org.apache.maven.cli.MavenCli - Command was /bin/sh -c cd /home/jenkins/agent/workspace/piplelinename && /usr/local/openjdk-11/bin/java -javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.8.0/org.jacoco.agent-0.8.0-runtime.jar=destfile=/home/jenkins/agent/workspace/core-service-pipeline-name/target/jacoco.exec org.apache.maven.surefire.booter.ForkedBooter /home/jenkins/agent/workspace/core-service-pipelinename/target/surefire/surefire5994062267928659047tmp /home/jenkins/agent/workspace/pipeline-name/target/surefire/surefire_06380871570757565397tmp
[main] ERROR org.apache.maven.cli.MavenCli - -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[Pipeline] }

Bitbucket pipeline with Jfrog failing to download plugins for build

I'm trying to configure a bitbucket pipeline with a jfrog repository. I'm able to authenticate to the repository. The problem that I'm facing is that maven is failing to download plugins during the build. What am I missing?
This is my pipeline configuration.
image: atlassian/default-image:2
pipelines:
default:
- step:
script:
- pipe: jfrog/jfrog-setup-cli:1.0.0
- source ./jfrog-setup-cli.sh
- jfrog rt use myrepo-config
- jfrog rt config show
- jfrog rt ping
- jfrog rt mvnc --server-id-resolve=myrepo --repo-resolve-releases=myrepo-mvn --repo-resolve-snapshots=myrepo-mvn --server-id-deploy=myrepo --repo-deploy-releases=myrepo-mvn-dev-local --repo-deploy-snapshots=myrepo-mvn-dev-local
- jfrog rt mvn clean install
- jfrog rt bce
- jfrog rt bag --config=./issues-collection.yml
- jfrog rt bp
- jfrog rt bs
- jfrog rt bpr promotion-repo
In Jfrog I have configured a remote repository that points to https://repo.maven.apache.org and a virtual repository that includes the remote one.
But my build fails when maven tries to fetch a plugin.
+ jfrog rt mvn clean install
[Info] Running Mvn...
[Debug] Checking prerequisites.
[Info] Downloading build-info-extractor from https://myrepo.jfrog.io/artifactory/extractors/org/jfrog/buildinfo/build-info-extractor-maven3/2.17.0/build-info-extractor-maven3-2.17.0-uber.jar
[Debug] Usage Report: Sending info...
[Debug] Sending HTTP GET request to: https://myrepo.jfrog.io/artifactory/extractors/org/jfrog/buildinfo/build-info-extractor-maven3/2.17.0/build-info-extractor-maven3-2.17.0-uber.jar
[Debug] Sending HTTP GET request to: https://myrepo.jfrog.io/artifactory/api/system/version
[Debug] The Artifactory version is: 7.25.4
[Debug] Sending HTTP POST request to: https://myrepo.jfrog.io/artifactory/api/system/usage
[Debug] Usage Report: Artifactory response: 200 OK
[Debug] Usage Report: Usage info sent successfully.
[Debug] Saving build general details at: /tmp/jfrog/builds/Z3JlZ3NvdWxzYnktdXMtbW9kZWxkcml2ZXJzLXBsdWdpbi0wMDEtYWRkLXBpcGVsaW5lLWNvbmZpZ3J1YXRpb25fNDM=/partials
[Debug] Saving build general details at: /tmp/jfrog/builds/Z3JlZ3NvdWxzYnktdXMtbW9kZWxkcml2ZXJzLXBsdWdpbi0wMDEtYWRkLXBpcGVsaW5lLWNvbmZpZ3J1YXRpb25fNDM=/partials
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building us-myrepo-plugin-001 1.0-SNAPSHOT
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
[main] WARN org.codehaus.plexus.PlexusContainer - The POM for org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.2 is missing, no dependency information available
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.jar
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 2.833 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-10-26T00:22:03+00:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 9M/110M
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.2 in artifactory-release (https://myrepo.jfrog.io/artifactory/myrepo-mvn) -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[Error] exit status 1
2021-10-26T00:22:03.846245861Z stdout P
The URL of Maven Central is https://repo.maven.apache.org/maven2 not just https://repo.maven.apache.org.

Error while storing artifacts to Nexus through Jenkins

I was trying to store artifacts to Nexus.
When trying using the Command line using mvn clean package deploy the Build Sucess and Artifacts are stored in the desired Nexus repository.
Now trying the same code With Jenkins with Goals and Option clean package deploy till package it is done successfully and after that, it shows error
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) # maven-webapp ---
[INFO] Downloading from deployment: http://localhost:8081/repository/sample-snap/com/infy/demos/maven-webapp/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.infy.demos:maven-webapp:0.0.1-SNAPSHOT/maven-metadata.xml from/to deployment (http://localhost:8081/repository/sample-snap/): Not authorized
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.173 s
[INFO] Finished at: 2019-11-25T12:22:12+05:30
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project maven-webapp: Failed to retrieve remote metadata com.infy.demos:maven-webapp:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.infy.demos:maven-webapp:0.0.1-SNAPSHOT/maven-metadata.xml from/to deployment (http://localhost:8081/repository/sample-snap/): Not authorized -> [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
[JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\maven-demo\pom.xml to com.infy.demos/maven-webapp/0.0.1-SNAPSHOT/maven-webapp-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\maven-demo\target\maven-webapp.war to com.infy.demos/maven-webapp/0.0.1-SNAPSHOT/maven-webapp-0.0.1-SNAPSHOT.war
channel stopped
Finished: FAILURE
Already configure Nexus Repository Manager Servers in the Jenkins and tested the connection showing Nexus Repository Manager 3.x connection succeeded.
Using Nexus OSS 3.19.1-01.

maven pom is invalid

I'm not able to build a project using a maven repository on a linux server. I'm using the same repository on my windows pc and I am able to build it.
WARN The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN The POM for com.fasterxml.jackson.core:jackson-core:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
INFO [wsdlgenerator:load-models] Loading models
INFO [wsdlgenerator:load-models] Generating webservices
INFO [wsdlgenerator:perform] Including /apps/visual-rules-6.4.1/server/teamserver/data/VRS_DEFAULT/build/jobs/Master Controller/workspace/IVRS_Common/vr-buildtarget/generated-resources/visual-rules
INFO
INFO --- maven-resources-plugin:2.6:resources (default-resources) # IVRS_Common ---
WARN The POM for org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN The POM for org.apache.maven.shared:maven-filtering:jar:1.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN The POM for org.codehaus.plexus:plexus-interpolation:jar:1.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN Error injecting: org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering
java.lang.NoClassDefFoundError: Lorg/sonatype/plexus/build/incremental/BuildContext;
maven-filtering:jar:1.1 has a dependency on plexus-container and plexus-interpolation. The missing class is in
<dependency>
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-build-api</artifactId>
<version>0.0.4</version>
</dependency>
The pom for maven-filtering seems to have the wrong relative path even though it works in windows.
<parent>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-components</artifactId>
<version>17</version>
<relativePath>../maven-shared-components/pom.xml</relativePath>
</parent>
it should be
../../maven-shared-components/17/maven-shared-components-17.pom
I've looked at some other related questions Why do I get invalid pom due to missing dependency.version although the version is managed? and The POM for <name> is invalid, transitive dependencies (if any) will not be available. I've tried running mvn install in the directory containing the maven-filtering pom and the directory of its parent but I get
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory
I tried executing mvn dependency:tree within these same two directories and I get
[ERROR] [ERROR] Invalid packaging for parent POM org.apache.maven.plugins:maven-dependency-plugin:2.8, must be "pom" but is "maven-plugin"
I went inside the pom for maven-dependency-plugin:2.8 and changed the packaging from maven-plugin to pom and I still get that error. When I make changes to the poms I use this command
mvn deploy:deploy-file -DpomFile=/export/home/user/sonatype-work/nexus/storage/repo/org/apache/maven/shared/maven-filtering/1.1/maven-filtering-1.1.pom \
-Dfile=/export/home/user/sonatype-work/nexus/storage/repo/org/apache/maven/shared/maven-filtering/1.1/maven-filtering-1.1.jar \
-DrepositoryId=repo \
-Durl=http://dendtp102d/nexus/content/repositories/repo
sometimes I just change the pom on the server without executing the deploy command and the changes are reflected when I view the repository in my browser so I'm not sure if it makes a difference.
Edit: Adding more of console output from build
INFO Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14 10:29:23-0700)
INFO Maven home: /apps/visual-rules-6.4.1/tools/apache-maven-3.2.5
INFO Java version: 1.7.0_76, vendor: Oracle Corporation
INFO Java home: /apps/jdk1.7.0_76/jre
INFO Default locale: en_US, platform encoding: UTF-8
INFO OS name: "linux", version: "2.6.32-504.el6.x86_64", arch: "amd64", family: "unix"
INFO Error stacktraces are turned on.
INFO Scanning for projects...
INFO ------------------------------------------------------------------------
INFO Reactor Build Order:
INFO
INFO Common
INFO Controller
INFO Master_Controller
INFO Controller_2
INFO
INFO ------------------------------------------------------------------------
INFO Building Common 0.0.1-SNAPSHOT
INFO ------------------------------------------------------------------------
INFO
INFO --- validation-maven-plugin:6.4.4:validate (default) # Common ---
INFO [validation:prepare] Starting validation
INFO [validation:validateModel] Validating RuleModel 'IVRS_Common'
INFO [validation:final] Validation finished
INFO
INFO --- javagenerator-maven-plugin:6.4.4:generate (default) # Common ---
INFO [vrgenerator:generate] Done
INFO
INFO --- wsgenerator-maven-plugin:6.4.4:generate (default) # Common ---
WARN The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN The POM for com.fasterxml.jackson.core:jackson-core:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
INFO [wsdlgenerator:load-models] Loading models
INFO [wsdlgenerator:load-models] Generating webservices
INFO [wsdlgenerator:perform] Including /apps/server/teamserver/data/build/jobs/Master Controller/workspace/Common/buildtarget/generated-resources/
INFO
INFO --- maven-resources-plugin:2.6:resources (default-resources) # Common ---
WARN The POM for org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN The POM for org.apache.maven.shared:maven-filtering:jar:1.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN The POM for org.codehaus.plexus:plexus-interpolation:jar:1.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
WARN Error injecting: org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering
java.lang.NoClassDefFoundError: Lorg/sonatype/plexus/build/incremental/BuildContext;
Update:
After adding the missing class to the classpath I have this error
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.sonatype.plexus.build.incremental.BuildContext.newScanner(Ljava/io/File;Z)Lorg/codehaus/plexus/util/Scanner;" the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) of the current class, org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/sonatype/plexus/build/incremental/BuildContext, have different Class objects for the type xt.newScanner(Ljava/io/File;Z)Lorg/codehaus/plexus/util/Scanner; used in the signature
at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:221)
at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:301)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 14 more
I added <scope>provided</scope> to the plexus-utils dependency in both the maven-filtering pom and the plexus-container-default pom but no resolution for the error

Weblogic Maven Deploy

I am using weblogic 10.3.6.0 and maven 3. I want to deploy my project to weblogic server with maven plugin. I do same steps in this oracle documents
But when I build my project, I get this error
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss Portlet Bridge - JSF 2 Basic Portlet 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- weblogic-maven-plugin:2.9.5:deploy (default-cli) # TestWeblogic ---
[WARNING] The POM for weblogic:weblogic:jar:10.3.6 is missing, no dependency i information available
[WARNING] The POM for weblogic:webservices:jar:10.3.6 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.446s
[INFO] Finished at: Mon Jul 01 16:50:02 EEST 2013
[INFO] Final Memory: 7M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:weblogic-maven-plugin:2.9.5:deploy ( (default-cli) on project TestWeblogic: Execution default-cli of goal org.codehaus.mojo:weblogic-maven-plugin:2.9.5:deploy failed: Plugin org.codehaus.mojo:weblogic-maven-plugin:2.9.5 or one of its dependencies could not be resolved: The following artifacts could not be resolved: weblogic:weblogic:jar:10.3.6, weblogic:webservices:jar:10.3.6: Failure to find weblogic:weblogic:jar:10.3.6 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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
My pom xml is here
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>10.3.6.0</version>
<configuration>
<adminurl>t3://localhost:7001</adminurl>
<user>username</user>
<password>password</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>
</configuration>
</plugin>
I use weblogic server 10.3.6.0, eclipse juno , maven 3.0.4.
You need to import wlfullclient.jar and webservices.jar. I tried importing the weblogic.jar first, but maven threw a ClassCastException by weblogic.utils.Debug.
To build this client you need to execute: java -jar wljarbuilder.jar inside the WL_HOME/server/lib.
Once you are ready, import into the maven repository by executing the following commands:
mvn install:install-file -DgroupId=weblogic -DartifactId=weblogic
-Dversion=10.3.6 -Dpackaging=jar -Dfile=wlfullclient.jar
mvn install:install-file -DgroupId=weblogic -DartifactId=webservices -Dversion=10.3.6 -Dpackaging=jar -Dfile=webservices.jar
Looks like you are using JBoss, not Weblogic based on your logs:
Building JBoss Portlet Bridge

Resources