Commit a3cbfe24 by zhongmh

解决项目信息保存不对的bug

parent df6ecd2d
......@@ -49,10 +49,6 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
......
......@@ -30,14 +30,6 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private SystemFile systemFile;
/*@Bean
public UserDetailsService userDetailsService() {
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
//manager.createUser(User.withDefaultPasswordEncoder().username("user").password("99boliyuan").roles("root").build());
//logger.info("创建用户:user 密码:99boliyuan");
return manager;
}*/
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().mvcMatchers("/site-upload", "/update-developer")
......
......@@ -81,7 +81,7 @@ public class SiteUploadMojo extends AbstractMojo {
getLog().info("输入目录:" + inputDirectory);
String name = StringUtils.isEmpty(directory.getName()) ? project.getArtifactId() : directory.getName();
try {
writeProjectInfo(inputDirectory);
writeProjectInfo(name, inputDirectory);
//上传压缩文件
File outFile = compress(name, inputDirectory);
transport(name, outFile);
......@@ -208,7 +208,7 @@ public class SiteUploadMojo extends AbstractMojo {
*
* @param inputDirectory
*/
public void writeProjectInfo(File inputDirectory) throws IOException {
public void writeProjectInfo(String projectName, File inputDirectory) throws IOException {
File infoXml = new File(inputDirectory, "info.xml");
OutputFormat outputFormat = OutputFormat.createPrettyPrint();
outputFormat.setEncoding("UTF-8");
......@@ -223,7 +223,7 @@ public class SiteUploadMojo extends AbstractMojo {
projectElement.addAttribute("hostName", InetAddress.getLocalHost().getHostName());
//添加项目信息
Element artifactId = new DefaultElement("artifactId");
artifactId.setText(project.getArtifactId());
artifactId.setText(projectName);
//版本
Element version = new DefaultElement("version");
version.setText(project.getVersion());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment