4

I want to unpack and copy the spring boot loader component in my war file. I am using maven dependency plugin for it. I am not sure about its correct group and artifact id. Maven complains about it. Here is the maven configuration which I am using:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-dependency-plugin</artifactId>
   <version>2.6</version>
   <executions>
      <execution>
         <id>unpack</id>
         <phase>prepare-package</phase>
         <goals>
            <goal>unpack</goal>
         </goals>
         <configuration>
            <artifactItems>
               <artifactItem>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-loader</artifactId>
                  <version>0.5.0.BUILD-SNAPSHOT</version>
                  <type>jar</type>
               </artifactItem>
            </artifactItems>
            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
            <remoteRepositories>central::default::http://repo.springsource.org/snapshot/</remoteRepositories>
         </configuration>
      </execution>
   </executions>
</plugin>

Thanks.

Update

I figured out the problem. It was looking into local nexus maven repository.

Anand Patel
  • 6,031
  • 11
  • 48
  • 67

2 Answers2

4

Add this repository in your pom.xml

<repository>
  <id>spring-milestones</id>
  <url>http://repo.springsource.org/libs-milestone/</url>
</repository>

And the dependancy will be like

 <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-loader</artifactId>
    <version>0.5.0.M6</version> <!-- 6 is the latest till yet -->
</dependency>
Saif Asif
  • 5,516
  • 3
  • 31
  • 48
  • I figured out the mistake. It is looking into local nexus maven repository. – Anand Patel Nov 27 '13 at 13:01
  • @SaifAsif what's the difference in using `` rather than `` for "spring boot" in the `pom.xml`? I am currently working on some "legacy code" containing a `` tag with a `spring-boot-starter-parent` (same ``) that now is not giving errors after adding the `` you mentioned. – TPPZ Feb 07 '14 at 16:25
  • To begin with, `dependency` and `parent` are completely different. I assume that you are working on a multi-module project ( or atleast your spring dependency is structured as such ). To dig further into the situation, I would suggest making a new post and ask your question with code and all so I can help in a better way – Saif Asif Feb 08 '14 at 15:17
0

Just chiming in even when this is a old question. Keep in mind for production do not use the snapshot builds, use the release builds instead. Snapshot builds may have known issues but the release builds are stable.

You can find the latest spring version at the Spring boot page.

randominstanceOfLivingThing
  • 16,873
  • 13
  • 49
  • 72