Results 1 to 5 of 5

Thread: Could not get the value for parameter schemaDirectory

  1. #1
    Join Date
    Apr 2010
    Posts
    11

    Question Could not get the value for parameter schemaDirectory

    I had to recover from a HD crash and now I'm finding that my projects don't compile anymore. I'll post the issues on two separate threads since they seem to be pretty different.

    Could not get the value for parameter schemaDirectory for plugin execution generate-compile (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.7.5:generate:generate-compile:generate-sources)


    Any ideas here? the schemaDirectory tag is right there. Maven accepts this perfectly well if I run command line (v2.2.1). I only see this error in STS, and I see it whether I am using the embedded Maven or point to the external 2.2.1 Maven. This worked fine with STS 2.9 before the HD crash.

    Here is the relevant portion of my POM:

    Code:
    
    <plugin>
    	<groupId>org.jvnet.jaxb2.maven2</groupId>
    	<artifactId>maven-jaxb2-plugin</artifactId>
    	<version>0.7.5</version>
    	<executions>
    		<execution>
    			<id>generate-compile</id>
    			<goals>
    				<goal>generate</goal>
    			</goals>
    		</execution>
    	</executions>
    	<configuration>
    		<schemaDirectory>${basedir}/src/main/expanded-schemas</schemaDirectory>
    		<bindingDirectory>${basedir}/src/main/resources/xjb/</bindingDirectory>
    		<generateDirectory>${basedir}/src/main/generated-sources</generateDirectory>
    		<schemaIncludes>
    			<include> <!-- (lots of these) -->  </include>
    		</schemaIncludes>
    		<debug>true</debug>
    		<extension>true</extension>
    	</configuration>
    </plugin>
    

  2. #2

    Default

    The "could not get the value for parameter" error seems to happen when m2e cannot resolve the artifact. Given your HD crash, it could be that your local .m2 repository is in a bad state.

    First thing I'd do is go to STS Preferences -> Maven -> User Settings and check that the Local Repository setting is pointing to your local m2 repository. You could try reindexing your repository. If that doesn't work you may need to delete it, or at minimum delete the subdirectory where the maven-jaxb2-plugin resides.
    Leo Dos Santos
    Committer, SpringSource Tool Suite

  3. #3
    Join Date
    Apr 2010
    Posts
    11

    Default

    Thanks for the suggestions.

    The HD crash was catastrophic - everything is completely fresh. The thing that is so very strange is that the error only happens in STS ... if I run maven command line there is no problem.

    I blew away my repository but now I'm in another problem - STS doesn't reliably download components. It will pull down the POM to the local repository but often not the jar, so I have to go through and manually pull down jars and put them in the repository.

    I am totally hating Maven with STS 2.9.1 ... I'm guessing I'm going to have to go back to 2.7 soon.

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,637

    Default

    Hi!

    I am sorry to hear that you are having such a hard time with STS and the Maven integration. I guess you are using STS 2.9.1 from the distribution, so with the Maven Eclipse bits and pieces already installed, right? Or did you downgrade to the old Maven Eclipse integration (0.12.x)? I am just asking to figure out what the problem with downloading the artifacts might be...

    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  5. #5
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,637

    Default

    Oh, and what happens if you run Maven from the command line to populate your local repository with the correct artifacts? Does that run better with regards to the downloads?

    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •