How to revert Maven project.build variables after Clover plugin finishes? - maven
I'm attempting to add integration tests to a large Maven project. Here is the desired order of events:
Clean existing artifacts.
Resolve dependencies and build project.
Run unit tests via Surefire plugin.
Fork lifecycle for Clover plugin.
--- Instrument sources using Clover plugin.
--- Modify project.build.directory and project.build.finalName for Clover.
--- Build Clover instrumented project in a new directory.
--- Run Clover instrumented unit tests via Surefire plugin.
--- Check code coverage from Clover instrumented unit tests.
--- Reset project.build.directory and project.build.finalName to original values.
--- End forked lifecycle (Clover only forks through 'test' phase).
Package project as a WAR file.
Locally host project WAR file via Tomcat7 plugin.
Run integration tests against Tomcat7 instance via Surefire plugin.
All of this works as expected except step #9 (hence the question). Instead, the build directory is still set to the Clover version, and the project name has "-clover" appended to it. I've also found that when "MyProject-clover.war" is hosted by Tomcat7 that it does not function as expected (returns a 404 error in the browser).
Even if it did work, We do not need/want Clover instrumentation in the WAR file which we're testing against because the integration tests don't touch any of the production code (it's all Selenium UI stuff under src/test/java which interacts with the locally hosted pages instead of the production code itself).
As mentioned, this is a large project containing hundreds of dependencies and dozens of plugins. I believe the following are relevant to my issue, though I can dig up more if necessary (posting the entire pom file seems unreasonable).
Here's the pom configuration for the Clover plugin:
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>3.1.11</version>
<configuration>
<generateHtml>true</generateHtml>
<generateXml>true</generateXml>
<licenseLocation>${basedir}/src/test/resources/clover.license</licenseLocation>
<targetPercentage>92%</targetPercentage>
<excludes>
<exclude>**/mock/*.java</exclude>
<exclude>**/com/mycompany/somestuff/*.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>generate-clover-report</id>
<phase>test</phase>
<goals>
<goal>instrument</goal>
<goal>clover</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
Here's the pom configuration for the WAR plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<!--Implementation-Build>${buildNumber}_${timestamp}</Implementation-Build -->
<Build-Time>${timestamp}</Build-Time>
</manifestEntries>
</archive>
</configuration>
</plugin>
Here's the pom configuration for the Tomcat7 plugin:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<ajpPort>8009</ajpPort>
<backgroundProcessorDelay>2</backgroundProcessorDelay>
<configurationDir>${project.build.directory}/tomcat7_plugin</configurationDir>
<contextFile>${CATALINA_HOME}/conf/context.xml</contextFile>
<contextReloadable>false</contextReloadable>
<fork>true</fork>
<hostName>localhost</hostName>
<httpsPort>8443</httpsPort>
<ignorePackaging>false</ignorePackaging>
<jarScanAllDirectories>false</jarScanAllDirectories>
<path>/contentmain</path>
<port>8080</port>
<serverXml>${CATALINA_HOME}/conf/server.xml</serverXml>
<tomcatUsers>${CATALINA_HOME}/conf/tomcat-users.xml</tomcatUsers>
<tomcatWebXml>${CATALINA_HOME}/conf/web.xml</tomcatWebXml>
<useNaming>true</useNaming>
<useTestClasspath>true</useTestClasspath>
<update>true</update>
<warDirectory>${project.build.directory}/${project.build.finalName}</warDirectory>
</configuration>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run-war-only</goal>
</goals>
<configuration>
<fork>true</fork>
</configuration>
</execution>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>shutdown</goal>
</goals>
</execution>
</executions>
</plugin>
Here's the current (desired) behavior when I run "mvn clean install -Dmaven.clover.skip":
[INFO] --- maven-clover2-plugin:3.1.11:check (generate-clover-report) # MyProject ---
[INFO]
[INFO] --- maven-dependency-plugin:2.1:unpack (unpack) # MyProject ---
[INFO] Configured Artifact: com.mycompany:somedependency:?:jar
[INFO] Configured Artifact: com.mycompany:somedependency:?:jar
[INFO] Configured Artifact: com.mycompany:somedependency:?:jar
[INFO] Unpacking /mydir/.m2/myrepo/mycompany/somedir/somedependency.jar to mydir/MyProject/target/MyProject with includes css/*.css and excludes:null
[INFO] Unpacking /mydir/.m2/myrepo/mycompany/somedir/somedependency.jar to mydir/MyProject/target/MyProject with includes scripts/*/*.* and excludes:null
[INFO] Unpacking /mydir/.m2/myrepo/mycompany/somedir/somedependency.jar to mydir/MyProject/target/MyProject with includes images/*.* and excludes:null
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) # MyProject ---
[INFO] Packaging webapp
[INFO] Assembling webapp [MyProject] in [mydir/MyProject/target/MyProject]
[INFO] Processing war project
[INFO] Copying webapp resources [mydir/MyProject/src/main/webapp]
[INFO] Webapp assembled in [2019 msecs]
[INFO] Building war: /mydir/MyProject/target/MyProject.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (default) # MyProject >>>
[INFO]
[INFO] --- maven-dependency-plugin:2.1:copy (default) # MyProject ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.1:create-timestamp (default) # MyProject ---
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (default) # MyProject <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (default) # MyProject ---
[INFO] Building jar: /mydir/MyProject/target/MyProject-sources.jar
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run-war-only (start-tomcat) # MyProject ---
[INFO] Running war on http://localhost:8080/contentmain
Here's the current (undesired) behavior when I run "mvn clean install" (note the paths listed by maven-war-plugin and warning message from maven-source-plugin:
[INFO] --- maven-clover2-plugin:3.1.11:check (generate-clover-report) # MyProject ---
[INFO]
[INFO] --- maven-dependency-plugin:2.1:unpack (unpack) # MyProject ---
[INFO] Configured Artifact: com.mycompany:somedependency:?:jar
[INFO] Configured Artifact: com.mycompany:somedependency:?:jar
[INFO] Configured Artifact: com.mycompany:somedependency:?:jar
[INFO] Unpacking /mydir/.m2/myrepo/mycompany/somedir/somedependency.jar to mydir/MyProject/target/MyProject with includes css/*.css and excludes:null
[INFO] Unpacking /mydir/.m2/myrepo/mycompany/somedir/somedependency.jar to mydir/MyProject/target/MyProject with includes scripts/*/*.* and excludes:null
[INFO] Unpacking /mydir/.m2/myrepo/mycompany/somedir/somedependency.jar to mydir/MyProject/target/MyProject with includes images/*.* and excludes:null
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) # MyProject ---
[INFO] Packaging webapp
[INFO] Assembling webapp [MyProject] in [mydir/MyProject/target/clover/MyProject-clover]
[INFO] Processing war project
[INFO] Copying webapp resources [mydir/MyProject/src/main/webapp]
[INFO] Webapp assembled in [1770 msecs]
[INFO] Building war: /mydir/MyProject/target/clover/MyProject-clover.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (default) # MyProject >>>
[INFO]
[INFO] --- maven-dependency-plugin:2.1:copy (default) # MyProject ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.1:create-timestamp (default) # MyProject ---
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (default) # MyProject <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (default) # MyProject ---
[WARNING] NOT adding sources to artifacts with classifier as Maven only supports one classifier per artifact. Current artifact [com.mycompany:MyProject:war:clover:ParentProject-SNAPSHOT] has a [clover] classifier.
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run-war-only (start-tomcat) # MyProject ---
[INFO] Running war on http://localhost:8080/contentmain
What can I do to make sure that the {project.build.directory} and {project.build.finalName} values are reset to their original values after Clover has finished executing the maven-clover2-plugin:check goal during the test phase of the forked lifecycle?
I've already tried browsing the online manuals for Clover, the WAR plugin, and Tomcat7. I see no mention of any settings I can use to revert the build variables that are altered by Clover. I can always hard-code the paths in my pom file, but I'd prefer a less brittle solution.
[INFO] --- maven-source-plugin:2.2.1:jar (default) # MyProject ---
[WARNING] NOT adding sources to artifacts with classifier as Maven only supports one classifier per artifact. Current artifact [com.mycompany:MyProject:war:clover:ParentProject-SNAPSHOT] has a [clover] classifier.
This is a limitation of Maven. It does not support artifacts with multiple classifiers. As the artifact in a forked life cycle has the "clover" classifier already, it cannot have "source" classifier at the same time. That's why this warning is present. You may consider using the clover2:setup instead of the clover2:instrument if you need to call a maven-source-plugin.
4. Fork lifecycle for Clover plugin.
--- End forked lifecycle (Clover only forks through 'test' phase).
There are two Clover goals which forks a build:
clover2:instrument - forks a build till the 'install' phase
clover2:instrument-test - forks a build till the 'test' phase
You may be interested in the latter one. You may also be interested in using the useCloverClassifier=false option - this will disable usage of the "clover" classifier in a forked build.
I've also found that when "MyProject-clover.war" is hosted by Tomcat7 that it does not function as expected (returns a 404 error in the browser).
My first guess is that you have clover.jar (com.atlassian.clover:clover) missing at runtime. You have to either copy clover.jar to Tomcat's /lib directory or to bundle it in your WAR. See https://confluence.atlassian.com/display/CLOVER/Using+Clover+for+web+applications
It turns out that Clover will always alter these variables unless the clover2:setup target is used. However, if you still wish to fork the lifecycle for Clover (IE: clover2:instrument or clover2:instrument-test) then these variables will always be altered.
We wish to continue forking the lifecycle using clover:instrument-test, so I've come up with a workaround. Instead of using the project.build.finalName and project.build.directory variables, I'm using my own variables that get copied and saved on Maven execution before Clover can mess with them:
<properties>
<!-- Saving these variables now before Clover alters them -->
<original.build.finalName>${project.build.finalName}</original.build.finalName>
<original.build.directory>${project.build.directory}</original.build.directory>
</properties>
I then tell all of the subsequent plugins to use these variables instead of the project variables which Clover has altered:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<cacheFile>${original.build.directory}/war/work/webapp-cache.xml</cacheFile>
<outputDirectory>${original.build.directory}</outputDirectory>
<warName>${original.build.finalName}</warName>
<webappDirectory>${original.build.directory}/${original.build.finalName}</webappDirectory>
<workDirectory>${original.build.directory}</workDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<configurationDir>${original.build.directory}/tomcat7_plugin</configurationDir>
<warDirectory>${original.build.directory}/${original.build.finalName}</warDirectory>
</configuration>
</plugin>
</plugins>
Alternative solutions might include creating or utilizing an additional plugin in a subsequent Maven phase to revert the project.build variables after Clover has finished executing. Either of these solutions is probably better than hard-coding the paths in all of your plugins.
Related
Maven build hangs during build
Whenever I run the maven build on my POM.xml, the build just hangs and the laptop becomes unresponsive. The last lines I always see are: [INFO] --- filevault-package-maven-plugin:1.0.3:check-signature (default-check-signature) # my-project.ui.apps --- [INFO] No signature defined. Skipping signature check. [INFO] [INFO] --- filevault-package-maven-plugin:1.0.3:analyze-classes (default-analyze-classes) # my-project.ui.apps --- [INFO] Analyzing java package dependencies. The plugin configuration in my POM file is below: <plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <version>1.0.3</version> <configuration> <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource> <failOnDependencyErrors>false</failOnDependencyErrors> </configuration> </plugin> I am trying to build this using archetype 22. The same code and dependencies worked fine in archetype 13 project earlier.
Jaxb2 maven plugin : Sources vs SchemaDirectory
I am making a maven project that will make use of Jaxb2-maven-plugin to generate java files out of xsd files. My Project structure is like: project.basedir --src/main/resources/schemas ----common ----request ----response Below is the plugin config from pom.xml <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>xjc-PDF</id> <phase>generate-sources</phase> <goals> <goal>xjc</goal> </goals> <configuration> <extension>true</extension> <clearOutputDir>false</clearOutputDir> <outputDirectory>${project.build.directory}/generated-sources/jaxb</outputDirectory> <explicitAnnotation>true</explicitAnnotation> <!-- <schemaDirectory>${project.basedir}/src/main/resources/schemas</schemaDirectory> --> <sources> <source>${project.basedir}/src/main/resources/schemas/common</source> <source>${project.basedir}/src/main/resources/schemas/response</source> <source>${project.basedir}/src/main/resources/schemas/request</source> </sources> <bindingDirectory>${project.basedir}/src/main/resources/schemas</bindingDirectory> <!-- <bindingDirectory>${project.basedir}/src/main/resources/bindings</bindingDirectory> --> <bindingFiles>jaxb-bth.xjb</bindingFiles> </configuration> </execution> </executions> </plugin> If I compile like this then I get below error (even though the source directories contains valid schema files): C:\ESB_SOAP5_Space\pdf-util>mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building pdf-util 1.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) # pdf-util --- [INFO] Deleting C:\ESB_SOAP5_Space\pdf-util\target [INFO] [INFO] --- build-helper-maven-plugin:1.6:add-source (add-source) # pdf-util --- [INFO] Source directory: C:\ESB_SOAP5_Space\pdf-util\target\generated-sources\jaxb added. [INFO] [INFO] --- jaxb2-maven-plugin:1.6:xjc (xjc-PDF) # pdf-util --- [INFO] Generating source... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.205 s [INFO] Finished at: 2018-03-19T06:27:02+11:00 [INFO] Final Memory: 8M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (xjc-PDF) on project pdf-util: No schemas have been found -> [Help 1] However, if I comment sources and uncomment and modify like below, then I am able to generate java classes out of schemas under common. <schemaDirectory>${project.basedir}/src/main/resources/schemas/common</schemaDirectory> Can anyone tell me why is this behaving like this? Also what do I do if I have to parse all the schema files under one root folder ( which has multiple child folders)? Thanks
Version 1.6 of the plugin does not support "sources" tag. You can use "sources tag on version 2.4 or newer. If you have multiple directories containing xsds, use multiple executions in your configuration with each schemaDirectory pointing to one of your directories.
nexus-staging-maven-plugin refuse to upload after deferred deployment
I have a multi-module project that has nexus-staging-maven-plugin configured in parent pom.xml: <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven-plugin</artifactId> <version>1.6.6</version> <extensions>true</extensions> <configuration> <serverId>ossrh</serverId> <nexusUrl>https://oss.sonatype.org/</nexusUrl> <!--<autoReleaseAfterClose>true</autoReleaseAfterClose>--> </configuration> </plugin> By default it should be inherited by all submodules (except those disabled using technique in How to disable nexus-staging-maven-plugin in sub-modules) However, when I start deployment: mvn clean deploy -DskipTests=true -Prelease-sign-artifacts -Dgpg.passphrase=***** I see the following message: [INFO] Installing Nexus Staging features: [INFO] ... total of 5 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin ... [INFO] --- nexus-staging-maven-plugin:1.6.6:deploy (injected-nexus-deploy) # spookystuff-core --- [INFO] Performing deferred deploys (gathering into "/home/peng/git/spookystuff/target/nexus-staging/deferred")... [INFO] Installing /home/peng/git/spookystuff/core/target/spookystuff-core-0.3.2-SNAPSHOT.jar to /home/peng/git/spookystuff/target/nexus-staging/deferred/com/tribbloids/spookystuff/spookystuff-core/0.3.2-SNAPSHOT/spookystuff-core-0.3.2-SNAPSHOT.jar ... [INFO] Reactor Summary: ... [INFO] BUILD SUCCESS No upload happens whatsoever. The artifact that should be uploaded to nexus were still cached under: /target/nexus-staging/deferred but neither the log nor nexus server record indicates that it has been uploaded. What has been wrong here and what should I do to fix it?
How to time the different stages of maven execution
I have a maven build that is extremely slow. I would like to know whether there is a way to profile maven execution in order to find out which are the most time-consuming steps. Later I will want to compare these times between builds for older versions (which were faster), so they should be ideally in a format that can be compared/diffed/graphed.
This is the quickest possible way: export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS \ -Dorg.slf4j.simpleLogger.showDateTime=true" mvn test Results in MAVEN_OPTS="-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Dorg.slf4j.simpleLogger.showDateTime=true" mvn test 17:06:07,330 [INFO] Scanning for projects... 17:06:07,447 [INFO] 17:06:07,447 [INFO] ------------------------------------------------------------------------ 17:06:07,448 [INFO] Building bimble-server 0.0.1-SNAPSHOT 17:06:07,448 [INFO] ------------------------------------------------------------------------ 17:06:07,747 [INFO] 17:06:07,748 [INFO] --- maven-resources-plugin:2.6:resources (default-resources) # bimble-server --- If you then add that environment variable to your shell's config file (like ~/.bashrc or ~/.profile) you will have those timings every time you use Maven. Based on info from Stanley Hillner's blog:
Out of the box solution is the takari maven profiler: https://github.com/takari/maven-profiler Sample output from its page: org.apache.maven:maven-core:3.1.2-SNAPSHOT clean 176ms org.apache.maven.plugins:maven-clean-plugin:2.5 (default-clean) 176ms initialize 408ms org.codehaus.mojo:buildnumber-maven-plugin:1.2 (create-noncanonicalrev) 349ms org.codehaus.mojo:buildnumber-maven-plugin:1.2 (create-buildnumber) 59ms generate-sources 408ms org.codehaus.modello:modello-maven-plugin:1.8.1 (standard) 369ms org.codehaus.modello:modello-maven-plugin:1.8.1 (standard) 28ms org.codehaus.modello:modello-maven-plugin:1.8.1 (standard) 11ms generate-resources 933ms org.apache.maven.plugins:maven-remote-resources-plugin:1.4 (default) 932ms process-resources 225ms org.apache.maven.plugins:maven-resources-plugin:2.6 (default-resources) 224ms compile 4s 522ms org.apache.maven.plugins:maven-compiler-plugin:2.5.1 (default-compile) 4s 522ms process-classes 6s 880ms org.codehaus.mojo:animal-sniffer-maven-plugin:1.6 (check-java-1.5-compat) 5s 814ms org.codehaus.plexus:plexus-component-metadata:1.5.5 (default) 946ms org.sonatype.plugins:sisu-maven-plugin:1.1 (default) 120ms process-test-resources 173ms org.apache.maven.plugins:maven-resources-plugin:2.6 (default-testResources) 173ms test-compile 818ms org.apache.maven.plugins:maven-compiler-plugin:2.5.1 (default-testCompile) 818ms process-test-classes 134ms org.codehaus.plexus:plexus-component-metadata:1.5.5 (default) 110ms org.sonatype.plugins:sisu-maven-plugin:1.1 (default) 23ms test 11s 306ms org.apache.maven.plugins:maven-surefire-plugin:2.12 (default-test) 11s 306ms package 1s 371ms org.apache.maven.plugins:maven-jar-plugin:2.4 (default-jar) 502ms org.apache.maven.plugins:maven-site-plugin:3.3 (attach-descriptor) 869ms
https://github.com/jcgay/maven-profiler is a similar handy tool. It's easy to setup and use. (Having something like it or EventSpy takari/maven-profiler in core Maven as an option would certainly be neat; comment in https://issues.apache.org/jira/browse/MNG-4639 ..)
This functionality has been included in Maven3. Here's the associated ticket: https://issues.apache.org/jira/browse/MNG-4639 If you need to do the same with Maven2 I'd recommend building yor own plugin that is hooks into all phases of execution ( or just the ones you need to track).
i just create a gist here : https://gist.github.com/boly38/7316378 This is a sample example on how to log datetime of some maven lifecycle steps. Of course you could adapt this sample to set your own output format (and graph it ...). Hope this help Extract : <profile> <id>stats</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>log_validate</id> <phase>validate</phase> <goals><goal>run</goal></goals> <configuration> <tasks> <tstamp><format property="stepTstamp" pattern="dd-HH:mm:ss" locale="en,US" /></tstamp> <echo file="stats.log" append="true" message="${line.separator}${line.separator}${stepTstamp} validate${line.separator}"/> </tasks> </configuration> </execution> (...) <execution> <id>log_process_sources</id> <phase>process-sources</phase> <goals><goal>run</goal></goals> <configuration> <tasks> <tstamp><format property="stepTstamp" pattern="dd-HH:mm:ss" locale="en,US" /></tstamp> <echo file="stats.log" append="true" message="${stepTstamp} process-sources${line.separator}"/> </tasks> </configuration> </execution> (...)
The following files have NOT been resolved when using mvn install?
greetings all i have a web application using (spring-hibernate) frameworks and when tried to build the application with maven2 using the command mvn install i get a build successful with the following note: The following files have NOT been resolved: [INFO] The following files have NOT been resolved: [INFO] antlr:antlr:java-source:sources:2.7.7 [INFO] com.sun.jdmk:jmxtools:java-source:sources:1.2.1 [INFO] com.sun.jmx:jmxri:java-source:sources:1.2.1 [INFO] commons-dbcp:commons-dbcp:java-source:sources:1.2.2 [INFO] commons-httpclient:commons-httpclient:java-source:sources:3.1 [INFO] commons-logging:commons-logging:java-source:sources:1.1.0.jboss [INFO] hibernate-commons-annotations:hibernate-commons-annotations:java-source:sources:3.0.0.GA [INFO] hsqldb:hsqldb:java-source:sources:1.8.0.2 [INFO] javassist:javassist:java-source:sources:3.4.GA [INFO] javax.jms:jms:java-source:sources:1.1 [INFO] net.java.dev.stax-utils:stax-utils:java-source:sources:20040917 [INFO] org.apache.solr:solr-commons-csv:java-source:sources:1.3.0 [INFO] org.apache.solr:solr-lucene-analyzers:java-source:sources:1.3.0 [INFO] org.apache.solr:solr-lucene-core:java-source:sources:1.3.0 [INFO] org.apache.solr:solr-lucene-highlighter:java-source:sources:1.3.0 [INFO] org.apache.solr:solr-lucene-queries:java-source:sources:1.3.0 [INFO] org.apache.solr:solr-lucene-snowball:java-source:sources:1.3.0 [INFO] org.apache.solr:solr-lucene-spellchecker:java-source:sources:1.3.0 [INFO] org.apache.velocity:velocity:java-source:sources:1.5 [INFO] org.tuckey:urlrewritefilter:java-source:sources:3.1.0 [INFO] quartz:quartz:java-source:sources:1.6.0 [INFO] stax:stax-api:java-source:sources:1.0.1 what does this mean ?
This looks like output from the maven-dependency-plugin and the 'sources' goal -- it looks like someone has configured the Maven build to pull source artifacts. What this output means is that Maven was unable to find source artifacts in any Maven2 repositories. http://maven.apache.org/plugins/maven-dependency-plugin/sources-mojo.html Without being able to see it, I am assuming that your compilation and packaging was successful regardless of these messages.
It comes from the maven-dependency-plugin when you set the execution block when you include a goal to check/list the dependencies while you issue the maven install command. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>install</id> <phase>install</phase> <goals> <goal>source</goal> </goals> </execution> </executions> </plugin> You error means one of dependencies is not resolved properly. See all the goals under the maven dependency plugin which contains many other goals to help you manage the version you declare in your POM.