maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csta...@apache.org
Subject git commit: Fix examples module
Date Thu, 28 Aug 2014 19:20:57 GMT
Repository: maven-indexer
Updated Branches:
  refs/heads/master b03b841c0 -> 2c916cbda


Fix examples module

Now that indexer-core is de-plexusized, examples
that uses Plexus container has to be told to
scan for components (as no more plexus components.xml)


Project: http://git-wip-us.apache.org/repos/asf/maven-indexer/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-indexer/commit/2c916cbd
Tree: http://git-wip-us.apache.org/repos/asf/maven-indexer/tree/2c916cbd
Diff: http://git-wip-us.apache.org/repos/asf/maven-indexer/diff/2c916cbd

Branch: refs/heads/master
Commit: 2c916cbdaf9ec79e5f66ecbb85b6bd80ad302152
Parents: b03b841
Author: Tamas Cservenak <tamas@cservenak.net>
Authored: Thu Aug 28 21:19:43 2014 +0200
Committer: Tamas Cservenak <tamas@cservenak.net>
Committed: Thu Aug 28 21:19:43 2014 +0200

----------------------------------------------------------------------
 .../org/apache/maven/indexer/examples/BasicUsageExample.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-indexer/blob/2c916cbd/indexer-examples/src/main/java/org/apache/maven/indexer/examples/BasicUsageExample.java
----------------------------------------------------------------------
diff --git a/indexer-examples/src/main/java/org/apache/maven/indexer/examples/BasicUsageExample.java
b/indexer-examples/src/main/java/org/apache/maven/indexer/examples/BasicUsageExample.java
index ff262d1..476ee0b 100644
--- a/indexer-examples/src/main/java/org/apache/maven/indexer/examples/BasicUsageExample.java
+++ b/indexer-examples/src/main/java/org/apache/maven/indexer/examples/BasicUsageExample.java
@@ -63,7 +63,9 @@ import org.apache.maven.wagon.Wagon;
 import org.apache.maven.wagon.events.TransferEvent;
 import org.apache.maven.wagon.events.TransferListener;
 import org.apache.maven.wagon.observers.AbstractTransferListener;
+import org.codehaus.plexus.DefaultContainerConfiguration;
 import org.codehaus.plexus.DefaultPlexusContainer;
+import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.PlexusContainerException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -101,7 +103,9 @@ public class BasicUsageExample
         // MI is a Plexus component ;)
         // If needed more info, ask on Maven Users list or Plexus Users list
         // google is your friend!
-        this.plexusContainer = new DefaultPlexusContainer();
+        final DefaultContainerConfiguration config = new DefaultContainerConfiguration();
+        config.setClassPathScanning( PlexusConstants.SCANNING_INDEX );
+        this.plexusContainer = new DefaultPlexusContainer(config);
 
         // lookup the indexer components from plexus
         this.indexer = plexusContainer.lookup( Indexer.class );


Mime
View raw message