1

I have a Maven project with the following header in all files :

/*
 * Copyright © 2017 Maria Papadopoulou.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

I am trying to change it to :

/*
 * Copyright © 2017 Maria Papadopoulou.  All rights reserved.
 *
 */

or :

/*
 * Copyright © 2017 Maria Papadopoulou.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at ...
 */

but when I build the project, I get the following error :

Line does not match expected header line of '^ * This program and the accompanying materials are made available under the$'. [RegexpHeader]

How can I change it with no error?

Marievi
  • 4,951
  • 1
  • 16
  • 33
  • What exactly does produce this error? Maven? – J Fabian Meier Aug 04 '17 at 08:00
  • @JFMeier Yes, sorry I forgot to write it. It is produced when I build the project with `mvn clean install`. – Marievi Aug 04 '17 at 08:05
  • You certainly have something set up to validate the contents of the files. See that in your pom.xml and change the regex accordingly. – Tome Aug 04 '17 at 08:26
  • @Tome I have looked in my `pom.xml` files but cannot find anything. Actually they also have the same header. – Marievi Aug 04 '17 at 11:39
  • This looks like a *checkstyle* rule in fact (http://checkstyle.sourceforge.net/config_header.html#RegexpHeader). I guess you should be able to validate this based on the Maven error log lines before it fails. But you're right that at least the second header change should be validated by the regex. – Tome Aug 04 '17 at 11:48

0 Answers0