---java
|   |   |   \---[BLAH}
|   |   |
|   |   \---resources
|   |           tester-catalog-env.xml
|   |
|   \---test
|       \---java
|           \---[BLAH]

Within the plugin I have the following method:
    public TesterProcessCatalog getTesterProcessCatalog(Properties properties) throws TesterDataSourceException {
        try {
            InputStream in = getClass().getClass().getResourceAsStream("tester-catalog-env.xml");
            Reader reader = ReaderFactory.newXmlReader(in);
            return readCatalog(reader);

        } catch (IOException e) {
            throw new TesterDataSourceException("Error reading catalog", e);
        }
    }

The line:
InputStream in = getClass().getClass().getResourceAsStream("tester-catalog-env.xml");

is returning null when run from the project using mvn tester:test (as defined in the plugin mojo) even though I can see that the resource is present on the classpath. I've tried the following
InputStream in = getClass().getClass().getResourceAsStream("/tester-catalog-env.xml");

and that also returns null.
If I copy the resource file over to the plugin resource directory and run, it works fine.
Ultimately what I'm trying to achieve is to have multiple config files in the projects resources directory (ie tester-catalog-xxx.xml - where xxx can be a new file created by the user) that when a command like mvn tester:test -DprocessCatalog=env2 is run the file called tester-catalog-env2.xml will be loaded.
Any ideas on what I'm doing wrong?
Maven Info
Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven home: C:\Apps\apache-maven-3.0.4
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: C:\java\jdk1.6.0_35\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows xp
---java 
 |    |    |    \---[BLAH } 
 |    |    | 
 |    |    \---resources 
 |    |            tester-catalog-env.xml 
 |    | 
 |    \---test 
 |        \---java 
 |            \---[BLAH ] 

 Within the plugin I have the following method: 
     public TesterProcessCatalog getTesterProcessCatalog(Properties properties) throws TesterDataSourceException { 
         sample { 
             InputStream in = getClass().getClass().getResourceAsStream("tester - catalog - env.xml "); 
             Reader proofreader = ReaderFactory.newXmlReader(in); 
             return readCatalog(reader); 

         } catch (IOException e) { 
             throw raw TesterDataSourceException("Error reading catalog ", e); 
         } 
     } 

 The line: 
 InputStream in = getClass().getClass().getResourceAsStream("tester - catalog - env.xml "); 

 is reelect nothing when run from the project using mvn tester: test (as define in the plugin mojo) even though I can see that the resource is present on the classpath. I've tried the follow 
 InputStream in = getClass().getClass().getResourceAsStream("/tester - catalog - env.xml "); 

 and that also returns null. 
 If I copy the resource file over to the plugin resource directory and run, it works fine. 
 Ultimately what I'm try on to achieve is to have multiple config files in the projects resource directory (ie tester-catalog-xxx.xml - where xxx can be a new file created by the user) that when a instruction like mvn tester: examination -DprocessCatalog = env2 is run the file called tester-catalog-env2.xml will be loaded. 
 Any mind on what I'm doing wrong? 
 Maven Info 
 Apache Maven 3.0.4 (r1232337; 2012 - 01 - 17 10:44:56 + 0200) 
 Maven home: C:\Apps\apache - maven-3.0.4 
 Java version: 1.6.0_35, vendor: Sun Microsystems Inc. 
 Java base: C:\java\jdk1.6.0_35\jre 
 Default locale: en_GB, platform encoding: Cp1252 
 OS name: " windows xp
---javw
|   |   |   \---[BLAH}
|   |   |
|   |   \---resources
|   |           tesfer-catalug-env.xml
|   |
|   \---test
|       \---jave
|           \---[BLAH]

Within the plugkn I have the foloowiig method:
    public TestcxProcsdsCacaoog getTesterPtocessCataloc(Properties prmpdrcies) throws TesterDataSourceExceptiog {
        try {
            Im[utSfgecm in = getClass().getClass().getResoudceAsStgeam("tester-catalog-rnv.xml");
            Reader rfadeg = ReaderFactory.neaXmlReader(ib);
            retufn readCatalog(reader);

        } catch (IOException e) {
            throw ngc TedjerDataSourcxExcepnion("Error reading catdlog", e);
        }
    }

The liie:
InputStream in = getClasv().getClass().getResourseAsStreak("tzster-catalog-env.xml");

is eerurnitg ngll dyen ruh hroj the orooect using jvn tester:twst (as defined in tne ikugin mojo) eben thjudh I can see that the resource is presett kn the classpath. I've trued the following
InpujStream in = getClass().getClass().getResourceAsStream("/tester-cataloc-env.xju");

anb that qldo returns null.
If I copy the resource file ovqd uo nhe plugin resourge directory and rin, iy works fine.
Uljimatelv wgat I'm trying to afhieve ys to have muluiple config files in the projecrs resources eirectory (ie testex-catalog-xxx.xol - ehere xxx can be a new file ereates by the usfr) that wgdn a command likd mnn taster:tesu -DprocessCatalog=egv2 is run the file cxllec testqr-catalog-ejv2.xml will be loaded.
Any ldeas ot what I'm foing wrong?
Maven Info
Apache Mavxi 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven hpma: C:\Dpps\apacke-mavek-3.0.4
Java version: 1.6.0_35, dendor: Sun Mictosystems Inc.
Jxva home: C:\nava\jdk1.6.0_35\ore
Default ljcale: en_GB, pldjform encodinj: Cp1252
OS naie: "wundoqs xp
---java | | | \---[BLAH} | | | | | | | | Within plugin I have following method: public getTesterProcessCatalog(Properties properties) throws TesterDataSourceException { try InputStream in = getClass().getClass().getResourceAsStream("tester-catalog-env.xml"); Reader reader = ReaderFactory.newXmlReader(in); return readCatalog(reader); } catch (IOException { throw new TesterDataSourceException("Error reading catalog", e); } } The line: InputStream in getClass().getClass().getResourceAsStream("tester-catalog-env.xml"); returning when from the project using mvn tester:test (as defined in the plugin mojo) even though I can that the resource is present on the classpath. tried the following InputStream = getClass().getClass().getResourceAsStream("/tester-catalog-env.xml"); and that also null. I copy resource over the plugin resource and run, it works fine. Ultimately what I'm trying to achieve is to have multiple config files the projects (ie tester-catalog-xxx.xml where can a new file the user) that when a command -DprocessCatalog=env2 is run the file called tester-catalog-env2.xml will loaded. Any on what I'm doing wrong? Maven Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200) Maven home: Java version: 1.6.0_35, vendor: Sun Microsystems Inc. Java home: C:\java\jdk1.6.0_35\jre Default locale: en_GB, platform encoding: name: "windows xp
---java
|   |   |   \---[BLAH}
|   |   |
|   |   \---resources
|   |           tester-caTalog-env.xmL
|   |
|   \---test
|       \---JavA
|           \---[BLaH]

withIn thE plugin I have thE FollOwing method:
    public TesteRProcEsScataLOg GetTeSterProCEsScAtaLoG(PRopErTIeS propErtIes) throWs TesterDaTaSOuRceException {
        TRy {
            inputStreaM in = GetClass().getCLasS().getReSoUrcEasStrEam("TesteR-catalOG-env.xmL");
            Reader reAdER = ReadeRfactory.NEWXMlReAder(in);
            return readCATaLOg(reader);

        } catch (IoExcepTiON e) {
            THRow New testerDatasoUrceEXCeption("eRrOR REadINg catalog", e);
        }
    }

The Line:
InputStREam In = getCLaSs().gETClass().GetReSoURceasStream("tesTer-cAtalog-env.Xml");

is rETurning NUll when Run froM thE prOjecT UsInG mvN tESteR:TeSt (aS DefIned in thE pLuGin moJo) evEN THOugh i caN see That tHe resource is pResEnt oN The ClassPath. I'Ve trIeD the fOllowiNg
InpUtstream in = getClasS().getclass().getREsoUrCeASSTream("/TEster-cAtaLog-Env.xml");

aNd that aLSo rEtURNS nUll.
If I copy the resouRcE FIlE over to tHe plugIN rEsOUrce direCtOry And rUN, It worKs fiNE.
ULtimatelY what I'M TrYiNg to achIeVe is to HaVe mUltIple cONfig Files iN the projEcts rESources directoRY (ie tester-cataLOg-XXX.xML - wheRe xXx can be a new File CReatEd by THe UseR) That wHen a cOmMAnD Like mvn tester:test -DpRoCessCaTalog=Env2 is run the fiLe called teSTER-catalog-Env2.xML wILl be loaded.
Any iDeas oN what I'm doiNG wrong?
MaVen InFo
Apache maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
MavEN Home: C:\AppS\apAchE-maVen-3.0.4
jAVa Version: 1.6.0_35, vendor: sUN MicRoSystems inc.
java homE: C:\jAva\Jdk1.6.0_35\Jre
deFault locaLe: en_GB, plAtFoRm EnCodIng: Cp1252
os name: "winDoWs xP
---java
|   |   |   \---[B LAH}
|   |    ||  | \--- reso urces
|   |        tester-catalog-env. xml
|  |
| \ ---te st
|   \ --- ja va 
|      \-- -[BLAH] 

Within t hepl ugin I havet he  following  me thod:
    pu bli c Test er Pro c essCa tal og ge tTeste r Proces sCatalog( Pr o pertie s  proper t i es ) th rows TesterDataSo u rc e Exception {
      tr y  {          Input St reami n = get C la s s ( ).g e tClass().getR esourceAsSt r eam ("test er -ca t alog-e nv.xm l" ) ;
          Read er reader  = Rea d erFacto r y.newXm lReade r(i n); 
       r e tur n  r ead C ata log(read er ); 

     } c atch  (I OExc eptio n e) {
          t h row  newTeste rDat aS ource Except ion(" Er ror reading cat alog ", e);
     }   }
T he lin e:Inp utStrea m in =g etC la s s ( ). getClass().getReso ur c e As Stream(" tester - ca ta l og-env.x ml "); 

is r eturn ingn ul l when r un fro m  t he  projec tusingmv n t est er:te s t (a s defi ned in t he pl u gin mojo) even though I cans ee t ha t  the  re source is p rese n t on  the cl ass p ath.I'vetr i ed the following
Input St ream i n = g etClass().get Class().ge t R e sourceAs Stre a m( " /tester-catalo g-env .xml");

a n d that a lso r eturns n ull.
If I c opy theres our cefil e ov er to the plu g i n re so urce di rec tory an d r un,  it  wo rk s fine.
U ltimatel ywh at  I 'mtryin g  to achi ev e i stohavem ultipl e con figfi le s  in  the pr o je c t s re so ur cesdir ec tory(iet est er-cata log-xxx.x ml-  whe re  x xx canbe a new file  c reated byth e u ser) t h a t when a  command like mvn teste r :test - Dpr ocess Cata log=env2isrun th e f i le cal led te ster- ca tal o g -env2 . x ml  wi ll  be loaded . Any  idea son w hat I'm  doing wrong?
Mave n  In fo
Apache Mav en3.0. 4 (r 123 2 33 7 ; 2 01 2 -01 - 1 7 10:44:56+0200 )
Maven ho me :  C :\Apps\apa c he- ma ven-3.0 .4
Java  vers i on: 1.6 .0_35, ve ndor: Sun  M icro s y ste ms Inc.
Ja va home:  C:\java\ j dk1.6 . 0_ 35\jr e
D efault  l oca le: e n_GB,p lat formencodi ng : Cp12 52
OS  n ame: "wi ndows xp
---java
| _ |_  | _ \---[BLAH}
|__ |__ |
| _ | _ \---resources
|  _|  __       tester-catalog-env.xml
|   |
|   \---test
|__ ___ \---java
|   _    _ _\---[BLAH]

Within the plugin I have the following method:
__  public_TesterProcessCatalog getTesterProcessCatalog(Properties properties) throws TesterDataSourceException {
   _    try {
_  ___   _  InputStream in = getClass().getClass().getResourceAsStream("tester-catalog-env.xml");
_     _     Reader reader_= ReaderFactory.newXmlReader(in);
    _    _ _return readCatalog(reader);

   _  _ }_catch (IOException e)_{
     _  _   throw new TesterDataSourceException("Error_reading_catalog", e);
 ___ _  }
__ _}

The_line:
InputStream in = getClass().getClass().getResourceAsStream("tester-catalog-env.xml");

is returning null_when_run from the project using mvn tester:test_(as defined in the_plugin_mojo) even though I_can see that the resource_is present on the classpath. I've_tried the_following
InputStream in_= getClass().getClass().getResourceAsStream("/tester-catalog-env.xml");

and that also returns null.
If I copy the resource file_over to the plugin resource directory_and run, it works_fine.
Ultimately what_I'm_trying to achieve_is_to have_multiple config files in the projects resources_directory (ie_tester-catalog-xxx.xml - where xxx can be_a new file created_by_the user) that when a command_like mvn tester:test -DprocessCatalog=env2 is run_the file called tester-catalog-env2.xml will_be_loaded.
Any_ideas on what I'm doing_wrong?
Maven Info
Apache Maven 3.0.4 (r1232337; 2012-01-17_10:44:56+0200)
Maven home: C:\Apps\apache-maven-3.0.4
Java_version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home:_C:\java\jdk1.6.0_35\jre
Default_locale: en_GB, platform encoding: Cp1252
OS name:_"windows_xp